About importing JavaBeans with the Connector and Metadata accelerator |
Importing a JavaBean with the Connector and Metadata Accelerator helps to implement the Pega 7 Platform Java Pages feature. This feature enables you to use rules and the clipboard to interact with Java objects in the same way that you use them to interact with Pega 7 Platform classes and properties. The accelerator creates class and Java properties (properties of mode Java Property
or Java Property List
) that reflect the data model described in a Java class file.
You start the accelerator and identify the source Java class. The accelerator imports the Java class through introspection and then generates the appropriate classes and properties. It also creates Java wrapper classes that implement the get and set methods from the Java class through the PRObjectWrapper
interface of the PublicAPI Clipboard class. The Java wrapper classes provide you with a standard way to access Java objects as clipboard pages from within the Pega 7 Platform.
For more information about using the Java Pages feature, see the PDN document Working with the Java Pages Feature. For information about the PRObjectWrapper
interface, see the PublicAPI JavaDocs topics.
Before you begin, complete the following steps:
Pega 7 Platform uses the JavaBeans coding standard to determine the identities of properties in a Java class. The getter and setter methods for a property must begin with get and set.
The JavaBeans coding standard defines an indexed property as one that has an array value. In Pega 7 Platform, that definition includes java.util.List
and any of its implementing classes (java.util.ArrayList
, for example). However, because list properties are not typed, the source Java class must provide an indexed get
method for the property so the data type can be determined. Without an indexed get
method for the property, the Pega 7 Platform does not interpret the property as a list property.
If the source Java class implements the Serializable
interface, the Pega 7 Platform can persist instances of the Java class with other clipboard data. For example, it can save information from the Java object with work items.
To start the accelerator, select Designer Studio> Integration > Connectors > Connector & Metadata wizard. When the accelerator starts you can click the help button () on any form for help about that form.