@Metadata(label="validation") public abstract class ValidatorDefinition extends Object
Represents a Validator
which declaratively validates message content
according to the input type declared by InputTypeDefinition
and/or
output type declared by OutputTypeDefinition
.
If you specify type='xml:ABC', the validator will be picked up when current
message type is 'xml:ABC'. If you specify type='json', then it will be picked
up for all of json validation. Validator
InputTypeDefinition
OutputTypeDefinition
Constructor and Description |
---|
ValidatorDefinition() |
Modifier and Type | Method and Description |
---|---|
String |
getType() |
void |
setType(Class<?> clazz)
Set the data type using Java class.
|
void |
setType(String type)
Set the data type name.
|
public ValidatorDefinition()
public void setType(String type)
type
- data type nameApache Camel