You can generate a spring component implementation from the Property view, canvas, or Problems view. The wizard steps you through the implementation.
Procedure
Choose an initial control and follow the relevant procedure.
Control
Procedure
Properties View
In the Validation Report area on the General tab of the component's Property View, click the
fix... link.
Select
Generate Spring Implementation.
Canvas
Right-click the component and select
Quick Fixes > Generate Spring Implementation.
Canvas
Right-click the component and select
Generate Spring Implementation.
Problems View
In the Problems view, right-click an error of the form
Component "ComponentName" is not configured and select
Quick Fixes.
In the Quick Fix dialog, click
Generate Spring Implementation.
Click
Finish.
The Create Spring Bean dialog displays.
Configure the project, source, and bean definition file details in the
Code Generation Details screen.
If the component has a service or reference, choose a data binding option and follow the appropriate procedure:
Data Binding Option
Procedure
Accept Defaults
A JAR containing XMLBeans data binding classes with the default options is generated.
Configure
Click
Next.
Configure the data binding type and Beans and interface JAR properties.
If the component has a reference and more than one service, click
.
Choose the bean to contain the
reference element, click
OK, and click
Next.
If the component has a property and more than one service, click
.
The Bean Selection dialog displays.
Choose the bean to contain the
property element, click
OK, and click
Next.
Click
Finish.
Note: When you add a reference or property to a Spring component and then generate the implementation, TIBCO Business Studio displays warnings about a referenced bean not being found in the Problems view. You can ignore the warning.
Result
The following objects are generated:
A Java plug-in project containing abstract and concrete implementation classes, interface, and data binding classes.
The
Spring bean XML configuration file. If the composite name is
compositeName and component name is
componentName, the bean XML configuration file is named
compositeName_componentName_beans.xml and is located in the plug-in project under the folder
config-compositeName_componentName.
A custom feature file that references the Java plug-in in the
Deployment Artifacts special folder in the SOA project.
Abstract and concrete implementation classes are also generated. If the implementation class is named
ImplClass, the abstract implementation class is named
AbstractImplClass. Additional code is generated based on the component elements as follows:
Service - An interface. If the port type is named
PortType, the interface is named
PortType. The clause
implementsPortType is added to the abstract class.
Reference - Field and accessor methods are added to the abstract class.
Property - Field and accessor methods are added to the abstract class.