public interface WmAdapterAccess
WmTemplateDescriptor.setResourceDomain(java.lang.String, java.lang.String, java.lang.String[])
.
A reference to this interface is passed through the
WmManagedConnection.registerResourceDomain(WmAdapterAccess)
method after the WmART metadata services are invoked. There are three types of methods
you can use to register a resource domain.
addResourceDomain(com.wm.adk.metadata.ResourceDomainValues)
.
addResourceDomainLookup(java.lang.String, java.lang.Object)
.
addCheckValue(java.lang.String, java.lang.Object)
.
The following example illustrates the use of these three types of methods in your adapter's
subclass of WmManagedConnection
.
You can register the resource domain as follows:
public void registerResourceDomain(WmAdapterAccess access) { //generate an array of ResourceDomainValues containing the default values. ResourceDomainValues[] values = new ResourceDomainValues(...) access.addResourceDomainLookup(resourceDomain1, (Object)this}; access.addResourceDomain(resourceDomain2, values); access.addCheckValue(resourceDomain3, (Object) this); }In this example:
WmManagedConnection.adapterResourceDomainLookup(java.lang.String, java.lang.String, java.lang.String[][])
,
which returns the resource metadata.
WmManagedConnection.adapterCheckValue(java.lang.String, java.lang.String, java.lang.String[][], java.lang.String)
,
which sends the test value to the resource to verify it.Modifier and Type | Method and Description |
---|---|
void |
addCheckValue(java.lang.String resourceDomainName,
java.lang.Object lookup)
Registers a callback method for a resource domain value check.
|
void |
addCheckValue(java.lang.String serviceName,
java.lang.String resourceDomainName,
java.lang.Object lookup)
Registers a callback method for a resource domain value check for the specified adapter
service template or adapter notification template.
|
void |
addResourceDomain(ResourceDomainValues values)
Defines a resource domain with a fixed set of values.
|
void |
addResourceDomain(ResourceDomainValues[] resourceDomains)
Defines a resource domain with an array of values (multiple lists of values).
|
void |
addResourceDomain(java.lang.String serviceName,
ResourceDomainValues values)
Defines a resource domain with a fixed set of values for a specified adapter service
template or adapter notification template.
|
void |
addResourceDomain(java.lang.String serviceName,
ResourceDomainValues[] resourceDomains)
Defines a resource domain with an array of fixed values (multiple lists of values) for the
specified adapter service template or adapter notification template.
|
void |
addResourceDomainLookup(java.lang.String resourceDomainName,
java.lang.Object lookup)
Registers a callback method for a resource domain lookup.
|
void |
addResourceDomainLookup(java.lang.String serviceName,
java.lang.String resourceDomainName,
java.lang.Object lookup)
Registers a callback method for a resource domain lookup for the specified adapter service
template or adapter notification template.
|
void |
addResourceDomainWithCheck(java.lang.String resourceDomainName,
java.lang.Object lookup)
Registers a resource domain with an associated callback method.
|
void |
addResourceDomainWithCheck(java.lang.String serviceName,
java.lang.String resourceDomainName,
java.lang.Object lookup)
Registers a resource domain with an associated callback method for the specified
adapter service template or adapter notification template.
|
void addCheckValue(java.lang.String resourceDomainName, java.lang.Object lookup)
lookup
object should implement the method
WmManagedConnection.adapterCheckValue(java.lang.String, java.lang.String, java.lang.String[][], java.lang.String)
.
Call this method in WmManagedConnection.registerResourceDomain(com.wm.adk.metadata.WmAdapterAccess)
to register a method for resource domain value verification. Use this method with
resource domains that are incomplete but that can be validated. This method applies
to all adapter services and adapter notifications.resourceDomainName
- the name of the resource domain that this check supportslookup
- the object that supports the value verificationvoid addCheckValue(java.lang.String serviceName, java.lang.String resourceDomainName, java.lang.Object lookup)
lookup
object should implement the method
WmManagedConnection.adapterCheckValue(java.lang.String, java.lang.String, java.lang.String[][], java.lang.String)
.
Call this method in WmManagedConnection.registerResourceDomain(com.wm.adk.metadata.WmAdapterAccess)
to register a method for resource domain value verification. Use this method with
resource domains that are incomplete but that can be validated.serviceName
- the name of the adapter service template or adapter notification templateresourceDomainName
- the name of the resource domain that this check supportslookup
- the object that supports the value verificationvoid addResourceDomain(ResourceDomainValues values)
You can call this method instead of addResourceDomainLookup(java.lang.String, java.lang.Object)
for resource domains
that use a fixed set of values. It is not necessary to support those resource domains in
a WmManagedConnection.adapterResourceDomainLookup(java.lang.String, java.lang.String, java.lang.String[][])
method.
The method applies to all adapter services and adapter notifications.
values
- the list of valuesvoid addResourceDomain(ResourceDomainValues[] resourceDomains)
You can call this method instead of addResourceDomainLookup(java.lang.String, java.lang.Object)
for resource domains
that use a fixed set of values. It is not necessary to support those resource domains in
a WmManagedConnection.adapterResourceDomainLookup(java.lang.String, java.lang.String, java.lang.String[][])
method.
The method applies to all adapter services and adapter notifications.
resourceDomains
- the list of resource domain values. The values can be multiple
lists (for example, for tuples).void addResourceDomain(java.lang.String serviceName, ResourceDomainValues values)
You can call this method instead of addResourceDomainLookup(java.lang.String, java.lang.Object)
for resource domains
that use a fixed set of values. It is not necessary to support those resource domains in
a WmManagedConnection.adapterResourceDomainLookup(java.lang.String, java.lang.String, java.lang.String[][])
method.
The method applies to all adapter services and adapter notifications.
serviceName
- name of the adapter service template and adapter notification templateresourceDomainName
- the name of the resource domain that this lookup supportsvalues
- the list of valuesvoid addResourceDomain(java.lang.String serviceName, ResourceDomainValues[] resourceDomains)
You can call this method instead of addResourceDomainLookup(java.lang.String, java.lang.Object)
for resource domains
that use a fixed set of values. It is not necessary to support those resource domains in
a WmManagedConnection.adapterResourceDomainLookup(java.lang.String, java.lang.String, java.lang.String[][])
method.
The method applies to all adapter services and adapter notifications.
serviceName
- name of the adapter service template or adapter notification template.
Pass in a null for a lookup that applies to all adapter services or
adapter notifications.resourceDomains
- the list of resource domain values. The values can be multiple lists
(for example, for tuples).void addResourceDomainLookup(java.lang.String resourceDomainName, java.lang.Object lookup)
lookup
object should implement
WmManagedConnection.adapterResourceDomainLookup(java.lang.String, java.lang.String, java.lang.String[][])
.
Call this method from
WmManagedConnection.registerResourceDomain(WmAdapterAccess)
for each resource domain lookup that the adapter supports. The lookup applies to all
adapter services and adapter notifications.
resourceDomainName
- the name of the resource domain that this lookup supportslookup
- the object that supports the lookupvoid addResourceDomainLookup(java.lang.String serviceName, java.lang.String resourceDomainName, java.lang.Object lookup)
lookup
object should implement
WmManagedConnection.adapterResourceDomainLookup(java.lang.String, java.lang.String, java.lang.String[][])
.
Call this method from
WmManagedConnection.registerResourceDomain(WmAdapterAccess)
for each resource domain lookup that the adapter supports.
serviceName
- the name of the adapter service template or adapter notification template.resourceDomainName
- the name of the resource domain that this lookup supportslookup
- the object that supports the lookupvoid addResourceDomainWithCheck(java.lang.String resourceDomainName, java.lang.Object lookup)
lookup
object should implement the method
WmManagedConnection.adapterCheckValue(java.lang.String, java.lang.String, java.lang.String[][], java.lang.String)
.
Call this method from
WmManagedConnection.registerResourceDomain(WmAdapterAccess)
for each resource domain that is not complete, but that supports validation using a
WmManagedConnection.adapterCheckValue(java.lang.String, java.lang.String, java.lang.String[][], java.lang.String)
method. It registers
an empty resource domain that can be validated; that is, the resource domain has
ResourceDomainValues.setComplete(boolean)
set to false
and ResourceDomainValues.setCanValidate(boolean)
set to
true
. The lookup applies to all adapter services and adapter notifications.
resourceDomainName
- the name of the resource domain that this lookup supportslookup
- the object that supports the check value methodvoid addResourceDomainWithCheck(java.lang.String serviceName, java.lang.String resourceDomainName, java.lang.Object lookup)
lookup
object should implement the method
WmManagedConnection.adapterCheckValue(java.lang.String, java.lang.String, java.lang.String[][], java.lang.String)
.
Call this method from
WmManagedConnection.registerResourceDomain(WmAdapterAccess)
for each resource domain that is not complete, but that supports validation using a
WmManagedConnection.adapterCheckValue(java.lang.String, java.lang.String, java.lang.String[][], java.lang.String)
method. It registers
an empty resource domain that can be validated; that is, the resource domain has
ResourceDomainValues.setComplete(boolean)
set to false
and ResourceDomainValues.setCanValidate(boolean)
set to
true
.
serviceName
- the name of the adapter service template or adapter notification templateresourceDomainName
- the name of the resource domain that this lookup supportslookup
- the object that supports the check value method
Copyright © 2003 - 2021 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.