Interface ModelToJavaDumper
public interface ModelToJavaDumper
SPI that serialises Camel route model definitions to their Java DSL representation (source code).
The implementation is provided by
camel-java-io and discovered via the service key FACTORY. Callers
supply a CamelContext and a NamedNode route definition; the dumper
returns a formatted Java source string. The overloaded
dumpModelAsJava
variant adds control over placeholder resolution and auto-generated ID inclusion. The primary consumers are
camel-jbang export commands that convert running integrations into a Java DSL project.
See Camel CLI (camel-jbang) for the export commands
that use this dumper.- Since:
- 4.21
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondumpModelAsJava(CamelContext context, NamedNode definition) Dumps the definition as Java DSLdumpModelAsJava(CamelContext context, NamedNode definition, boolean resolvePlaceholders, boolean generatedIds) Dumps the definition as Java DSL
-
Field Details
-
FACTORY
-
-
Method Details
-
dumpModelAsJava
Dumps the definition as Java DSL -
dumpModelAsJava
String dumpModelAsJava(CamelContext context, NamedNode definition, boolean resolvePlaceholders, boolean generatedIds) throws Exception Dumps the definition as Java DSL- Parameters:
context- the CamelContextdefinition- the definition, such as aNamedNoderesolvePlaceholders- whether to resolve property placeholders in the dumped Java DSLgeneratedIds- whether to include auto generated IDs- Returns:
- the output in Java DSL (is formatted)
- Throws:
Exception- is throw if error marshalling to Java DSL
-