javax.wbem.provider
Interface PullInstanceProvider

All Superinterfaces:
Provider

public interface PullInstanceProvider
extends Provider

This interface is implemented by instance providers. Instance providers are used to serve up dynamic instances of CIM classes using the Pull operations as defined by the Distributed Management Task Force (DMTF) CIM Infrastructure Specification (DSP004).

Since:
JSR48 1.0.0

Method Summary
 CIMObjectPath createInstance(CIMInstance ci)
          Create the specified instance.
 void deleteInstance(CIMObjectPath op)
          Delete the instance specified.
 CloseableIterator<CIMObjectPath> enumerateInstanceNames(CIMObjectPath op, String filterQueryLanguage, String filterQuery, boolean continueOnError)
          Enumerate the names of the instances for a specified class.
 CloseableIterator<CIMInstance> enumerateInstances(CIMObjectPath op, boolean localOnly, boolean includeClassOrigin, String[] propertyList, String filterQueryLanguage, String filterQuery, boolean continueOnError)
          Enumerate the instances of a class.
 CloseableIterator<CIMInstance> execQuery(CIMObjectPath op, String query, String ql)
          This method enumerates all instances of the class specified by the CIMObjectpath argument that satisfy the conditions defined by the query expression (query) in query language type (ql).
 CIMInstance getInstance(CIMObjectPath op, boolean localOnly, boolean includeClassOrigin, String[] propertyList)
          Get the instance specified by the object path.
 void modifyInstance(CIMInstance ci, String[] propertyList)
          Modify the instance specified.
 
Methods inherited from interface javax.wbem.provider.Provider
close, initialize
 

Method Detail

createInstance

CIMObjectPath createInstance(CIMInstance ci)
                             throws WBEMException
Create the specified instance.

Parameters:
ci - The instance to be created. Its keys and properties may be initialized by either the client or provider.
Returns:
the CIMObjectPath of the created instance. The provider should return non-NULL ONLY IF it initializes or changes one or more keys.
Throws:
WBEMException - If unsuccessful, one of the following status codes may be returned. The ORDERED list is:
  • CIM_ERR_ACCESS_DENIED
  • CIM_ERR_NOT_SUPPORTED (provider does not support this method)
  • CIM_ERR_INVALID_NAMESPACE
  • CIM_ERR_INVALID_PARAMETER (for this method)
  • CIM_ERR_INVALID_CLASS (in this namespace)
  • CIM_ERR_ALREADY_EXISTS
  • CIM_ERR_FAILED (some other unspecified error occurred)

deleteInstance

void deleteInstance(CIMObjectPath op)
                    throws WBEMException
Delete the instance specified.

Parameters:
op - The object path of the instance to be deleted. It must include all of the keys.
Throws:
WBEMException - If unsuccessful, one of the following status codes may be returned. The ORDERED list is:
  • CIM_ERR_ACCESS_DENIED
  • CIM_ERR_NOT_SUPPORTED (provider does not support this method)
  • CIM_ERR_INVALID_NAMESPACE
  • CIM_ERR_INVALID_PARAMETER (for this method)
  • CIM_ERR_INVALID_CLASS (in this namespace)
  • CIM_ERR_NOT_FOUND (if instance does not exist)
  • CIM_ERR_FAILED (some other unspecified error occurred)

enumerateInstanceNames

CloseableIterator<CIMObjectPath> enumerateInstanceNames(CIMObjectPath op,
                                                        String filterQueryLanguage,
                                                        String filterQuery,
                                                        boolean continueOnError)
                                                        throws WBEMException
Enumerate the names of the instances for a specified class. The names of all subclass instances are returned.

Parameters:
op - The object path of the class to be enumerated. Only the name space and class name components are used. Any other information (e.g. keys) is ignored.
Returns:
An WBEMIterator that references CIMObjectPaths. Each element is an object path to an enumerated instance. If none are found, then the Provider returns NULL.
Throws:
WBEMException - If unsuccessful, one of the following status codes may be returned. The ORDERED list is:
  • CIM_ERR_ACCESS_DENIED
  • CIM_ERR_NOT_SUPPORTED (provider does not support this method)
  • CIM_ERR_INVALID_NAMESPACE
  • CIM_ERR_INVALID_PARAMETER (for this method)
  • CIM_ERR_INVALID_CLASS (in this namespace)
  • CIM_ERR_FAILED (some other unspecified error occurred)

enumerateInstances

CloseableIterator<CIMInstance> enumerateInstances(CIMObjectPath op,
                                                  boolean localOnly,
                                                  boolean includeClassOrigin,
                                                  String[] propertyList,
                                                  String filterQueryLanguage,
                                                  String filterQuery,
                                                  boolean continueOnError)
                                                  throws WBEMException
Enumerate the instances of a class. The instances of all subclasses are also returned.

Parameters:
op - The object path of the class to be enumerated. Only the name space and class name components are used. Any other information (e.g. keys) is ignored.
localOnly - If true, only properties overridden or defined in the returned Instance are included in the response. If false, all properties of the returned Instance are returned.
includeClassOrigin - The class origin attribute is the name of the class that first defined the property. If true, the class origin attribute will be present for each property on all returned CIMInstances. If false, the class origin will not be present.
propertyList - If the PropertyList input parameter is not NULL, the members of the array define one or more Property names. Each returned Instance MUST NOT include elements for any Properties missing from this list. Note that if localOnly is specified as true this acts as an additional filter on the set of Properties returned (e.g. 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 Instance. 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 Instance. The PropertyList may contain duplicate or invalid Property names. The Provider must ignore them but otherwise process the request normally; i.e. the returned Instance(s) will not contain duplicate or invalid Property Names.
Returns:
An WBEMIterator that references CIMInstances. Each element is a filtered instance. If none are found, then the Provider returns NULL.
Throws:
WBEMException - If unsuccessful, one of the following status codes may be returned. The ORDERED list is:
  • CIM_ERR_ACCESS_DENIED
  • CIM_ERR_NOT_SUPPORTED (provider does not support this method)
  • CIM_ERR_INVALID_NAMESPACE
  • CIM_ERR_INVALID_PARAMETER (for this method)
  • CIM_ERR_INVALID_CLASS (in this namespace)
  • CIM_ERR_FAILED (some other unspecified error occurred)

execQuery

CloseableIterator<CIMInstance> execQuery(CIMObjectPath op,
                                         String query,
                                         String ql)
                                         throws WBEMException
This method enumerates all instances of the class specified by the CIMObjectpath argument that satisfy the conditions defined by the query expression (query) in query language type (ql). The entire instances are returned, not just the object paths to them. NOTE: This method operates as if localOnly is false and propertyList is NULL; all local and inherited properties with the class origin attributes of each instance are returned.

Typically, a provider parses the query string, enumerates the instances in the class (op), and then filters those instances to match the query string (query) expressed using the specified query language (ql). The provider then returns an array containing the instances that match the query string.

Providers with access to an entity that handles indexing can pass the query string to that entity for parsing. For those providers who do not have any indexing/query filtering capabilites, the provider may ask the CIM object manager to handle the filtering. A return array of all CIMInstance which have a possibility of matching the filter may be returned (this can be the same result as an enumerate instances call), but with the first element of the array set to NULL. This NULL value indicates to the CIM object manager that it needs to handle the filtering. The filter is applied by the object manager and the filtered result is returned to the client.

Parameters:
op - The object path of the class to enumerate and apply the query to. Only the name space and class name components are used. Any other information (e.g. keys) is ignored.
query - The CIM query expression (e.g. SELECT *)
ql - The CIM query language type (e.g. WQL)
Returns:
An WBEMIterator that references CIMInstances. Each element is an instance that met the specified criteria. If none are found, then the Provider returns NULL.
Throws:
WBEMException - If unsuccessful, one of the following status codes may be returned. The ORDERED list is:
  • CIM_ERR_ACCESS_DENIED
  • CIM_ERR_NOT_SUPPORTED (provider does not support this method)
  • CIM_ERR_INVALID_NAMESPACE
  • CIM_ERR_INVALID_PARAMETER (for this method)
  • CIM_ERR_QUERY_LANGUAGE_NOT_SUPPORTED
  • CIM_ERR_INVALID_QUERY
  • CIM_ERR_FAILED (some other unspecified error occurred)

getInstance

CIMInstance getInstance(CIMObjectPath op,
                        boolean localOnly,
                        boolean includeClassOrigin,
                        String[] propertyList)
                        throws WBEMException
Get the instance specified by the object path.

Parameters:
op - The object path of the instance to be retrieved. This must include all of the keys for the instance.
localOnly - If true, only properties overridden or defined in the returned Instance are included in the response. If false, all elements of the returned Instance are returned.
includeClassOrigin - The class origin attribute is the name of the class that first defined the property. If true, the class origin attribute will be present for each property returned for the CIMInstance. If false, the class origin will not be present.
propertyList - If the PropertyList input parameter is not NULL, the members of the array define one or more Property names. Each returned Instance MUST NOT include elements for any Properties missing from this list. Note that if localOnly is specified as true this acts as an additional filter on the set of Properties returned (e.g. 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 Instance. 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 Instance. The PropertyList may contain duplicate or invalid Property names. The Provider must ignore them but otherwise process the request normally; i.e. the returned Instance(s) will not contain duplicate or invalid Property Names. This argument can be used to perform the GetProperty operation as defined by the CIM operations over HTTP spec at http://www.dmtf.org/.
Returns:
The retrieved filtered instance.
Throws:
WBEMException - If unsuccessful, one of the following status codes may be returned. The ORDERED list is:
  • CIM_ERR_ACCESS_DENIED
  • CIM_ERR_NOT_SUPPORTED (provider does not support this method)
  • CIM_ERR_INVALID_NAMESPACE
  • CIM_ERR_INVALID_PARAMETER (for this method)
  • CIM_ERR_INVALID_CLASS (in this namespace)
  • CIM_ERR_NOT_FOUND (if instance does not exist)
  • CIM_ERR_FAILED (some other unspecified error occurred)

modifyInstance

void modifyInstance(CIMInstance ci,
                    String[] propertyList)
                    throws WBEMException
Modify the instance specified.

Parameters:
ci - The instance to be set. Its properties may be initialized by either the client or Provider.
propertyList - If the PropertyList input parameter is not NULL, the members of the array define one or more Property names. The Provider will modify or initialize only the values for the Property names in PropertyList. The Provider will not affect any other Property. Order is not important. The value of the specified Property is found in CIMInstance ci. If the specified Property value is not found in ci, then it will be ignored by the Provider. If PropertyList contains invalid Property names, the entire operation fails (i.e. no Property values of ci are modified). PropertyList may contain duplicate Property names. The Provider must ignore them but otherwise process the request normally. If PropertyList is an empty array, then no Property values in ci are updated. If PropertyList is NULL, then ci contains all Property values to be updated by the client or Provider. This argument can be used to perform the SetProperty operation as defined by the CIM operations over HTTP spec at http://www.dmtf.org/.
Throws:
WBEMException - If unsuccessful, one of the following status codes may be returned. The ORDERED list is:
  • CIM_ERR_ACCESS_DENIED
  • CIM_ERR_NOT_SUPPORTED (provider does not support this method)
  • CIM_ERR_INVALID_NAMESPACE
  • CIM_ERR_INVALID_PARAMETER (for this method)
  • CIM_ERR_INVALID_CLASS (in this namespace)
  • CIM_ERR_NOT_FOUND (if instance does not exist)
  • CIM_ERR_NO_SUCH_PROPERTY (in this instance)
  • CIM_ERR_FAILED (some other unspecified error occurred)


Copyright © 2002-2008 WBEM Solutions, Inc. All Rights Reserved.