public interface Element extends ElementProperties
Modifier and Type | Method and Description |
---|---|
UcmdbId |
getId()
The ID of the element.
|
Property |
getProperty(String propertyName)
Returns a property object for the property of the specified name.
|
Object |
getPropertyValue(String propertyName)
Returns the value of the specified property.
|
String |
getType()
The element's class name.
|
Collection<Property> |
properties()
Returns the properties of the element as an unmodifiable collection.
|
Map<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 |
removeProperty(String propertyName)
Removes the property from the element.
|
void |
setBooleanProperty(String name,
boolean value) |
void |
setBytesProperty(String name,
byte[] value) |
void |
setDateProperty(String name,
Date value) |
void |
setDoubleProperty(String name,
double value) |
void |
setFloatProperty(String name,
float value) |
void |
setIntListProperty(String name,
int[] value) |
void |
setIntListProperty(String name,
Iterable<Integer> value) |
void |
setIntProperty(String name,
int value) |
void |
setLongProperty(String name,
long value) |
void |
setPropertyValue(String name,
Object value)
Sets the property to the value.
|
void |
setStringListProperty(String name,
Iterable<String> value) |
void |
setStringListProperty(String name,
String[] value) |
void |
setStringProperty(String name,
String value) |
void |
setXmlProperty(String name,
String value) |
UcmdbId getId()
String getType()
Collection<Property> properties()
properties
in interface ElementProperties
Map<String,Property> propertiesAsMap()
int propertiesSize()
propertiesSize
in interface ElementProperties
Property getProperty(String propertyName)
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.
getProperty
in interface ElementProperties
void removeProperty(String propertyName)
propertyName
- name of the property to removeObject getPropertyValue(String propertyName)
Property.getValue()
.getPropertyValue
in interface ElementProperties
getProperty(java.lang.String)
void setPropertyValue(String name, Object value)
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
setPropertyValue
in interface ElementProperties
name
- name of the propertyvalue
- value of the propertyvoid setBooleanProperty(String name, boolean value)
setBooleanProperty
in interface ElementProperties
void setBytesProperty(String name, byte[] value)
setBytesProperty
in interface ElementProperties
void setDateProperty(String name, Date value)
setDateProperty
in interface ElementProperties
void setDoubleProperty(String name, double value)
setDoubleProperty
in interface ElementProperties
void setFloatProperty(String name, float value)
setFloatProperty
in interface ElementProperties
void setIntListProperty(String name, int[] value)
setIntListProperty
in interface ElementProperties
void setIntListProperty(String name, Iterable<Integer> value)
setIntListProperty
in interface ElementProperties
void setIntProperty(String name, int value)
setIntProperty
in interface ElementProperties
void setLongProperty(String name, long value)
setLongProperty
in interface ElementProperties
void setStringListProperty(String name, String[] value)
setStringListProperty
in interface ElementProperties
void setStringListProperty(String name, Iterable<String> value)
setStringListProperty
in interface ElementProperties
void setStringProperty(String name, String value)
setStringProperty
in interface ElementProperties
void setXmlProperty(String name, String value)
setXmlProperty
in interface ElementProperties
Documentation Feedback
Copyright 2011 - 2018 Micro Focus or one of its affiliates.