Interface ClassDefinition


public interface ClassDefinition
Represents a definition of a type (class) in the uCMDB.
  • 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()
      The ClassDefinition object representing the super-type of this type.
    • getDeclaredQualifiers

      Map<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

      Map<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(String qualifierName)
      Checks whether this type or one of its super-types is marked with the specified qualifier.
    • getQualifier

      Qualifier getQualifier(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

      Map<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

      Map<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(String attributeName)
      Checks whether this type or one of its super-types defines an attribute with the specified name.
    • getAttribute

      Attribute getAttribute(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
    • 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

      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
    • isSubtypeOf

      boolean isSubtypeOf(String anotherTypeName)
      Checks whether this 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, otherwise false
    • getChildClasses

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

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

      boolean isFactory()
      Returns:
      true if this class is created by the production, otherwise false
    • isModifiedByUser

      boolean isModifiedByUser()
      Returns:
      true if this class is modified by uder, otherwise false