Adapter Development Kit 6.5 | webMethods Adapter Development Kit Documentation | webMethods Adapter Development Kit Installation and User’s Documentation | Adapter Services | The Metadata Model for Adapter Services | Resource Domains
 
Resource Domains
 
Registering Resource Domains
Associating Metadata Parameters with Resource Domains
Populating Resource Domains with Values
Resource Domain Lookups
Adapter Check Value Callbacks
A resource domain defines the domain of valid values for metadata parameters, based on rules and/or data that are specific to the adapter resource. Resource domains can have properties that affect the behavior of the resource domain, and associations with metadata parameters.
You can use resource domain values to:
*Assign default values for parameters.
*Enable the adapter to look up parameter values in the adapter resource.
*Enable adapter users to supply their own parameter values, and enable the adapter to validate these values.
*Disable parameters, based on specified sets of values in other parameters.
A common use of resource domain values is to create a drop-down list of data values for a parameter, much like the WmDescriptor.setValidValues method in connection factories. However, resource domain values differ from the setValidValues lists in two important ways:
*Resource domain values can interact with the Adapter Service Editor.
As values in one parameter change, callbacks are made to the adapter to update resource domain values. For example, if parameter A contains a list of database table names, and parameter B contains a list of column names, then when a table is selected in parameter A, the resource domain values used in parameter B can be updated to reflect the columns from the table selected in parameter A.
*Resource domain values can be retrieved directly from the adapter resource, using a WmManagedConnection instance.
To create a resource domain, you perform the following tasks:
1. Register the resource domain and its properties in your WmManagedConnection implementation (see Registering Resource Domains).
2. Associate the adapter's metadata parameters with the resource domain (see Associating Metadata Parameters with Resource Domains).
3. Populate the resource domain with values in your WmManagedConnection implementation (see Populating Resource Domains with Values).