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:
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
Note:
addCheckValue must appear after addResourceDomain or addResourceDomainLookup.