The logic for creating and displaying CPS is inbuilt in the Fiorano framework. A user can specify the properties that have to be displayed in the CPS (Figure 2) by specifying the JMX descriptors (Figure 3) in the java files containing configuration details. Such java files are java bean type classes which have getter and setter for all the fields as well as an empty constructor.
To add a new property to be displayed in the CPS
- Add a getter and setter defined for the property.
- Add jmx.managed-attribute descriptors above the method.
- Add other jmx descriptors describing how the property is to be rendered or handled in the CPS.
Figure 1: CPS containing My Property attribute required for component configuration
Figure 2: Java file showing the JMX descriptors for the property
All the JMX descriptors that can be added on the components getters are shown in the table below.
JMX Descriptor | Description | Default | Example |
---|---|---|---|
propertyEditor | JMX descriptor to specify the editor class to be launched when the ellipsis button is clicked in the CPS. By default basic editors are shown for the basic return type. |
| @ jmx.descriptor name="propertyEditor" value="com.fiorano.adapter.jca.db.editors.SQLConfigurationEditor" |
Expert | To make a specific Property Advanced so that its not visible unless the 'expert' view is switched on in the BCDK | false | @jmx.descriptor name="expert" value="true" |
displayName | By default, the name for a property is introspected from the class. |
| @jmx.descriptor name="displayName" value="My Display Name" |
Optional | To notify the editor that a property is optional. Optional property names are rendered in new Color (0, 128, 0) in the CPS. | false | @jmx.descriptor name="optional" value="true" |
Password | To inform that this property has password, it is rendered as "*****" | false | @jmx.descriptor name="password" value="true" |
Index | Define the order in which properties appear in the Studio.
| – | @jmx.descriptor name="index" value="1" |
legalValues | If a property can take only one value from a list of some permissible values, then that same value should be provided as a JMX descriptor. The values must be provided as comma separated lists. |
| @jmx.descriptor name="legalValues" value="Value1,Value2" |
canEditAsText | If this property is not specified, default value is false if legalValues are present and else true if the property has legal values If this property is true, then an editable combo box is displayed. | false | @jmx.descriptor name="canEditAsText" value="true" |
Refresh | If set to true for an attribute then all the attributes of the MBean are refreshed when the value changes | false | @jmx.descriptor name="refresh" value="true" |
hidesProperties | JMX descriptor to indicate that change in the value of this attribute hides certain other properties.
|
| @jmx.descriptor name="hidesProperties" value="true" |
propertySets | These descriptors are used to categorize or group properties under different propertySets. The figure below shows the use propertySets and propertySetIndex descriptors to define the propertySets and group properties under propertySets respectively. |
|
|
warningMessage | A warning Dialog box is displayed when the value of the property changes. The Message to be shown in the warning dialog should be set using a value. |
| @jmx.descriptor name="warningMessage" value="The Message comes here" |
defaultValue | The default value to be set for the property when "Reset" is clicked (right-click the property to set the default value) |
| @jmx.descriptor name="defaultValue" value="10" |
minValue | Minimum value acceptable for the property |
| @jmx.descriptor name="minValue" value="0" |
maxValue | Maximum value acceptable for the property |
| @jmx.descriptor name="maxValue" value="1000" |
primitive | Used for Boolean properties, By Default a property specified Boolean shows "yes", "no", and "none" in the box displayed. If this property is set to true, "none" will not be shown | false | @jmx.descriptor name="primitive" value="true" |