org.rhq.enterprise.server.plugin.pc.content.metadata
Class ContentSourcePluginMetadataManager

java.lang.Object
  extended by org.rhq.enterprise.server.plugin.pc.content.metadata.ContentSourcePluginMetadataManager

public class ContentSourcePluginMetadataManager
extends Object

This is meant to provide an interface to the underlying metadata of a server plugin for content. 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.

Author:
John Mazzitelli

Constructor Summary
ContentSourcePluginMetadataManager()
           
 
Method Summary
 Set<org.rhq.core.domain.content.ContentSourceType> getAllContentSourceTypes()
          Returns all the ContentSourceTypes that have been defined in all plugins.
 org.rhq.core.domain.content.ContentSourceType getContentSourceType(String typeName)
          Returns the ContentSourceType that has the given name.
 Collection<org.rhq.core.domain.content.ContentSourceType> getContentSourceTypesByPlugin(String pluginName)
          Returns the ContentSourceTypes defined by the given plugin.
 String getPluginNameFromContentSourceType(org.rhq.core.domain.content.ContentSourceType type)
          Returns the name of the plugin that deployed the given content source type.
 Set<String> getPluginNames()
          Returns the names of all plugins that defined content source types.
 Collection<org.rhq.core.domain.content.ContentSourceType> loadPlugin(ContentPluginDescriptorType pluginDescriptor)
          Transforms the pluginDescriptor into domain object form and stores those objects.
 void unloadPlugin(String pluginName)
          This will remove all knowledge of the given plugin - that is, all content source types deployed by the plugin will be removed from this manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentSourcePluginMetadataManager

public ContentSourcePluginMetadataManager()
Method Detail

unloadPlugin

public void unloadPlugin(String pluginName)
This will remove all knowledge of the given plugin - that is, all content source types deployed by the plugin will be removed from this manager.

Parameters:
pluginName - the plugin whose types are to be removed

loadPlugin

public Collection<org.rhq.core.domain.content.ContentSourceType> loadPlugin(ContentPluginDescriptorType pluginDescriptor)
Transforms the pluginDescriptor into domain object form and stores those objects.

Parameters:
pluginDescriptor - the descriptor to transform
Returns:
the new content source types represented by this descriptor (not a copy)

getContentSourceType

public org.rhq.core.domain.content.ContentSourceType getContentSourceType(String typeName)
Returns the ContentSourceType that has the given name. If no plugin defined a type with that name, null is returned.

Parameters:
typeName - the name of the content source type to return
Returns:
the content source type with the given name or null if none exists

getAllContentSourceTypes

public Set<org.rhq.core.domain.content.ContentSourceType> getAllContentSourceTypes()
Returns all the ContentSourceTypes that have been defined in all plugins.

Returns:
all content source types defined; will be empty if there are none

getPluginNames

public Set<String> getPluginNames()
Returns the names of all plugins that defined content source types.

Returns:
all plugin names

getContentSourceTypesByPlugin

public Collection<org.rhq.core.domain.content.ContentSourceType> getContentSourceTypesByPlugin(String pluginName)
Returns the ContentSourceTypes defined by the given plugin. If there is no plugin with that name, null is returned.

Parameters:
pluginName - the name of the plugin whose types are to be returned
Returns:
the content source types defined by the given plugin or null if no plugin exists with that name - the returned collection is not a copy, its backed by this manager

getPluginNameFromContentSourceType

public String getPluginNameFromContentSourceType(org.rhq.core.domain.content.ContentSourceType type)
Returns the name of the plugin that deployed the given content source type. null will be returned if unknown.

Parameters:
type - the name of the plugin that deployed this type is to be returned
Returns:
name of the plugin


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