Package org.apache.camel.builder
Class ValidatorBuilder
- java.lang.Object
-
- org.apache.camel.builder.ValidatorBuilder
-
-
Constructor Summary
Constructors Constructor Description ValidatorBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(org.apache.camel.CamelContext camelContext)Configures a new Validator according to the configurations built on this builder and register it into the givenCamelContext.ValidatorBuildertype(Class<?> type)Set the data type using Java class.ValidatorBuildertype(String type)Set the data type name.ValidatorBuilderwithBean(String ref)Set the Java Bean name to be used for customValidator.ValidatorBuilderwithExpression(org.apache.camel.Expression expression)Set theExpressionto be used for the predicateValidator.ValidatorBuilderwithExpression(org.apache.camel.Predicate predicate)Set thePredicateto be used for the predicateValidator.ValidatorBuilderwithJava(Class<? extends org.apache.camel.spi.Validator> clazz)Set the JavaClassrepresents a customValidatorimplementation class.ValidatorBuilderwithUri(String uri)Set the URI to be used for the endpointValidator.
-
-
-
Method Detail
-
type
public ValidatorBuilder type(String type)
Set the data type name. If you specify 'xml:XYZ', the validator will be picked up if source type is 'xml:XYZ'. If you specify just 'xml', the validator matches with all of 'xml' source type like 'xml:ABC' or 'xml:DEF'.- Parameters:
type- 'from' data type name
-
type
public ValidatorBuilder type(Class<?> type)
Set the data type using Java class.- Parameters:
type- Java class represents data type
-
withUri
public ValidatorBuilder withUri(String uri)
Set the URI to be used for the endpointValidator.- Parameters:
uri- endpoint URI
-
withExpression
public ValidatorBuilder withExpression(@AsPredicate org.apache.camel.Expression expression)
Set theExpressionto be used for the predicateValidator.- Parameters:
expression- validation expression
-
withExpression
public ValidatorBuilder withExpression(@AsPredicate org.apache.camel.Predicate predicate)
Set thePredicateto be used for the predicateValidator.- Parameters:
predicate- validation predicate
-
withJava
public ValidatorBuilder withJava(Class<? extends org.apache.camel.spi.Validator> clazz)
Set the JavaClassrepresents a customValidatorimplementation class.- Parameters:
clazz-Classobject represents custom validator implementation- See Also:
CustomValidatorDefinition
-
withBean
public ValidatorBuilder withBean(String ref)
Set the Java Bean name to be used for customValidator.- Parameters:
ref- bean name for the customValidator- See Also:
CustomValidatorDefinition
-
configure
public void configure(org.apache.camel.CamelContext camelContext)
Configures a new Validator according to the configurations built on this builder and register it into the givenCamelContext.- Parameters:
camelContext- the given CamelContext
-
-