1 mike 1.1 //%/////////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (c) 2000, 2001 The Open group, BMC Software, Tivoli Systems, IBM
4 //
5 // Permission is hereby granted, free of charge, to any person obtaining a copy
6 // of this software and associated documentation files (the "Software"), to
7 // deal in the Software without restriction, including without limitation the
8 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9 // sell copies of the Software, and to permit persons to whom the Software is
10 // furnished to do so, subject to the following conditions:
11 //
12 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
13 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
14 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
15 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
16 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
17 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
18 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
19 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 //
21 //==============================================================================
22 mike 1.1 //
23 // Author: Mike Brasher (mbrasher@bmc.com)
24 //
|
25 kumpf 1.3 // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
26 // (carolann_graves@hp.com)
27 //
|
28 mike 1.1 //%/////////////////////////////////////////////////////////////////////////////
29
30 #ifndef Pegasus_Common_RepositoryBase_h
31 #define Pegasus_Common_RepositoryBase_h
32
33 #include <Pegasus/Common/Config.h>
34 #include <Pegasus/Common/IPC.h>
35 #include <Pegasus/Common/CIMClass.h>
36 #include <Pegasus/Common/CIMObject.h>
37 #include <Pegasus/Common/CIMInstance.h>
38 #include <Pegasus/Common/CIMPropertyList.h>
39 #include <Pegasus/Common/CIMQualifierDecl.h>
40
41 PEGASUS_NAMESPACE_BEGIN
42
43 class RepositoryDeclContext;
44
45 /** This class declares the interface for a CIM repository implementation.
46
47 CIMRepositoryBase is an pure virtual base class (all the method signatures
48 must
49 mike 1.1 */
50 class PEGASUS_REPOSITORY_LINKAGE CIMRepositoryBase
51 {
52 public:
53
54 virtual ~CIMRepositoryBase() { }
55
56 virtual void read_lock(void) throw(IPCException) = 0;
57
58 virtual void read_unlock(void) = 0;
59
60 virtual void write_lock(void) throw(IPCException) = 0;
61
62 virtual void write_unlock(void) = 0;
63
64 virtual CIMClass getClass(
65 const String& nameSpace,
66 const String& className,
67 Boolean localOnly = true,
68 Boolean includeQualifiers = true,
69 Boolean includeClassOrigin = false,
70 mike 1.1 const CIMPropertyList& propertyList = CIMPropertyList()) = 0;
71
72 virtual CIMInstance getInstance(
73 const String& nameSpace,
|
74 kumpf 1.2 const CIMObjectPath& instanceName,
|
75 mike 1.1 Boolean localOnly = true,
76 Boolean includeQualifiers = false,
77 Boolean includeClassOrigin = false,
78 const CIMPropertyList& propertyList = CIMPropertyList()) = 0;
79
80 virtual void deleteClass(
81 const String& nameSpace,
82 const String& className) = 0;
83
84 virtual void deleteInstance(
85 const String& nameSpace,
|
86 kumpf 1.2 const CIMObjectPath& instanceName) = 0;
|
87 mike 1.1
88 virtual void createClass(
89 const String& nameSpace,
90 const CIMClass& newClass) = 0;
91
|
92 kumpf 1.2 virtual CIMObjectPath createInstance(
|
93 mike 1.1 const String& nameSpace,
94 const CIMInstance& newInstance) = 0;
95
96 virtual void modifyClass(
97 const String& nameSpace,
98 const CIMClass& modifiedClass) = 0;
99
100 virtual void modifyInstance(
101 const String& nameSpace,
|
102 kumpf 1.3 const CIMInstance& modifiedInstance,
|
103 mike 1.1 Boolean includeQualifiers = true,
104 const CIMPropertyList& propertyList = CIMPropertyList()) = 0;
105
106 virtual Array<CIMClass> enumerateClasses(
107 const String& nameSpace,
108 const String& className = String::EMPTY,
109 Boolean deepInheritance = false,
110 Boolean localOnly = true,
111 Boolean includeQualifiers = true,
112 Boolean includeClassOrigin = false) = 0;
113
114 virtual Array<String> enumerateClassNames(
115 const String& nameSpace,
116 const String& className = String::EMPTY,
117 Boolean deepInheritance = false) = 0;
118
|
119 kumpf 1.3 virtual Array<CIMInstance> enumerateInstances(
|
120 mike 1.1 const String& nameSpace,
121 const String& className,
122 Boolean deepInheritance = true,
123 Boolean localOnly = true,
124 Boolean includeQualifiers = false,
125 Boolean includeClassOrigin = false,
126 const CIMPropertyList& propertyList = CIMPropertyList()) = 0;
127
|
128 kumpf 1.2 virtual Array<CIMObjectPath> enumerateInstanceNames(
|
129 mike 1.1 const String& nameSpace,
130 const String& className) = 0;
131
132 virtual Array<CIMInstance> execQuery(
133 const String& queryLanguage,
134 const String& query) = 0;
135
|
136 kumpf 1.4 virtual Array<CIMObject> associators(
|
137 mike 1.1 const String& nameSpace,
|
138 kumpf 1.2 const CIMObjectPath& objectName,
|
139 mike 1.1 const String& assocClass = String::EMPTY,
140 const String& resultClass = String::EMPTY,
141 const String& role = String::EMPTY,
142 const String& resultRole = String::EMPTY,
143 Boolean includeQualifiers = false,
144 Boolean includeClassOrigin = false,
145 const CIMPropertyList& propertyList = CIMPropertyList()) = 0;
146
|
147 kumpf 1.2 virtual Array<CIMObjectPath> associatorNames(
|
148 mike 1.1 const String& nameSpace,
|
149 kumpf 1.2 const CIMObjectPath& objectName,
|
150 mike 1.1 const String& assocClass = String::EMPTY,
151 const String& resultClass = String::EMPTY,
152 const String& role = String::EMPTY,
153 const String& resultRole = String::EMPTY) = 0;
154
|
155 kumpf 1.4 virtual Array<CIMObject> references(
|
156 mike 1.1 const String& nameSpace,
|
157 kumpf 1.2 const CIMObjectPath& objectName,
|
158 mike 1.1 const String& resultClass = String::EMPTY,
159 const String& role = String::EMPTY,
160 Boolean includeQualifiers = false,
161 Boolean includeClassOrigin = false,
162 const CIMPropertyList& propertyList = CIMPropertyList()) = 0;
163
|
164 kumpf 1.2 virtual Array<CIMObjectPath> referenceNames(
|
165 mike 1.1 const String& nameSpace,
|
166 kumpf 1.2 const CIMObjectPath& objectName,
|
167 mike 1.1 const String& resultClass = String::EMPTY,
168 const String& role = String::EMPTY) = 0;
169
170 virtual CIMValue getProperty(
171 const String& nameSpace,
|
172 kumpf 1.2 const CIMObjectPath& instanceName,
|
173 mike 1.1 const String& propertyName) = 0;
174
175 virtual void setProperty(
176 const String& nameSpace,
|
177 kumpf 1.2 const CIMObjectPath& instanceName,
|
178 mike 1.1 const String& propertyName,
179 const CIMValue& newValue = CIMValue()) = 0;
180
181 virtual CIMQualifierDecl getQualifier(
182 const String& nameSpace,
183 const String& qualifierName) = 0;
184
185 virtual void setQualifier(
186 const String& nameSpace,
187 const CIMQualifierDecl& qualifierDecl) = 0;
188
189 virtual void deleteQualifier(
190 const String& nameSpace,
191 const String& qualifierName) = 0;
192
193 virtual Array<CIMQualifierDecl> enumerateQualifiers(
194 const String& nameSpace) = 0;
195
196 virtual void createNameSpace(const String& nameSpace) = 0;
197
198 virtual Array<String> enumerateNameSpaces() const = 0;
199 mike 1.1
200 virtual void deleteNameSpace(const String& nameSpace) = 0;
201
202 virtual void getSubClassNames(
203 const String& nameSpaceName,
204 const String& className,
205 Boolean deepInheritance,
206 Array<String>& subClassNames) const = 0;
207
208 virtual void getSuperClassNames(
209 const String& nameSpaceName,
210 const String& className,
211 Array<String>& subClassNames) const = 0;
212 };
213
214 PEGASUS_NAMESPACE_END
215
216 #endif /* Pegasus_Common_RepositoryBase_h */
|