com.hp.ucmdb.api.types
Interface Element

All Superinterfaces:
ElementProperties
All Known Subinterfaces:
AffectedCI, AffectedRelation, CI, Relation, TopologyCI, TopologyRelation

public interface Element
extends ElementProperties

The common interface of CI and Relation.


Method Summary
 UcmdbId getId()
          The ID of the element.
 Property getProperty(java.lang.String propertyName)
          Returns a property object for the property of the specified name.
 java.lang.Object getPropertyValue(java.lang.String propertyName)
          Returns the value of the specified property.
 java.lang.String getType()
          The element's class name.
 java.util.Collection<Property> properties()
          Returns the properties of the element as an unmodifiable collection.
 java.util.Map<java.lang.String,Property> propertiesAsMap()
          Returns the properties of the element as a map from property name to property object.
 int propertiesSize()
          Returns the number of properties in this element.
 void setBooleanProperty(java.lang.String name, boolean value)
           
 void setBytesProperty(java.lang.String name, byte[] value)
           
 void setDateProperty(java.lang.String name, java.util.Date value)
           
 void setDoubleProperty(java.lang.String name, double value)
           
 void setFloatProperty(java.lang.String name, float value)
           
 void setIntListProperty(java.lang.String name, int[] value)
           
 void setIntListProperty(java.lang.String name, java.lang.Iterable<java.lang.Integer> value)
           
 void setIntProperty(java.lang.String name, int value)
           
 void setLongProperty(java.lang.String name, long value)
           
 void setPropertyValue(java.lang.String name, java.lang.Object value)
          Sets the property to the value.
 void setStringListProperty(java.lang.String name, java.lang.Iterable<java.lang.String> value)
           
 void setStringListProperty(java.lang.String name, java.lang.String[] value)
           
 void setStringProperty(java.lang.String name, java.lang.String value)
           
 void setXmlProperty(java.lang.String name, java.lang.String value)
           
 

Method Detail

getId

UcmdbId getId()
The ID of the element.


getType

java.lang.String getType()
The element's class name.


properties

java.util.Collection<Property> properties()
Returns the properties of the element as an unmodifiable collection.

Specified by:
properties in interface ElementProperties

propertiesAsMap

java.util.Map<java.lang.String,Property> propertiesAsMap()
Returns the properties of the element as a map from property name to property object.


propertiesSize

int propertiesSize()
Returns the number of properties in this element.

Specified by:
propertiesSize in interface ElementProperties

getProperty

Property getProperty(java.lang.String propertyName)
Returns a property object for the property of the specified name.
Returns null if the client-side representation of the element does not have a value for the property. This does not necessarily mean that the corresponding uCMDB-side element does not have a value for the property.

Specified by:
getProperty in interface ElementProperties

getPropertyValue

java.lang.Object getPropertyValue(java.lang.String propertyName)
Returns the value of the specified property. The class of the returned object is property-type specific. Foer details, see Property.getValue().

Specified by:
getPropertyValue in interface ElementProperties
See Also:
getProperty(java.lang.String)

setPropertyValue

void setPropertyValue(java.lang.String name,
                      java.lang.Object value)
Sets the property to the value.
The type of the property is deduced from the class of the value parameter. The following classes are supported:
  • Boolean, Integer, Long, Float, Double and String are interpreted as their UCMDB counterparts. Using autoboxing boolean, int, long, float and double can also be passed.
  • byte[] is interpreted as BYTES
  • Date is interpreted as DATE
  • Iterable<String> and String[] are interpreted as STRING_LIST
  • Iterable<Integer> and int[] are interpreted as INTEGER_LIST

Specified by:
setPropertyValue in interface ElementProperties
Parameters:
name - name of the property
value - value of the property

setBooleanProperty

void setBooleanProperty(java.lang.String name,
                        boolean value)
Specified by:
setBooleanProperty in interface ElementProperties

setBytesProperty

void setBytesProperty(java.lang.String name,
                      byte[] value)
Specified by:
setBytesProperty in interface ElementProperties

setDateProperty

void setDateProperty(java.lang.String name,
                     java.util.Date value)
Specified by:
setDateProperty in interface ElementProperties

setDoubleProperty

void setDoubleProperty(java.lang.String name,
                       double value)
Specified by:
setDoubleProperty in interface ElementProperties

setFloatProperty

void setFloatProperty(java.lang.String name,
                      float value)
Specified by:
setFloatProperty in interface ElementProperties

setIntListProperty

void setIntListProperty(java.lang.String name,
                        int[] value)
Specified by:
setIntListProperty in interface ElementProperties

setIntListProperty

void setIntListProperty(java.lang.String name,
                        java.lang.Iterable<java.lang.Integer> value)
Specified by:
setIntListProperty in interface ElementProperties

setIntProperty

void setIntProperty(java.lang.String name,
                    int value)
Specified by:
setIntProperty in interface ElementProperties

setLongProperty

void setLongProperty(java.lang.String name,
                     long value)
Specified by:
setLongProperty in interface ElementProperties

setStringListProperty

void setStringListProperty(java.lang.String name,
                           java.lang.String[] value)
Specified by:
setStringListProperty in interface ElementProperties

setStringListProperty

void setStringListProperty(java.lang.String name,
                           java.lang.Iterable<java.lang.String> value)
Specified by:
setStringListProperty in interface ElementProperties

setStringProperty

void setStringProperty(java.lang.String name,
                       java.lang.String value)
Specified by:
setStringProperty in interface ElementProperties

setXmlProperty

void setXmlProperty(java.lang.String name,
                    java.lang.String value)
Specified by:
setXmlProperty in interface ElementProperties


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