Groovy Documentation

com.ace.mws.plugins
[Java] Interface IPluginControlService


public interface IPluginControlService

The control service allows lifecycle management operations to be performed on plugins. It also provides methods to create and retrieve plugins.

For more information on how to use this service, see the MWS Quick Reference page on Plugin Control Service.

Authors:
bsaville


Method Summary
void configure(String pluginId)

Verifies the current configuration of the plugin and notifies the plugin that a configuration change has occurred.

boolean createPlugin(String pluginId, Class pluginType)

Creates a new plugin with the given identifier and plugin type, initializes the bean for it, and automatically starts it if AbstractPluginInfo.getAutoStart is enabled.

boolean createPlugin(String pluginId, Class pluginType, Map properties)

Creates a new plugin with the given identifier, plugin type, and additional properties, initializes bean for it, and automatically starts it if AbstractPluginInfo.getAutoStart is enabled.

boolean createPlugin(String pluginId, String pluginType)

Creates a new plugin with the given identifier and plugin type, initializes bean for it, and automatically starts it if AbstractPluginInfo.getAutoStart is enabled.

boolean createPlugin(String pluginId, String pluginType, Map properties)

Creates a new plugin with the given identifier, plugin type, and additional properties, initializes bean for it, and automatically starts it if AbstractPluginInfo.getAutoStart is enabled.

Object getPlugin(String pluginType, Map config)

Retrieves a plugin that is of the specified plugin type and contains the properties given in AbstractPlugin.getConfig.

Object getPluginById(String pluginId)

Retrieves a plugin by the unique identifier from AbstractPlugin.getId.

List getPlugins(String pluginType)

Retrieves a list of plugins that are of the specified plugin type.

List getPlugins(String pluginType, Map config)

Retrieves a list of plugins that are of the specified plugin type and contain the properties given in AbstractPlugin.getConfig.

void start(String pluginId)

Starts a plugin with the specified identifier, including handling of events before and after start and verifying configuration.

void stop(String pluginId)

Stops a plugin with the specified identifier, including handling of events before and after stop.

 

Method Detail

configure

public void configure(String pluginId)
Verifies the current configuration of the plugin and notifies the plugin that a configuration change has occurred. If errors are encountered, an InvalidPluginConfigurationException will be thrown and this will contain the errors in it. InvalidPluginConfigurationException.getErrors.
throws:
InvalidPluginConfigurationException
throws:
InvalidPluginException
Parameters:
pluginId
See Also:
AbstractPlugin.configure


createPlugin

public boolean createPlugin(String pluginId, Class pluginType)
Creates a new plugin with the given identifier and plugin type, initializes the bean for it, and automatically starts it if AbstractPluginInfo.getAutoStart is enabled.
throws:
InvalidPluginConfigurationException if the id is already taken
throws:
PluginStartException if there was a problem starting the plugin after it was created
throws:
InvalidPluginTypeException if the plugin type does not exist or is invalid
Parameters:
pluginId
pluginType
Returns:
True if successful, false otherwise


createPlugin

public boolean createPlugin(String pluginId, Class pluginType, Map properties)
Creates a new plugin with the given identifier, plugin type, and additional properties, initializes bean for it, and automatically starts it if AbstractPluginInfo.getAutoStart is enabled.
throws:
InvalidPluginConfigurationException if the id is already taken
throws:
PluginStartException if there was a problem starting the plugin after it was created
throws:
InvalidPluginTypeException if the plugin type does not exist or is invalid
Parameters:
pluginId
pluginType
properties - Map containing configuration properties as defined in AbstractPluginInfo, including a config Map.
Returns:
True if successful, false otherwise


createPlugin

public boolean createPlugin(String pluginId, String pluginType)
Creates a new plugin with the given identifier and plugin type, initializes bean for it, and automatically starts it if AbstractPluginInfo.getAutoStart is enabled.
throws:
InvalidPluginConfigurationException if the id is already taken
throws:
PluginStartException if there was a problem starting the plugin after it was created
throws:
InvalidPluginTypeException if the plugin type does not exist or is invalid
Parameters:
pluginId
pluginType
Returns:
True if successful, false otherwise


createPlugin

public boolean createPlugin(String pluginId, String pluginType, Map properties)
Creates a new plugin with the given identifier, plugin type, and additional properties, initializes bean for it, and automatically starts it if AbstractPluginInfo.getAutoStart is enabled.
throws:
InvalidPluginConfigurationException if the id is already taken
throws:
PluginStartException if there was a problem starting the plugin after it was created
throws:
InvalidPluginTypeException if the plugin type does not exist or is invalid
Parameters:
pluginId
pluginType
properties - Map containing configuration properties as defined in AbstractPluginInfo, including a config Map.
Returns:
True if successful, false otherwise


getPlugin

public Object getPlugin(String pluginType, Map config)
Retrieves a plugin that is of the specified plugin type and contains the properties given in AbstractPlugin.getConfig. If more than one such plugin exists, return the first such plugin found.
Parameters:
pluginType
config
Returns:
The first plugin found that matches the criteria or null if no such plugin exists


getPluginById

public Object getPluginById(String pluginId)
Retrieves a plugin by the unique identifier from AbstractPlugin.getId.
Parameters:
pluginId
Returns:
The plugin or null if it doesn't exist


getPlugins

public List getPlugins(String pluginType)
Retrieves a list of plugins that are of the specified plugin type.
Parameters:
pluginType
Returns:
The plugin list or an empty list if none match the criteria


getPlugins

public List getPlugins(String pluginType, Map config)
Retrieves a list of plugins that are of the specified plugin type and contain the properties given in AbstractPlugin.getConfig.
Parameters:
pluginType
config
Returns:
The plugin list or an empty list if none match the criteria


start

public void start(String pluginId)
Starts a plugin with the specified identifier, including handling of events before and after start and verifying configuration.
throws:
PluginStartException
throws:
InvalidPluginException
throws:
InvalidPluginConfigurationException
Parameters:
pluginId


stop

public void stop(String pluginId)
Stops a plugin with the specified identifier, including handling of events before and after stop.
throws:
PluginStopException
throws:
InvalidPluginException
Parameters:
pluginId


 

Groovy Documentation