|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.enterprise.server.resource.metadata.PluginManagerBean
public class PluginManagerBean
| Constructor Summary | |
|---|---|
PluginManagerBean()
|
|
| Method Summary | |
|---|---|
void |
deletePlugins(org.rhq.core.domain.auth.Subject subject,
List<Integer> pluginIds)
This method puts the plugin into a deleted state and removes the plugin JAR file from the file system. |
void |
disablePlugins(org.rhq.core.domain.auth.Subject subject,
List<Integer> pluginIds)
|
void |
enablePlugins(org.rhq.core.domain.auth.Subject subject,
List<Integer> pluginIds)
|
List<org.rhq.core.domain.plugin.Plugin> |
findAllDeletedPlugins()
|
List<org.rhq.core.domain.plugin.Plugin> |
findPluginsMarkedForPurge()
|
List<org.rhq.core.domain.plugin.Plugin> |
getAllPluginsById(List<Integer> pluginIds)
Returns a list of plugins with the specified ids. |
List<org.rhq.core.domain.plugin.Plugin> |
getInstalledPlugins()
Returns the list of all plugins deployed in the server. |
org.rhq.core.domain.plugin.Plugin |
getPlugin(String name)
Returns the information on the given plugin as found in the database. |
File |
getPluginDropboxDirectory()
Returns the directory where plugins can be dropped for inclusion into the system. |
List<org.rhq.core.domain.plugin.Plugin> |
getPlugins()
|
List<org.rhq.core.domain.plugin.Plugin> |
getPluginsByResourceTypeAndCategory(String resourceTypeName,
org.rhq.core.domain.resource.ResourceCategory resourceCategory)
|
List<PluginStats> |
getPluginStats(List<Integer> pluginIds)
|
boolean |
installPluginJar(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.plugin.Plugin newPlugin,
PluginDescriptor pluginDescriptor,
File pluginFile)
Exists only for transactional boundary reasons. |
boolean |
isReadyForPurge(org.rhq.core.domain.plugin.Plugin plugin)
|
void |
markPluginsForPurge(org.rhq.core.domain.auth.Subject subject,
List<Integer> pluginIds)
Schedules a plugin to be purged. |
void |
purgePlugins(List<org.rhq.core.domain.plugin.Plugin> plugins)
Permanently deletes the plugins from the database. |
void |
registerPlugin(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.plugin.Plugin plugin,
PluginDescriptor pluginDescriptor,
File pluginFile,
boolean forceUpdate)
For server-side registration of plugin archives. |
boolean |
registerPluginTypes(org.rhq.core.domain.plugin.Plugin newPlugin,
PluginDescriptor pluginDescriptor,
boolean newOrUpdated,
boolean forceUpdate)
Exists only to for transactional boundary reasons. |
void |
setPluginEnabledFlag(org.rhq.core.domain.auth.Subject subject,
int pluginId,
boolean enabled)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PluginManagerBean()
| Method Detail |
|---|
public org.rhq.core.domain.plugin.Plugin getPlugin(String name)
getPlugin in interface PluginManagerLocalname - the name of a plugin
javax.persistence.NoResultException - when no plugin with that name exists
public void markPluginsForPurge(org.rhq.core.domain.auth.Subject subject,
List<Integer> pluginIds)
throws Exception
PluginManagerLocalDELETED and its ctime is set to Plugin.PURGED. This method
does not flip the status of the plugins to DELETED since it assumes that has already been done. It
only sets ctime to PURGED.
markPluginsForPurge in interface PluginManagerLocalsubject - The user purging the pluginpluginIds - The ids of the plugins to be purged
Exception - if an error occursPurgePluginsJobpublic boolean isReadyForPurge(org.rhq.core.domain.plugin.Plugin plugin)
isReadyForPurge in interface PluginManagerLocalplugin - The plugin to check
public void purgePlugins(List<org.rhq.core.domain.plugin.Plugin> plugins)
PluginManagerLocalPurgePluginsJob.
purgePlugins in interface PluginManagerLocalplugins - The plugins to remove from the database.public List<org.rhq.core.domain.plugin.Plugin> getPlugins()
getPlugins in interface PluginManagerLocalpublic List<org.rhq.core.domain.plugin.Plugin> getInstalledPlugins()
PluginManagerLocal
getInstalledPlugins in interface PluginManagerLocalpublic List<org.rhq.core.domain.plugin.Plugin> findAllDeletedPlugins()
findAllDeletedPlugins in interface PluginManagerLocalpublic List<org.rhq.core.domain.plugin.Plugin> findPluginsMarkedForPurge()
findPluginsMarkedForPurge in interface PluginManagerLocalpublic List<org.rhq.core.domain.plugin.Plugin> getAllPluginsById(List<Integer> pluginIds)
PluginManagerLocal
getAllPluginsById in interface PluginManagerLocalpluginIds - The ids of the plugins to fetch
public List<org.rhq.core.domain.plugin.Plugin> getPluginsByResourceTypeAndCategory(String resourceTypeName,
org.rhq.core.domain.resource.ResourceCategory resourceCategory)
getPluginsByResourceTypeAndCategory in interface PluginManagerLocal
public void enablePlugins(org.rhq.core.domain.auth.Subject subject,
List<Integer> pluginIds)
throws Exception
enablePlugins in interface PluginManagerLocalException
public void disablePlugins(org.rhq.core.domain.auth.Subject subject,
List<Integer> pluginIds)
throws Exception
disablePlugins in interface PluginManagerLocalException
public void deletePlugins(org.rhq.core.domain.auth.Subject subject,
List<Integer> pluginIds)
throws Exception
PluginManagerLocal
deletePlugins in interface PluginManagerLocalsubject - The user performing the deletionpluginIds - The ids of the plugins to be deleted
Exception - if an error occurspublic List<PluginStats> getPluginStats(List<Integer> pluginIds)
getPluginStats in interface PluginManagerLocal
public void setPluginEnabledFlag(org.rhq.core.domain.auth.Subject subject,
int pluginId,
boolean enabled)
throws Exception
setPluginEnabledFlag in interface PluginManagerLocalExceptionpublic File getPluginDropboxDirectory()
PluginManagerLocal
getPluginDropboxDirectory in interface PluginManagerLocal
public void registerPlugin(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.plugin.Plugin plugin,
PluginDescriptor pluginDescriptor,
File pluginFile,
boolean forceUpdate)
throws Exception
PluginManagerLocalpluginFile, and the plugin is deemed to be new or updated, the content
of the file will be streamed to the database. Note that if you provide a non-null file, you must ensure
its MD5 matches that of the file (i.e. this method will not attempt to recompute the file's MD5, it will assume
the caller has already done that and provided the proper MD5 in plugin).
registerPlugin in interface PluginManagerLocalplugin - The plugin object being deployedpluginDescriptor - The plugin descriptor filepluginFile - the actual plugin file whose content will be stored in the database (will be ignored if null)forceUpdate - if true, the plugin's types will be updated, even if the plugin hasn't changed since
the last time it was registered
Exception
public boolean installPluginJar(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.plugin.Plugin newPlugin,
PluginDescriptor pluginDescriptor,
File pluginFile)
throws Exception
PluginManagerLocal
installPluginJar in interface PluginManagerLocalException
public boolean registerPluginTypes(org.rhq.core.domain.plugin.Plugin newPlugin,
PluginDescriptor pluginDescriptor,
boolean newOrUpdated,
boolean forceUpdate)
throws Exception
PluginManagerLocal
registerPluginTypes in interface PluginManagerLocalException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||