The WmTemplateDescriptor Interface
The WmTemplateDescriptor interface extends the WmDescriptor interface (which is described in
The WmDescriptor Interface). Like WmDescriptor, WmTemplateDescriptor controls how metadata parameters are displayed, and defines rules for data entry. To populate WmTemplateDescriptor, you include a fillWmTemplateDescriptor method in your adapter service.
Important:
Do not call the base class version of the method (by calling super()).
WmTemplateDescriptor introduces new methods and concepts, which are described in
The WmTemplateDescriptor Methods. In addition, it modifies the behavior of some of the methods inherited from WmDescriptor, as described below:
createGroup
Specifies the order in which parameters should appear in Designer. Unlike with connections, you can create multiple groups for adapter services. Each group will correspond to a tab in the Adapter Service Editor, with the group name becoming the key from which its display name is identified. Each group has a resource bundle entry that provides the display name shown on the screen. Group names are only displayed if you do not provide a display name in your resource bundle.
Parameters can be assigned to only one group. If some or all of a service's metadata parameters are not assigned to a group, a default group is created and they are assigned to it. This is true even if the parameter is hidden. Each group may have a display name and a help URL specified in the resource bundle.
setValidValues
Use the resource domain facilities (recommended) instead of this method. For more information, see
Resource Domains.
setPassword
Displays asterisks when adapter users enter passwords.
Note:
The Adapter Service Editor does not support the automated password confirmation facilities described for connections.
setDescriptions
Searches the resource bundle for display names, descriptions, help URLs for the service, metadata parameters, and any groups that have been created at the point setDescriptions is called. Since you normally want group display fields to be loaded from the resource bundle, you typically call setDescriptions at the end of the fillWmTemplateDescriptor implementation.
setHidden
Designates properties as hidden. A hidden property is not displayed in the Adapter Service Editor.
Note:
Some of these methods have implicit order requirements because the methods build on activities performed in previous method calls (see
The WmTemplateDescriptor Methods).
By default, the Adapter Service Editor displays each metadata parameter in its own widget, based on the parameter's data type. These widgets include:
Widget | Data Type |
Text box | String parameter |
Table widget | Array |
Check box | Boolean |
A text box with scrollable values | Numeric |
Adapter Service Editor: an adapter service