com.hp.ucmdb.api.types
Interface ElementProperties

All Known Subinterfaces:
AffectedCI, AffectedRelation, CI, Element, Relation, TopologyCI, TopologyRelation

public interface ElementProperties

Since:
UCMDB 9.0

Method Summary
 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.util.Collection<Property> properties()
          Returns the properties of the element as an unmodifiable collection.
 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

properties

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


propertiesSize

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


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.


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().

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

Parameters:
name - name of the property
value - value of the property

setBooleanProperty

void setBooleanProperty(java.lang.String name,
                        boolean value)

setBytesProperty

void setBytesProperty(java.lang.String name,
                      byte[] value)

setDateProperty

void setDateProperty(java.lang.String name,
                     java.util.Date value)

setDoubleProperty

void setDoubleProperty(java.lang.String name,
                       double value)

setFloatProperty

void setFloatProperty(java.lang.String name,
                      float value)

setIntListProperty

void setIntListProperty(java.lang.String name,
                        int[] value)

setIntListProperty

void setIntListProperty(java.lang.String name,
                        java.lang.Iterable<java.lang.Integer> value)

setIntProperty

void setIntProperty(java.lang.String name,
                    int value)

setLongProperty

void setLongProperty(java.lang.String name,
                     long value)

setStringListProperty

void setStringListProperty(java.lang.String name,
                           java.lang.String[] value)

setStringListProperty

void setStringListProperty(java.lang.String name,
                           java.lang.Iterable<java.lang.String> value)

setStringProperty

void setStringProperty(java.lang.String name,
                       java.lang.String value)

setXmlProperty

void setXmlProperty(java.lang.String name,
                    java.lang.String value)


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