javax.wbem.client
Class BatchCIMClient

java.lang.Object
  |
  +--javax.wbem.client.BatchCIMClient
All Implemented Interfaces:
BatchHandle

public class BatchCIMClient
extends java.lang.Object
implements BatchHandle

The BatchCIMClient allows a client application to batch multiple requests into one remote call. The methods in this class correspond to CIM operation. A method when invoked, gives rise to a CIMOperation object. As multiple methods are invoked, a list of such CIMOperation objects is built. The client application executes the batch of requests by invoking the performBatchOperations() method on the CIMClient object and passing a BatchCIMClient object as a parameter.

Since:
WBEM 2.5

Constructor Summary
BatchCIMClient()
          Constructor to create a BatchCIMClient object.
 
Method Summary
 int associatorNames(CIMObjectPath objectName, java.lang.String assocClass, java.lang.String resultClass, java.lang.String role, java.lang.String resultRole)
          Enumerates the object paths to CIM Objects that are associated to a particular source CIM Object.
 int associators(CIMObjectPath objectName, java.lang.String assocClass, java.lang.String resultClass, java.lang.String role, java.lang.String resultRole, boolean includeQualifiers, boolean includeClassOrigin, java.lang.String[] propertyList)
          Enumerate CIM Objects that are associated to a particular source CIM Object.
 int createClass(CIMObjectPath name, CIMClass cc)
          Adds the CIM class to the specified namespace.
 int createInstance(CIMObjectPath name, CIMInstance ci)
          Adds the specified CIM Instance to the specified namespace
 int createNameSpace(CIMNameSpace ns)
          Creates a CIM namespace, a directory containing CIM classes and CIM instances.
 int createQualifierType(CIMObjectPath name, CIMQualifierType qt)
          Adds the specified CIM qualifier type to the specified namespace.
 int deleteClass(CIMObjectPath path)
          Deletes the CIM class for the object specified by the CIM object path, a name that uniquely identifies a CIM object.
 int deleteInstance(CIMObjectPath path)
          Deletes the CIM instance specified by the CIM object path, a name that uniquely identifies a CIM object.
 int deleteNameSpace(CIMNameSpace ns)
          Deletes the specified namespace on the current host.
 int deleteQualifierType(CIMObjectPath path)
          Deletes the CIM qualfier to the specified namespace.
 int enumerateClasses(CIMObjectPath path, boolean deep, boolean localOnly, boolean includeQualifiers, boolean includeClassOrigin)
          Enumerates the class specified in the path.
 int enumerateClassNames(CIMObjectPath path, boolean deep)
          Enumerates the class specified in the path.
 int enumerateInstanceNames(CIMObjectPath path)
          Returns the object paths to all instances belonging to the class specified in the path.
 int enumerateInstances(CIMObjectPath path, boolean deep, boolean localOnly, boolean includeQualifiers, boolean includeClassOrigin, java.lang.String[] propertyList)
          Returns all instances of the class specified in the path.
 int enumNameSpace(CIMObjectPath path, boolean deep)
          Gets a list of the namespaces within the namespace specified by the CIM object path.
 int enumQualifierTypes(CIMObjectPath path)
          Enumerates the qualifiers defined in a namespace.
 int execQuery(CIMObjectPath name, java.lang.String query, java.lang.String ql)
          Executes a query to retrieve objects.
 int getClass(CIMObjectPath name, boolean localOnly, boolean includeQualifiers, boolean includeClassOrigin, java.lang.String[] propertyList)
          Gets the CIM class for the specified CIM object path.
 int getInstance(CIMObjectPath name, boolean localOnly, boolean includeQualifiers, boolean includeClassOrigin, java.lang.String[] propertyList)
          Gets the CIM instance for the specified CIM object path.
 int getProperty(CIMObjectPath name, java.lang.String propertyName)
          Gets the value of the specified property for the instance specified in the object path.
 int getQualifierType(CIMObjectPath name)
          Gets the CIM qualifier type specified in the CIM object path.
 int invokeMethod(CIMObjectPath name, java.lang.String methodName, java.util.Vector inParams, java.util.Vector outParams)
          Executes the specified method on the specified object.
 int referenceNames(CIMObjectPath objectName, java.lang.String resultClass, java.lang.String role)
          Enumerates the object paths to association objects that refer to a particular target CIM Object.
 int references(CIMObjectPath objectName, java.lang.String resultClass, java.lang.String role, boolean includeQualifiers, boolean includeClassOrigin, java.lang.String[] propertyList)
          Enumerates the association objects that refer to a particular target CIM Object.
 int setClass(CIMObjectPath name, CIMClass cc)
          Modifies the CIM class in the specified namespace.
 int setInstance(CIMObjectPath name, CIMInstance ci)
          Modifies the specified CIM instance in the specified namespace.
 int setInstance(CIMObjectPath name, CIMInstance ci, CIMArgument[] propertyList)
          Modifies the specified CIM instance in the specified namespace.
 int setProperty(CIMObjectPath name, java.lang.String propertyName, CIMValue newValue)
          Modifies the value of the specified property for the instance specified in the object path.
 int setQualifierType(CIMObjectPath name, CIMQualifierType qt)
          Adds the specified CIM qualifier type to the specified namespace.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchCIMClient

public BatchCIMClient()
Constructor to create a BatchCIMClient object. Creates a new BatchCIMClient object that can be used to build a list of CIM Operations to be executed as a batched request.

Parameters:
cimclient - reference to an existing CIMClient connetction to a CIM Object Manager.
Method Detail

createNameSpace

public int createNameSpace(CIMNameSpace ns)
                    throws CIMException
Creates a CIM namespace, a directory containing CIM classes and CIM instances. When a client application connects to the CIM Object Manager, it specifies a namespace. All subsequent operations occur within that namespace on the CIM Object Manager host.

Specified by:
createNameSpace in interface BatchHandle
Parameters:
ns - The CIMNameSpace object that specifies a string for the host and a string for the namespace

Returns:
int - Operation ID.

deleteNameSpace

public int deleteNameSpace(CIMNameSpace ns)
                    throws CIMException
Deletes the specified namespace on the current host.

Specified by:
deleteNameSpace in interface BatchHandle
Parameters:
ns - The CIMNameSpace object that identifies the namespace to be deleted

Returns:
int - Operation ID.

deleteClass

public int deleteClass(CIMObjectPath path)
                throws CIMException
Deletes the CIM class for the object specified by the CIM object path, a name that uniquely identifies a CIM object. The CIM object path consists of two parts: namespace + model path. The namespace portion of the CIM object path identifies the host running the CIM Object Manager and the namespace. A namespace is a directory-like structure that contains CIM classes, instances, and qualifier types.

The model path portion of the CIM object path uniquely identifies a CIM object within the namespace on the host. The model path for a class is the class name.

Specified by:
deleteClass in interface BatchHandle
Parameters:
path - The CIMObjectPath identifying the class to delete

Returns:
int - Operation ID.

deleteInstance

public int deleteInstance(CIMObjectPath path)
                   throws CIMException
Deletes the CIM instance specified by the CIM object path, a name that uniquely identifies a CIM object. A CIM object path consists of two parts: namespace + model path. The model path is created by concatenating the properties of a class that are qualified with the KEY qualifier.

Specified by:
deleteInstance in interface BatchHandle
Parameters:
path - The CIMObjectPath identifying the CIM instance to delete

Returns:
int - Operation ID.

deleteQualifierType

public int deleteQualifierType(CIMObjectPath path)
                        throws CIMException
Deletes the CIM qualfier to the specified namespace.

Specified by:
deleteQualifierType in interface BatchHandle
Parameters:
path - the CIMObjectPath identifying the CIM qualifier to delete

Returns:
int - Operation ID.

enumNameSpace

public int enumNameSpace(CIMObjectPath path,
                         boolean deep)
                  throws CIMException
Gets a list of the namespaces within the namespace specified by the CIM object path.

Specified by:
enumNameSpace in interface BatchHandle
Parameters:
path - The CIMObjectPath identifying the namespace to be enumerated.

deep - If true, the enumeration returned will contain the entire hierarchy of namespaces present under the enumerated namespace. If false, the enumeration will return only the first level children of the enumerated namespace.

Returns:
int - Operation ID. Result list from the performBatch method contains the actual return value.

enumerateClasses

public int enumerateClasses(CIMObjectPath path,
                            boolean deep,
                            boolean localOnly,
                            boolean includeQualifiers,
                            boolean includeClassOrigin)
                     throws CIMException
Enumerates the class specified in the path. The entire class contents (and not just the class names) are returned.

Specified by:
enumerateClasses in interface BatchHandle
Parameters:
path - The CIMObjectPath identifying the class to be enumerated.

deep - If true, the enumeration returned will contain the contents of all subclasses derived from the specified class. If false, the enumeration will return only the contents of the first level children of the specified class.

localOnly - If true, only elements (properties, methods and qualifiers) defined or overridden within the class are included in the response. Propagated properties are NOT included, since their values are based on information in another class. If false, all elements of the class definition are returned. When instances are returned, the InstanceName must include all keys, including Propagated keys. So these attributes are included in the "name" part of the method response, but not in the "value" information.

includeQualifiers - If true, all Qualifiers for each Object (including Qualifiers on the Object and on any returned Properties) MUST be included. If false, no Qualifiers are present in the returned Object.

includeClassOrigin - If true, the CLASSORIGIN attribute MUST be present on all appropriate elements in each returned Object. If false, no CLASSORIGIN attributes are present in each returned Object. The CLASSORIGIN attribute is defined in the DMTF's Specification for the Representation of CIM in XML. CLASSORIGIN is an XML tag identifying the following text as a class name. It is attached to a property or method (when specified in XML), to indicate the class where that property or method is first defined. Where the same property name is locally defined in another superclass or subclass, the Server will return the value for the property in the lowest subclass.

Returns:
int - Operation ID. Result list from the performBatch method contains the actual return value.
See Also:
CIMClient.enumerateClassNames(javax.wbem.cim.CIMObjectPath), CIMClient.enumerateClasses(javax.wbem.cim.CIMObjectPath)

enumerateClassNames

public int enumerateClassNames(CIMObjectPath path,
                               boolean deep)
                        throws CIMException
Enumerates the class specified in the path. The class NAMES are returned as a vector of CIMObjectPaths.

Specified by:
enumerateClassNames in interface BatchHandle
Parameters:
path - The CIMObjectPath identifying the class to be enumerated.

deep - If true, the enumeration returned will contain the names of all subclasses derived from the specified class. If false the enumeration will return only the names of the first level children of the specified class.

Returns:
int - Operation ID. Result list from the performBatch method contains the actual return value.

enumerateInstanceNames

public int enumerateInstanceNames(CIMObjectPath path)
                           throws CIMException
Returns the object paths to all instances belonging to the class specified in the path. The objectpaths of all derived classes in the specified class heirarchy will also be returned.

Specified by:
enumerateInstanceNames in interface BatchHandle
Parameters:
path - The CIMObjectPath identifying the class whose instances are to be enumerated. Only the name space and class name components are used. Any other information (e.g. keys) is ignored.

Returns:
int - Operation ID. Result list from the performBatch method contains the actual return value.

enumerateInstances

public int enumerateInstances(CIMObjectPath path,
                              boolean deep,
                              boolean localOnly,
                              boolean includeQualifiers,
                              boolean includeClassOrigin,
                              java.lang.String[] propertyList)
                       throws CIMException
Returns all instances of the class specified in the path. The method also returns all instances of classes derived from the specified class.

Specified by:
enumerateInstances in interface BatchHandle
Parameters:
path - The CIMObjectPath identifying the class whose instances are to be enumerated. Only the name space and class name components are used. Any other information (e.g. keys) is ignored.

deep - If false, each returned instance will only contain inherited and local properties of the specified class. If true, each returned instance will also contain any additional properties defined in all subclasses derived from the specified class.

localOnly - If true, only elements (properties, methods and qualifiers) defined or overridden within the class are included in the response. Propagated properties are NOT included, since their values are based on information in another class. If false, all elements of the class definition are returned. When instances are returned, the InstanceName must include all keys, including Propagated keys. So these attributes are included in the "name" part of the method response, but not in the "value" information.
includeQualifiers - If true, all Qualifiers for each Object (including Qualifiers on the Object and on any returned Properties) MUST be included. If false, no Qualifiers are present in the returned Object.

includeClassOrigin - If true, the CLASSORIGIN attribute MUST be present on all appropriate elements in each returned Object. If false, no CLASSORIGIN attributes are present in each returned Object. The CLASSORIGIN attribute is defined in the DMTF's Specification for the Representation of CIM in XML. CLASSORIGIN is an XML tag identifying the following text as a class name. It is attached to a property or method (when specified in XML), to indicate the class where that property or method is first defined. Where the same property name is locally defined in another superclass or subclass, the Server will return the value for the property in the lowest subclass. *

propertyList - If the PropertyList input parameter is not NULL, the members of the array define one or more Property names. Each returned Object MUST NOT include elements for any Properties missing from this list. Note that if LocalOnly is specified as true (or DeepInheritance is specified as false) this acts as an additional filter on the set of Properties returned (for example, if Property A is included in the PropertyList but LocalOnly is set to true and A is not local to a returned Instance, then it will not be included in that Instance). If the PropertyList input parameter is an empty array this signifies that no Properties are included in each returned Object. If the PropertyList input parameter is NULL this specifies that all Properties (subject to the conditions expressed by the other parameters) are included in each returned Object. If the PropertyList contains duplicate elements, the Server ignores the duplicates but otherwise process the request normally. If the PropertyList contains elements which are invalid Property names for any target Object, the Server ignores such entries but otherwise process the request normally.

Returns:
int - Operation ID. Result list from the performBatch method contains the actual return value.

enumQualifierTypes

public int enumQualifierTypes(CIMObjectPath path)
                       throws CIMException
Enumerates the qualifiers defined in a namespace.

Specified by:
enumQualifierTypes in interface BatchHandle
Parameters:
path - The CIMObjectPath identifying the namespace whose qualifier definitions are to be enumerated.
Returns:
int - Operation ID. Result list from the performBatch method contains the actual return value.

getClass

public int getClass(CIMObjectPath name,
                    boolean localOnly,
                    boolean includeQualifiers,
                    boolean includeClassOrigin,
                    java.lang.String[] propertyList)
             throws CIMException
Gets the CIM class for the specified CIM object path. The entire class contents (and not just the class names) are returned.

Specified by:
getClass in interface BatchHandle
Parameters:
name - the CIMObjectPath that identifies the CIM class

localOnly - If true, only elements (properties, methods and qualifiers) defined or overridden within the class are included in the response. Propagated properties are NOT included, since their values are based on information in another class. If false, all elements of the class definition are returned. When instances are returned, the InstanceName must include all keys, including Propagated keys. So these attributes are included in the "name" part of the method response, but not in the "value" information.

includeQualifiers - If true, all Qualifiers for each Object (including Qualifiers on the Object and on any returned Properties) MUST be included. If false, no Qualifiers are present in the returned Object.

includeClassOrigin - If true, the CLASSORIGIN attribute MUST be present on all appropriate elements in each returned Object. If false, no CLASSORIGIN attributes are present in each returned Object. The CLASSORIGIN attribute is defined in the DMTF's Specification for the Representation of CIM in XML. CLASSORIGIN is an XML tag identifying the following text as a class name. It is attached to a property or method (when specified in XML), to indicate the class where that property or method is first defined. Where the same property name is locally defined in another superclass or subclass, the Server will return the value for the property in the lowest subclass. *

propertyList - If the PropertyList input parameter is not NULL, the members of the array define one or more Property names. Each returned Object MUST NOT include elements for any Properties missing from this list. Note that if LocalOnly is specified as true (or DeepInheritance is specified as false) this acts as an additional filter on the set of Properties returned (for example, if Property A is included in the PropertyList but LocalOnly is set to true and A is not local to a returned Instance, then it will not be included in that Instance). If the PropertyList input parameter is an empty array this signifies that no Properties are included in each returned Object. If the PropertyList input parameter is NULL this specifies that all Properties (subject to the conditions expressed by the other parameters) are included in each returned Object. If the PropertyList contains duplicate elements, the Server ignores the duplicates but otherwise process the request normally. If the PropertyList contains elements which are invalid Property names for any target Object, the Server ignores such entries but otherwise process the request normally.

Returns:
int - Operation ID. Result list from the performBatch method contains the actual return value.
See Also:
CIMClient.enumerateClasses(javax.wbem.cim.CIMObjectPath), CIMClient.enumerateClassNames(javax.wbem.cim.CIMObjectPath)

getInstance

public int getInstance(CIMObjectPath name,
                       boolean localOnly,
                       boolean includeQualifiers,
                       boolean includeClassOrigin,
                       java.lang.String[] propertyList)
                throws CIMException
Gets the CIM instance for the specified CIM object path.

Specified by:
getInstance in interface BatchHandle
Parameters:
name - CIM Object Path that identifies this CIM instance. This must include all of the keys.

localOnly - If true, only elements (properties, methods and qualifiers) defined or overridden within the class are included in the response. Propagated properties are NOT included, since their values are based on information in another class. If false, all elements of the class definition are returned. When instances are returned, the InstanceName must include all keys, including Propagated keys. So these attributes are included in the "name" part of the method response, but not in the "value" information.

includeQualifiers - If true, all Qualifiers for each Object (including Qualifiers on the Object and on any returned Properties) MUST be included. If false, no Qualifiers are present in the returned Object.

includeClassOrigin - If true, the CLASSORIGIN attribute MUST be present on all appropriate elements in each returned Object. If false, no CLASSORIGIN attributes are present in each returned Object. The CLASSORIGIN attribute is defined in the DMTF's Specification for the Representation of CIM in XML. CLASSORIGIN is an XML tag identifying the following text as a class name. It is attached to a property or method (when specified in XML), to indicate the class where that property or method is first defined. Where the same property name is locally defined in another superclass or subclass, the Server will return the value for the property in the lowest subclass. *

propertyList - If the PropertyList input parameter is not NULL, the members of the array define one or more Property names. Each returned Object MUST NOT include elements for any Properties missing from this list. Note that if LocalOnly is specified as true (or DeepInheritance is specified as false) this acts as an additional filter on the set of Properties returned (for example, if Property A is included in the PropertyList but LocalOnly is set to true and A is not local to a returned Instance, then it will not be included in that Instance). If the PropertyList input parameter is an empty array this signifies that no Properties are included in each returned Object. If the PropertyList input parameter is NULL this specifies that all Properties (subject to the conditions expressed by the other parameters) are included in each returned Object. If the PropertyList contains duplicate elements, the Server ignores the duplicates but otherwise process the request normally. If the PropertyList contains elements which are invalid Property names for any target Object, the Server ignores such entries but otherwise process the request normally.

Returns:
int - Operation ID. Result list from the performBatch method contains the actual return value.
See Also:
CIMClient.enumerateInstances(javax.wbem.cim.CIMObjectPath), CIMClient.enumerateInstanceNames(javax.wbem.cim.CIMObjectPath)

invokeMethod

public int invokeMethod(CIMObjectPath name,
                        java.lang.String methodName,
                        java.util.Vector inParams,
                        java.util.Vector outParams)
                 throws CIMException
Executes the specified method on the specified object. A method is a declaration containing the method name, return type, and parameters in the method.

Specified by:
invokeMethod in interface BatchHandle
Parameters:
name - CIM object path that identifies the method

methodName - the string name of the method to be invoked

inParams - the input parameters specified as a vector of CIMValue.

outParams - The output parameters, the CIMValue of these parameters will be appended to the outParams vector. The outParams vector is populated when the performBatchOperations call is completed.

Returns:
int - Operation ID. Result list from the performBatch method contains the actual return value.

getQualifierType

public int getQualifierType(CIMObjectPath name)
                     throws CIMException
Gets the CIM qualifier type specified in the CIM object path.

Specified by:
getQualifierType in interface BatchHandle
Parameters:
name - CIM object path that identifies the CIM qualifier type

Returns:
int - Operation ID. Result list from the performBatch method contains the actual return value.

createQualifierType

public int createQualifierType(CIMObjectPath name,
                               CIMQualifierType qt)
                        throws CIMException
Adds the specified CIM qualifier type to the specified namespace.

Specified by:
createQualifierType in interface BatchHandle
Parameters:
name - CIM object path that identifies the CIM qualifier type

qt - the CIM qualifier type to be added

Returns:
int - Operation ID.

setQualifierType

public int setQualifierType(CIMObjectPath name,
                            CIMQualifierType qt)
                     throws CIMException
Adds the specified CIM qualifier type to the specified namespace.

Specified by:
setQualifierType in interface BatchHandle
Parameters:
name - CIM object path that identifies the CIM qualifier type

qt - the CIM qualifier type to be added

Returns:
int - Operation ID.

createClass

public int createClass(CIMObjectPath name,
                       CIMClass cc)
                throws CIMException
Adds the CIM class to the specified namespace.

Specified by:
createClass in interface BatchHandle
Parameters:
name - CIM object path that identifies the CIM class to be added
cc - CIMClass to be added
Returns:
int - Operation ID.

setClass

public int setClass(CIMObjectPath name,
                    CIMClass cc)
             throws CIMException
Modifies the CIM class in the specified namespace.

Specified by:
setClass in interface BatchHandle
Parameters:
name - CIM object path that identifies the CIM class to be modified

cc - CIMClass to be modified

Returns:
int - Operation ID.

createInstance

public int createInstance(CIMObjectPath name,
                          CIMInstance ci)
                   throws CIMException
Adds the specified CIM Instance to the specified namespace

Specified by:
createInstance in interface BatchHandle
Parameters:
name - CIM object path that identifies the CIM instance to be added. Only the name space component is used. Any other information (e.g. keys) is ignored.

ci - CIM instance to be added. Its keys and properties may be initialized by either the client or server.

Returns:
int - Operation ID. Result list from the performBatch method contains the actual return value.

setInstance

public int setInstance(CIMObjectPath name,
                       CIMInstance ci)
                throws CIMException
Modifies the specified CIM instance in the specified namespace.

Specified by:
setInstance in interface BatchHandle
Parameters:
name - CIM object path that identifies the CIM instance to be modified. It must include all of the keys.

ci - CIM instance to be modified. Its properties may be initialized by either the client or server.

Returns:
int - Operation ID.

setInstance

public int setInstance(CIMObjectPath name,
                       CIMInstance ci,
                       CIMArgument[] propertyList)
                throws CIMException
Modifies the specified CIM instance in the specified namespace.

Parameters:
name - CIM object path that identifies the CIM instance to be modified. It must include all of the keys.

ci - CIM instance to be modified. Its properties may be initialized by either the client or server.

propertylist - If the PropertyList input parameter is not NULL, each array element define a Property name and its new value. The Server will modify or initialize only the values for the Property names in PropertyList. The Server will not affect another other Property. Order is not important. PropertyList may contain duplicate or invalid Property names. The Server must ignore them but otherwise process the request normally. The value of a duplicate Property name will override its previous value. This argument can be used to perform the SetProperty operation as defined by the CIM operations over HTTP spec at http://www.dmtf.org/. If the PropertyList input parameter is NULL, then ci contains all property values to be initialized by the client or Server

* @return int - Operation ID.


getProperty

public int getProperty(CIMObjectPath name,
                       java.lang.String propertyName)
                throws CIMException
Gets the value of the specified property for the instance specified in the object path.

Specified by:
getProperty in interface BatchHandle
Parameters:
name - CIM object path that identifies the CIM instance to be accessed. It must include all of the keys.

propertyName - Property whose value is required.

Returns:
int - Operation ID. Result list from the performBatch method contains the actual return value.

setProperty

public int setProperty(CIMObjectPath name,
                       java.lang.String propertyName,
                       CIMValue newValue)
                throws CIMException
Modifies the value of the specified property for the instance specified in the object path.

Specified by:
setProperty in interface BatchHandle
Parameters:
name - CIM object path that identifies the CIM instance to be accessed. It must include all of the keys.

propertyName - Property whose value is to be set.

newValue - The value for property propertyName.

Returns:
int - Operation ID.

execQuery

public int execQuery(CIMObjectPath name,
                     java.lang.String query,
                     java.lang.String ql)
              throws CIMException
Executes a query to retrieve objects. The WBEM Query Language is a subset of standard American National Standards Institute Structured Query Language (ANSI SQL) with semantic changes to support WBEM. Unlike SQL, in this release, it is a retrieval-only language. You cannot use the WBEM Query Language to modify, insert, or delete information. NOTE: This method operates as if localOnly is false, includeQualifiers is true, includeClassOrigin is true and propertyList is false; i.e. all qualifiers and all local and inherited properties with CLASSORIGIN attributes of each instance are returned.

Only queries on class instances are supported.

Specified by:
execQuery in interface BatchHandle
Parameters:
name - CIMObjectPath that identifies the class in which to query. Only the name space and class name components are used. Any other information (e.g. keys) is ignored.

query - A string containing the text of the query. This parameter cannot be null.

ql - String that identifies the query language to use for parsing the query string (e.g. WQL). WQL level 1 is the only currently supported query language.

Returns:
int - Operation ID. Result list from the performBatch method contains the actual return value.
  • The user does not have permission to view the result.
  • The requested query language is not supported.
  • The query specifies a class that does not exist.

    Example:

    The following API call returns an enumeration of all instances of the device_class.

    cc.execQuery(new CIMObjectPath(), SELECT * FROM device_class, cc.WQL)


  • associators

    public int associators(CIMObjectPath objectName,
                           java.lang.String assocClass,
                           java.lang.String resultClass,
                           java.lang.String role,
                           java.lang.String resultRole,
                           boolean includeQualifiers,
                           boolean includeClassOrigin,
                           java.lang.String[] propertyList)
                    throws CIMException
    Enumerate CIM Objects that are associated to a particular source CIM Object. If the source CIM object is a class, then associated class names are returned. If the target CIM object is an instance, then entire instances of associated classes are returned.

    Specified by:
    associators in interface BatchHandle
    Parameters:
    objectName - - Defines the source CIM Object whose associated Objects are to be returned. This may be either a Class name or Instance name (modelpath).

    assocClass - The AssocClass input parameter, if not NULL, MUST be a valid CIM Association Class name. It acts as a filter on the returned set of Objects by mandating that each returned Object MUST be associated to the source Object via an Instance of this Class or one of its subclasses.

    resultClass - The ResultClass input parameter, if not NULL, MUST be a valid CIM Class name. It acts as a filter on the returned set of Objects by mandating that each returned Object MUST be either an Instance of this Class (or one of its subclasses) or be this Class (or one of its subclasses).

    role - The Role input parameter, if not NULL, MUST be a valid Property name. It acts as a filter on the returned set of Objects by mandating that each returned Object MUST be associated to the source Object via an Association in which the source Object plays the specified role (i.e. the name of the Property in the Association Class that refers to the source Object MUST match the value of this parameter). Thus, if the Role input parameter is set to Antecedent, then only Associations where the source Object is the Antecedent reference are examined.

    resultRole - The ResultRole input parameter, if not NULL, MUST be a valid Property name. It acts as a filter on the returned set of Objects by mandating that each returned Object MUST be associated to the source Object via an Association in which the returned Object plays the specified role (i.e. the name of the Property in the Association Class that refers to the returned Object MUST match the value of this parameter). Thus, if the resultRole input parameter is set to Dependent, then only Associations where the returned Object is the Dependent reference are examined.

    includeQualifiers - If true, all Qualifiers for each Object (including Qualifiers on the Object and on any returned Properties) MUST be included in the response. If false, no Qualifiers are present in each returned Object.

    includeClassOrigin - If true, the CLASSORIGIN attribute MUST be present on all appropriate elements in each returned Object. If false, no CLASSORIGIN attributes are present in each returned Object. The CLASSORIGIN attribute is defined in the DMTF's Specification for the Representation of CIM in XML. CLASSORIGIN is an XML tag identifying the following text as a class name. It is attached to a property or method (when specified in XML), to indicate the class where that property or method is first defined. Where the same property name is locally defined in another superclass or subclass, the Server will return the value for the property in the lowest subclass. *

    propertyList - If the PropertyList input parameter is not NULL, the members of the array define one or more Property names. Each returned Object MUST NOT include elements for any Properties missing from this list. Note that if LocalOnly is specified as true (or DeepInheritance is specified as false) this acts as an additional filter on the set of Properties returned (for example, if Property A is included in the PropertyList but LocalOnly is set to true and A is not local to a returned Instance, then it will not be included in that Instance). If the PropertyList input parameter is an empty array this signifies that no Properties are included in each returned Object. If the PropertyList input parameter is NULL this specifies that all Properties (subject to the conditions expressed by the other parameters) are included in each returned Object. If the PropertyList contains duplicate elements, the Server ignores the duplicates but otherwise process the request normally. If the PropertyList contains elements which are invalid Property names for any target Object, the Server ignores such entries but otherwise process the request normally. Clients SHOULD NOT explicitly specify properties in the PropertyList parameter unless they have specified a non-NULL value for the ResultClass parameter.

    Returns:
    int - Operation ID. Result array from the performBatch method contains the actual return value.

    associatorNames

    public int associatorNames(CIMObjectPath objectName,
                               java.lang.String assocClass,
                               java.lang.String resultClass,
                               java.lang.String role,
                               java.lang.String resultRole)
                        throws CIMException
    Enumerates the object paths to CIM Objects that are associated to a particular source CIM Object. If the source CIM object is a class, then associated class names are returned. If the target CIM object is an instance, then object paths to the instances of associated classes are returned.

    Specified by:
    associatorNames in interface BatchHandle
    Parameters:
    objectName - - Defines the source CIM Object whose associated Objects are to be returned. This may be either a Class name or Instance name (modelpath).

    assocClass - The AssocClass input parameter, if not NULL, MUST be a valid CIM Association Class name. It acts as a filter on the returned set of Objects by mandating that each returned Object MUST be associated to the source Object via an Instance of this Class or one of its subclasses.

    resultClass - The ResultClass input parameter, if not NULL, MUST be a valid CIM Class name. It acts as a filter on the returned set of Objects by mandating that each returned Object MUST be either an Instance of this Class (or one of its subclasses) or be this Class (or one of its subclasses).

    role - The Role input parameter, if not NULL, MUST be a valid Property name. It acts as a filter on the returned set of Objects by mandating that each returned Object MUST be associated to the source Object via an Association in which the source Object plays the specified role (i.e. the name of the Property in the Association Class that refers to the source Object MUST match the value of this parameter). Thus, if the Role input parameter is set to Antecedent, then only Associations where the source Object is the Antecedent reference are examined.

    resultRole - The ResultRole input parameter, if not NULL, MUST be a valid Property name. It acts as a filter on the returned set of Objects by mandating that each returned Object MUST be associated to the source Object via an Association in which the returned Object plays the specified role (i.e. the name of the Property in the Association Class that refers to the returned Object MUST match the value of this parameter). Thus, if the resultRole input parameter is set to Dependent, then only Associations where the returned Object is the Dependent reference are examined.

    Returns:
    int - Operation ID. Result list from the performBatch method contains the actual return value.

    references

    public int references(CIMObjectPath objectName,
                          java.lang.String resultClass,
                          java.lang.String role,
                          boolean includeQualifiers,
                          boolean includeClassOrigin,
                          java.lang.String[] propertyList)
                   throws CIMException
    Enumerates the association objects that refer to a particular target CIM Object. If the target CIM object is a class, association class names are returned. If the target CIM object is an instance, then association instances are returned.

    Specified by:
    references in interface BatchHandle
    Parameters:
    objectName - The ObjectName input parameter defines the target CIM Object whose referring Objects are to be returned. This is either a Class name or Instance name (model path).

    ResultClass - The ResultClass input parameter, if not NULL, MUST be a valid CIM Class name. It acts as a filter on the returned set of Objects by mandating that each returned Object MUST be an Instance of this Class (or one of its subclasses), or this Class (or one of its subclasses).

    role - The Role input parameter, if not NULL, MUST be a valid Property name. It acts as a filter on the returned set of Objects by mandating that each returned Objects MUST refer to the target Object via a Property whose name matches the value of this parameter. Thus, if the Role input parameter is set to Antecedent, then only Association instances where the target Object is the Antecedent reference are returned.

    includeQualifiers - If true, all Qualifiers for each Object (including Qualifiers on the Object and on any returned Properties) MUST be included in the response. If false, no Qualifiers are present in each returned Object.

    includeClassOrigin - If true, the CLASSORIGIN attribute MUST be present on all appropriate elements in each returned Object. If false, no CLASSORIGIN attributes are present in each returned Object. The CLASSORIGIN attribute is defined in the DMTF's Specification for the Representation of CIM in XML. CLASSORIGIN is an XML tag identifying the following text as a class name. It is attached to a property or method (when specified in XML), to indicate the class where that property or method is first defined. Where the same property name is locally defined in another superclass or subclass, the Server will return the value for the property in the lowest subclass. *

    propertyList - If the PropertyList input parameter is not NULL, the members of the array define one or more Property names. Each returned Object MUST NOT include elements for any Properties missing from this list. Note that if LocalOnly is specified as true (or DeepInheritance is specified as false) this acts as an additional filter on the set of Properties returned (for example, if Property A is included in the PropertyList but LocalOnly is set to true and A is not local to a returned Instance, then it will not be included in that Instance). If the PropertyList input parameter is an empty array this signifies that no Properties are included in each returned Object. If the PropertyList input parameter is NULL this specifies that all Properties (subject to the conditions expressed by the other parameters) are included in each returned Object. If the PropertyList contains duplicate elements, the Server ignores the duplicates but otherwise process the request normally. If the PropertyList contains elements which are invalid Property names for any target Object, the Server ignores such entries but otherwise process the request normally. Clients SHOULD NOT explicitly specify properties in the PropertyList parameter unless they have specified a non-NULL value for the ResultClass parameter.

    Returns:
    int - Operation ID. Result list from the performBatch method contains the actual return value.

    referenceNames

    public int referenceNames(CIMObjectPath objectName,
                              java.lang.String resultClass,
                              java.lang.String role)
                       throws CIMException
    Enumerates the object paths to association objects that refer to a particular target CIM Object. If the target CIM object is a class, association class names are returned. If the target CIM object is an instance, then object paths to the association instances are returned.

    Specified by:
    referenceNames in interface BatchHandle
    Parameters:
    objectName - The ObjectName input parameter defines the target CIM Object whose referring Objects are to be returned. This is either a Class name or Instance name (model path).

    ResultClass - The ResultClass input parameter, if not NULL, MUST be a valid CIM Class name. It acts as a filter on the returned set of Objects by mandating that each returned Object MUST be an Instance of this Class (or one of its subclasses), or this Class (or one of its subclasses).

    role - The Role input parameter, if not NULL, MUST be a valid Property name. It acts as a filter on the returned set of Objects by mandating that each returned Objects MUST refer to the target Object via a Property whose name matches the value of this parameter. Thus, if the Role input parameter is set to Antecedent, then only Association instances where the target Object is the Antecedent reference are returned.

    Returns:
    int - Operation ID. Result list from the performBatch method contains the actual return value.