com.hp.ucmdb.api.classmodel
Interface Attribute


public interface Attribute

The definition of an attribute of a UCMDB class.


Method Summary
 java.lang.Object getDefaultValue()
          The default value of a non-static attribute.
 java.lang.String getDescription()
           
 java.lang.String getDisplayLabel()
           
 java.lang.String getName()
          The attribute name.
 java.util.Map<java.lang.String,Qualifier> getQualifiers()
          The qualifiers defined for the attribute.
 Type getType()
          The attribute data type.
 TypeInfo getTypeInfo()
          Additional type information for specific attribute types.
 java.lang.Object getValue()
          The value of a static attribute.
 boolean hasQualifier(java.lang.String qualifierName)
           
 boolean isStatic()
          Checks whether the the attribute is "static".
 

Method Detail

getName

java.lang.String getName()
The attribute name.


getType

Type getType()
The attribute data type.


getTypeInfo

TypeInfo getTypeInfo()
Additional type information for specific attribute types. Cast the return value to a specific type info interface.

Example:

      Attribute enumAttr = typeObjectDefinition.getAttribute(AttributesUtils.PROPERTY_ENUM);
      EnumInfo enumInfo = (EnumInfo)enumAttr.getTypeInfo();
      String enumName = enumInfo.getEnumName();
      

Returns:
TypeInfo, or null for types that have no type information.

getValue

java.lang.Object getValue()
                          throws AttributeNotStaticException
The value of a static attribute. Static means the attribute has a single value, not a value for each CI.

Throws:
AttributeNotStaticException - if the attribute is not static

getDefaultValue

java.lang.Object getDefaultValue()
                                 throws AttributeStaticException
The default value of a non-static attribute.

Throws:
AttributeStaticException - if the attribute is static

getDisplayLabel

java.lang.String getDisplayLabel()

getDescription

java.lang.String getDescription()

getQualifiers

java.util.Map<java.lang.String,Qualifier> getQualifiers()
The qualifiers defined for the attribute.

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

hasQualifier

boolean hasQualifier(java.lang.String qualifierName)

isStatic

boolean isStatic()
Checks whether the the attribute is "static". Static means the attribute has a single value, not a value for each CI.

Returns:
true if the attribute is "static"


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