Adapter Development Kit 9.12 | webMethods Adapter Development Kit Documentation | webMethods Adapter Development Kit Installation and User’s Documentation | Adapter Services | Metadata Model for Adapter Services | Metadata Parameter Groups, FieldMaps and Tuples
 
Metadata Parameter Groups, FieldMaps and Tuples
Groups
Call the WmTemplateDescriptor.createGroup method to perform the following:
1. Organize parameters into different tabs.
2. Specify the order in which the parameters appear.
FieldMaps
Call the WmTemplateDescriptor.createFieldMap method to organize various sequence parameters (within the same group) into a single table widget in the adapter service editor. The full signature for createFieldMap is:
void createFieldMap(String[] members,
boolean variable,
boolean fillAll);
The following table describes the parameters of WmTemplateDescriptor.createFieldMap:
Parameter Name
Description
members
Specifies a list of the parameter names that make up the field map. A field map can contain one or more member parameters, but a parameter must not be a member of more than one field map.
*The members argument is not an ordered list.
*The members argument has no impact on the order in which the columns appear in a field map.
*The order of the columns in a field map is dictated entirely by the order in which the parameters appear in the group.
*The first member to appear in the group list appears in the first column of the field map.
*The remaining columns follow the order in which they appear in the group.
*If there is more than one field map in a group, then the relative positions of the first column parameters in the group dictates the order in which the field map tables appear.
Note:
Using the parameters from different groups in a field map results in an exception.
variable
Enables the users of the adapter to add rows to the table. Possible values are:
*true. The values are not populated by default. However the users of the adapter must click on the add row icon to populate each value row in the table.
*false. The values are populated by default, and the add row icon is disabled, thereby disabling the users of the adapter from adding rows to the table.
In this case, the field map is considered to be a variable field map because the number of fields that appear in the adapter service editor may vary.
By default, each time the user of the adapter adds a row to the field map, each column is populated based on the associated parameter's data type and the contents of the associated resource domain. Typically, the column contains a dropdown list of string values from the resource domain. In other cases, either a check box appears (for Boolean parameters) or the column is empty.
fillAll
Populates the table with all the available data. Possible values are:
*true. Populates the table with all the available data.
*false. The user of the adapter must add the rows in the table.
*If the fillAll argument is true and the variable argument is false, then :
*The table is expanded to contain one row for each value provided for the parameter in the first column of the field map.
*The values for this first column are provided by the associated resource domain, and cannot be changed or manipulated by the user. This is true even when the associated resource domain's setComplete method is false; the users of the adapter cannot directly update this column. The users of the adapter can still make changes to other parameters that might impact the content of the resource domain of the first column's parameter. For more information about dependencies, see Associating Metadata Parameters with Resource Domains.
*The remaining columns contain the same value and user interface widget that would be employed if the user manually inserted the row.
Note: 
*If variable is false, then fillAll is assumed to be true, regardless of the value passed in the argument.
*Do not set both fillAll and variable to true; the resulting behavior is unpredictable.
Tuples
The WmTemplateDescriptor.createTuple method is an another grouping mechanism that you can use to modify:
*The behavior of a resource domain lookup.
*How the resource domain values are applied to parameters in the tuple.
Members of a tuple are linked when:
*The resource domain values are retrieved.
*The values are updated on the user interface.
When the adapter service editor performs a resource domain lookup for a parameter in a tuple, it expects the response array to contain a ResourceDomainValues object for each parameter in the tuple. Thus, changes resulting from the resource domain lookup is applied simultaneously to each parameter in the tuple. This mechanism is particularly useful when two or more sequence parameters in a field map are closely related. For example, when one parameter contains a column name and the other parameter contains the column format.
Requirements for reliable tuple operation are as follows:
*The parameters of a tuple must be sequence parameters of the same field map. If parameters are in separate field maps, the resource domain lookup functions properly, but the user interface characteristics do not function as described below.
In the user interface, the first parameter in a tuple serves as the primary parameter, and all other parameters are secondary parameters. In the adapter service editor:
*Users of the adapter can directly manipulate the primary parameter, but not secondary parameters.
*The secondary parameter contains the value from its resource domain that corresponds to the value selected from the primary parameter. For example, if the fourth member of the primary parameter's resource domain is selected, then the fourth member of the secondary parameter's resource domain appears in the secondary parameter's column.
*If a secondary parameter value is not specified in the position corresponding to the primary parameter's value, then the secondary parameter is left blank in that row.
*A tuple must be declared (in the code) before a setResourceDomain method.
*The first parameter of a tuple must be assigned to a resource domain before any other member of the tuple.
*Each parameter of a tuple must have the same parameter dependencies listed in the setResourceDomain call that you used to assign the metadata parameters of the adapter service to a resource domain.
*For each ResourceDomainValues object returned in the lookup, the setComplete method must be true in which the users of the adapter cannot supply parameter values.
*The first parameter in the tuple must appear first in its group.
For more information, see Associating Metadata Parameters with Resource Domains, and Populating Resource Domains with Values.