OW_NAMESPACE::OpenWBEM_ConfigSettingDataInstProv Class Reference

Inheritance diagram for OW_NAMESPACE::OpenWBEM_ConfigSettingDataInstProv:

Inheritance graph
[legend]
Collaboration diagram for OW_NAMESPACE::OpenWBEM_ConfigSettingDataInstProv:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void initialize (const ProviderEnvironmentIFCRef &env)
 Called by the CIMOM when the provider is initialized.
virtual ~OpenWBEM_ConfigSettingDataInstProv ()
virtual void enumInstanceNames (const ProviderEnvironmentIFCRef &env, const String &ns, const String &className, CIMObjectPathResultHandlerIFC &result, const CIMClass &cimClass)
 This method enumerates all names of instances of the class which is specified in cop.
virtual CIMInstance getInstance (const ProviderEnvironmentIFCRef &env, const String &ns, const CIMObjectPath &instanceName, WBEMFlags::ELocalOnlyFlag localOnly, WBEMFlags::EIncludeQualifiersFlag includeQualifiers, WBEMFlags::EIncludeClassOriginFlag includeClassOrigin, const StringArray *propertyList, const CIMClass &cimClass)
 This method retrieves the instance specified in the object path.
virtual CIMObjectPath createInstance (const ProviderEnvironmentIFCRef &env, const String &ns, const CIMInstance &cimInstance)
 This method creates the instance specified in the object path.
virtual void modifyInstance (const ProviderEnvironmentIFCRef &env, const String &ns, const CIMInstance &modifiedInstance, const CIMInstance &previousInstance, WBEMFlags::EIncludeQualifiersFlag includeQualifiers, const StringArray *propertyList, const CIMClass &theClass)
 This method sets the instance specified in the object path.
virtual void deleteInstance (const ProviderEnvironmentIFCRef &env, const String &ns, const CIMObjectPath &cop)
 This method deletes the instance specified in the object path.
virtual void getInstanceProviderInfo (InstanceProviderInfo &info)
 A provider should override this method to report which classes in which namespaces it instruments.
virtual void doReferences (const ProviderEnvironmentIFCRef &env, CIMInstanceResultHandlerIFC &result, const String &ns, const CIMObjectPath &objectName, const CIMClass &assocClass, const String &resultClass, const String &role, const String &resultRole)
 This method is invoked in order to do the Associators, AssociatorNames, References, and ReferenceNames operation as defined by the CIM operations over HTTP spec at http://www.dmtf.org/download/spec/xmls/CIM_HTTP_Mapping10.htm#SecAssociators This operation is used to enumerate CIM Instances of a particular Association class.
virtual void getAssociatorProviderInfo (AssociatorProviderInfo &info)
 A provider should override this method to report which classes in which namespaces it instruments.

Private Types

typedef SortedVectorMap< String,
ConfigData
ConfigItemsMap

Private Member Functions

String makeID (const String &confName)
bool mapNeedsLoad (const String &filename)
String getConfigFile (const ProviderEnvironmentIFCRef &env)
void loadConfigMap (const ProviderEnvironmentIFCRef &env)

Private Attributes

SortedVectorMap< String, ConfigDatam_configItems
time_t m_fileMTime

Classes

struct  ConfigData

Detailed Description

Definition at line 59 of file OW_provinstOpenWBEM_ConfigSettingData.cpp.


Member Typedef Documentation

typedef SortedVectorMap<String, ConfigData> OW_NAMESPACE::OpenWBEM_ConfigSettingDataInstProv::ConfigItemsMap [private]
 

Definition at line 425 of file OW_provinstOpenWBEM_ConfigSettingData.cpp.


Constructor & Destructor Documentation

virtual OW_NAMESPACE::OpenWBEM_ConfigSettingDataInstProv::~OpenWBEM_ConfigSettingDataInstProv  )  [inline, virtual]
 

Definition at line 72 of file OW_provinstOpenWBEM_ConfigSettingData.cpp.


Member Function Documentation

virtual CIMObjectPath OW_NAMESPACE::OpenWBEM_ConfigSettingDataInstProv::createInstance const ProviderEnvironmentIFCRef env,
const String ns,
const CIMInstance cimInstance
[inline, virtual]
 

This method creates the instance specified in the object path.

If the instance does exist an CIMException with ID CIM_ERR_ALREADY_EXISTS must be thrown. The parameter should be the instance name.

Parameters:
cop The path to the instance to be set. The import part in this parameter is the namespace component.
cimInstance The instance to be set
Returns:
A CIM ObjectPath of the instance that was created.
Exceptions:
CIMException 

Implements OW_NAMESPACE::CppInstanceProviderIFC.

Definition at line 163 of file OW_provinstOpenWBEM_ConfigSettingData.cpp.

References env, ns, and OW_THROWCIMMSG.

virtual void OW_NAMESPACE::OpenWBEM_ConfigSettingDataInstProv::deleteInstance const ProviderEnvironmentIFCRef env,
const String ns,
const CIMObjectPath cop
[inline, virtual]
 

This method deletes the instance specified in the object path.

Parameters:
cop The instance to be deleted
Exceptions:
CIMException 

Implements OW_NAMESPACE::CppInstanceProviderIFC.

Definition at line 326 of file OW_provinstOpenWBEM_ConfigSettingData.cpp.

References cop, env, ns, and OW_THROWCIMMSG.

virtual void OW_NAMESPACE::OpenWBEM_ConfigSettingDataInstProv::doReferences const ProviderEnvironmentIFCRef env,
CIMInstanceResultHandlerIFC result,
const String ns,
const CIMObjectPath objectName,
const CIMClass assocClass,
const String resultClass,
const String role,
const String resultRole
[inline, virtual]
 

This method is invoked in order to do the Associators, AssociatorNames, References, and ReferenceNames operation as defined by the CIM operations over HTTP spec at http://www.dmtf.org/download/spec/xmls/CIM_HTTP_Mapping10.htm#SecAssociators This operation is used to enumerate CIM Instances of a particular Association class.

Parameters:
assocClass Defines the association that the objectName object should be associated to. The provider uses this information to identify which association must be traversed in case it supports more than one association.
objectName Defines the source CIM Object whose associated Objects are to be returned. This is an instance name. Instance name (modelpath).
resultClass The resultClass input parameter, if not empty (""), MUST be a valid CIM Class name. It acts as a filter on the returned set of Objects by mandating that the resultRole of each returned Object MUST be an ObjectPath to 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 empty (""), 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).
resultRole The resultRole input parameter if not empty (""), MUST be a valid Property name. It acts as a filter on the returned set of Objects by mandating that each returned Object MUST contain a reference (ObjectPath) to an Instance or Class which is associated to the source Object via an Association in which the Associated Object plays the specified role (i.e. the name of the Property in the Association Class that refers to the Associated Object MUST match the value of this parameter).
Returns:
If successful, the method returns zero or more CIM Instances meeting the requested criteria.
Exceptions:
CIMException. - The following IDs can be expected. CIM_ERR_ACCESS_DENIED CIM_ERR_NOT_SUPPORTED CIM_ERR_INVALID_NAMESPACE CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or otherwise incorrect parameters) CIM_ERR_FAILED (some other unspecifed error occurred)
+------------------+ +-----------------+ | ObjectNameClass | | ResultClass | | ~~~~~~~~~~~~~~~ | | ~~~~~~~~~~~ | +------------------+ +-----------------+ | +----------------------------+ | | | [Association] AssocClass | | | ObjectName | ~~~~~~~~~~~~~~~~~~~~~~~~ | | +----------------+ ObjectNameClass REF Role | | (CIMObjectPath) | ResultClass REF ResultRole +-----------------+ | | (CIMObjectPath) +----------------------------+

Implements OW_NAMESPACE::CppSimpleAssociatorProviderIFC.

Definition at line 345 of file OW_provinstOpenWBEM_ConfigSettingData.cpp.

References OW_NAMESPACE::SortedVectorMap< Key, T, Compare >::begin(), OW_NAMESPACE::String::empty(), OW_NAMESPACE::SortedVectorMap< Key, T, Compare >::end(), OW_NAMESPACE::CIMObjectPath::getClassName(), OW_NAMESPACE::ResultHandlerIFC< T >::handle(), m_configItems, OW_NAMESPACE::CIMClass::newInstance(), ns, OW_THROWCIMMSG, result, OW_NAMESPACE::CIMObjectPath::setKeyValue(), OW_NAMESPACE::CIMInstance::setProperty(), and OW_NAMESPACE::String::toLowerCase().

virtual void OW_NAMESPACE::OpenWBEM_ConfigSettingDataInstProv::enumInstanceNames const ProviderEnvironmentIFCRef env,
const String ns,
const String className,
CIMObjectPathResultHandlerIFC result,
const CIMClass cimClass
[inline, virtual]
 

This method enumerates all names of instances of the class which is specified in cop.

Parameters:
cop The object path specifies the class that must be enumerated.
cimClass The class reference
Returns:
An array of CIMObjectPath containing names of the enumerated instances.
Exceptions:
CIMException - throws if the CIMObjectPath is incorrect or does not exist.

Implements OW_NAMESPACE::CppInstanceProviderIFC.

Definition at line 77 of file OW_provinstOpenWBEM_ConfigSettingData.cpp.

References OW_NAMESPACE::SortedVectorMap< Key, T, Compare >::begin(), cimClass, className, OW_NAMESPACE::SortedVectorMap< Key, T, Compare >::end(), env, getConfigFile(), OW_NAMESPACE::ResultHandlerIFC< T >::handle(), loadConfigMap(), m_configItems, makeID(), mapNeedsLoad(), ns, result, and OW_NAMESPACE::CIMObjectPath::setKeyValue().

virtual void OW_NAMESPACE::OpenWBEM_ConfigSettingDataInstProv::getAssociatorProviderInfo AssociatorProviderInfo info  )  [inline, virtual]
 

A provider should override this method to report which classes in which namespaces it instruments.

It should insert an entry for each class it is responsible for. The entry consists of the class name and an optional list of namespaces. If the namespace list is empty, all namespaces are implied. If the method does nothing, then the provider's class must have a provider qualifier that identifies the provider. This old behavior is deprecated and will be removed sometime in the future. This method has a default implementation that does nothing, to allow old providers to be migrated forward with little or no change, but once the old provider location method is removed, this member function will be pure virtual.

Reimplemented from OW_NAMESPACE::CppAssociatorProviderIFC.

Definition at line 408 of file OW_provinstOpenWBEM_ConfigSettingData.cpp.

References OW_NAMESPACE::ProviderInfoBase< ClassInfoT >::addInstrumentedClass().

String OW_NAMESPACE::OpenWBEM_ConfigSettingDataInstProv::getConfigFile const ProviderEnvironmentIFCRef env  )  [inline, private]
 

Definition at line 457 of file OW_provinstOpenWBEM_ConfigSettingData.cpp.

References OW_NAMESPACE::String::empty(), env, and OW_THROWCIMMSG.

Referenced by enumInstanceNames().

virtual CIMInstance OW_NAMESPACE::OpenWBEM_ConfigSettingDataInstProv::getInstance const ProviderEnvironmentIFCRef env,
const String ns,
const CIMObjectPath instanceName,
WBEMFlags::ELocalOnlyFlag  localOnly,
WBEMFlags::EIncludeQualifiersFlag  includeQualifiers,
WBEMFlags::EIncludeClassOriginFlag  includeClassOrigin,
const StringArray propertyList,
const CIMClass cimClass
[inline, virtual]
 

This method retrieves the instance specified in the object path.

Parameters:
cop The name of the instance to be retrieved.
cimClass The class to which the instance belongs. This is useful for providers which do not want to create instances from scratch. They can call the class newInstance() routine to create a template for the new instance.
localOnly If true, only the non-inherited properties are to be returned, otherwise all properties are required.
Returns:
The retrieved instance
Exceptions:
CIMException - thrown if cop is incorrect or does not exist

Implements OW_NAMESPACE::CppInstanceProviderIFC.

Definition at line 107 of file OW_provinstOpenWBEM_ConfigSettingData.cpp.

References cimClass, env, OW_NAMESPACE::CIMObjectPath::getKeys(), OW_NAMESPACE::CIMObjectPath::getKeyValue(), OW_NAMESPACE::CIMValue::getType(), OW_NAMESPACE::CIMException::INVALID_PARAMETER, OW_NAMESPACE::CIMValue::isArray(), OW_NAMESPACE::CIMClass::newInstance(), ns, OW_THROWCIM, OW_NAMESPACE::CIMDataType::STRING, and OW_NAMESPACE::CIMInstance::updatePropertyValues().

virtual void OW_NAMESPACE::OpenWBEM_ConfigSettingDataInstProv::getInstanceProviderInfo InstanceProviderInfo info  )  [inline, virtual]
 

A provider should override this method to report which classes in which namespaces it instruments.

It should insert an entry for each class it is responsible for. The entry consists of the class name and an optional list of namespaces. If the namespace list is empty, all namespaces are implied. If the method does nothing, then the provider's class must have a provider qualifier that identifies the provider. This old behavior is deprecated and will be removed sometime in the future. This method has a default implementation that does nothing, to allow old providers to be migrated forward with little or no change, but once the old provider location method is removed, this member function will be pure virtual.

Reimplemented from OW_NAMESPACE::CppInstanceProviderIFC.

Definition at line 338 of file OW_provinstOpenWBEM_ConfigSettingData.cpp.

References OW_NAMESPACE::ProviderInfoBase< ClassInfoT >::addInstrumentedClass().

void OW_NAMESPACE::OpenWBEM_ConfigSettingDataInstProv::initialize const ProviderEnvironmentIFCRef env  )  [inline, virtual]
 

Called by the CIMOM when the provider is initialized.

Parameters:
env Gives the provider access to things such as a CIMOM handle, logger, etc. This provider environment carries its own OperationContext and hence things like the CIMOM handle remain valid for the lifetime of *env. Thus the provider can store a copy of env for later use, e.g., by a separate thread spawned by the provider.
Exceptions:
CIMException 

Reimplemented from OW_NAMESPACE::CppProviderBaseIFC.

Definition at line 66 of file OW_provinstOpenWBEM_ConfigSettingData.cpp.

References env, and loadConfigMap().

void OW_NAMESPACE::OpenWBEM_ConfigSettingDataInstProv::loadConfigMap const ProviderEnvironmentIFCRef env  )  [inline, private]
 

Definition at line 470 of file OW_provinstOpenWBEM_ConfigSettingData.cpp.

References OW_NAMESPACE::String::c_str(), OW_NAMESPACE::SortedVectorMap< Key, T, Compare >::clear(), OW_NAMESPACE::String::empty(), OW_NAMESPACE::SortedVectorMap< Key, T, Compare >::end(), env, OW_NAMESPACE::SortedVectorMap< Key, T, Compare >::find(), OW_NAMESPACE::String::indexOf(), OW_NAMESPACE::SortedVectorMap< Key, T, Compare >::insert(), OW_NAMESPACE::String::length(), m_configItems, OW_THROWCIMMSG, OW_NAMESPACE::String::substring(), and OW_NAMESPACE::String::trim().

Referenced by enumInstanceNames(), and initialize().

String OW_NAMESPACE::OpenWBEM_ConfigSettingDataInstProv::makeID const String confName  )  [inline, private]
 

Definition at line 432 of file OW_provinstOpenWBEM_ConfigSettingData.cpp.

Referenced by enumInstanceNames().

bool OW_NAMESPACE::OpenWBEM_ConfigSettingDataInstProv::mapNeedsLoad const String filename  )  [inline, private]
 

Definition at line 439 of file OW_provinstOpenWBEM_ConfigSettingData.cpp.

References OW_NAMESPACE::String::c_str(), and OW_THROWCIMMSG.

Referenced by enumInstanceNames().

virtual void OW_NAMESPACE::OpenWBEM_ConfigSettingDataInstProv::modifyInstance const ProviderEnvironmentIFCRef env,
const String ns,
const CIMInstance modifiedInstance,
const CIMInstance previousInstance,
WBEMFlags::EIncludeQualifiersFlag  includeQualifiers,
const StringArray propertyList,
const CIMClass theClass
[inline, virtual]
 

This method sets the instance specified in the object path.

If the instance does not exist an CIMException with ID CIM_ERR_NOT_FOUND must be thrown. The parameter should be the instance name.

Parameters:
cop The path of the instance to be set. The important part in this parameter is the namespace component.
cimInstance The instance to be set.
Exceptions:
CIMException 

Implements OW_NAMESPACE::CppInstanceProviderIFC.

Definition at line 175 of file OW_provinstOpenWBEM_ConfigSettingData.cpp.

References env, ns, OW_THROWCIMMSG, propertyList, OW_NAMESPACE::Array< T >::size(), and theClass.


Member Data Documentation

SortedVectorMap<String, ConfigData> OW_NAMESPACE::OpenWBEM_ConfigSettingDataInstProv::m_configItems [private]
 

Definition at line 427 of file OW_provinstOpenWBEM_ConfigSettingData.cpp.

Referenced by enumInstanceNames().

time_t OW_NAMESPACE::OpenWBEM_ConfigSettingDataInstProv::m_fileMTime [private]
 

Definition at line 430 of file OW_provinstOpenWBEM_ConfigSettingData.cpp.


The documentation for this class was generated from the following file:
Generated on Thu Feb 9 09:16:26 2006 for openwbem by  doxygen 1.4.6