|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ServerPluginsLocal
Interface to the methods that interact with the serve-side plugin infrastructure.
Most of these methods will only return information on PluginStatusType.INSTALLED
plugins; only when explicitly stated will a method return data on
PluginStatusType.DELETED plugins, too.
| Method Summary | |
|---|---|
java.util.List<PluginKey> |
disableServerPlugins(Subject subject,
java.util.List<java.lang.Integer> pluginIds)
Disables the plugins and unschedules their jobs. |
java.util.List<PluginKey> |
enableServerPlugins(Subject subject,
java.util.List<java.lang.Integer> pluginIds)
Enables the plugins and restarts them. |
java.util.List<ServerPlugin> |
getAllServerPlugins()
Returns a list of all the installed and deleted server plugins in the database. |
java.util.List<ServerPlugin> |
getAllServerPluginsById(java.util.List<java.lang.Integer> pluginIds)
Get a list of both installed and deleted plugins from their IDs. |
java.util.Map<ServerPluginType,java.util.List<PluginKey>> |
getInstalledServerPluginsGroupedByType()
This will return a map containing all installed plugins that are both enabled and disabled. |
ServerPlugin |
getServerPlugin(PluginKey key)
Returns a plugin with the given key. |
ServerPluginDescriptorType |
getServerPluginDescriptor(PluginKey pluginKey)
Given a plugin key, returns the descriptor for that plugin. |
java.util.List<PluginKey> |
getServerPluginKeysByEnabled(boolean enabled)
Returns a list of plugin keys for only those server plugins whose enabled flag is equal to the given parameter. |
ServerPlugin |
getServerPluginRelationships(ServerPlugin plugin)
Methods in this object that return plugins normally do not include the data from relationships with the plugin (for example, the plugin configuration and scheduled jobs related to the plugin). |
java.util.List<ServerPlugin> |
getServerPlugins()
Returns a list of all the installed server plugins in the database |
java.util.List<ServerPlugin> |
getServerPluginsById(java.util.List<java.lang.Integer> pluginIds)
Get a list of plugins from their IDs. |
PluginStatusType |
getServerPluginStatus(PluginKey pluginKey)
Given the key of a server plugin, this will return the status of that plugin. |
void |
purgeServerPlugin(Subject subject,
PluginKey pluginKey)
Purges the server plugin from the database. |
java.util.List<PluginKey> |
purgeServerPlugins(Subject subject,
java.util.List<java.lang.Integer> pluginIds)
Purges the undeployed plugins from the system so there is no record of them to have ever existed. |
ServerPlugin |
registerServerPlugin(Subject subject,
ServerPlugin plugin,
java.io.File pluginFile)
Registers the given plugin to the database. |
void |
restartMasterPluginContainer(Subject subject)
Recycles the master plugin container, essentially shutting down all server plugins and then restarting them. |
void |
setServerPluginEnabledFlag(Subject subject,
int pluginId,
boolean enabled)
Turns on or off the enabled flag in the database but does NOT restart the server plugin. |
void |
setServerPluginStatus(Subject subject,
java.util.List<java.lang.Integer> pluginIds,
PluginStatusType status)
Sets the status flag in the database but does NOT restart the server plugin container. |
java.util.List<PluginKey> |
undeployServerPlugins(Subject subject,
java.util.List<java.lang.Integer> pluginIds)
Removes the plugins from the system and unschedules their jobs. |
ServerPlugin |
updateServerPluginExceptContent(Subject subject,
ServerPlugin plugin)
Given a plugin that already exists, this will update that plugin's data in the database, except for the content, which is left as-is. |
| Method Detail |
|---|
void restartMasterPluginContainer(Subject subject)
subject - the user asking to restart the master plugin containerjava.util.List<ServerPlugin> getServerPlugins()
java.util.List<ServerPlugin> getAllServerPlugins()
ServerPlugin getServerPlugin(PluginKey key)
key - identifies the plugin to find
javax.persistence.NoResultException - when no plugin with that name existsServerPlugin getServerPluginRelationships(ServerPlugin plugin)
plugin -
javax.persistence.NoResultException - when no plugin with that name existsjava.util.List<ServerPlugin> getServerPluginsById(java.util.List<java.lang.Integer> pluginIds)
pluginIds - the IDs of the plugins to load.
java.util.List<ServerPlugin> getAllServerPluginsById(java.util.List<java.lang.Integer> pluginIds)
pluginIds - the IDs of the plugins to load.
ServerPluginDescriptorType getServerPluginDescriptor(PluginKey pluginKey)
throws java.lang.Exception
pluginKey -
java.lang.Exception - if the descriptor could not be retrieved or parsed for the given pluginjava.util.List<PluginKey> getServerPluginKeysByEnabled(boolean enabled)
enabled - if true, return only the keys of plugins that are enabled;
if false, return only the keys of plugins that are disabled.
java.util.List<PluginKey> enableServerPlugins(Subject subject,
java.util.List<java.lang.Integer> pluginIds)
throws java.lang.Exception
subject - user making the requestpluginIds - the plugins to be enabled
java.lang.Exception - if failed to disable a plugin
java.util.List<PluginKey> disableServerPlugins(Subject subject,
java.util.List<java.lang.Integer> pluginIds)
throws java.lang.Exception
subject - user making the requestpluginIds - the plugins to be disabled
java.lang.Exception - if failed to disable a plugin
java.util.List<PluginKey> undeployServerPlugins(Subject subject,
java.util.List<java.lang.Integer> pluginIds)
throws java.lang.Exception
subject - user making the requestpluginIds - the plugins to be undeployed
java.lang.Exception - if failed to undeploy a plugin
java.util.List<PluginKey> purgeServerPlugins(Subject subject,
java.util.List<java.lang.Integer> pluginIds)
throws java.lang.Exception
subject - user making the requestpluginIds - the plugins to be purged
java.lang.Exception - if failed to purge a plugin
void setServerPluginEnabledFlag(Subject subject,
int pluginId,
boolean enabled)
throws java.lang.Exception
subject - user making the requestpluginId - the plugin to be enabledenabled - the value of the enabled flag for the plugin
if - failed to update the plugin
java.lang.Exception
void setServerPluginStatus(Subject subject,
java.util.List<java.lang.Integer> pluginIds,
PluginStatusType status)
throws java.lang.Exception
PluginStatusType.DELETED, the enabled flag is also flipped to false.
This has "requires new" semantics, so the results are committed immediately upon return.
subject - user making the requestpluginIds - the plugins to be enabledenabled - the value of the enabled flag for the plugins
if - failed to update one of the plugins
java.lang.Exception
ServerPlugin registerServerPlugin(Subject subject,
ServerPlugin plugin,
java.io.File pluginFile)
throws java.lang.Exception
subject - the user that needs to have permissions to add a plugin to the systemplugin - the plugin definitionpluginFile - the actual plugin file itself
java.lang.Exception - if failed to fully register the plugin
ServerPlugin updateServerPluginExceptContent(Subject subject,
ServerPlugin plugin)
throws java.lang.Exception
subject - user making the requestplugin - existing plugin with updated data
java.lang.Exception - if the plugin did not already exist or an error occurred that caused the update to fail
void purgeServerPlugin(Subject subject,
PluginKey pluginKey)
#reRegisterServerPlugin(Subject, ServerPlugin, File) - you'll
probably want to use that instead. Do not blindly purge server plugins using this method unless you
know what you are doing.
subject - user making the requestpluginKey - the key of the server plugin to deletePluginStatusType getServerPluginStatus(PluginKey pluginKey)
pluginKey - the key of the plugin whose status is to be returned.
null indicates an unknown plugin.java.util.Map<ServerPluginType,java.util.List<PluginKey>> getInstalledServerPluginsGroupedByType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||