/
Graphs.ice
444 lines (375 loc) · 14.6 KB
/
Graphs.ice
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
/*
* Copyright 2011 Glencoe Software, Inc. All rights reserved.
* Use is subject to license terms supplied in LICENSE.txt
*/
#ifndef OMERO_CMD_GRAPHS_ICE
#define OMERO_CMD_GRAPHS_ICE
#include <omero/cmd/API.ice>
#include <omero/Collections.ice>
module omero {
module cmd {
/**
*
**/
["deprecated:use omero::cmd::GraphModify2 instead"]
class GraphModify extends Request {
string type;
long id;
StringMap options;
};
/**
* Returned when specifically a ome.services.graphs.GraphConstraintException
* is thrown. The contents of that internal exception are passed in
* this instance.
**/
["deprecated:use omero::cmd::ERR instead"]
class GraphConstraintERR extends ERR {
/**
* A container mapping from class names to collections of
* longs (ids) for each object which prevented the current
* operation from succeeding.
**/
omero::api::IdListMap constraints;
};
["deprecated:omero::cmd::GraphModify is deprecated",
"java:type:java.util.ArrayList<omero.cmd.GraphModify>:java.util.List<omero.cmd.GraphModify>"]
sequence<GraphModify> GraphModifyList;
["deprecated:use omero::cmd::Chgrp2 instead"]
class Chgrp extends GraphModify {
long grp;
};
["deprecated:use omero::cmd::Chgrp2Response instead"]
class ChgrpRsp extends Response {
};
/**
* Modifies the permissions settings for the given object.
* Most permission modifications will be quite fast and will
* specify this as returning a small number of steps in the
* status object. When lowering a READ setting, however, all
* existing data will need to be checked and there will be a
* minimum of one step per table in the database.
*
* At the moment, the only supported type is ""/ExperimenterGroup"".
*
**/
["deprecated:use omero::cmd::Chmod2 instead"]
class Chmod extends GraphModify {
/**
* String representation of the permissions
* which should be set on the object.
**/
string permissions;
};
["deprecated:use omero::cmd::Chmod2Response instead"]
class ChmodRsp extends Response {
};
["deprecated:use omero::cmd::Chown2 instead"]
class Chown extends GraphModify {
long user;
};
["deprecated:use omero::cmd::Chown2Response instead"]
class ChownRsp extends Response {
};
/**
* Delete requests will return a {@link omero.cmd.DeleteRsp}
* unless an error has occurred in which case a standard
* {@link omero.cmd.ERR} may be returned.
**/
["deprecated:use omero::cmd::Delete2 instead"]
class Delete extends GraphModify {
};
/**
* Mirrors and replaces DeleteReport. There is no ""error"" field
* because if there was an error than an ERR object will be
* returned.
**/
["deprecated:use omero::cmd::Delete2Response instead"]
class DeleteRsp extends OK {
/**
* Extra feedback mechanism. Typically will only be non-empty
* if the error is empty. This implies that some situation was
* encountered that the user may need to be informed of (e.g.
* some annotation wasn't deleted), but which was non-critical.
**/
string warning;
/**
* Map from type name (""Thumbnail"", ""Pixels"", ""OriginalFile"") to
* a list of ids for any binary files which did not get deleted.
*
* Some action may be desired by the user to guarantee that this
* server-space is eventually
**/
omero::api::IdListMap undeletedFiles;
/**
* Number of steps that this {@link DeleteCommand} requires.
**/
int steps;
/**
* Number of objects that this {@link DeleteCommand} will attempt
* to delete.
**/
long scheduledDeletes;
/**
* Number of actual deletes which took place.
**/
long actualDeletes;
};
/**
* Options that modify GraphModify2 request execution.
* By default, a user's related ""orphaned"" objects are typically
* included in a request's operation. These options override that
* behavior, allowing the client to specify whether to always or
* never include given kinds of child object regardless of if they
* are orphans.
* For annotations, each override is limited to specific annotation
* namespaces. (If no namespaces are specified, defaults apply
* according to the configuration of the graph request factory.)
**/
module graphs {
/**
* How GraphModify2 requests should deal with kinds of children,
* related to the target objects.
* By default, it is usual for only orphans to be operated on.
* At least one of includeType or excludeType must be used;
* if a type matches both, then it is included.
* No more than one of includeNs and excludeNs may be used.
**/
class ChildOption {
/**
* Include in the operation all children of these types.
* Cf. use of HARD in GraphModify's options.
**/
omero::api::StringSet includeType;
/**
* Include in the operation no children of these types.
* Cf. use of KEEP in GraphModify's options.
**/
omero::api::StringSet excludeType;
/**
* For annotations, limit the applicability of this option
* to only those in these namespaces.
**/
omero::api::StringSet includeNs;
/**
* For annotations, limit the applicability of this option
* to only those not in these namespaces.
**/
omero::api::StringSet excludeNs;
};
/**
* A list of if GraphModify2 requests should operate on
* specific kinds of children.
* Only the first applicable option takes effect.
**/
["java:type:java.util.ArrayList<omero.cmd.graphs.ChildOption>:java.util.List<omero.cmd.graphs.ChildOption>"]
sequence<ChildOption> ChildOptions;
};
/**
* Base class for new requests for operating upon the model object
* graph.
**/
class GraphModify2 extends Request {
/**
* The model objects upon which to operate.
* Related model objects may also be targeted.
**/
omero::api::StringLongListMap targetObjects;
/**
* If the request should operate on specific kinds of children.
* Only the first applicable option takes effect.
**/
graphs::ChildOptions childOptions;
/**
* If this request should skip the actual model object updates.
* The response is still as if the operation actually occurred,
* indicating what would have been done to which objects.
**/
bool dryRun;
};
/**
* Move model objects into a different experimenter group.
* The user must be either an administrator,
* or the owner of the objects and a member of the target group.
**/
class Chgrp2 extends GraphModify2 {
/**
* The ID of the experimenter group into which to move the model
* objects.
**/
long groupId;
};
/**
* Result of moving model objects into a different experimenter
* group.
**/
class Chgrp2Response extends OK {
/**
* The model objects that were moved.
**/
omero::api::StringLongListMap includedObjects;
/**
* The model objects that were deleted.
**/
omero::api::StringLongListMap deletedObjects;
};
/**
* Change the permissions on model objects.
* The user must be an administrator, the owner of the objects,
* or an owner of the objects' group.
* The only permitted target object type is ExperimenterGroup.
**/
class Chmod2 extends GraphModify2 {
/**
* The permissions to set on the model objects.
**/
string permissions;
};
/**
* Result of changing the permissions on model objects.
**/
class Chmod2Response extends OK {
/**
* The model objects with changed permissions.
**/
omero::api::StringLongListMap includedObjects;
/**
* The model objects that were deleted.
**/
omero::api::StringLongListMap deletedObjects;
};
/**
* Change the ownership of model objects.
* The user must be an administrator, or they
* must be an owner of the objects' group, with
* the target user a member of the objects' group.
**/
class Chown2 extends GraphModify2 {
/**
* The ID of the experimenter to which to give the model
* objects.
**/
long userId;
};
/**
* Result of changing the ownership of model objects.
**/
class Chown2Response extends OK {
/**
* The model objects that were given.
**/
omero::api::StringLongListMap includedObjects;
/**
* The model objects that were deleted.
**/
omero::api::StringLongListMap deletedObjects;
};
/**
* Delete model objects.
**/
class Delete2 extends GraphModify2 {
};
/**
* Result of deleting model objects.
**/
class Delete2Response extends OK {
/**
* The model objects that were deleted.
**/
omero::api::StringLongListMap deletedObjects;
};
/**
* Perform a request skipping the top-most model objects in the
* graph. This permits operating upon the (possibly indirect)
* children of given objects. The arguments of this SkipHead
* request override those of the given request only until the
* targeted children are reached, except that if this SkipHead
* request's dryRun is set to true then the dryRun override
* persists throughout the operation. The response from SkipHead
* is as from the given request.
**/
class SkipHead extends GraphModify2 {
/**
* Classes of model objects from which to actually start the
* operation. These are children, directly or indirectly, of
* the target objects. These children become the true target
* objects of the underlying request.
**/
omero::api::StringSet startFrom;
/**
* The operation to perform on the targeted model objects.
* The given request's targetObjects property is ignored: it
* is the SkipHead request that specifies the parent objects.
* Only specific request types are supported
* (those implementing WrappableRequest).
**/
GraphModify2 request;
};
/**
* Duplicate model objects with some selection of their subgraph.
* All target model objects must be in the current group context.
* The extra three data members allow adjustment of the related
* subgraph. The same type must not be listed in more than one of
* those data members. Use of a more specific sub-type in a data
* member always overrides the more general type in another.
**/
class Duplicate extends GraphModify2 {
/**
* The types of the model objects to actually duplicate.
**/
omero::api::StringSet typesToDuplicate;
/**
* The types of the model objects that should not be duplicated
* but that may participate in references involving duplicates.
**/
omero::api::StringSet typesToReference;
/**
* The types of the model objects that should not be duplicated
* and that may not participate in references involving duplicates.
**/
omero::api::StringSet typesToIgnore;
};
/**
* Result of duplicating model objects.
**/
class DuplicateResponse extends OK {
/**
* The duplicate model objects created by the request.
* Note: If dryRun is set to true then this instead lists the model
* objects that would have been duplicated.
**/
omero::api::StringLongListMap duplicates;
};
/**
* Graph requests typically allow only specific model object classes
* to be targeted. This request lists the legal targets for a given
* request. The request's fields are ignored, only its class matters.
**/
class LegalGraphTargets extends Request {
/**
* A request of the type being queried.
**/
GraphModify2 request;
};
/**
* A list of the legal targets for a graph request.
**/
class LegalGraphTargetsResponse extends OK {
/**
* The legal targets for the given request's type.
**/
omero::api::StringSet targets;
};
/**
* Returned when specifically a ome.services.graphs.GraphException
* is thrown. The contents of that internal exception are passed in
* this instance.
**/
class GraphException extends ERR {
/**
* The message of the GraphException.
**/
string message;
};
};
};
#endif