org.rhq.core.domain.common
Class EntityContext

java.lang.Object
  extended by org.rhq.core.domain.common.EntityContext
All Implemented Interfaces:
Serializable

public class EntityContext
extends Object
implements Serializable

Category is assigned with the following preference assuming multiple categories can be satisfied with the available context information:

 ResourceGroup
 AutoGroup
 ResourceTemplate
 Resource
 

See Also:
Serialized Form

Nested Class Summary
static class EntityContext.Type
           
 
Field Summary
 int groupId
           
 int parentResourceId
           
 int resourceId
           
 int resourceTypeId
           
 EntityContext.Type type
           
 
Constructor Summary
EntityContext()
           
EntityContext(Integer resourceId, Integer groupId, Integer parentResourceId, Integer resourceTypeId)
           
 
Method Summary
static EntityContext forAutoGroup(int parentResourceId, int resourceTypeId)
           
static EntityContext forGroup(int groupId)
           
static EntityContext forGroup(int groupId, boolean isAutoCluster, boolean isAutoGroup)
           
static EntityContext forGroup(ResourceGroup group)
           
static EntityContext forResource(int resourceId)
           
static EntityContext forSubsystemView()
           
static EntityContext forTemplate(int resourceTypeId)
           
static EntityContext fromCriteriaMap(Map<String,Object> criteriaMap)
           
 int getGroupId()
           
 String getLegacyKey()
           
 int getParentResourceId()
           
 int getResourceId()
           
 int getResourceTypeId()
           
 EntityContext.Type getType()
           
 String getUnknownContextMessage()
           
 boolean isAutoCluster()
           
 boolean isAutoGroup()
           
 boolean isResource()
           
 boolean isResourceGroup()
           
 boolean isSubsystemView()
           
 Map<String,String> toCriteriaMap()
           
 String toShortString()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

public EntityContext.Type type

resourceId

public int resourceId

groupId

public int groupId

parentResourceId

public int parentResourceId

resourceTypeId

public int resourceTypeId
Constructor Detail

EntityContext

public EntityContext()

EntityContext

public EntityContext(Integer resourceId,
                     Integer groupId,
                     Integer parentResourceId,
                     Integer resourceTypeId)
Method Detail

isResource

public boolean isResource()

isResourceGroup

public boolean isResourceGroup()

isAutoCluster

public boolean isAutoCluster()

isAutoGroup

public boolean isAutoGroup()

isSubsystemView

public boolean isSubsystemView()

getType

public EntityContext.Type getType()

getResourceId

public int getResourceId()

getGroupId

public int getGroupId()

getParentResourceId

public int getParentResourceId()

getResourceTypeId

public int getResourceTypeId()

forResource

public static EntityContext forResource(int resourceId)

forGroup

public static EntityContext forGroup(int groupId)

forGroup

public static EntityContext forGroup(int groupId,
                                     boolean isAutoCluster,
                                     boolean isAutoGroup)

forGroup

public static EntityContext forGroup(ResourceGroup group)

forAutoGroup

public static EntityContext forAutoGroup(int parentResourceId,
                                         int resourceTypeId)

forTemplate

public static EntityContext forTemplate(int resourceTypeId)

forSubsystemView

public static EntityContext forSubsystemView()

fromCriteriaMap

public static EntityContext fromCriteriaMap(Map<String,Object> criteriaMap)

toCriteriaMap

public Map<String,String> toCriteriaMap()

getLegacyKey

public String getLegacyKey()

getUnknownContextMessage

public String getUnknownContextMessage()

toString

public String toString()
Overrides:
toString in class Object

toShortString

public String toShortString()


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