Package com.hp.ucmdb.api.classmodel
Interface Attribute
public interface Attribute
The definition of an attribute of a UCMDB class.
-
Method Summary
Modifier and TypeMethodDescriptionThe default value of a non-static attribute.getName()
The attribute name.The qualifiers defined for the attribute.getSize()
getType()
The attribute data type.Additional type information for specific attribute types.getValue()
The value of a static attribute.boolean
hasQualifier
(String qualifierName) boolean
boolean
boolean
isStatic()
Checks whether the the attribute is "static".
-
Method Details
-
getName
String getName()The attribute name. -
getType
Type getType()The attribute data type. -
isFactory
boolean isFactory()- Returns:
true
if this attribute is created by the production, otherwisefalse
-
isModifiedByUser
boolean isModifiedByUser()- Returns:
true
if this attribute is modified by user, otherwisefalse
-
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
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
The default value of a non-static attribute.- Throws:
AttributeStaticException
- if the attribute is static
-
getResolvedDefaultValue
Object getResolvedDefaultValue() -
getDisplayLabel
String getDisplayLabel() -
getDescription
String getDescription() -
getSize
Integer getSize() -
getQualifiers
The qualifiers defined for the attribute.- Returns:
- a read-only Map of qualifier name to qualifier object
-
hasQualifier
-
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"
-