Package org.apache.camel.model
Class InputTypeDefinition
- java.lang.Object
-
- org.apache.camel.model.OptionalIdentifiedDefinition<InputTypeDefinition>
-
- org.apache.camel.model.InputTypeDefinition
-
- All Implemented Interfaces:
org.apache.camel.NamedNode
,org.apache.camel.spi.HasId
,org.apache.camel.spi.IdAware
@Metadata(label="configuration") public class InputTypeDefinition extends OptionalIdentifiedDefinition<InputTypeDefinition>
Set the expected data type of the input message. If the actual message type is different at runtime, camel look for a requiredTransformer
and apply if exists. If validate attribute is true then camel appliesValidator
as well. Type name consists of two parts, 'scheme' and 'name' connected with ':'. For Java type 'name' is a fully qualified class name. For examplejava:java.lang.String
,json:ABCOrder
. It's also possible to specify only scheme part, so that it works like a wildcard. If only 'xml' is specified, all the XML message matches. It's handy to add only one transformer/validator for all the transformation from/to XML.
-
-
Constructor Summary
Constructors Constructor Description InputTypeDefinition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getLabel()
String
getShortName()
String
getUrn()
Get input type URN.String
getValidate()
Get if validation is required for this input type.InputTypeDefinition
javaClass(Class<?> clazz)
void
setJavaClass(Class<?> clazz)
Set input type via Java Class.void
setUrn(String urn)
Set input type URN.void
setValidate(String validate)
Set if validation is required for this input type.String
toString()
InputTypeDefinition
urn(String urn)
InputTypeDefinition
validate(boolean validate)
-
Methods inherited from class org.apache.camel.model.OptionalIdentifiedDefinition
description, description, getCustomId, getDescription, getDescriptionText, getId, getParent, hasCustomIdAssigned, id, idOrCreate, setCustomId, setDescription, setGeneratedId, setId
-
-
-
-
Method Detail
-
urn
public InputTypeDefinition urn(String urn)
-
javaClass
public InputTypeDefinition javaClass(Class<?> clazz)
-
validate
public InputTypeDefinition validate(boolean validate)
-
getUrn
public String getUrn()
Get input type URN.- Returns:
- input type URN
-
setUrn
public void setUrn(String urn)
Set input type URN.- Parameters:
urn
- input type URN
-
setJavaClass
public void setJavaClass(Class<?> clazz)
Set input type via Java Class.- Parameters:
clazz
- Java Class
-
getValidate
public String getValidate()
Get if validation is required for this input type.- Returns:
- true if validate
-
setValidate
public void setValidate(String validate)
Set if validation is required for this input type.- Parameters:
validate
- true if validate
-
getShortName
public String getShortName()
-
getLabel
public String getLabel()
-
-