Adapter Development Kit 9.12 | webMethods Adapter Development Kit Documentation | webMethods Adapter Development Kit Installation and User’s Documentation | Polling Notifications | Polling Notification Implementation | Implementing Configuration Resource Domains for Polling Notifications
 
Implementing Configuration Resource Domains for Polling Notifications
The next steps for implementing a polling notification are:
*Define and implement the resource domains required for the metadata parameters that you created.
*Identify the values on which those resource domains depend.
For each parameter that requires a resource domain to supply a value, or that requires a validity check for values supplied by the users of the adapter, you must perform the following:
1. In the WmPollingNotification.fillWmTemplateDescriptor method, call WmTemplateDescriptor.setResourceDomain method, passing the name of the parameter, the name of the resource domain, and an array of the names of any parameters on which the resource domain depends.
2. In the WmPollingNotification.registerResourceDomain method, call WmAdapterAccess.addResourceDomain(ResourceDomainValues) method to register the resource domain support.
3. In the WmPollingNotification.registerResourceDomain method, implement code to populate the resource domain values and/or the adapter check values. For more information about adapter check values, see Adapter Check Value Callbacks.
4. In the associated connection class's WmManagedConnection.registerResourceDomain method, call WmAdapterAccess.addResourceDomainLookup method to add the polling notification metadata parameters with resource domain lookup.
package com.wm.MyAdapter.connection;

import com.wm.adk.connection.WmManagedConnection;
import com.wm.adk.metadata.*;
import com.wm.adk.error.AdapterException;

import com.wm.MyAdapter.MyAdapter;
import com.wm.MyAdapter.services.MockDbUpdate;
import com.wm.MyAdapter.notifications.SimpleNotification;


public class SimpleConnection extends WmManagedConnection {
..
..

public void registerResourceDomain(WmAdapterAccess access)
throws AdapterException
{
..
..
..

//Simple Polling Notification Registering Resource Domain
access.addResourceDomainLookup(SimpleNotification.DIRECTORIES_RD, this);
access.addResourceDomainLookup(SimpleNotification.FIELD_NAMES_RD, this);
access.addResourceDomainLookup(SimpleNotification.FIELD_TYPES_RD, this);

}

}
In this example, there are no preset values, but adapter's user supplied data for the directory parameter is validated to ensure that the directory exists.