version 1.3, 2001/01/31 08:20:51
|
version 1.10.2.3, 2007/11/08 23:20:50
|
|
|
//BEGIN_LICENSE |
//%2006//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
|
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
|
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation, The Open Group. |
|
// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; Symantec Corporation; The Open Group. |
|
// |
|
// Permission is hereby granted, free of charge, to any person obtaining a copy |
|
// of this software and associated documentation files (the "Software"), to |
|
// deal in the Software without restriction, including without limitation the |
|
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
|
// sell copies of the Software, and to permit persons to whom the Software is |
|
// furnished to do so, subject to the following conditions: |
|
// |
|
// THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN |
|
// ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED |
|
// "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT |
|
// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR |
|
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
|
// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
|
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a |
//============================================================================== |
// copy of this software and associated documentation files (the "Software"), |
|
// to deal in the Software without restriction, including without limitation |
|
// the rights to use, copy, modify, merge, publish, distribute, sublicense, |
|
// and/or sell copies of the Software, and to permit persons to whom the |
|
// Software is furnished to do so, subject to the following conditions: |
|
// | // |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
//%///////////////////////////////////////////////////////////////////////////// |
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
// DEALINGS IN THE SOFTWARE. |
|
// |
|
//END_LICENSE |
|
//BEGIN_HISTORY |
|
// |
|
// Author: |
|
// |
|
// $Log$ |
|
// Revision 1.3 2001/01/31 08:20:51 mike |
|
// Added dispatcher framework. |
|
// Added enumerateInstanceNames. |
|
// |
|
// Revision 1.2 2001/01/28 04:11:03 mike |
|
// fixed qualifier resolution |
|
// |
|
// Revision 1.1.1.1 2001/01/14 19:53:56 mike |
|
// Pegasus import |
|
// |
|
// |
|
//END_HISTORY |
|
|
|
//////////////////////////////////////////////////////////////////////////////// |
|
// |
|
// Repository.h |
|
// |
|
// This interface contains a method for each operation defined in |
|
// the "Specification for CIM Operations over HTTP". |
|
// |
|
//////////////////////////////////////////////////////////////////////////////// |
|
| |
#ifndef PegasusRepository_Repository_h |
#ifndef Pegasus_Repository_h |
#define PegasusRepository_Repository_h |
#define Pegasus_Repository_h |
| |
#include <Pegasus/Common/Config.h> | #include <Pegasus/Common/Config.h> |
#include <Pegasus/Common/ClassDecl.h> |
#include <Pegasus/Common/CIMClass.h> |
#include <Pegasus/Common/InstanceDecl.h> |
#include <Pegasus/Common/CIMObject.h> |
#include <Pegasus/Common/QualifierDecl.h> |
#include <Pegasus/Common/CIMInstance.h> |
#include <Pegasus/Common/Operations.h> |
#include <Pegasus/Common/CIMPropertyList.h> |
|
#include <Pegasus/Common/CIMQualifierDecl.h> |
|
#include <Pegasus/Common/ContentLanguageList.h> |
|
#include <Pegasus/Common/HashTable.h> |
|
#include <Pegasus/Repository/Linkage.h> |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
class RepositoryDeclContext; | class RepositoryDeclContext; |
|
class compilerDeclContext; |
| |
class PEGASUS_REPOSITORY_LINKAGE Repository : public Operations |
/** Virtual base class for CIMRepository implementations. |
|
*/ |
|
class Repository |
{ | { |
public: | public: |
| |
Repository(const String& path); |
typedef HashTable <String, String, EqualNoCaseFunc, HashLowerCaseFunc> |
|
NameSpaceAttributes; |
|
|
|
Repository(); |
| |
virtual ~Repository(); | virtual ~Repository(); |
| |
virtual ClassDecl getClass( |
virtual CIMClass getClass( |
const String& nameSpace, |
bool lock, |
const String& className, |
const CIMNamespaceName& nameSpace, |
Boolean localOnly = true, |
const CIMName& className, |
Boolean includeQualifiers = true, |
Boolean localOnly, |
Boolean includeClassOrigin = false, |
Boolean includeQualifiers, |
const Array<String>& propertyList = _getStringArray()); |
Boolean includeClassOrigin, |
|
const CIMPropertyList& propertyList) = 0; |
virtual InstanceDecl getInstance( |
|
const String& nameSpace, |
virtual CIMInstance getInstance( |
const Reference& instanceName, |
bool lock, |
Boolean localOnly = true, |
const CIMNamespaceName& nameSpace, |
Boolean includeQualifiers = false, |
const CIMObjectPath& instanceName, |
Boolean includeClassOrigin = false, |
Boolean localOnly, |
const Array<String>& propertyList = _getStringArray()); |
Boolean includeQualifiers, |
|
Boolean includeClassOrigin, |
|
const CIMPropertyList& propertyList) = 0; |
| |
virtual void deleteClass( | virtual void deleteClass( |
const String& nameSpace, |
bool lock, |
const String& className); |
const CIMNamespaceName& nameSpace, |
|
const CIMName& className) = 0; |
| |
virtual void deleteInstance( | virtual void deleteInstance( |
const String& nameSpace, |
bool lock, |
const Reference& instanceName); |
const CIMNamespaceName& nameSpace, |
|
const CIMObjectPath& instanceName) = 0; |
| |
virtual void createClass( | virtual void createClass( |
const String& nameSpace, |
bool lock, |
ClassDecl& newClass); |
const CIMNamespaceName& nameSpace, |
|
const CIMClass& newClass, |
virtual void createInstance( |
const ContentLanguageList& contentLangs) = 0; |
const String& nameSpace, |
|
const InstanceDecl& newInstance) ; |
virtual CIMObjectPath createInstance( |
|
bool lock, |
|
const CIMNamespaceName& nameSpace, |
|
const CIMInstance& newInstance, |
|
const ContentLanguageList& contentLangs) = 0; |
| |
virtual void modifyClass( | virtual void modifyClass( |
const String& nameSpace, |
bool lock, |
ClassDecl& modifiedClass); |
const CIMNamespaceName& nameSpace, |
|
const CIMClass& modifiedClass, |
|
const ContentLanguageList& contentLangs) = 0; |
| |
virtual void modifyInstance( | virtual void modifyInstance( |
const String& nameSpace, |
bool lock, |
const InstanceDecl& modifiedInstance); |
const CIMNamespaceName& nameSpace, |
|
const CIMInstance& modifiedInstance, |
virtual Array<ClassDecl> enumerateClasses( |
Boolean includeQualifiers, |
const String& nameSpace, |
const CIMPropertyList& propertyList, |
const String& className = String::EMPTY, |
const ContentLanguageList& contentLangs) = 0; |
Boolean deepInheritance = false, |
|
Boolean localOnly = true, |
virtual Array<CIMClass> enumerateClasses( |
Boolean includeQualifiers = true, |
bool lock, |
Boolean includeClassOrigin = false); |
const CIMNamespaceName& nameSpace, |
|
const CIMName& className, |
virtual Array<String> enumerateClassNames( |
Boolean deepInheritance, |
const String& nameSpace, |
Boolean localOnly, |
const String& className = String::EMPTY, |
Boolean includeQualifiers, |
Boolean deepInheritance = false); |
Boolean includeClassOrigin) = 0; |
|
|
virtual Array<InstanceDecl> enumerateInstances( |
virtual Array<CIMName> enumerateClassNames( |
const String& nameSpace, |
bool lock, |
const String& className, |
const CIMNamespaceName& nameSpace, |
Boolean deepInheritance = true, |
const CIMName& className, |
Boolean localOnly = true, |
Boolean deepInheritance) = 0; |
Boolean includeQualifiers = false, |
|
Boolean includeClassOrigin = false, |
virtual Array<CIMInstance> enumerateInstancesForSubtree( |
const Array<String>& propertyList = _getStringArray()); |
bool lock, |
|
const CIMNamespaceName& nameSpace, |
virtual Array<Reference> enumerateInstanceNames( |
const CIMName& className, |
const String& nameSpace, |
Boolean deepInheritance, |
const String& className); |
Boolean localOnly, |
|
Boolean includeQualifiers, |
|
Boolean includeClassOrigin, |
|
const CIMPropertyList& propertyList) = 0; |
|
|
|
virtual Array<CIMInstance> enumerateInstancesForClass( |
|
bool lock, |
|
const CIMNamespaceName& nameSpace, |
|
const CIMName& className, |
|
Boolean localOnly, |
|
Boolean includeQualifiers, |
|
Boolean includeClassOrigin, |
|
const CIMPropertyList& propertyList) = 0; |
|
|
|
virtual Array<CIMObjectPath> enumerateInstanceNamesForSubtree( |
|
bool lock, |
|
const CIMNamespaceName& nameSpace, |
|
const CIMName& className) = 0; |
|
|
|
virtual Array<CIMObjectPath> enumerateInstanceNamesForClass( |
|
bool lock, |
|
const CIMNamespaceName& nameSpace, |
|
const CIMName& className) = 0; |
| |
virtual Array<InstanceDecl> execQuery( |
virtual Array<CIMInstance> execQuery( |
|
bool lock, |
const String& queryLanguage, | const String& queryLanguage, |
const String& query) ; |
const String& query) = 0; |
| |
virtual Array<InstanceDecl> associators( |
virtual Array<CIMObject> associators( |
const String& nameSpace, |
bool lock, |
const Reference& objectName, |
const CIMNamespaceName& nameSpace, |
const String& assocClass = String::EMPTY, |
const CIMObjectPath& objectName, |
const String& resultClass = String::EMPTY, |
const CIMName& assocClass, |
const String& role = String::EMPTY, |
const CIMName& resultClass, |
const String& resultRole = String::EMPTY, |
const String& role, |
Boolean includeQualifiers = false, |
const String& resultRole, |
Boolean includeClassOrigin = false, |
Boolean includeQualifiers, |
const Array<String>& propertyList = _getStringArray()); |
Boolean includeClassOrigin, |
|
const CIMPropertyList& propertyList) = 0; |
virtual Array<Reference> associatorNames( |
|
const String& nameSpace, |
virtual Array<CIMObjectPath> associatorNames( |
const Reference& objectName, |
bool lock, |
const String& assocClass = String::EMPTY, |
const CIMNamespaceName& nameSpace, |
const String& resultClass = String::EMPTY, |
const CIMObjectPath& objectName, |
const String& role = String::EMPTY, |
const CIMName& assocClass, |
const String& resultRole = String::EMPTY); |
const CIMName& resultClass, |
|
const String& role, |
virtual Array<InstanceDecl> references( |
const String& resultRole) = 0; |
const String& nameSpace, |
|
const Reference& objectName, |
virtual Array<CIMObject> references( |
const String& resultClass = String::EMPTY, |
bool lock, |
const String& role = String::EMPTY, |
const CIMNamespaceName& nameSpace, |
Boolean includeQualifiers = false, |
const CIMObjectPath& objectName, |
Boolean includeClassOrigin = false, |
const CIMName& resultClass, |
const Array<String>& propertyList = _getStringArray()); |
const String& role, |
|
Boolean includeQualifiers, |
virtual Array<Reference> referenceNames( |
Boolean includeClassOrigin, |
const String& nameSpace, |
const CIMPropertyList& propertyList) = 0; |
const Reference& objectName, |
|
const String& resultClass = String::EMPTY, |
virtual Array<CIMObjectPath> referenceNames( |
const String& role = String::EMPTY); |
bool lock, |
|
const CIMNamespaceName& nameSpace, |
virtual Value getProperty( |
const CIMObjectPath& objectName, |
const String& nameSpace, |
const CIMName& resultClass, |
const Reference& instanceName, |
const String& role) = 0; |
const String& propertyName); |
|
|
virtual CIMValue getProperty( |
|
bool lock, |
|
const CIMNamespaceName& nameSpace, |
|
const CIMObjectPath& instanceName, |
|
const CIMName& propertyName) = 0; |
| |
virtual void setProperty( | virtual void setProperty( |
const String& nameSpace, |
bool lock, |
const Reference& instanceName, |
const CIMNamespaceName& nameSpace, |
const String& propertyName, |
const CIMObjectPath& instanceName, |
const Value& newValue = Value()); |
const CIMName& propertyName, |
|
const CIMValue& newValue, |
virtual QualifierDecl getQualifier( |
const ContentLanguageList& contentLangs) = 0; |
const String& nameSpace, |
|
const String& qualifierName); |
virtual CIMQualifierDecl getQualifier( |
|
bool lock, |
|
const CIMNamespaceName& nameSpace, |
|
const CIMName& qualifierName) = 0; |
| |
virtual void setQualifier( | virtual void setQualifier( |
const String& nameSpace, |
bool lock, |
const QualifierDecl& qualifierDecl); |
const CIMNamespaceName& nameSpace, |
|
const CIMQualifierDecl& qualifierDecl, |
|
const ContentLanguageList& contentLangs) = 0; |
| |
virtual void deleteQualifier( | virtual void deleteQualifier( |
const String& nameSpace, |
bool lock, |
const String& qualifierName); |
const CIMNamespaceName& nameSpace, |
|
const CIMName& qualifierName) = 0; |
virtual Array<QualifierDecl> enumerateQualifiers( |
|
const String& nameSpace); |
virtual Array<CIMQualifierDecl> enumerateQualifiers( |
|
bool lock, |
virtual Value invokeMethod( |
const CIMNamespaceName& nameSpace) = 0; |
const String& nameSpace, |
|
const Reference& instanceName, |
virtual void createNameSpace( |
const String& methodName, |
bool lock, |
const Array<Value>& inParameters, |
const CIMNamespaceName& nameSpace, |
Array<Value>& outParameters); |
const NameSpaceAttributes& attributes) = 0; |
|
|
void createNameSpace(const String& nameSpace); |
virtual void modifyNameSpace( |
|
bool lock, |
virtual Array<String> enumerateNameSpaces() const; |
const CIMNamespaceName& nameSpace, |
|
const NameSpaceAttributes& attributes) = 0; |
/** |
|
This method must be invoked to create the appropriate meta-qualifiers |
virtual Array<CIMNamespaceName> enumerateNameSpaces( |
required by CIM (they are not part of the CIM schema; rather they are |
bool lock) const = 0; |
part of the meta-schema). |
|
*/ |
virtual void deleteNameSpace( |
|
bool lock, |
void createMetaQualifiers(const String& nameSpace); |
const CIMNamespaceName& nameSpace) = 0; |
|
|
private: |
virtual Boolean getNameSpaceAttributes( |
|
bool lock, |
static Array<String> _getStringArray() |
const CIMNamespaceName& nameSpace, |
{ |
NameSpaceAttributes& attributes) = 0; |
return Array<String>(); |
|
} |
virtual void setDeclContext( |
|
bool lock, |
String _root; |
RepositoryDeclContext* context) = 0; |
RepositoryDeclContext* _context; |
|
|
virtual Boolean isDefaultInstanceProvider( |
|
bool lock) = 0; |
|
|
|
virtual void getSubClassNames( |
|
bool lock, |
|
const CIMNamespaceName& nameSpace, |
|
const CIMName& className, |
|
Boolean deepInheritance, |
|
Array<CIMName>& subClassNames) const = 0; |
|
|
|
virtual void getSuperClassNames( |
|
bool lock, |
|
const CIMNamespaceName& nameSpace, |
|
const CIMName& className, |
|
Array<CIMName>& superClassNames) const = 0; |
|
|
|
virtual Boolean isRemoteNameSpace( |
|
bool lock, |
|
const CIMNamespaceName& nameSpace, |
|
String& remoteInfo) = 0; |
|
|
|
#ifdef PEGASUS_DEBUG |
|
virtual void DisplayCacheStatistics( |
|
bool lock) = 0; |
|
#endif |
}; | }; |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |
| |
#endif /* PegasusRepository_Repository_h */ |
#endif /* Pegasus_Repository_h */ |