CIMInstanceProvider Class Reference

#include <CIMInstanceProvider.h>

Inheritance diagram for CIMInstanceProvider:
CIMProvider

List of all members.

Public Member Functions

 CIMInstanceProvider ()
virtual ~CIMInstanceProvider ()
virtual void getInstance (const OperationContext &context, const CIMObjectPath &instanceReference, const Boolean includeQualifiers, const Boolean includeClassOrigin, const CIMPropertyList &propertyList, InstanceResponseHandler &handler)=0
virtual void enumerateInstances (const OperationContext &context, const CIMObjectPath &classReference, const Boolean includeQualifiers, const Boolean includeClassOrigin, const CIMPropertyList &propertyList, InstanceResponseHandler &handler)=0
virtual void enumerateInstanceNames (const OperationContext &context, const CIMObjectPath &classReference, ObjectPathResponseHandler &handler)=0
virtual void modifyInstance (const OperationContext &context, const CIMObjectPath &instanceReference, const CIMInstance &instanceObject, const Boolean includeQualifiers, const CIMPropertyList &propertyList, ResponseHandler &handler)=0
virtual void createInstance (const OperationContext &context, const CIMObjectPath &instanceReference, const CIMInstance &instanceObject, ObjectPathResponseHandler &handler)=0
virtual void deleteInstance (const OperationContext &context, const CIMObjectPath &instanceReference, ResponseHandler &handler)=0

Detailed Description

This class defines a set of functions that support the manipulation of instances of a CIM object class and their properties.

The Instance Provider is the most common provider, and is the provider interface used by the CIM Server to perform instance and property manipulation operations.

The Instance Provider receives operation requests from clients through calls to these functions by the CIM Server. Its purpose is to convert these to calls to system services, operations on system resources, or whatever platform-specific behavior is required to perform the operation modeled by the request. The specific requirements for each of the interface functions are discussed in their respective sections.


Constructor & Destructor Documentation

Destructs a CIMInstanceProvider object.


Member Function Documentation

virtual void CIMInstanceProvider::createInstance ( const OperationContext context,
const CIMObjectPath instanceReference,
const CIMInstance instanceObject,
ObjectPathResponseHandler handler 
) [pure virtual]

Creates a new instance.

Parameters:
contextAn OperationContext object containing the context for the processing of the operation. The context includes the name of the requesting user, language information, and other data.
instanceReferenceSpecifies the namespace and class name of the instance to create. The key bindings are not present in the instanceReference, because an instance name is not defined until after the instance has been created.
instanceObjectThe CIM instance to create. If a key property is null, the provider must supply a valid value for the property or throw a CIMInvalidParameterException. If any property value is invalid, the provider should throw a CIMInvalidParameterException.
handlerResponseHandler object for delivery of results. On a successful operation, the name of the newly created instance must be delivered.
Exceptions:
CIMNotSupportedException
CIMInvalidParameterException
CIMObjectAlreadyExistsException
CIMAccessDeniedException
CIMOperationFailedException
virtual void CIMInstanceProvider::deleteInstance ( const OperationContext context,
const CIMObjectPath instanceReference,
ResponseHandler handler 
) [pure virtual]

Deletes a specified instance.

Parameters:
contextAn OperationContext object containing the context for the processing of the operation. The context includes the name of the requesting user, language information, and other data.
instanceReferenceA fully qualified CIMObjectPath specifying the instance to be deleted.
handlerResponseHandler object for delivery of results.
Exceptions:
CIMNotSupportedException
CIMInvalidParameterException
CIMObjectNotFoundException
CIMAccessDeniedException
CIMOperationFailedException
virtual void CIMInstanceProvider::enumerateInstanceNames ( const OperationContext context,
const CIMObjectPath classReference,
ObjectPathResponseHandler handler 
) [pure virtual]

Returns the names of all instances of a specified class.

A typical implementation of this method will call the processing method in the ResponseHandler object, then iterate over the system resources representing instances of the CIM object, calling deliver on each iteration. Finally, it will call complete to inform the CIM Server that it has delivered all known instances. It is correct to call complete without calling deliver if no instances exist.

A provider can be implemented and registered to perform operations for several levels of the same line of descent (e.g., CIM_ComputerSystem and CIM_UnitaryComputerSystem). When this is done, the provider must return instances only for the deepest class for which it is registered, since the CIM Server will invoke enumerateInstanceNames for all classes at and beneath the class specified by the client.

Parameters:
contextAn OperationContext object containing the context for the processing of the operation. The context includes the name of the requesting user, language information, and other data.
classReferenceA fully qualified CIMObjectPath specifying the class for which to retrieve the instance names.
handlerResponseHandler object for delivery of results. The delivered CIMObjectPath values should not contain host or namespace information, as these attributes are not included in the WBEM protocol.
Exceptions:
CIMNotSupportedException
CIMInvalidParameterException
CIMAccessDeniedException
CIMOperationFailedException
virtual void CIMInstanceProvider::enumerateInstances ( const OperationContext context,
const CIMObjectPath classReference,
const Boolean  includeQualifiers,
const Boolean  includeClassOrigin,
const CIMPropertyList propertyList,
InstanceResponseHandler handler 
) [pure virtual]

Returns all instances of a specified class.

A typical implementation of this method will call the processing method in the ResponseHandler object, then iterate over the system resources representing instances of the CIM object, calling deliver on each iteration. Finally, it will call complete to inform the CIM Server that it has delivered all known instances. It is correct to call complete without calling deliver if no instances exist.

A provider can be implemented and registered to perform operations for several levels of the same line of descent (e.g., CIM_ComputerSystem and CIM_UnitaryComputerSystem). When this is done, the provider must return instances only for the deepest class for which it is registered, since the CIM Server will invoke enumerateInstances for all classes at and beneath the class specified by the client.

Parameters:
contextAn OperationContext object containing the context for the processing of the operation. The context includes the name of the requesting user, language information, and other data.
classReferenceA fully qualified CIMObjectPath specifying the class for which to retrieve the instances.
includeQualifiersA Boolean indicating whether the returned instances must include the qualifiers for the instance and its properties. Qualifiers may be included even if this flag is false.
includeClassOriginA Boolean indicating whether the returned instances must include the class origin for each of the instance elements.
propertyListA CIMPropertyList specifying the minimum set of properties required in the returned instances. Support for this parameter is optional, so the returned instance may contain properties not specified in the list. A null propertyList indicates that all properties must be included. A non-null, but empty, propertyList indicates that no properites are required. Note: The client PropertyList, DeepInheritance, and LocalOnly parameters are consolidated by the CIM Server into this single parameter.
handlerResponseHandler object for delivery of results.
Exceptions:
CIMNotSupportedException
CIMInvalidParameterException
CIMAccessDeniedException
CIMOperationFailedException
virtual void CIMInstanceProvider::getInstance ( const OperationContext context,
const CIMObjectPath instanceReference,
const Boolean  includeQualifiers,
const Boolean  includeClassOrigin,
const CIMPropertyList propertyList,
InstanceResponseHandler handler 
) [pure virtual]

Returns a specified CIM instance.

Parameters:
contextAn OperationContext object containing the context for the processing of the operation. The context includes the name of the requesting user, language information, and other data.
instanceReferenceA fully qualified CIMObjectPath specifying the instance to be retrieved.
includeQualifiersA Boolean indicating whether the returned instance must include the qualifiers for the instance and its properties. Qualifiers may be included even if this flag is false.
includeClassOriginA Boolean indicating whether the returned instance must include the class origin for each of the instance elements.
propertyListA CIMPropertyList specifying the minimum set of properties required in the returned instance. Support for this parameter is optional, so the returned instance may contain properties not specified in the list. A null propertyList indicates that all properties must be included. A non-null, but empty, propertyList indicates that no properites are required. Note: The client PropertyList and LocalOnly parameters are consolidated by the CIM Server into this single parameter.
handlerResponseHandler object for delivery of results.
Exceptions:
CIMNotSupportedException
CIMInvalidParameterException
CIMObjectNotFoundException
CIMAccessDeniedException
CIMOperationFailedException
virtual void CIMInstanceProvider::modifyInstance ( const OperationContext context,
const CIMObjectPath instanceReference,
const CIMInstance instanceObject,
const Boolean  includeQualifiers,
const CIMPropertyList propertyList,
ResponseHandler handler 
) [pure virtual]

Replaces all or part of a specified instance.

This method is intended to be atomic. Intermediate states should not be visible to other operations that access the instance.

Parameters:
contextAn OperationContext object containing the context for the processing of the operation. The context includes the name of the requesting user, language information, and other data.
instanceReferenceA fully qualified CIMObjectPath specifying the instance to be modified.
instanceObjectA CIMInstance containing the properties and qualifiers with which to update the instance.
includeQualifiersA Boolean indicating whether the instance qualifiers are to be updated in the instance and its properties. If false, no qualifiers are explicitly modified by this operation.
propertyListA CIMPropertyList specifying the set of properties to be updated in the instance. Support for this parameter is NOT optional. If the propertyList cannot be honored, a CIMNotSupportedException must be thrown. A null propertyList indicates that all properties must be updated. Properties specified in the propertyList but not present in the instanceObject are to be replaced by the class default values or left null.
handlerResponseHandler object for delivery of results.
Exceptions:
CIMNotSupportedException
CIMInvalidParameterException
CIMObjectNotFoundException
CIMAccessDeniedException
CIMOperationFailedException

The documentation for this class was generated from the following file: