OW_NAMESPACE::MetaRepository2 Class Reference

#include <OW_MetaRepository2.hpp>

Collaboration diagram for OW_NAMESPACE::MetaRepository2:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MetaRepository2 (const ServiceEnvironmentIFCRef &env)
 Create a new MetaRepository object.
 ~MetaRepository2 ()
void open (::DB_ENV *env,::DB_TXN *txn)
 Open this MetaRepository.
void close ()
CIMQualifierType getQualifierType (const String &ns, const String &qualName)
 Get an existing qualifier type from the repository.
bool deleteQualifierType (const String &ns, const String &qualName)
 Delete an existing qualifier from the repository.
void setQualifierType (const String &ns, const CIMQualifierType &qt)
 Update a qualifier type in the repository.
void enumQualifierTypes (const String &ns, CIMQualifierTypeResultHandlerIFC &result)
 Enumerator the qualifiers in a given namespace.
CIMException::ErrNoType getCIMClass (const String &ns, const String &className, WBEMFlags::ELocalOnlyFlag localOnly, WBEMFlags::EIncludeQualifiersFlag includeQualifiers, WBEMFlags::EIncludeClassOriginFlag includeClassOrigin, const StringArray *propertyList, CIMClass &cc)
 Gets an existing class from the store.
bool deleteClass (const String &ns, const String &className)
 Delete an existing class from the store.
void createClass (const String &ns, CIMClass &cimClass)
 creates a class in the store
void modifyClass (const String &ns, const CIMClass &cimClass)
 set a class in the store - note children are not affected
void enumClass (const String &ns, const String &className, CIMClassResultHandlerIFC &result, WBEMFlags::EDeepFlag deep, WBEMFlags::ELocalOnlyFlag localOnly, WBEMFlags::EIncludeQualifiersFlag includeQualifiers, WBEMFlags::EIncludeClassOriginFlag includeClassOrigin)
 Enumerates the class specified by className.
void enumClassNames (const String &ns, const String &className, StringResultHandlerIFC &result, WBEMFlags::EDeepFlag deep)
 Enumerates the class names specified by className.
void getTopLevelAssociations (const String &ns, CIMClassResultHandlerIFC &result)
 Get all top level classes that are associations.
void deleteNameSpace (const String &nsName, OperationContext &context)
 Delete the given namespace and all object contained within it.
void createNameSpace (String ns, OperationContext &context)
 Create a namespace.
void enumNameSpace (StringResultHandlerIFC &result, OperationContext &context)
bool nameSpaceExists (const String &ns)

Private Member Functions

 MetaRepository2 (const MetaRepository2 &x)
MetaRepository2operator= (const MetaRepository2 &x)
String _makeQualPath (const String &ns, const String &qualName)
 Make a path to a qualifier.
String _makeClassPath (const String &ns, const String &className)
 Make a path to a CIM class.
void _addQualifierType (const String &ns, const CIMQualifierType &qt)
 Add a qualifier type to the repository.
void _getClassNodes (CIMClassResultHandlerIFC &result, WBEMFlags::EDeepFlag deep, WBEMFlags::ELocalOnlyFlag localOnly=WBEMFlags::E_NOT_LOCAL_ONLY, WBEMFlags::EIncludeQualifiersFlag includeQualifiers=WBEMFlags::E_INCLUDE_QUALIFIERS, WBEMFlags::EIncludeClassOriginFlag includeClassOrigin=WBEMFlags::E_INCLUDE_CLASS_ORIGIN)
void _getClassNameNodes (StringResultHandlerIFC &result, WBEMFlags::EDeepFlag deep)
void _resolveClass (CIMClass &cls, const String &ns)
void _resolveQualifiers (const String &ns, CIMQualifierArray &quals)

Private Attributes

Cache< CIMClassm_classCache
Cache< CIMQualifierTypem_qualCache
dbDatabase m_namespaces
dbDatabase m_qualifiers
dbDatabase m_classes
dbDatabase m_subclasslists
dbDatabase m_qualifierlists
ServiceEnvironmentIFCRef m_env

Detailed Description

Definition at line 46 of file OW_MetaRepository2.hpp.


Constructor & Destructor Documentation

OW_NAMESPACE::MetaRepository2::MetaRepository2 const ServiceEnvironmentIFCRef env  ) 
 

Create a new MetaRepository object.

Definition at line 527 of file OW_MetaRepository2.cpp.

References env, m_classCache, OW_NAMESPACE::ConfigOpts::MAX_CLASS_CACHE_SIZE_opt, OW_DEFAULT_MAX_CLASS_CACHE_SIZE_I, OW_NAMESPACE::Cache< T >::setMaxCacheSize(), and OW_NAMESPACE::String::toUInt32().

OW_NAMESPACE::MetaRepository2::~MetaRepository2  ) 
 

Definition at line 66 of file OW_MetaRepository2.cpp.

References close().

OW_NAMESPACE::MetaRepository2::MetaRepository2 const MetaRepository2 x  )  [private]
 


Member Function Documentation

void OW_NAMESPACE::MetaRepository2::_addQualifierType const String ns,
const CIMQualifierType qt
[private]
 

Add a qualifier type to the repository.

Parameters:
ns The namespace for the qualifier type
qt The qualifier type to add to the repository
Exceptions:
CIMException 

Definition at line 236 of file OW_MetaRepository2.cpp.

void OW_NAMESPACE::MetaRepository2::_getClassNameNodes StringResultHandlerIFC result,
WBEMFlags::EDeepFlag  deep
[private]
 

void OW_NAMESPACE::MetaRepository2::_getClassNodes CIMClassResultHandlerIFC result,
WBEMFlags::EDeepFlag  deep,
WBEMFlags::ELocalOnlyFlag  localOnly = WBEMFlags::E_NOT_LOCAL_ONLY,
WBEMFlags::EIncludeQualifiersFlag  includeQualifiers = WBEMFlags::E_INCLUDE_QUALIFIERS,
WBEMFlags::EIncludeClassOriginFlag  includeClassOrigin = WBEMFlags::E_INCLUDE_CLASS_ORIGIN
[private]
 

String OW_NAMESPACE::MetaRepository2::_makeClassPath const String ns,
const String className
[private]
 

Make a path to a CIM class.

Parameters:
ns The namespace for the class.
className The name of the class.
Returns:
A string that can be used to locate the class.

Definition at line 125 of file OW_MetaRepository2.cpp.

References className, OW_NAMESPACE::String::empty(), ns, and OW_ASSERT.

String OW_NAMESPACE::MetaRepository2::_makeQualPath const String ns,
const String qualName
[private]
 

Make a path to a qualifier.

Parameters:
ns The namespace for the qualifier.
qualName The name of the qualifier
Returns:
A string that can be used to locate the qualifier.

Definition at line 112 of file OW_MetaRepository2.cpp.

References OW_NAMESPACE::String::empty(), ns, and OW_ASSERT.

void OW_NAMESPACE::MetaRepository2::_resolveClass CIMClass cls,
const String ns
[private]
 

void OW_NAMESPACE::MetaRepository2::_resolveQualifiers const String ns,
CIMQualifierArray quals
[private]
 

void OW_NAMESPACE::MetaRepository2::close  ) 
 

Definition at line 101 of file OW_MetaRepository2.cpp.

References OW_NAMESPACE::dbDatabase::close(), m_classes, m_namespaces, m_qualifierlists, m_qualifiers, and m_subclasslists.

Referenced by OW_NAMESPACE::CIMRepository2::close(), and ~MetaRepository2().

void OW_NAMESPACE::MetaRepository2::createClass const String ns,
CIMClass cimClass
 

creates a class in the store

Parameters:
ns The namespace for the class
cimClass The class to create
Exceptions:
CIMException if the class already exists, or parent class is not yet on file.
HDBException An error occurred in the database.
IOException Couldn't write class object to file.

Definition at line 383 of file OW_MetaRepository2.cpp.

Referenced by OW_NAMESPACE::CIMRepository2::createClass().

void OW_NAMESPACE::MetaRepository2::createNameSpace String  ns,
OperationContext context
 

Create a namespace.

Parameters:
ns The name of the namespace exists.
Exceptions:
CIMException if the namespace already exists.

Definition at line 506 of file OW_MetaRepository2.cpp.

References OW_NAMESPACE::String::empty(), OW_NAMESPACE::CIMException::INVALID_PARAMETER, ns, and OW_THROWCIM.

Referenced by OW_NAMESPACE::CIMRepository2::createNameSpace().

bool OW_NAMESPACE::MetaRepository2::deleteClass const String ns,
const String className
 

Delete an existing class from the store.

Parameters:
ns The namespace for the class
className The name of the class to retrieve
Returns:
true if the class was deleted. false if class was not found.
Exceptions:
CIMException if class does not exist

Definition at line 362 of file OW_MetaRepository2.cpp.

void OW_NAMESPACE::MetaRepository2::deleteNameSpace const String nsName,
OperationContext context
 

Delete the given namespace and all object contained within it.

Parameters:
nsName The name of the namespace

Definition at line 496 of file OW_MetaRepository2.cpp.

Referenced by OW_NAMESPACE::CIMRepository2::deleteNameSpace().

bool OW_NAMESPACE::MetaRepository2::deleteQualifierType const String ns,
const String qualName
 

Delete an existing qualifier from the repository.

Parameters:
ns The namespace for the qualifier name.
qualName The name of the qualifier to delete
Returns:
true if the delete operation was successful. false indicates the qualifier was not found.
Exceptions:
CIMException 

Definition at line 212 of file OW_MetaRepository2.cpp.

Referenced by OW_NAMESPACE::CIMRepository2::deleteQualifierType().

void OW_NAMESPACE::MetaRepository2::enumClass const String ns,
const String className,
CIMClassResultHandlerIFC result,
WBEMFlags::EDeepFlag  deep,
WBEMFlags::ELocalOnlyFlag  localOnly,
WBEMFlags::EIncludeQualifiersFlag  includeQualifiers,
WBEMFlags::EIncludeClassOriginFlag  includeClassOrigin
 

Enumerates the class specified by className.

Parameters:
ns The namespace of the class
className The name of the class to enumerate
deep If set to CIMClient::DEEP, the enumeration returned will contain the names of all classes derived from the enumerated class. If set to CIMClient::SHALLOW the enumermation will return only the names of the first level children of the enumerated class.
localOnly If true, then only CIM elements (properties, methods, qualifiers) overriden within the definition are returned.
includeQualifiers If true, then all qualifiers for the class (including properties, methods, and method parameters) are returned.
includeClassOrigin If true, then the class origin attribute will be returned on all appropriate components.
Exceptions:
CIMException If the specified CIMObjectPath object cannot be found.

Definition at line 437 of file OW_MetaRepository2.cpp.

Referenced by OW_NAMESPACE::CIMRepository2::_getAssociationClasses(), and OW_NAMESPACE::CIMRepository2::enumClasses().

void OW_NAMESPACE::MetaRepository2::enumClassNames const String ns,
const String className,
StringResultHandlerIFC result,
WBEMFlags::EDeepFlag  deep
 

Enumerates the class names specified by className.

Parameters:
ns The namespace of the class
className The name of the class to enumerate
deep If set to CIMClient::DEEP, the enumeration returned will contain the names of all classes derived from the enumerated class. If set to CIMClient::SHALLOW the enumermation will return only the names of the first level children of the enumerated class.
Exceptions:
CIMException If the specified CIMObjectPath object cannot be found.

Definition at line 488 of file OW_MetaRepository2.cpp.

Referenced by OW_NAMESPACE::CIMRepository2::enumClassNames().

void OW_NAMESPACE::MetaRepository2::enumNameSpace StringResultHandlerIFC result,
OperationContext context
 

Definition at line 61 of file OW_MetaRepository2.cpp.

Referenced by OW_NAMESPACE::CIMRepository2::enumNameSpace().

void OW_NAMESPACE::MetaRepository2::enumQualifierTypes const String ns,
CIMQualifierTypeResultHandlerIFC result
 

Enumerator the qualifiers in a given namespace.

Parameters:
ns The namespace to get the qualifiers from
Returns:
An enumeration of the qualifier types in the namespace.

Definition at line 182 of file OW_MetaRepository2.cpp.

Referenced by OW_NAMESPACE::CIMRepository2::enumQualifierTypes().

CIMException::ErrNoType OW_NAMESPACE::MetaRepository2::getCIMClass const String ns,
const String className,
WBEMFlags::ELocalOnlyFlag  localOnly,
WBEMFlags::EIncludeQualifiersFlag  includeQualifiers,
WBEMFlags::EIncludeClassOriginFlag  includeClassOrigin,
const StringArray propertyList,
CIMClass cc
 

Gets an existing class from the store.

Parameters:
ns The namespace for the class
className The name of the class to retrieve
cc the class to be retrieved.
Returns:
0 on success. Otherwise a value from CIMException.
Exceptions:
CIMException 
HDBException An error occurred in the database.
IOException Couldn't read class object from file.

Definition at line 306 of file OW_MetaRepository2.cpp.

References OW_NAMESPACE::CIMException::SUCCESS.

Referenced by OW_NAMESPACE::CIMRepository2::_getAssociationClasses(), OW_NAMESPACE::CIMRepository2::_getClass(), OW_NAMESPACE::CIMRepository2::_instGetClass(), and OW_NAMESPACE::CIMRepository2::getClass().

CIMQualifierType OW_NAMESPACE::MetaRepository2::getQualifierType const String ns,
const String qualName
 

Get an existing qualifier type from the repository.

Parameters:
ns The namespace for the qualifier name.
qualName The name of the qualifier type to retrieve.
Returns:
A valid CIMQauliferType type on success. Otherwise a NULL CIMQualifierType.
Exceptions:
CIMException 
IOException 

Definition at line 138 of file OW_MetaRepository2.cpp.

Referenced by OW_NAMESPACE::CIMRepository2::getQualifierType().

void OW_NAMESPACE::MetaRepository2::getTopLevelAssociations const String ns,
CIMClassResultHandlerIFC result
 

Get all top level classes that are associations.

Parameters:
ns The namespace to enumerate
Returns:
An enumeration of classes that are associations.

void OW_NAMESPACE::MetaRepository2::modifyClass const String ns,
const CIMClass cimClass
 

set a class in the store - note children are not affected

Parameters:
ns The namespace for the class
cimClass The class to update
Exceptions:
CIMException if the class already exists

Definition at line 413 of file OW_MetaRepository2.cpp.

Referenced by OW_NAMESPACE::CIMRepository2::modifyClass().

bool OW_NAMESPACE::MetaRepository2::nameSpaceExists const String ns  ) 
 

Definition at line 54 of file OW_MetaRepository2.cpp.

Referenced by OW_NAMESPACE::CIMRepository2::_commonAssociators(), OW_NAMESPACE::CIMRepository2::_commonReferences(), OW_NAMESPACE::CIMRepository2::checkGetClassRvalAndThrow(), OW_NAMESPACE::CIMRepository2::checkGetClassRvalAndThrowInst(), and OW_NAMESPACE::CIMRepository2::deleteQualifierType().

void OW_NAMESPACE::MetaRepository2::open ::DB_ENV *  env,
::DB_TXN *  txn
 

Open this MetaRepository.

Definition at line 79 of file OW_MetaRepository2.cpp.

References OW_NAMESPACE::dbDatabase::E_DUPLICATES, OW_NAMESPACE::dbDatabase::E_NO_DUPLICATES, m_classes, m_namespaces, m_qualifierlists, m_qualifiers, m_subclasslists, and OW_NAMESPACE::dbDatabase::open().

MetaRepository2& OW_NAMESPACE::MetaRepository2::operator= const MetaRepository2 x  )  [private]
 

void OW_NAMESPACE::MetaRepository2::setQualifierType const String ns,
const CIMQualifierType qt
 

Update a qualifier type in the repository.

Parameters:
ns The namespace for the qualifier
qt The qualifier type to update
Exceptions:
CIMException 

Definition at line 279 of file OW_MetaRepository2.cpp.

Referenced by OW_NAMESPACE::CIMRepository2::setQualifierType().


Member Data Documentation

Cache<CIMClass> OW_NAMESPACE::MetaRepository2::m_classCache [private]
 

Definition at line 244 of file OW_MetaRepository2.hpp.

Referenced by MetaRepository2().

dbDatabase OW_NAMESPACE::MetaRepository2::m_classes [private]
 

Definition at line 249 of file OW_MetaRepository2.hpp.

Referenced by close(), and open().

ServiceEnvironmentIFCRef OW_NAMESPACE::MetaRepository2::m_env [private]
 

Definition at line 253 of file OW_MetaRepository2.hpp.

dbDatabase OW_NAMESPACE::MetaRepository2::m_namespaces [private]
 

Definition at line 247 of file OW_MetaRepository2.hpp.

Referenced by close(), and open().

Cache<CIMQualifierType> OW_NAMESPACE::MetaRepository2::m_qualCache [private]
 

Definition at line 245 of file OW_MetaRepository2.hpp.

dbDatabase OW_NAMESPACE::MetaRepository2::m_qualifierlists [private]
 

Definition at line 251 of file OW_MetaRepository2.hpp.

Referenced by close(), and open().

dbDatabase OW_NAMESPACE::MetaRepository2::m_qualifiers [private]
 

Definition at line 248 of file OW_MetaRepository2.hpp.

Referenced by close(), and open().

dbDatabase OW_NAMESPACE::MetaRepository2::m_subclasslists [private]
 

Definition at line 250 of file OW_MetaRepository2.hpp.

Referenced by close(), and open().


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