Adapter Development Kit 6.5 | webMethods Adapter Development Kit Documentation | webMethods Adapter Development Kit Installation and User’s Documentation | Listener Notifications | Listener Implementation | Specifying Configuration Metadata
 
Specifying Configuration Metadata
 
Restricting Listeners to Register Specified Notification Templates
The next logical step for implementing a listener is to create the metadata constructs that will enable adapter users to create listener notification nodes. You must create metadata parameters appropriate to the function of the listener, and describe the presentation and data entry rules for those parameters. This example only requires the name of the file that will be monitored. Create the metadata parameter by creating the accessor method and the associated fields as follows:
public static final String FILE_NAME_PARM = "fileName";
private String _fileName= null;
public void setFileName(String val){_fileName = val;}
Then update the descriptor:
public void fillWmDescriptor(WmDescriptor descriptor, Locale
locale)
throws ResourceException
{
descriptor.setRequired(FILE_NAME_PARM);
descriptor.setDescriptions(
MyAdapter.getInstance().getAdapterResourceBundleManager(),
locale);
}
And finally, add the parameter to the resource bundle:
,{SimpleListener.FILE_NAME_PARM + ADKGLOBAL.RESOURCEBUNDLEKEY_DISPLAYNAME,
"Log File Name"}