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

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

public class SubCategoriesMetadataParser
extends Object

Parser responsible for translating the subcategories section of the rhq-plugin.xml descriptor into domain objects. Also has methods which deal with translating the subcategory="blah" attribute on Platform/Server/Service ojbects into an actual ResourceSubCategory object

Author:
Charles Crouch

Constructor Summary
SubCategoriesMetadataParser()
           
 
Method Summary
static org.rhq.core.domain.resource.ResourceSubCategory findSubCategoryOnResourceTypeAncestor(org.rhq.core.domain.resource.ResourceType resourceType, String subCategoryName)
          Given a resourceType this method looks on the parent resourcetypes/grandparent resourcetypes...
static org.rhq.core.domain.resource.ResourceSubCategory getSubCategory(SubCategoryDescriptor descriptor, org.rhq.core.domain.resource.ResourceType resourceType)
          Parses the contents of the SubCategoryDescriptor and populates an instance of the domain model representation, ResourceSubCategory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubCategoriesMetadataParser

public SubCategoriesMetadataParser()
Method Detail

getSubCategory

public static org.rhq.core.domain.resource.ResourceSubCategory getSubCategory(SubCategoryDescriptor descriptor,
                                                                              org.rhq.core.domain.resource.ResourceType resourceType)
Parses the contents of the SubCategoryDescriptor and populates an instance of the domain model representation, ResourceSubCategory

Parameters:
descriptor - non-null SubCategoryDescriptor.
Returns:
domain model object populated with the descriptor's values.

findSubCategoryOnResourceTypeAncestor

@Nullable
public static org.rhq.core.domain.resource.ResourceSubCategory findSubCategoryOnResourceTypeAncestor(@NotNull
                                                                                                              org.rhq.core.domain.resource.ResourceType resourceType,
                                                                                                              @Nullable
                                                                                                              String subCategoryName)
Given a resourceType this method looks on the parent resourcetypes/grandparent resourcetypes... of the specified resourceType to see if a child ResourceSubCategory with the specified name has been defined on one of them. If the ResourceSubCategory cannot be found, null will be returned

Parameters:
resourceType -
subCategoryName -
Returns:


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