Groovy Documentation

com.ace.mws.plugins.services
[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.

Authors:
bsaville


Method Summary
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 by the plugin type and according to specific 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 specified 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.

void verifyConfiguration(String pluginId)

Verifies the current configuration of the plugin with the specified identifier.

 

Method Detail

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
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
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
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
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 by the plugin type and according to specific properties given in AbstractPlugin.getConfig.
throws:
InvalidPluginException
Parameters:
plugin
config
Returns:
The plugin or null if it doesn't exist


getPluginById

public Object getPluginById(String pluginId)
Retrieves a plugin by the unique identifier from AbstractPlugin.getId.
throws:
InvalidPluginException
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.
throws:
InvalidPluginException
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 specified properties given in AbstractPlugin.getConfig.
throws:
InvalidPluginException
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


verifyConfiguration

public void verifyConfiguration(String pluginId)
Verifies the current configuration of the plugin with the specified identifier. If errors are encountered, an InvalidPluginConfigurationException will be thrown and this will contain the errors in InvalidPluginConfigurationException.getErrors.
throws:
InvalidPluginConfigurationException
throws:
InvalidPluginException
Parameters:
pluginId


 

Groovy Documentation