org.sblim.wbem.cim
Class CIMObject
- Comparable, Serializable
public abstract class CIMObject
CIMObject.java
(C) Copyright IBM Corp. 2005, 2006
THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE
("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
You can obtain a current copy of the Common Public License from
http://www.opensource.org/licenses/cpl1.0.php
void | addProperty(CIMProperty pProperty) - Adds a property to the specified object.
|
Vector | getAllProperties() - Returns a list of CIMProperties for this CIMObject.
|
Vector | getKeys() - Returns a list of key properties in this CIMObject.
|
Vector | getProperties() - Returns a list of CIMProperties for this CIMObject.
|
CIMProperty | getProperty(String pPropertyName) - Gets the specified CIMProperty, if the property exists.
|
CIMProperty | getProperty(String pName, String pOriginClass) - Gets the CIMProperty from the current CIMElement, if the property exits.
|
protected CIMProperty | getProperty(CIMProperty pProperty)
|
CIMProperty | removeProperty(String propertyName) - Remove the specified property from the object.
|
abstract void | setObjectPath(CIMObjectPath pObjectPath) - Specifies the CIMObjectPath for this CIM Object.
|
void | setProperties(Vector pProperties) - Replace the current properties from the object and add the new set of
properties defined by the argument.
|
CIMProperty | setProperty(String pPropertyName, CIMValue pValue) - Sets the value for the property, if the property already exists,
otherwise create a new property with the specified name, and sets assigns
the especified value to it.
|
iAllProperties
protected Vector iAllProperties
CIMObject
protected CIMObject()
CIMObject
protected CIMObject(String pName)
addProperty
public void addProperty(CIMProperty pProperty)
Adds a property to the specified object. If the property already exits in
the object, the property will not be modified. No exception is thrown.
pProperty
- property to be added
getAllProperties
public Vector getAllProperties()
Returns a list of CIMProperties for this CIMObject. For performance
reasons the method returns the internal property vector of the object. It
is important to note that any modification to this vector may affect the
consistency of the CIMMethod therefore, should be avoided. The
application should decide when the vector needs to be cloned or not to
preserve a consistent internal state.
- internal vector of CIMProperties for this CIMObject.
getKeys
public Vector getKeys()
Returns a list of key properties in this CIMObject.
- a vector of cloned key properties.
getProperties
public Vector getProperties()
Returns a list of CIMProperties for this CIMObject. For performance
reasons the method returns a vector which provides direct access to the
properties of the object. It is important to note that any modification
to this vector may affect the consistency of the CIMMethod therefore,
should be avoided. The application should decide when the vector needs to
be cloned or not to preserve a consistent internal state.
- a vector of CIMProperties for this CIMObject.
getProperty
public CIMProperty getProperty(String pPropertyName)
Gets the specified CIMProperty, if the property exists.
pPropertyName
- the name of the CIMProperty, with the following format
"propName" or "propName.orignClass".
- null if the property does not exists, otherwise returns the
CIMProperty.
getProperty
public CIMProperty getProperty(String pName,
String pOriginClass)
Gets the CIMProperty from the current CIMElement, if the property exits.
pName
- a string which specifies the property name.pOriginClass
- a String which specifies the originClass.
- null if the property exits, otherwise returns the CIMProperty.
removeProperty
public CIMProperty removeProperty(String propertyName)
Remove the specified property from the object. If the object does not
contains the specified.
propertyName
- The property's name
setObjectPath
public abstract void setObjectPath(CIMObjectPath pObjectPath)
Specifies the CIMObjectPath for this CIM Object.
pObjectPath
- The object path
setProperties
public void setProperties(Vector pProperties)
Replace the current properties from the object and add the new set of
properties defined by the argument. If any property is repeated, only the
first instance of it will be added.
setProperty
public CIMProperty setProperty(String pPropertyName,
CIMValue pValue)
Sets the value for the property, if the property already exists,
otherwise create a new property with the specified name, and sets assigns
the especified value to it.
pPropertyName
- A string specifing the property name.pValue
- CIMValue that will be assigned to the property. It may be
null.
- if the property already exists, returns the modified property,
otherwise returns the new property that was created.
Copyright © 2005, 2006 IBM Corporation. All Rights Reserved.