Enum Class YamlDeserializationMode

java.lang.Object
java.lang.Enum<YamlDeserializationMode>
org.apache.camel.dsl.yaml.common.YamlDeserializationMode
All Implemented Interfaces:
Serializable, Comparable<YamlDeserializationMode>, Constable

public enum YamlDeserializationMode extends Enum<YamlDeserializationMode>
  • Enum Constant Details

    • CLASSIC

      public static final YamlDeserializationMode CLASSIC
      This option configure the deserialization engine to strictly respect the model definition.

      As example, a Split step is expected to have it's own steps to process the result of the split.
       
       - from:
           uri: "direct:a"
           steps:
             - split:
                  tokenize: \n"
                steps:
                  - log: "${body}"
       
       
    • FLOW

      public static final YamlDeserializationMode FLOW
      Mimics the Java Dsl.

      When the deserializer is configured to use this mode, a route can be defined using a syntax that is closed to the Java DSL, as example, the following Java route:
       
       from("direct:a")
           .split().tokenize("\n"))
           .log("${body}");
       
       
      Can be represented by the following YAML:
       
       - from:
           uri: "direct:a"
           steps:
             - split:
                  tokenize: \n"
             - log: "${body}"
       
       
      As you may have noticed, there's no need to define the split's specific steps as the subsequent log processor is automatically added to the step's outputs.

      See https://issues.apache.org/jira/browse/CAMEL-16504
  • Method Details

    • values

      public static YamlDeserializationMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static YamlDeserializationMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null