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 | Registering Resource Domains
 
Registering Resource Domains
You register resource domains in your WmManagedConnection implementation using the WmManagedConnection.registerResourceDomain method.This method has a single argument of the WmAdapterAccess type. For more information, see Creating a WmManagedConnection Implementation Class.
Registering a resource domain name establishes the definition of the resource domain within a given scope. That is, you can register one resource domain to be used by all adapter services that use the connection, or you can register multiple resource domains on a service-by-service basis. You must register the name of each resource domain supported by the connection (and by extension, each resource domain used by any service supported by the connection).
In the registerResourceDomain method, you:
*Create a ResourceDomainValues object, which represents a list of values for a resource domain (see Populating Resource Domains with Values).
*Specify whether the resource domain is fixed or dynamic.
A fixed resource domain displays default values that you provide for the resource domain parameters; use the WmAdapterAccess.addResourceDomain method (see The addResourceDomain Method).
With a dynamic resource domain, you use the addResourceDomainLookup method to enable the adapter to look up values for the parameters, based on changes to dependency parameters (see The addResourceDomainLookup Method).
*Specify whether adapter users can provide their own parameter values, and enable the adapter to validate these values.
With both fixed and dynamic resource domains, you may allow adapter users to enter their own values, allowing them to add to the current list of values for the resource domain. In addition, you can enable the adapter to validate these values, using callbacks known as adapter check values. To do this, you use the following methods:
*ResourceDomainValues.setComplete(false) indicates that adapter users can enter their own parameter values; it sets a flag named complete
*ResourceDomainValues.setCanValidate(true) indicates that the adapterCheckValue method will validate user-supplied parameter values; it sets the canValidate flag
*WmAdapterAccess.addCheckValue calls the WmManagedConnection.adapterCheckValue method; see Adapter Check Value Callbacks.
Note:
addCheckValue must appear after addResourceDomain or addResourceDomainLookup.
Example of Registering Resource Domains illustrates how to use these methods.