org.rhq.core.clientapi.agent.metadata
Class PluginMetadataManager

java.lang.Object
  extended by org.rhq.core.clientapi.agent.metadata.PluginMetadataManager

public class PluginMetadataManager
extends Object

This is meant to provide an interface to the underlying metadata of a plugin. It will load, translate and cache the metadata for the rest of the services in the form of the domain object classes and the jaxb version of the descriptors.


Field Summary
static ResourceType TEST_PLATFORM_TYPE
           
 
Constructor Summary
PluginMetadataManager()
           
 
Method Summary
 ResourceType addTestPlatformType()
          Adds a platform resource type to represent an "anonymous" platform.
 Set<ResourceType> getAllTypes()
           
 String getComponentClass(ResourceType resourceType)
           
 String getDiscoveryClass(ResourceType resourceType)
           
 String getPluginLifecycleListenerClass(String pluginName)
           
 Set<String> getPluginNames()
           
 Set<ResourceType> getRootTypes()
           
 ResourceType getType(ResourceType resourceType)
           
 ResourceType getType(String typeName, ResourceCategory category)
           
 ResourceType getType(String resourceTypeName, String pluginName)
          Returns the Resource type with the specified name and plugin, or null if no such Resource type exists.
 Set<ResourceType> getTypesForCategory(ResourceCategory category)
          Return the Resource types applicable for a category
 Set<ResourceType> loadPlugin(PluginDescriptor pluginDescriptor)
          Transforms the pluginDescriptor into domain object form and stores into this object's type system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEST_PLATFORM_TYPE

public static final ResourceType TEST_PLATFORM_TYPE
Constructor Detail

PluginMetadataManager

public PluginMetadataManager()
Method Detail

addTestPlatformType

public ResourceType addTestPlatformType()
Adds a platform resource type to represent an "anonymous" platform. This should really only ever be used in a test scenario when the platform plugin is unavailable.

Returns:
the very thin anonymous resource type object

getPluginLifecycleListenerClass

public String getPluginLifecycleListenerClass(String pluginName)

getDiscoveryClass

public String getDiscoveryClass(ResourceType resourceType)

getComponentClass

public String getComponentClass(ResourceType resourceType)

loadPlugin

public Set<ResourceType> loadPlugin(PluginDescriptor pluginDescriptor)
Transforms the pluginDescriptor into domain object form and stores into this object's type system.

Parameters:
pluginDescriptor - the descriptor to transform
Returns:
the root resource types represented by this descriptor, or null on failure

getType

public ResourceType getType(String typeName,
                            ResourceCategory category)

getType

@Nullable
public ResourceType getType(String resourceTypeName,
                                     String pluginName)
Returns the Resource type with the specified name and plugin, or null if no such Resource type exists.

Parameters:
resourceTypeName - the Resource type name
pluginName - the name of the plugin that defines the Resource type
Returns:
the Resource type with the specified name and plugin, or null if no such Resource type exists

getType

@Nullable
public ResourceType getType(ResourceType resourceType)

getTypesForCategory

public Set<ResourceType> getTypesForCategory(ResourceCategory category)
Return the Resource types applicable for a category

Parameters:
category - ResourceCategory to look up
Returns:
the types for this category or an empty Set

getAllTypes

public Set<ResourceType> getAllTypes()

getRootTypes

public Set<ResourceType> getRootTypes()

getPluginNames

public Set<String> getPluginNames()


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