|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.enterprise.server.plugin.ServerPluginsBean
public class ServerPluginsBean
A server API into the server plugin infrastructure.
| Constructor Summary | |
|---|---|
ServerPluginsBean()
|
|
| 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServerPluginsBean()
| Method Detail |
|---|
public void restartMasterPluginContainer(Subject subject)
ServerPluginsLocal
restartMasterPluginContainer in interface ServerPluginsLocalsubject - the user asking to restart the master plugin containerpublic java.util.List<ServerPlugin> getServerPlugins()
ServerPluginsLocal
getServerPlugins in interface ServerPluginsLocalpublic java.util.List<ServerPlugin> getAllServerPlugins()
ServerPluginsLocal
getAllServerPlugins in interface ServerPluginsLocalpublic ServerPlugin getServerPlugin(PluginKey key)
ServerPluginsLocal
getServerPlugin in interface ServerPluginsLocalkey - identifies the plugin to find
public ServerPlugin getServerPluginRelationships(ServerPlugin plugin)
ServerPluginsLocal
getServerPluginRelationships in interface ServerPluginsLocalpublic java.util.List<ServerPlugin> getServerPluginsById(java.util.List<java.lang.Integer> pluginIds)
ServerPluginsLocal
getServerPluginsById in interface ServerPluginsLocalpluginIds - the IDs of the plugins to load.
public java.util.List<ServerPlugin> getAllServerPluginsById(java.util.List<java.lang.Integer> pluginIds)
ServerPluginsLocal
getAllServerPluginsById in interface ServerPluginsLocalpluginIds - the IDs of the plugins to load.
public ServerPluginDescriptorType getServerPluginDescriptor(PluginKey pluginKey)
throws java.lang.Exception
ServerPluginsLocal
getServerPluginDescriptor in interface ServerPluginsLocaljava.lang.Exception - if the descriptor could not be retrieved or parsed for the given pluginpublic java.util.List<PluginKey> getServerPluginKeysByEnabled(boolean enabled)
ServerPluginsLocal
getServerPluginKeysByEnabled in interface ServerPluginsLocalenabled - if true, return only the keys of plugins that are enabled;
if false, return only the keys of plugins that are disabled.
public java.util.List<PluginKey> enableServerPlugins(Subject subject,
java.util.List<java.lang.Integer> pluginIds)
throws java.lang.Exception
ServerPluginsLocal
enableServerPlugins in interface ServerPluginsLocalsubject - user making the requestpluginIds - the plugins to be enabled
java.lang.Exception - if failed to disable a plugin
public java.util.List<PluginKey> disableServerPlugins(Subject subject,
java.util.List<java.lang.Integer> pluginIds)
throws java.lang.Exception
ServerPluginsLocal
disableServerPlugins in interface ServerPluginsLocalsubject - user making the requestpluginIds - the plugins to be disabled
java.lang.Exception - if failed to disable a plugin
public java.util.List<PluginKey> undeployServerPlugins(Subject subject,
java.util.List<java.lang.Integer> pluginIds)
throws java.lang.Exception
ServerPluginsLocal
undeployServerPlugins in interface ServerPluginsLocalsubject - user making the requestpluginIds - the plugins to be undeployed
java.lang.Exception - if failed to undeploy a plugin
public java.util.List<PluginKey> purgeServerPlugins(Subject subject,
java.util.List<java.lang.Integer> pluginIds)
throws java.lang.Exception
ServerPluginsLocal
purgeServerPlugins in interface ServerPluginsLocalsubject - user making the requestpluginIds - the plugins to be purged
java.lang.Exception - if failed to purge a plugin
public void setServerPluginEnabledFlag(Subject subject,
int pluginId,
boolean enabled)
throws java.lang.Exception
ServerPluginsLocal
setServerPluginEnabledFlag in interface ServerPluginsLocalsubject - user making the requestpluginId - the plugin to be enabledenabled - the value of the enabled flag for the plugin
java.lang.Exception
public void setServerPluginStatus(Subject subject,
java.util.List<java.lang.Integer> pluginIds,
PluginStatusType status)
throws java.lang.Exception
ServerPluginsLocalPluginStatusType.DELETED, the enabled flag is also flipped to false.
This has "requires new" semantics, so the results are committed immediately upon return.
setServerPluginStatus in interface ServerPluginsLocalsubject - user making the requestpluginIds - the plugins to be enabled
java.lang.Exception
public ServerPlugin registerServerPlugin(Subject subject,
ServerPlugin plugin,
java.io.File pluginFile)
throws java.lang.Exception
ServerPluginsLocal
registerServerPlugin in interface ServerPluginsLocalsubject - 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
public void purgeServerPlugin(Subject subject,
PluginKey pluginKey)
ServerPluginsLocal#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.
purgeServerPlugin in interface ServerPluginsLocalsubject - user making the requestpluginKey - the key of the server plugin to delete
public ServerPlugin updateServerPluginExceptContent(Subject subject,
ServerPlugin plugin)
throws java.lang.Exception
ServerPluginsLocal
updateServerPluginExceptContent in interface ServerPluginsLocalsubject - 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 failpublic PluginStatusType getServerPluginStatus(PluginKey pluginKey)
ServerPluginsLocal
getServerPluginStatus in interface ServerPluginsLocalpluginKey - the key of the plugin whose status is to be returned.
null indicates an unknown plugin.public java.util.Map<ServerPluginType,java.util.List<PluginKey>> getInstalledServerPluginsGroupedByType()
ServerPluginsLocal
getInstalledServerPluginsGroupedByType in interface ServerPluginsLocal
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||