Package org.apache.camel.model
Class OutputTypeDefinition
- java.lang.Object
-
- org.apache.camel.model.OptionalIdentifiedDefinition<OutputTypeDefinition>
-
- org.apache.camel.model.OutputTypeDefinition
-
- All Implemented Interfaces:
org.apache.camel.CamelContextAware,org.apache.camel.LineNumberAware,org.apache.camel.NamedNode,org.apache.camel.spi.HasId,org.apache.camel.spi.IdAware
@Metadata(label="configuration") public class OutputTypeDefinition extends OptionalIdentifiedDefinition<OutputTypeDefinition>
Set the expected data type of the output message. If the actual message type is different at runtime, camel look for a requiredTransformerand apply if exists. If validate attribute is true then camel appliesValidatoras 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 XML-Java transformation.
-
-
Constructor Summary
Constructors Constructor Description OutputTypeDefinition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetLabel()StringgetShortName()StringgetUrn()StringgetValidate()OutputTypeDefinitionjavaClass(Class<?> clazz)voidsetJavaClass(Class<?> clazz)Set output type via Java Class.voidsetUrn(String urn)Set output type URN.voidsetValidate(String validate)Whether if validation is required for this output type.StringtoString()OutputTypeDefinitionurn(String urn)OutputTypeDefinitionvalidate(boolean validate)-
Methods inherited from class org.apache.camel.model.OptionalIdentifiedDefinition
description, description, getCamelContext, getCustomId, getDescription, getDescriptionText, getId, getLineNumber, getLocation, getParent, hasCustomIdAssigned, id, idOrCreate, setCamelContext, setCustomId, setDescription, setGeneratedId, setId, setLineNumber, setLocation
-
-
-
-
Method Detail
-
urn
public OutputTypeDefinition urn(String urn)
-
javaClass
public OutputTypeDefinition javaClass(Class<?> clazz)
-
validate
public OutputTypeDefinition validate(boolean validate)
-
getUrn
public String getUrn()
-
setUrn
public void setUrn(String urn)
Set output type URN.
-
setJavaClass
public void setJavaClass(Class<?> clazz)
Set output type via Java Class.
-
getValidate
public String getValidate()
-
setValidate
public void setValidate(String validate)
Whether if validation is required for this output type.
-
getShortName
public String getShortName()
-
getLabel
public String getLabel()
-
-