|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.wbem.cim.CIMElement | +--com.sun.wbem.cim.CIMInstance
The CIMInstance class represents an instance of any CIM class. Clients use CIMInstance in conjunction with the CIMClient instance methods like createInstance, setInstance to manipulate instances within a namespace.
CIMClient
, Serialized FormConstructor Summary | |
CIMInstance()
Basic CIMInstance constructor. |
|
CIMInstance(java.lang.String name)
Deprecated. The input name of the instance will no longer be used since the name is generated from the key properties. |
Method Summary | |
CIMInstance |
filterProperties(java.lang.String[] propertyList,
boolean includeQualifier,
boolean includeClassOrigin)
This method returns a new CIMInstance with properties filtered according to the input parameters. |
java.lang.String |
getAlias()
Gets the alias name of this CIM instance |
java.lang.String |
getClassName()
Gets the name of the class that instantiates this CIM instance |
java.util.Vector |
getKeyValuePairs()
Returns a dynamic list of key-value pairs for this CIM instance, not the actual name. |
java.lang.String |
getName()
Gets the name of this CIM instance in string form. |
java.util.Vector |
getProperties()
Gets the list of properties for this CIM instance |
CIMProperty |
getProperty(java.lang.String propertyName)
Gets the values of the specified property |
CIMProperty |
getProperty(java.lang.String name,
java.lang.String originClass)
Returns a CIM property, a name/value pair that describes a unit of data for a class. |
java.util.Vector |
getQualifiers()
Gets the list of qualifiers for this CIM instance |
CIMInstance |
localElements()
Returns only the local elements for this instance and filters out the rest. |
CIMInstance |
localElements(java.util.List classNames)
Returns only the elements for this instance that have classOrigin set to one of the names in the className list. |
void |
setAlias(java.lang.String aliasName)
Sets the alias for this instance |
void |
setClassName(java.lang.String className)
Sets the name of the class that instantiates this CIM instance |
void |
setProperties(java.util.Vector Table)
Sets the properties for this CIM instance to the specified property list |
void |
setProperty(java.lang.String name,
CIMValue cv)
Sets the value of the specified property. |
void |
setQualifiers(java.util.Vector table)
Sets the qualifiers for this CIM instance to the specified qualifier list |
java.lang.String |
toMOF()
Returns a MOF representation of the CIMInstance. |
java.lang.String |
toString()
Returns a String representation of the CIMInstance. |
java.lang.String |
toXml()
Returns an XML representation of this CIM instance. |
java.lang.String |
toXml(CIMObjectPath cop)
Returns an XML representation of the specified CIM instance. |
java.lang.String |
toXml(CIMObjectPath cop,
java.lang.String host)
Returns an XML representation of the specified CIM instance on the specified host. |
void |
updatePropertyValue(CIMProperty pe)
Updates the value of the specified CIM property. |
void |
updatePropertyValues(java.util.Vector v)
Updates the property values for this CIM instance with the specified list of property values |
Methods inherited from class com.sun.wbem.cim.CIMElement |
assign,
equals,
lessThan,
setName |
Methods inherited from class java.lang.Object |
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public CIMInstance()
public CIMInstance(java.lang.String name)
name
- The string name of the CIM instanceMethod Detail |
public java.lang.String toString()
public java.lang.String toMOF()
public java.lang.String getClassName()
public void setClassName(java.lang.String className)
className
- the string for the name of the class that
instantiates this CIM instancepublic java.util.Vector getQualifiers()
public void setQualifiers(java.util.Vector table)
table
- The list of qualifiers to be set for the this
CIM instancepublic java.util.Vector getProperties()
public void setProperties(java.util.Vector Table)
Table
- The list of properties to set for this CIM instancepublic CIMProperty getProperty(java.lang.String name, java.lang.String originClass)
name
- The name of the property to get.originClass
- The class in which the property was defined.public CIMProperty getProperty(java.lang.String propertyName)
propertyName
- The text string for the name of the propertypublic java.lang.String getAlias()
public void setAlias(java.lang.String aliasName)
aliasName
- the alias name of this CIM instancepublic java.lang.String getName()
public java.util.Vector getKeyValuePairs()
public void updatePropertyValues(java.util.Vector v)
v
- the list of CIM properties and values
for this CIM instancepublic void updatePropertyValue(CIMProperty pe)
pe
- CIM property to update. pe contains the value to be
used.public void setProperty(java.lang.String name, CIMValue cv)
name
- The name of the property to set. Can also be in the
form "originClass.propertyName".cv
- The value to set to.public CIMInstance localElements()
filterProperties(java.lang.String[], boolean, boolean)
public CIMInstance localElements(java.util.List classNames)
className
- A list of strings containing the classes with which
the classOrigin must be matched.filterProperties(java.lang.String[], boolean, boolean)
public CIMInstance filterProperties(java.lang.String[] propertyList, boolean includeQualifier, boolean includeClassOrigin)
propertyList
- If the PropertyList input parameter is not NULL, the
members of the array define one or more Property names. The returned
Instance does not include elements for any Properties missing from this
list. If the PropertyList input parameter is an empty array this
signifies that no Properties are included in each returned class. If the
PropertyList input parameter is NULL this specifies that all Properties
are included in each returned class.
If the PropertyList contains duplicate elements or invalid property
names, they are ignored.includeQualifier
- qualifiers are only included if true.includeClassOrigin
- classOrigins are only included if true.localElements()
public java.lang.String toXml()
public java.lang.String toXml(CIMObjectPath cop)
cop
- The CIMObjectPath to use when creating the
the XML representation.public java.lang.String toXml(CIMObjectPath cop, java.lang.String host)
cop
- The CIMObjectPath to use when creating
the XML representation.host
- The host to use when creating the XML
representation.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |