1 karl 1.1 //BEGIN_LICENSE
2 //
3 // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM
4 //
5 // Permission is hereby granted, free of charge, to any person obtaining a
6 // copy of this software and associated documentation files (the "Software"),
7 // to deal in the Software without restriction, including without limitation
8 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 // and/or sell copies of the Software, and to permit persons to whom the
10 // Software is furnished to do so, subject to the following conditions:
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
15 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
17 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
18 // DEALINGS IN THE SOFTWARE.
19 //
20 //END_LICENSE
21 //BEGIN_HISTORY
22 karl 1.1 //
23 // Author:
24 //
25 // $Log$
26 //
27 //END_HISTORY
28
29 ////////////////////////////////////////////////////////////////////////////////
30 //
31 // Operations.h
32 //
33 // This interface contains a method for each operations defined in
34 // the "Specification for CDIM Operations over HTTP".
35 //
36 ////////////////////////////////////////////////////////////////////////////////
37
38 #ifndef Pegasus_Operations_h
39 #define Pegasus_Operations_h
40
41 #include <Pegasus/Common/Config.h>
42 #include <Pegasus/Common/ClassDecl.h>
43 karl 1.1 #include <Pegasus/Common/InstanceDecl.h>
44 #include <Pegasus/Common/QualifierDecl.h>
45
46 PEGASUS_NAMESPACE_BEGIN
47
48 class PEGASUS_COMMON_LINKAGE Operations
49 {
50 public:
51
52 Operations();
53
54 virtual ~Operations();
55
56 // ATTN: MSVC++ 5.0 you know what!
57 static Array<String> _getStringArray()
58 {
59 return Array<String>();
60 }
61
62 virtual ClassDecl getClass(
63 const String& nameSpace,
64 karl 1.1 const String& className,
65 Boolean localOnly = true,
66 Boolean includeQualifiers = true,
67 Boolean includeClassOrigin = false,
68 const Array<String>& propertyList = _getStringArray()) = 0;
69
70 virtual InstanceDecl getInstance(
71 const String& nameSpace,
72 const Reference& instanceName,
73 Boolean localOnly = true,
74 Boolean includeQualifiers = false,
75 Boolean includeClassOrigin = false,
76 const Array<String>& propertyList = _getStringArray()) = 0;
77
78 virtual void deleteClass(
79 const String& nameSpace,
80 const String& className) = 0;
81
82 virtual void deleteInstance(
83 const String& nameSpace,
84 const Reference& instanceName) = 0;
85 karl 1.1
86 virtual void createClass(
87 const String& nameSpace,
88 ClassDecl& newClass) = 0;
89
90 virtual void createInstance(
91 const String& nameSpace,
92 const InstanceDecl& newInstance) = 0;
93
94 virtual void modifyClass(
95 const String& nameSpace,
96 ClassDecl& modifiedClass) = 0;
97
98 virtual void modifyInstance(
99 const String& nameSpace,
100 const InstanceDecl& modifiedInstance) = 0;
101
102 virtual Array<ClassDecl> enumerateClasses(
103 const String& nameSpace,
104 const String& className = String::EMPTY,
105 Boolean deepInheritance = false,
106 karl 1.1 Boolean localOnly = true,
107 Boolean includeQualifiers = true,
108 Boolean includeClassOrigin = false) = 0;
109
110 virtual Array<String> enumerateClassNames(
111 const String& nameSpace,
112 const String& className = String::EMPTY,
113 Boolean deepInheritance = false) = 0;
114
115 virtual Array<InstanceDecl> enumerateInstances(
116 const String& nameSpace,
117 const String& className,
118 Boolean deepInheritance = true,
119 Boolean localOnly = true,
120 Boolean includeQualifiers = false,
121 Boolean includeClassOrigin = false,
122 const Array<String>& propertyList = _getStringArray()) = 0;
123
124 virtual Array<String> enumerateInstanceNames(
125 const String& nameSpace,
126 const String& className) = 0;
127 karl 1.1
128 virtual Array<InstanceDecl> execQuery(
129 const String& queryLanguage,
130 const String& query) = 0;
131
132 virtual Array<InstanceDecl> associators(
133 const String& nameSpace,
134 const Reference& objectName,
135 const String& assocClass = String::EMPTY,
136 const String& resultClass = String::EMPTY,
137 const String& role = String::EMPTY,
138 const String& resultRole = String::EMPTY,
139 Boolean includeQualifiers = false,
140 Boolean includeClassOrigin = false,
141 const Array<String>& propertyList= _getStringArray()) = 0;
142
143 virtual Array<Reference> associatorNames(
144 const String& nameSpace,
145 const Reference& objectName,
146 const String& assocClass = String::EMPTY,
147 const String& resultClass = String::EMPTY,
148 karl 1.1 const String& role = String::EMPTY,
149 const String& resultRole = String::EMPTY) = 0;
150
151 virtual Array<InstanceDecl> references(
152 const String& nameSpace,
153 const Reference& objectName,
154 const String& resultClass = String::EMPTY,
155 const String& role = String::EMPTY,
156 Boolean includeQualifiers = false,
157 Boolean includeClassOrigin = false,
158 const Array<String>& propertyList= _getStringArray()) = 0;
159
160 virtual Array<Reference> referenceNames(
161 const String& nameSpace,
162 const Reference& objectName,
163 const String& resultClass = String::EMPTY,
164 const String& role = String::EMPTY) = 0;
165
166 virtual Value getProperty(
167 const String& nameSpace,
168 const Reference& instanceName,
169 karl 1.1 const String& propertyName) = 0;
170
171 virtual void setProperty(
172 const String& nameSpace,
173 const Reference& instanceName,
174 const String& propertyName,
175 const Value& newValue = Value()) = 0;
176
177 virtual QualifierDecl getQualifier(
178 const String& nameSpace,
179 const String& qualifierName) = 0;
180
181 virtual void setQualifier(
182 const String& nameSpace,
183 const QualifierDecl& qualifierDecl) = 0;
184
185 virtual void deleteQualifier(
186 const String& nameSpace,
187 const String& qualifierName) = 0;
188
189 virtual Array<QualifierDecl> enumerateQualifiers(
190 karl 1.1 const String& nameSpace) = 0;
191
192 virtual Value invokeMethod(
193 const String& nameSpace,
194 const Reference& instanceName,
195 const String& methodName,
196 const Array<Value>& inParameters,
197 Array<Value>& outParameters) = 0;
198 };
199
200 PEGASUS_NAMESPACE_END
201
202 #endif /* Pegasus_Operations_h */
|