Generating a Spring Component Implementation

You can generate a spring component implementation from the Property view, canvas, or Problems view. The wizard steps you through the implementation.

Procedure

  1. Choose an initial control and follow the relevant procedure.
    Control Procedure
    Properties View
    1. In the Validation Report area on the General tab of the component's Property View, click the fix... link.
    2. Select Generate Spring Implementation.
    Canvas
    1. Right-click the component and select Quick Fixes > Generate Spring Implementation.
    Canvas
    1. Right-click the component and select Generate Spring Implementation.
    Problems View
    1. In the Problems view, right-click an error of the form Component "ComponentName" is not configured and select Quick Fixes.
    2. In the Quick Fix dialog, click Generate Spring Implementation.
    3. Click Finish.
    The Create Spring Bean dialog displays.
  2. Configure the project, source, and bean definition file details in the Code Generation Details screen.
  3. 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
    1. Click Next.
    2. Configure the data binding type and Beans and interface JAR properties.
  4. If the component has a reference and more than one service, click .
  5. Choose the bean to contain the reference element, click OK, and click Next.
  6. If the component has a property and more than one service, click .
    The Bean Selection dialog displays.
  7. Choose the bean to contain the property element, click OK, and click Next.
  8. 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 implements PortType 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.