You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
453 B
17 lines
453 B
package camelinaction;
|
|
|
|
import org.apache.camel.Exchange;
|
|
import org.apache.camel.language.XPath;
|
|
|
|
public class ValidatorBean {
|
|
|
|
public void validate(@XPath("/order/@name") String partName, Exchange exchange) {
|
|
// only motors are valid parts in this simple test bean
|
|
if ("motor".equals(partName)) {
|
|
exchange.getOut().setBody("Valid");
|
|
} else {
|
|
exchange.getOut().setBody("Invalid");
|
|
}
|
|
}
|
|
|
|
}
|