How To Use Generators - lbroudoux/eip-designer GitHub Wiki
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.feature
feature), - Spring Integration support provided by the EIP Designer extension for Spring Integration (
com.github.lbroudoux.dsl.eip.spring.feature
feature) - JBoss SwitchYard support provided by the EIP Designer extension for Switchyard (
com.github.lbroudoux.dsl.eip.switchyard.feature
feature)
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.
Apache Camel
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.
Launcher
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
.
Switches and properties
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 |
Spring Integration
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.
Launcher
For launching generator just right-click onto your EIP Model and within the EIP Generation
menu, pick the Generate Spring
sub-menu.
JBoss SwitchYard
This generator bootstraps a full SwitchYard/SCA project from your EIP Model. Such a bootstrap contains:
- SwitchYard/SCA descriptro
switchyard.xml
with declaration of anyComponents
,Services
andReferences
used, - Camel routes for each Route defined into your EIP Model (delegated to Apache Camel generator).
Launcher
For launching generator just right-click onto your EIP Model and within the EIP Generation
menu, pick the Generate Switchyard
sub-menu.
Switches and properties
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.