Package com.hp.ucmdb.api.classmodel
Interface ClassDefinition
public interface ClassDefinition
Represents a definition of a type (class) in the uCMDB.
-
Method Summary
Modifier and TypeMethodDescriptionThe attributes defined for this type and its supertypes.The qualifiers defined for this type and its super-types.getAttribute
(String attributeName) The Attribute object of the specified name.getAttribute
(String attributeName, boolean includeCmdbId) The Attribute object of the specified name.AnIterable
collection of all types derived directly from this type.The attributes defined for this type.The qualifiers defined for this type.The description of the purpose of the type.The class name to be displayed on the uCMDB user interface.getName()
The class name to be used in code.TheClassDefinition
object representing the super-type of this type.The name of the super-type of this type.getQualifier
(String qualifierName) The Qualifier object of the specified name.AnIterable
collection of all types derived directly or indirectly from this type.boolean
hasAttribute
(String attributeName) Checks whether this type or one of its super-types defines an attribute with the specified name.boolean
hasQualifier
(String qualifierName) Checks whether this type or one of its super-types is marked with the specified qualifier.boolean
boolean
boolean
isSubtypeOf
(ClassDefinition anotherType) Checks whetherthis
is either the ClassDefinition of the specified type or is descended from the specified type.boolean
isSubtypeOf
(String anotherTypeName) Checks whetherthis
is either the ClassDefinition of the specified type or is descended from the name of specified type.
-
Method Details
-
getName
String getName()The class name to be used in code. -
getDisplayName
String getDisplayName()The class name to be displayed on the uCMDB user interface. -
getDescription
String getDescription()The description of the purpose of the type. -
getParentClassName
String getParentClassName()The name of the super-type of this type. -
getParentClass
ClassDefinition getParentClass()TheClassDefinition
object representing the super-type of this type. -
getDeclaredQualifiers
The qualifiers defined for this type. The Map does not include qualifiers for the super-types.- Returns:
- a read-only Map of qualifier name to qualifier object #deprecated - use getAllQualifiers instead
-
getAllQualifiers
The qualifiers defined for this type and its super-types.- Returns:
- a read-only Map of qualifier name to qualifier object
-
hasQualifier
Checks whether this type or one of its super-types is marked with the specified qualifier. -
getQualifier
The Qualifier object of the specified name. The qualifier is returned if this type or one of its super-types is marked with the qualifier. Otherwise, throws exception.- Returns:
- qualifier object representing a type qualifier with the specified name
- Throws:
QualifierDoesNotExistException
- if neither this type nor one of its super-types is marked with the specified qualifier.
-
getDeclaredAttributes
The attributes defined for this type. Attributes defined for supertypes are not included.- Returns:
- a read-only Map of attribute name to attribute object
-
getAllAttributes
The attributes defined for this type and its supertypes.- Returns:
- a read-only Map of attribute name to attribute object
-
hasAttribute
Checks whether this type or one of its super-types defines an attribute with the specified name. -
getAttribute
The Attribute object of the specified name. The attribute is returned if this type defines it or inherits it from one of its super-types. Otherwise, throws exception.- Throws:
AttributeDoesNotExistException
- if this type neither defines nor inherits an attribute with the specified name
-
getAttribute
Attribute getAttribute(String attributeName, boolean includeCmdbId) throws AttributeDoesNotExistException The Attribute object of the specified name. The attribute is returned if this type defines it or inherits it from one of its super-types. Otherwise, throws exception.- Throws:
AttributeDoesNotExistException
- if this type neither defines nor inherits an attribute with the specified name
-
isSubtypeOf
Checks whetherthis
is either the ClassDefinition of the specified type or is descended from the specified type.- Parameters:
anotherType
-- Returns:
true
if this type is the same as or is a descendant of the specified type, otherwisefalse
-
isSubtypeOf
Checks whetherthis
is either the ClassDefinition of the specified type or is descended from the name of specified type.- Parameters:
anotherTypeName
-- Returns:
true
if this type is the same as or is a descendant of the specified type, otherwisefalse
-
getChildClasses
Collection<ClassDefinition> getChildClasses()AnIterable
collection of all types derived directly from this type. -
getSubclasses
Iterable<ClassDefinition> getSubclasses()AnIterable
collection of all types derived directly or indirectly from this type. -
isFactory
boolean isFactory()- Returns:
true
if this class is created by the production, otherwisefalse
-
isModifiedByUser
boolean isModifiedByUser()- Returns:
true
if this class is modified by uder, otherwisefalse
-