-
Notifications
You must be signed in to change notification settings - Fork 12
How To Use Generators
Generators are provided within features dedicated to specific generation target. For now, we have :
-
Apache Camel support provided by the EIP Designer extension for Apache Camel (
com.github.lbroudoux.dsl.eip.camel.featurefeature), -
Spring Integration support provided by the EIP Designer extension for Spring Integration (
com.github.lbroudoux.dsl.eip.spring.featurefeature) -
JBoss SwitchYard support provided by the EIP Designer extension for Switchyard (
com.github.lbroudoux.dsl.eip.switchyard.featurefeature)
Obviously, you should have installed the corresponding feature to enable generator ;-)
Generators may offer customization through the usage of switches or generation properties. Those properties should be put into a simple file with .properties extension, placed within the same directory as your model (your .eip model file). You may choose to name generation.properties for example.
This generator allows you to generate a Camel route for each Route defined within your EIP Model. Camel route may be generated using the Java or the Xml DSL offered by Camel.
For launching generator just right-click onto your EIP Model and within the EIP Generation menu, choose between Generate Camel Xml or Generate Camel Java.
| Property | Description |
|---|---|
camel.xml.generation_target |
Generation target for your Xml DSL routes. Pick a value from BASE_SPRING for the generic camelContext syntax, BLUEPRINT for the OSGi compliant syntax or SWITCHYARD when using Camel as an SCA/Switchyard implementation component. Default is BASE_SPRING
|
camel.java.package_name |
The Java package name where your Camel Java routes will be generated. Default is com.example.mydomain.camel.routes
|
This generator allows you to generate a Spring Integration context file for each Route defined within your EIP Model. This generator does not support any switch for now.
For launching generator just right-click onto your EIP Model and within the EIP Generation menu, pick the Generate Spring sub-menu.
This generator bootstraps a full SwitchYard/SCA project from your EIP Model. Such a bootstrap contains:
- SwitchYard/SCA descriptro
switchyard.xmlwith declaration of anyComponents,ServicesandReferencesused, - Camel routes for each Route defined into your EIP Model (delegated to Apache Camel generator).
For launching generator just right-click onto your EIP Model and within the EIP Generation menu, pick the Generate Switchyard sub-menu.
| Property | Description |
|---|---|
switchyard.composite_name |
The name of the SCA composite to generate a descriptor for. Default is switchyard-mydomain
|
switchyard.composite_namespace |
The namespace of the SCA composite to generate a descriptor for. Do not forget versioning information! Default is urn:com.example.switchyard:mydomain:1.0
|
switchyard.component_impl |
Choose between CAMEL_JAVA for generating routes using Java DSL and CAMEL_XML for Xml DSL. Default is CAMEL_XML
|
Because route generation is delegated to Camel generator, those generator own switches and properties may co-exist into your properties file.