public interface ServerPluginManagerLocal extends ServerPluginManagerRemote
PluginStatusType.INSTALLED
plugins; only when explicitly stated will a method return data on
PluginStatusType.DELETED plugins, too.| Modifier and Type | Method and Description |
|---|---|
void |
acknowledgeDeletedPluginsBy(int serverId)
The provided server acknowledges the deletion of all plugins marked as deleted by calling this method.
|
List<org.rhq.core.domain.plugin.ServerPlugin> |
getAllServerPlugins()
Deprecated.
do not use this as the deleted plugins are essentially ephemeral and will be removed from the
database in due time automatically.
|
List<org.rhq.core.domain.plugin.ServerPlugin> |
getAllServerPluginsById(List<Integer> pluginIds)
Get a list of both installed and deleted plugins from their IDs.
|
List<org.rhq.core.domain.plugin.ServerPlugin> |
getDeletedPlugins()
Returns the plugins that have been marked as deleted.
|
List<org.rhq.core.domain.plugin.ServerPlugin> |
getEnabledServerPluginsByType(String type)
Return all the server plugins that match a certain type string.
|
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.
|
boolean |
isReadyForPurge(int pluginId)
A helper method for
PurgePluginsJob. |
void |
purgeServerPlugin(int pluginId)
Purges the server plugin from the database.
|
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 |
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.
|
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.
|
deleteServerPlugins, disableServerPlugins, enableServerPlugins, getServerPlugins, invokeServerPluginControl, restartMasterPluginContainerList<org.rhq.core.domain.plugin.ServerPlugin> getServerPlugins()
@Deprecated List<org.rhq.core.domain.plugin.ServerPlugin> getAllServerPlugins()
List<org.rhq.core.domain.plugin.ServerPlugin> getDeletedPlugins()
PurgePluginsJob
which goes ahead and removes such plugins from database once it's safe to do so.org.rhq.core.domain.plugin.ServerPlugin getServerPlugin(org.rhq.core.domain.plugin.PluginKey key)
key - identifies the plugin to findjavax.persistence.NoResultException - when no plugin with that name existsorg.rhq.core.domain.plugin.ServerPlugin getServerPluginRelationships(org.rhq.core.domain.plugin.ServerPlugin plugin)
plugin - javax.persistence.NoResultException - when no plugin with that name existsList<org.rhq.core.domain.plugin.ServerPlugin> getServerPluginsById(List<Integer> pluginIds)
pluginIds - the IDs of the plugins to load.List<org.rhq.core.domain.plugin.ServerPlugin> getAllServerPluginsById(List<Integer> pluginIds)
pluginIds - the IDs of the plugins to load.long getLastConfigurationChangeTimestamp(int pluginId)
pluginId - ServerPluginDescriptorType getServerPluginDescriptor(org.rhq.core.domain.plugin.PluginKey pluginKey) throws Exception
pluginKey - Exception - if the descriptor could not be retrieved or parsed for the given pluginList<org.rhq.core.domain.plugin.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.void setServerPluginEnabledFlag(org.rhq.core.domain.auth.Subject subject,
int pluginId,
boolean enabled)
throws Exception
subject - user making the requestpluginId - the plugin to be enabledenabled - the value of the enabled flag for the pluginif - failed to update the pluginExceptionvoid setServerPluginStatus(org.rhq.core.domain.auth.Subject subject,
List<Integer> pluginIds,
org.rhq.core.domain.plugin.PluginStatusType status)
throws 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 pluginsif - failed to update one of the pluginsExceptionorg.rhq.core.domain.plugin.ServerPlugin registerServerPlugin(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.plugin.ServerPlugin plugin,
File pluginFile)
throws Exception
subject - the user that needs to have permissions to add a plugin to the systemplugin - the plugin definitionpluginFile - the actual plugin file itselfException - if failed to fully register the pluginorg.rhq.core.domain.plugin.ServerPlugin updateServerPluginExceptContent(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.plugin.ServerPlugin plugin)
throws Exception
subject - user making the requestplugin - existing plugin with updated dataException - if the plugin did not already exist or an error occurred that caused the update to failvoid purgeServerPlugin(int pluginId)
PurgePluginsJob.pluginId - the id of the server plugin to deleteorg.rhq.core.domain.plugin.PluginStatusType getServerPluginStatus(org.rhq.core.domain.plugin.PluginKey pluginKey)
pluginKey - the key of the plugin whose status is to be returned.null indicates an unknown plugin.Map<ServerPluginType,List<org.rhq.core.domain.plugin.PluginKey>> getInstalledServerPluginsGroupedByType()
org.rhq.core.domain.configuration.definition.ConfigurationDefinition getServerPluginConfigurationDefinition(org.rhq.core.domain.plugin.PluginKey pluginKey)
throws Exception
pluginKey - Exceptionorg.rhq.core.domain.configuration.definition.ConfigurationDefinition getServerPluginScheduledJobsDefinition(org.rhq.core.domain.plugin.PluginKey pluginKey)
throws Exception
pluginKey - ExceptionList<ControlDefinition> getServerPluginControlDefinitions(org.rhq.core.domain.plugin.PluginKey pluginKey) throws Exception
pluginKey - Exception - if failed to determine a plugin's control definitionsList<org.rhq.core.domain.plugin.ServerPlugin> getEnabledServerPluginsByType(String type)
type - Name of the typeboolean isReadyForPurge(int pluginId)
PurgePluginsJob.
Checks whether given server plugin is safe for purging from the database.void acknowledgeDeletedPluginsBy(int serverId)
ServerPluginScannerserverId - the id of the server that wants to acknowledge that it has seen the deleted pluginsCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.