|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.core.clientapi.agent.metadata.PluginMetadataManager
public class PluginMetadataManager
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. This object can also be used to separately store plugin descriptors without converting them into types (i.e. the descriptor staging area). The thinking here is the server has the ability to get all the plugin descriptors early on and in any order; only later does it load/register those plugins (because it needs to order them via the proper dependency graph. There may be times when we need a plugin's descriptor but before that plugin has been loaded/registered. This manager lets us stage those descriptors prior to converting them into types.
| Field Summary | |
|---|---|
static org.rhq.core.domain.resource.ResourceType |
TEST_PLATFORM_TYPE
|
| Constructor Summary | |
|---|---|
PluginMetadataManager()
|
|
| Method Summary | |
|---|---|
org.rhq.core.domain.resource.ResourceType |
addTestPlatformType()
Adds a platform resource type to represent an "anonymous" platform. |
PluginDependencyGraph |
buildDependencyGraph()
Builds the dependency graph using all known descriptors. |
Set<org.rhq.core.domain.resource.ResourceType> |
getAllTypes()
|
String |
getComponentClass(org.rhq.core.domain.resource.ResourceType resourceType)
|
String |
getDiscoveryClass(org.rhq.core.domain.resource.ResourceType resourceType)
|
Map<String,PluginDescriptor> |
getEmbeddedExtensions(String parentPlugin)
Returns a map of plugins and their descriptors where those plugins are child extensions of the given parent plugin. |
PluginDescriptor |
getPluginDescriptor(String pluginName)
Get the plugin descriptor for the named plugin. |
String |
getPluginLifecycleListenerClass(String pluginName)
|
Set<String> |
getPluginNames()
|
Set<org.rhq.core.domain.resource.ResourceType> |
getRootTypes()
|
org.rhq.core.domain.resource.ResourceType |
getType(org.rhq.core.domain.resource.ResourceType resourceType)
|
org.rhq.core.domain.resource.ResourceType |
getType(String typeName,
org.rhq.core.domain.resource.ResourceCategory category)
|
org.rhq.core.domain.resource.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<org.rhq.core.domain.resource.ResourceType> |
getTypesForCategory(org.rhq.core.domain.resource.ResourceCategory category)
Return the Resource types applicable for a category |
Set<org.rhq.core.domain.resource.ResourceType> |
loadPlugin(PluginDescriptor pluginDescriptor)
Transforms the pluginDescriptor into domain object form and stores into this object's type system. |
void |
storePluginDescriptor(PluginDescriptor descriptor)
This will simply squirrel away the given plugin descriptor for later retrieval via getPluginDescriptor(String). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final org.rhq.core.domain.resource.ResourceType TEST_PLATFORM_TYPE
| Constructor Detail |
|---|
public PluginMetadataManager()
| Method Detail |
|---|
public void storePluginDescriptor(PluginDescriptor descriptor)
getPluginDescriptor(String). Use this as a simple storage
mechanism for descriptors. Nothing is done with descriptor other than store it
in memory for later retrieval.
descriptor - the descriptor to storepublic PluginDescriptor getPluginDescriptor(String pluginName)
storePluginDescriptor(PluginDescriptor), it will be used. If a new descriptor
hasn't been staged, but a previous descriptor was loaded and converted into types,
via loadPlugin(PluginDescriptor), it will be used.
If the descriptor cannot be found anywhere, returns null.
pluginName - name of the plugin whose descriptor is to be returned.
public org.rhq.core.domain.resource.ResourceType addTestPlatformType()
public String getPluginLifecycleListenerClass(String pluginName)
public String getDiscoveryClass(org.rhq.core.domain.resource.ResourceType resourceType)
public String getComponentClass(org.rhq.core.domain.resource.ResourceType resourceType)
public Set<org.rhq.core.domain.resource.ResourceType> loadPlugin(PluginDescriptor pluginDescriptor)
pluginDescriptor - the descriptor to transform
public org.rhq.core.domain.resource.ResourceType getType(String typeName,
org.rhq.core.domain.resource.ResourceCategory category)
@Nullable
public org.rhq.core.domain.resource.ResourceType getType(String resourceTypeName,
String pluginName)
resourceTypeName - the Resource type namepluginName - the name of the plugin that defines the Resource type
@Nullable public org.rhq.core.domain.resource.ResourceType getType(org.rhq.core.domain.resource.ResourceType resourceType)
public Set<org.rhq.core.domain.resource.ResourceType> getTypesForCategory(org.rhq.core.domain.resource.ResourceCategory category)
category - ResourceCategory to look up
public Set<org.rhq.core.domain.resource.ResourceType> getAllTypes()
public Set<org.rhq.core.domain.resource.ResourceType> getRootTypes()
public Set<String> getPluginNames()
public PluginDependencyGraph buildDependencyGraph()
public Map<String,PluginDescriptor> getEmbeddedExtensions(String parentPlugin)
loaded
and those that were merely stored.
parentPlugin - the parent plugin
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||