4.1

Table Of Contents
Procedure
1 Create an instance of the plug-in watcher implementation.
The SolarSystemAdapter class creates an instance of the SolarSystemWatchersManager class.
private static final SolarSystemWatchersManager watchersManager =
new SolarSystemWatchersManager();
2 Add a watcher instance to the plug-in adaptor.
You add a watcher to the adapter by calling the IPluginAdaptor.addWatcher() method.
The solar system example defines a method to add the SolarSystemWatchersManager instance.
public void addWatcher(PluginWatcher watcher) {
log.info( "Adding watcher '" + watcher + "'" );
watchersManager.addWatcher(watcher);
}
3 Remove a watcher from the plug-in adaptor.
You remove a watcher by calling the IPluginAdaptor.removeWatcher() method.
The solar system example defines a method to remove a SolarSystemWatchersManager instance.
public void removeWatcher(String watcherId) {
log.info( "Removing watcher '" + watcherId + "'" );
watchersManager.removeWatcher( watcherId );
}
4 Instantiate the plug-in publisher that publishes events from the watchers to the Orchestrator notification
mechanism.
The solar system example defines a method that calls the
SolarSystemWatchersManager.setPluginPublisher() method to instantiate a plug-in publisher.
public void setPluginPublisher(IPluginPublisher pluginPublisher) {
watchersManager.setPluginPublisher( pluginPublisher );
}
You added watchers to the plug-in adapter implementation to monitor the events that workflow triggers
generate.
What to do next
Add a tab for the plug-in to the Orchestrator configuration interface.
Add a Tab to the Configuration Interface
You can add a tab to the Orchestrator configuration interface to allow users to provide information to the plug-
in configuration that is specific to their environment or preferences.
To add a configuration tab for a plug-in to the configuration interface, you implement the
IConfigurationAdaptor interface. You can also use the SDKHelper and extend the BaseAction classes from the
Orchestrator plug-in API. You create a configuration adapter that accesses the classes of the plug-in and the
plugged-in technology for the Orchestrator configuration server. You define configuration actions to obtain
and save the configuration information that the user provides by using the configuration tab.
You must create an Apache Struts-based Web application to create the layout of the tab in the configuration
interface. The Struts Web application uses the methods that you define in the IConfigurationAdaptor
implementation to add configuration operations for the users to perform in the configuration tab for the plug-
in. The Struts Web application submits to the Orchestrator server the information that the user enters in the
configuration tab.
Chapter 7 Developing Plug-Ins
VMware, Inc. 185