com.hp.ucmdb.api.classmodel
Interface ClassDefinition


public interface ClassDefinition

Represents a definition of a type (class) in the uCMDB.


Method Summary
 java.util.Map<java.lang.String,Attribute> getAllAttributes()
          The attributes defined for this type and its supertypes.
 java.util.Map<java.lang.String,Qualifier> getAllQualifiers()
          The qualifiers defined for this type and its super-types.
 Attribute getAttribute(java.lang.String attributeName)
          The Attribute object of the specified name.
 java.util.Collection<ClassDefinition> getChildClasses()
          An Iterable collection of all types derived directly from this type.
 java.util.Map<java.lang.String,Attribute> getDeclaredAttributes()
          The attributes defined for this type.
 java.util.Map<java.lang.String,Qualifier> getDeclaredQualifiers()
          The qualifiers defined for this type.
 java.lang.String getDescription()
          The description of the purpose of the type.
 java.lang.String getDisplayName()
          The class name to be displayed on the uCMDB user interface.
 java.lang.String getName()
          The class name to be used in code.
 ClassDefinition getParentClass()
          The ClassDefinition object representing the super-type of this type.
 java.lang.String getParentClassName()
          The name of the super-type of this type.
 Qualifier getQualifier(java.lang.String qualifierName)
          The Qualifier object of the specified name.
 java.lang.Iterable<ClassDefinition> getSubclasses()
          An Iterable collection of all types derived directly or indirectly from this type.
 boolean hasAttribute(java.lang.String attributeName)
          Checks whether this type or one of its super-types defines an attribute with the specified name.
 boolean hasQualifier(java.lang.String qualifierName)
          Checks whether this type or one of its super-types is marked with the specified qualifier.
 boolean isSubtypeOf(ClassDefinition anotherType)
          Checks whether this is either the ClassDefinition of the specified type or is descended from the specified type.
 

Method Detail

getName

java.lang.String getName()
The class name to be used in code.


getDisplayName

java.lang.String getDisplayName()
The class name to be displayed on the uCMDB user interface.


getDescription

java.lang.String getDescription()
The description of the purpose of the type.


getParentClassName

java.lang.String getParentClassName()
The name of the super-type of this type.


getParentClass

ClassDefinition getParentClass()
The ClassDefinition object representing the super-type of this type.


getDeclaredQualifiers

java.util.Map<java.lang.String,Qualifier> 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

java.util.Map<java.lang.String,Qualifier> getAllQualifiers()
The qualifiers defined for this type and its super-types.

Returns:
a read-only Map of qualifier name to qualifier object

hasQualifier

boolean hasQualifier(java.lang.String qualifierName)
Checks whether this type or one of its super-types is marked with the specified qualifier.


getQualifier

Qualifier getQualifier(java.lang.String qualifierName)
                       throws QualifierDoesNotExistException
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

java.util.Map<java.lang.String,Attribute> 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

java.util.Map<java.lang.String,Attribute> getAllAttributes()
The attributes defined for this type and its supertypes.

Returns:
a read-only Map of attribute name to attribute object

hasAttribute

boolean hasAttribute(java.lang.String attributeName)
Checks whether this type or one of its super-types defines an attribute with the specified name.


getAttribute

Attribute getAttribute(java.lang.String attributeName)
                       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

boolean isSubtypeOf(ClassDefinition anotherType)
Checks whether this 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, otherwise false

getChildClasses

java.util.Collection<ClassDefinition> getChildClasses()
An Iterable collection of all types derived directly from this type.


getSubclasses

java.lang.Iterable<ClassDefinition> getSubclasses()
An Iterable collection of all types derived directly or indirectly from this type.



Documentation Feedback
Copyright 2010 Hewlett-Packard Development Company, L.P.