Class OutputTypeDefinition

  • All Implemented Interfaces:
    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 required Transformer and apply if exists. If validate attribute is true then camel applies Validator as well. Type name consists of two parts, 'scheme' and 'name' connected with ':'. For Java type 'name' is a fully qualified class name. For example java: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 Detail

      • OutputTypeDefinition

        public OutputTypeDefinition()
    • Method Detail

      • getUrn

        public String getUrn()
        Get output type URN.
        Returns:
        output type URN
      • setUrn

        public void setUrn​(String urn)
        Set output type URN.
        Parameters:
        urn - output type URN
      • setJavaClass

        public void setJavaClass​(Class<?> clazz)
        Set output type via Java Class.
        Parameters:
        clazz - Java Class
      • getValidate

        public String getValidate()
        Get if validation is required for this output type.
        Returns:
        true if validate
      • setValidate

        public void setValidate​(String validate)
        Set if validation is required for this output type.
        Parameters:
        validate - true if validate
      • getShortName

        public String getShortName()
      • getLabel

        public String getLabel()