The logic for creating and displaying CPS is inbuilt in the Fiorano framework. User can specify the properties that have to be displayed in the CPS (Figure 2) by specifying JMX descriptors (Figure 3) in the java files containing the configuration details. Such java files are java bean type classes which have getter and setter for all the fields and an empty constructor.
To add a new property that should be shown 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 has 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 following table.
JMX Descriptor | Description | Default | Example |
---|---|---|---|
propertyEditor | JMX descriptor to specify the editor class which should be launched when … is clicked in the CPS. By default basic editors are shown for basic return type |
| @ jmx.descriptor name="propertyEditor" value="com.fiorano.adapter.jca.db.editors.SQLConfigurationEditor" |
Expert | JMX descriptorTo make a specific Property Advanced so that its not visible unless 'expert' view is switched on in the BCDK | false | @jmx.descriptor name="expert" value="true" |
displayName | By default, in the GUI the display name for a property is introspected from the class. |
| @jmx.descriptor name="displayName" value="My Display Name" |
Optional | To notify the editor that this property is optional. Optional property names are rendered in new Color(0, 128, 0) in CPS. | false | @jmx.descriptor name="optional" value="true" |
Password | To inform that this property is password and render as "*****" | false | @jmx.descriptor name="password" value="true" |
Index | Define the order in which properties appear in Studio. | – | @jmx.descriptor name="index" value="1" |
legalValues | If the property can take only a value from a list of some permissible values, then same should be provided as a JMX descriptor. The values must be provided as comma separated list. |
| @jmx.descriptor name="legalValues" value="Value1,Value2" |
canEditAsText | if this property is not specified default value is false if legalValues are present else true | false | @jmx.descriptor name="canEditAsText" value="true" |
Refresh | If it is 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 some other properties.
|
| @jmx.descriptor name="hidesProperties" value="true" |
propertySets | These descriptors are used to categorize or group properties under different propertySets. Below figure shows the use propertySets and propertySetIndex descriptors to define the propertySets and group properties under propertySets respectively. |
|
|
warningMessage | A warning Dialog pops up whenever the value of the property changes. The Message to be shown in the warning dialog should be set using value |
| @jmx.descriptor name="warningMessage" value="The Message comes here" |
defaultValue | The default value which should be set for the property when "Reset" is clicked (Comes up on right-clicking the property) |
| @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", "none" in the combo box. If this property is set to true, "none" will not be shown | false | @jmx.descriptor name="primitive" value="true" |