org.rhq.enterprise.server.resource.metadata
Interface ResourceMetadataManagerLocal

All Known Implementing Classes:
ResourceMetadataManagerBean

public interface ResourceMetadataManagerLocal

Provides functionality surrounding agent plugins and their resource metadata.


Method Summary
 Plugin getPlugin(java.lang.String name)
          Given the plugin name, will return that plugin.
 java.util.List<Plugin> getPlugins()
          Returns the list of all plugins deployed in the server.
 java.util.List<Plugin> getPluginsByResourceTypeAndCategory(java.lang.String resourceTypeName, ResourceCategory resourceCategory)
           
 void registerPlugin(Subject whoami, Plugin plugin, PluginDescriptor metadata, java.io.File pluginFile, boolean forceUpdate)
          For server-side registration of plugin archives.
 

Method Detail

registerPlugin

void registerPlugin(Subject whoami,
                    Plugin plugin,
                    PluginDescriptor metadata,
                    java.io.File pluginFile,
                    boolean forceUpdate)
                    throws java.lang.Exception
For server-side registration of plugin archives. At server startup or as new plugins are runtime deployed the jar will have its descriptor read and parsed and the metadata for the plugin will be updated in the db. If you provide a non-null pluginFile, 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).

Parameters:
plugin - The plugin object being deployed
metadata - The plugin descriptor file
pluginFile - 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
Throws:
java.lang.Exception

getPlugins

java.util.List<Plugin> getPlugins()
Returns the list of all plugins deployed in the server.

Returns:
list of plugins deployed

getPluginsByResourceTypeAndCategory

java.util.List<Plugin> getPluginsByResourceTypeAndCategory(java.lang.String resourceTypeName,
                                                           ResourceCategory resourceCategory)

getPlugin

Plugin getPlugin(java.lang.String name)
Given the plugin name, will return that plugin. The name is defined in the plugin descriptor.

Parameters:
name - name of plugin as defined in plugin descriptor.
Returns:
the plugin
Throws:
javax.persistence.NoResultException - when no plugin with that name exists


Copyright © 2008-2009 Red Hat, Inc.. All Rights Reserved.