|
||||||||||
| 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 | |
|---|---|
List<org.rhq.core.domain.plugin.PluginKey> |
disableServerPlugins(org.rhq.core.domain.auth.Subject subject,
List<Integer> pluginIds)
Disables the plugins and unschedules their jobs. |
List<org.rhq.core.domain.plugin.PluginKey> |
enableServerPlugins(org.rhq.core.domain.auth.Subject subject,
List<Integer> pluginIds)
Enables the plugins and restarts them. |
List<org.rhq.core.domain.plugin.ServerPlugin> |
getAllServerPlugins()
Returns a list of all the installed and deleted server plugins in the database. |
List<org.rhq.core.domain.plugin.ServerPlugin> |
getAllServerPluginsById(List<Integer> pluginIds)
Get a list of both installed and deleted plugins from their IDs. |
Map<ServerPluginType,List<org.rhq.core.domain.plugin.PluginKey>> |
getInstalledServerPluginsGroupedByType()
This will return a map containing all installed plugins that are both enabled and disabled. |
long |
getLastConfigurationChangeTimestamp(int pluginId)
Given a plugin ID, this will return a timestamp (in epoch millis) that indicates the last time when the plugin's configuration changed. |
org.rhq.core.domain.plugin.ServerPlugin |
getServerPlugin(org.rhq.core.domain.plugin.PluginKey key)
Returns a plugin with the given key. |
org.rhq.core.domain.configuration.definition.ConfigurationDefinition |
getServerPluginConfigurationDefinition(org.rhq.core.domain.plugin.PluginKey pluginKey)
Returns the definition for the given plugin's global plugin configuration. |
List<ControlDefinition> |
getServerPluginControlDefinitions(org.rhq.core.domain.plugin.PluginKey pluginKey)
Returns the metadata for all control operations for the given plugin. |
ServerPluginDescriptorType |
getServerPluginDescriptor(org.rhq.core.domain.plugin.PluginKey pluginKey)
Given a plugin key, returns the descriptor for that plugin. |
List<org.rhq.core.domain.plugin.PluginKey> |
getServerPluginKeysByEnabled(boolean enabled)
Returns a list of plugin keys for only those server plugins whose enabled flag is equal to the given parameter. |
org.rhq.core.domain.plugin.ServerPlugin |
getServerPluginRelationships(org.rhq.core.domain.plugin.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). |
List<org.rhq.core.domain.plugin.ServerPlugin> |
getServerPlugins()
Returns a list of all the installed server plugins in the database |
List<org.rhq.core.domain.plugin.ServerPlugin> |
getServerPluginsById(List<Integer> pluginIds)
Get a list of plugins from their IDs. |
org.rhq.core.domain.configuration.definition.ConfigurationDefinition |
getServerPluginScheduledJobsDefinition(org.rhq.core.domain.plugin.PluginKey pluginKey)
Returns the definition for the given plugin's scheduled jobs configuration. |
org.rhq.core.domain.plugin.PluginStatusType |
getServerPluginStatus(org.rhq.core.domain.plugin.PluginKey pluginKey)
Given the key of a server plugin, this will return the status of that plugin. |
ControlResults |
invokeServerPluginControl(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.plugin.PluginKey pluginKey,
String controlName,
org.rhq.core.domain.configuration.Configuration params)
Invokes a control operation on a given plugin and returns the results. |
void |
purgeServerPlugin(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.plugin.PluginKey pluginKey)
Purges the server plugin from the database. |
List<org.rhq.core.domain.plugin.PluginKey> |
purgeServerPlugins(org.rhq.core.domain.auth.Subject subject,
List<Integer> pluginIds)
Purges the undeployed plugins from the system so there is no record of them to have ever existed. |
org.rhq.core.domain.plugin.ServerPlugin |
registerServerPlugin(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.plugin.ServerPlugin plugin,
File pluginFile)
Registers the given plugin to the database. |
void |
restartMasterPluginContainer(org.rhq.core.domain.auth.Subject subject)
Recycles the master plugin container, essentially shutting down all server plugins and then restarting them. |
void |
setServerPluginEnabledFlag(org.rhq.core.domain.auth.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(org.rhq.core.domain.auth.Subject subject,
List<Integer> pluginIds,
org.rhq.core.domain.plugin.PluginStatusType status)
Sets the status flag in the database but does NOT restart the server plugin container. |
List<org.rhq.core.domain.plugin.PluginKey> |
undeployServerPlugins(org.rhq.core.domain.auth.Subject subject,
List<Integer> pluginIds)
Removes the plugins from the system and unschedules their jobs. |
org.rhq.core.domain.plugin.ServerPlugin |
updateServerPluginExceptContent(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.plugin.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(org.rhq.core.domain.auth.Subject subject)
ServerPluginsLocal
restartMasterPluginContainer in interface ServerPluginsLocalsubject - the user asking to restart the master plugin containerpublic List<org.rhq.core.domain.plugin.ServerPlugin> getServerPlugins()
ServerPluginsLocal
getServerPlugins in interface ServerPluginsLocalpublic List<org.rhq.core.domain.plugin.ServerPlugin> getAllServerPlugins()
ServerPluginsLocal
getAllServerPlugins in interface ServerPluginsLocalpublic org.rhq.core.domain.plugin.ServerPlugin getServerPlugin(org.rhq.core.domain.plugin.PluginKey key)
ServerPluginsLocal
getServerPlugin in interface ServerPluginsLocalkey - identifies the plugin to find
public org.rhq.core.domain.plugin.ServerPlugin getServerPluginRelationships(org.rhq.core.domain.plugin.ServerPlugin plugin)
ServerPluginsLocal
getServerPluginRelationships in interface ServerPluginsLocalpublic List<org.rhq.core.domain.plugin.ServerPlugin> getServerPluginsById(List<Integer> pluginIds)
ServerPluginsLocal
getServerPluginsById in interface ServerPluginsLocalpluginIds - the IDs of the plugins to load.
public List<org.rhq.core.domain.plugin.ServerPlugin> getAllServerPluginsById(List<Integer> pluginIds)
ServerPluginsLocal
getAllServerPluginsById in interface ServerPluginsLocalpluginIds - the IDs of the plugins to load.
public long getLastConfigurationChangeTimestamp(int pluginId)
ServerPluginsLocal
getLastConfigurationChangeTimestamp in interface ServerPluginsLocal
public ServerPluginDescriptorType getServerPluginDescriptor(org.rhq.core.domain.plugin.PluginKey pluginKey)
throws Exception
ServerPluginsLocal
getServerPluginDescriptor in interface ServerPluginsLocalException - if the descriptor could not be retrieved or parsed for the given pluginpublic List<org.rhq.core.domain.plugin.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 List<org.rhq.core.domain.plugin.PluginKey> enableServerPlugins(org.rhq.core.domain.auth.Subject subject,
List<Integer> pluginIds)
throws Exception
ServerPluginsLocal
enableServerPlugins in interface ServerPluginsLocalsubject - user making the requestpluginIds - the plugins to be enabled
Exception - if failed to disable a plugin
public List<org.rhq.core.domain.plugin.PluginKey> disableServerPlugins(org.rhq.core.domain.auth.Subject subject,
List<Integer> pluginIds)
throws Exception
ServerPluginsLocal
disableServerPlugins in interface ServerPluginsLocalsubject - user making the requestpluginIds - the plugins to be disabled
Exception - if failed to disable a plugin
public List<org.rhq.core.domain.plugin.PluginKey> undeployServerPlugins(org.rhq.core.domain.auth.Subject subject,
List<Integer> pluginIds)
throws Exception
ServerPluginsLocal
undeployServerPlugins in interface ServerPluginsLocalsubject - user making the requestpluginIds - the plugins to be undeployed
Exception - if failed to undeploy a plugin
public List<org.rhq.core.domain.plugin.PluginKey> purgeServerPlugins(org.rhq.core.domain.auth.Subject subject,
List<Integer> pluginIds)
throws Exception
ServerPluginsLocal
purgeServerPlugins in interface ServerPluginsLocalsubject - user making the requestpluginIds - the plugins to be purged
Exception - if failed to purge a plugin
public void setServerPluginEnabledFlag(org.rhq.core.domain.auth.Subject subject,
int pluginId,
boolean enabled)
throws Exception
ServerPluginsLocal
setServerPluginEnabledFlag in interface ServerPluginsLocalsubject - user making the requestpluginId - the plugin to be enabledenabled - the value of the enabled flag for the plugin
Exception
public void setServerPluginStatus(org.rhq.core.domain.auth.Subject subject,
List<Integer> pluginIds,
org.rhq.core.domain.plugin.PluginStatusType status)
throws 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
Exception
public org.rhq.core.domain.plugin.ServerPlugin registerServerPlugin(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.plugin.ServerPlugin plugin,
File pluginFile)
throws 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
Exception - if failed to fully register the plugin
public void purgeServerPlugin(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.plugin.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 org.rhq.core.domain.plugin.ServerPlugin updateServerPluginExceptContent(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.plugin.ServerPlugin plugin)
throws Exception
ServerPluginsLocal
updateServerPluginExceptContent in interface ServerPluginsLocalsubject - user making the requestplugin - existing plugin with updated data
Exception - if the plugin did not already exist or an error occurred that caused the update to failpublic org.rhq.core.domain.plugin.PluginStatusType getServerPluginStatus(org.rhq.core.domain.plugin.PluginKey pluginKey)
ServerPluginsLocal
getServerPluginStatus in interface ServerPluginsLocalpluginKey - the key of the plugin whose status is to be returned.
null indicates an unknown plugin.public Map<ServerPluginType,List<org.rhq.core.domain.plugin.PluginKey>> getInstalledServerPluginsGroupedByType()
ServerPluginsLocal
getInstalledServerPluginsGroupedByType in interface ServerPluginsLocal
public org.rhq.core.domain.configuration.definition.ConfigurationDefinition getServerPluginConfigurationDefinition(org.rhq.core.domain.plugin.PluginKey pluginKey)
throws Exception
ServerPluginsLocal
getServerPluginConfigurationDefinition in interface ServerPluginsLocalException
public org.rhq.core.domain.configuration.definition.ConfigurationDefinition getServerPluginScheduledJobsDefinition(org.rhq.core.domain.plugin.PluginKey pluginKey)
throws Exception
ServerPluginsLocal
getServerPluginScheduledJobsDefinition in interface ServerPluginsLocalException
public List<ControlDefinition> getServerPluginControlDefinitions(org.rhq.core.domain.plugin.PluginKey pluginKey)
throws Exception
ServerPluginsLocal
getServerPluginControlDefinitions in interface ServerPluginsLocalException - if failed to determine a plugin's control definitions
public ControlResults invokeServerPluginControl(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.plugin.PluginKey pluginKey,
String controlName,
org.rhq.core.domain.configuration.Configuration params)
throws Exception
ServerPluginsLocal
invokeServerPluginControl in interface ServerPluginsLocalsubject - user making the request, must have the proper permissionspluginKey - identifies the plugin whose control operation is to be invokedcontrolName - identifies the name of the control operation to invokeparams - parameters to pass to the control operation; may be null
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||