Class LwModelToYAMLDumper

java.lang.Object
org.apache.camel.yaml.LwModelToYAMLDumper
All Implemented Interfaces:
org.apache.camel.spi.ModelToYAMLDumper

@JdkService("modelyaml-dumper") public class LwModelToYAMLDumper extends Object implements org.apache.camel.spi.ModelToYAMLDumper
Lightweight ModelToYAMLDumper based on the generated ModelWriter.
  • Constructor Details

    • LwModelToYAMLDumper

      public LwModelToYAMLDumper()
  • Method Details

    • dumpModelAsYaml

      public String dumpModelAsYaml(org.apache.camel.CamelContext context, org.apache.camel.NamedNode definition) throws Exception
      Specified by:
      dumpModelAsYaml in interface org.apache.camel.spi.ModelToYAMLDumper
      Throws:
      Exception
    • dumpModelAsYaml

      public String dumpModelAsYaml(org.apache.camel.CamelContext context, org.apache.camel.NamedNode definition, boolean resolvePlaceholders, boolean uriAsParameters, boolean generatedIds, boolean sourceLocation) throws Exception
      Specified by:
      dumpModelAsYaml in interface org.apache.camel.spi.ModelToYAMLDumper
      Throws:
      Exception
    • dumpBeansAsYaml

      public String dumpBeansAsYaml(org.apache.camel.CamelContext context, List<Object> beans) throws Exception
      Specified by:
      dumpBeansAsYaml in interface org.apache.camel.spi.ModelToYAMLDumper
      Throws:
      Exception
    • dumpDataFormatsAsYaml

      public String dumpDataFormatsAsYaml(org.apache.camel.CamelContext context, Map<String,Object> dataFormats) throws Exception
      Dumps the global data formats as YAML
      Specified by:
      dumpDataFormatsAsYaml in interface org.apache.camel.spi.ModelToYAMLDumper
      Parameters:
      context - the CamelContext
      dataFormats - list of data formats (DataFormatDefinition)
      Returns:
      the output in YAML (is formatted)
      Throws:
      Exception - is throw if error marshalling to YAML