1
|
/**
|
2
|
* '$RCSfile$'
|
3
|
* Copyright: 2000-2011 Regents of the University of California and the
|
4
|
* National Center for Ecological Analysis and Synthesis
|
5
|
*
|
6
|
* '$Author: leinfelder $'
|
7
|
* '$Date: 2014-07-23 16:19:48 -0700 (Wed, 23 Jul 2014) $'
|
8
|
*
|
9
|
* This program is free software; you can redistribute it and/or modify
|
10
|
* it under the terms of the GNU General Public License as published by
|
11
|
* the Free Software Foundation; either version 2 of the License, or
|
12
|
* (at your option) any later version.
|
13
|
*
|
14
|
* This program is distributed in the hope that it will be useful,
|
15
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
* GNU General Public License for more details.
|
18
|
*
|
19
|
* You should have received a copy of the GNU General Public License
|
20
|
* along with this program; if not, write to the Free Software
|
21
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
22
|
*/
|
23
|
|
24
|
package edu.ucsb.nceas.metacat.dataone.v1;
|
25
|
|
26
|
import java.io.InputStream;
|
27
|
import java.util.Date;
|
28
|
|
29
|
import javax.servlet.http.HttpServletRequest;
|
30
|
|
31
|
import org.apache.log4j.Logger;
|
32
|
import org.dataone.service.cn.v1.CNAuthorization;
|
33
|
import org.dataone.service.cn.v1.CNCore;
|
34
|
import org.dataone.service.cn.v1.CNRead;
|
35
|
import org.dataone.service.cn.v1.CNReplication;
|
36
|
import org.dataone.service.exceptions.BaseException;
|
37
|
import org.dataone.service.exceptions.IdentifierNotUnique;
|
38
|
import org.dataone.service.exceptions.InsufficientResources;
|
39
|
import org.dataone.service.exceptions.InvalidRequest;
|
40
|
import org.dataone.service.exceptions.InvalidSystemMetadata;
|
41
|
import org.dataone.service.exceptions.InvalidToken;
|
42
|
import org.dataone.service.exceptions.NotAuthorized;
|
43
|
import org.dataone.service.exceptions.NotFound;
|
44
|
import org.dataone.service.exceptions.NotImplemented;
|
45
|
import org.dataone.service.exceptions.ServiceFailure;
|
46
|
import org.dataone.service.exceptions.UnsupportedType;
|
47
|
import org.dataone.service.exceptions.VersionMismatch;
|
48
|
import org.dataone.service.types.v1.AccessPolicy;
|
49
|
import org.dataone.service.types.v1.Checksum;
|
50
|
import org.dataone.service.types.v1.ChecksumAlgorithmList;
|
51
|
import org.dataone.service.types.v1.DescribeResponse;
|
52
|
import org.dataone.service.types.v1.Event;
|
53
|
import org.dataone.service.types.v1.Identifier;
|
54
|
import org.dataone.service.types.v1.Log;
|
55
|
import org.dataone.service.types.v1.NodeList;
|
56
|
import org.dataone.service.types.v1.NodeReference;
|
57
|
import org.dataone.service.types.v1.ObjectFormat;
|
58
|
import org.dataone.service.types.v1.ObjectFormatIdentifier;
|
59
|
import org.dataone.service.types.v1.ObjectFormatList;
|
60
|
import org.dataone.service.types.v1.ObjectList;
|
61
|
import org.dataone.service.types.v1.ObjectLocationList;
|
62
|
import org.dataone.service.types.v1.Permission;
|
63
|
import org.dataone.service.types.v1.Replica;
|
64
|
import org.dataone.service.types.v1.ReplicationPolicy;
|
65
|
import org.dataone.service.types.v1.ReplicationStatus;
|
66
|
import org.dataone.service.types.v1.Session;
|
67
|
import org.dataone.service.types.v1.Subject;
|
68
|
import org.dataone.service.types.v1.SystemMetadata;
|
69
|
import org.dataone.service.types.v1_1.QueryEngineDescription;
|
70
|
import org.dataone.service.types.v1_1.QueryEngineList;
|
71
|
import org.dataone.service.util.TypeMarshaller;
|
72
|
|
73
|
/**
|
74
|
* Represents Metacat's implementation of the DataONE Coordinating Node service
|
75
|
* API. Methods implement the various CN* interfaces, and methods common to both
|
76
|
* Member Node and Coordinating Node interfaces are found in the D1NodeService
|
77
|
* super class.
|
78
|
*
|
79
|
*/
|
80
|
public class CNodeService implements CNAuthorization, CNCore, CNRead,
|
81
|
CNReplication {
|
82
|
|
83
|
// pass through to the most recent implementation
|
84
|
private edu.ucsb.nceas.metacat.dataone.CNodeService impl = null;
|
85
|
|
86
|
/* the logger instance */
|
87
|
private Logger logMetacat = null;
|
88
|
|
89
|
/**
|
90
|
* singleton accessor
|
91
|
*/
|
92
|
public static CNodeService getInstance(HttpServletRequest request) {
|
93
|
return new CNodeService(request);
|
94
|
}
|
95
|
|
96
|
/**
|
97
|
* Constructor, private for singleton access
|
98
|
*/
|
99
|
private CNodeService(HttpServletRequest request) {
|
100
|
|
101
|
logMetacat = Logger.getLogger(CNodeService.class);
|
102
|
|
103
|
impl = edu.ucsb.nceas.metacat.dataone.CNodeService.getInstance(request);
|
104
|
|
105
|
}
|
106
|
|
107
|
@Override
|
108
|
public boolean deleteReplicationMetadata(Identifier pid,
|
109
|
NodeReference nodeId, long serialVersion) throws InvalidToken, InvalidRequest,
|
110
|
ServiceFailure, NotAuthorized, NotFound, NotImplemented,
|
111
|
VersionMismatch {
|
112
|
return impl.deleteReplicationMetadata(null, pid, nodeId, serialVersion);
|
113
|
}
|
114
|
|
115
|
@Override
|
116
|
@Deprecated
|
117
|
public boolean deleteReplicationMetadata(Session session, Identifier pid,
|
118
|
NodeReference nodeId, long serialVersion) throws InvalidToken, InvalidRequest,
|
119
|
ServiceFailure, NotAuthorized, NotFound, NotImplemented,
|
120
|
VersionMismatch {
|
121
|
return impl.deleteReplicationMetadata(session, pid, nodeId, serialVersion);
|
122
|
|
123
|
}
|
124
|
|
125
|
@Override
|
126
|
public boolean isNodeAuthorized(Subject targetNodeSubject, Identifier pid)
|
127
|
throws NotImplemented, NotAuthorized, InvalidToken, ServiceFailure,
|
128
|
NotFound, InvalidRequest {
|
129
|
return impl.isNodeAuthorized(null, targetNodeSubject, pid);
|
130
|
|
131
|
}
|
132
|
|
133
|
@Override
|
134
|
@Deprecated
|
135
|
public boolean isNodeAuthorized(Session originatingNodeSession, Subject targetNodeSubject, Identifier pid)
|
136
|
throws NotImplemented, NotAuthorized, InvalidToken, ServiceFailure,
|
137
|
NotFound, InvalidRequest {
|
138
|
return impl.isNodeAuthorized(originatingNodeSession, targetNodeSubject, pid);
|
139
|
}
|
140
|
|
141
|
@Override
|
142
|
public boolean setReplicationPolicy(Identifier pid,
|
143
|
ReplicationPolicy policy, long serialVersion) throws NotImplemented, NotFound,
|
144
|
NotAuthorized, ServiceFailure, InvalidRequest, InvalidToken,
|
145
|
VersionMismatch {
|
146
|
return impl.setReplicationPolicy(null, pid, policy, serialVersion);
|
147
|
}
|
148
|
|
149
|
@Override
|
150
|
@Deprecated
|
151
|
public boolean setReplicationPolicy(Session session, Identifier pid,
|
152
|
ReplicationPolicy policy, long serialVersion) throws NotImplemented, NotFound,
|
153
|
NotAuthorized, ServiceFailure, InvalidRequest, InvalidToken,
|
154
|
VersionMismatch {
|
155
|
return impl.setReplicationPolicy(session, pid, policy, serialVersion);
|
156
|
|
157
|
}
|
158
|
|
159
|
@Override
|
160
|
public boolean setReplicationStatus(Identifier pid,
|
161
|
NodeReference targetNode, ReplicationStatus status, BaseException failure)
|
162
|
throws ServiceFailure, NotImplemented, InvalidToken, NotAuthorized, InvalidRequest, NotFound {
|
163
|
return impl.setReplicationStatus(null, pid, targetNode, status, failure);
|
164
|
}
|
165
|
|
166
|
@Override
|
167
|
@Deprecated
|
168
|
public boolean setReplicationStatus(Session session, Identifier pid,
|
169
|
NodeReference targetNode, ReplicationStatus status, BaseException failure)
|
170
|
throws ServiceFailure, NotImplemented, InvalidToken, NotAuthorized,
|
171
|
InvalidRequest, NotFound {
|
172
|
return impl.setReplicationStatus(session, pid, targetNode, status, failure);
|
173
|
}
|
174
|
|
175
|
@Override
|
176
|
public boolean updateReplicationMetadata(Identifier pid,
|
177
|
Replica replica, long serialVersion) throws NotImplemented, NotAuthorized, ServiceFailure,
|
178
|
NotFound, InvalidRequest, InvalidToken, VersionMismatch {
|
179
|
return impl.updateReplicationMetadata(null, pid, replica, serialVersion);
|
180
|
}
|
181
|
|
182
|
@Override
|
183
|
@Deprecated
|
184
|
public boolean updateReplicationMetadata(Session session, Identifier pid,
|
185
|
Replica replica, long serialVersion) throws NotImplemented, NotAuthorized,
|
186
|
ServiceFailure, NotFound, InvalidRequest, InvalidToken,
|
187
|
VersionMismatch {
|
188
|
return impl.updateReplicationMetadata(session, pid, replica, serialVersion);
|
189
|
}
|
190
|
|
191
|
@Override
|
192
|
public DescribeResponse describe(Identifier pid) throws InvalidToken,
|
193
|
NotAuthorized, NotImplemented, ServiceFailure, NotFound {
|
194
|
return impl.describe(null, pid);
|
195
|
}
|
196
|
|
197
|
@Override
|
198
|
@Deprecated
|
199
|
public DescribeResponse describe(Session session, Identifier pid)
|
200
|
throws InvalidToken, NotAuthorized, NotImplemented, ServiceFailure,
|
201
|
NotFound {
|
202
|
return impl.describe(session, pid);
|
203
|
}
|
204
|
|
205
|
@Override
|
206
|
public InputStream get(Identifier pid) throws InvalidToken,
|
207
|
ServiceFailure, NotAuthorized, NotFound, NotImplemented {
|
208
|
return impl.get(null, pid);
|
209
|
}
|
210
|
|
211
|
@Override
|
212
|
@Deprecated
|
213
|
public InputStream get(Session session, Identifier pid) throws InvalidToken,
|
214
|
ServiceFailure, NotAuthorized, NotFound, NotImplemented {
|
215
|
return impl.get(session, pid);
|
216
|
}
|
217
|
|
218
|
@Override
|
219
|
public Checksum getChecksum(Identifier pid) throws InvalidToken,
|
220
|
ServiceFailure, NotAuthorized, NotFound, NotImplemented {
|
221
|
return impl.getChecksum(null, pid);
|
222
|
}
|
223
|
|
224
|
@Override
|
225
|
@Deprecated
|
226
|
public Checksum getChecksum(Session session, Identifier pid)
|
227
|
throws InvalidToken, ServiceFailure, NotAuthorized, NotFound,
|
228
|
NotImplemented {
|
229
|
return impl.getChecksum(session, pid);
|
230
|
}
|
231
|
|
232
|
@Override
|
233
|
public QueryEngineDescription getQueryEngineDescription(String queryEngine)
|
234
|
throws InvalidToken, ServiceFailure, NotAuthorized, NotImplemented,
|
235
|
NotFound {
|
236
|
return impl.getQueryEngineDescription(null, queryEngine);
|
237
|
}
|
238
|
|
239
|
@Override
|
240
|
public SystemMetadata getSystemMetadata(Identifier pid)
|
241
|
throws InvalidToken, ServiceFailure, NotAuthorized, NotFound,
|
242
|
NotImplemented {
|
243
|
return impl.getSystemMetadata(null, pid);
|
244
|
}
|
245
|
|
246
|
@Override
|
247
|
@Deprecated
|
248
|
public SystemMetadata getSystemMetadata(Session session, Identifier pid)
|
249
|
throws InvalidToken, ServiceFailure, NotAuthorized, NotFound,
|
250
|
NotImplemented {
|
251
|
return impl.getSystemMetadata(session, pid);
|
252
|
}
|
253
|
|
254
|
@Override
|
255
|
public ObjectList listObjects(Date startTime, Date endTime,
|
256
|
ObjectFormatIdentifier formatid, Boolean replicaStatus, Integer start,
|
257
|
Integer count) throws InvalidRequest, InvalidToken, NotAuthorized,
|
258
|
NotImplemented, ServiceFailure {
|
259
|
return impl.listObjects(null, startTime, endTime, formatid, null, replicaStatus, start, count);
|
260
|
}
|
261
|
|
262
|
@Override
|
263
|
@Deprecated
|
264
|
public ObjectList listObjects(Session session, Date startTime, Date endTime,
|
265
|
ObjectFormatIdentifier formatid, Boolean replicaStatus, Integer start,
|
266
|
Integer count) throws InvalidRequest, InvalidToken, NotAuthorized,
|
267
|
NotImplemented, ServiceFailure {
|
268
|
return impl.listObjects(session, startTime, endTime, formatid, null, replicaStatus, start, count);
|
269
|
}
|
270
|
|
271
|
@Override
|
272
|
public QueryEngineList listQueryEngines() throws InvalidToken,
|
273
|
ServiceFailure, NotAuthorized, NotImplemented {
|
274
|
return impl.listQueryEngines(null);
|
275
|
}
|
276
|
|
277
|
@Override
|
278
|
public InputStream query(String queryEngine, String query) throws InvalidToken,
|
279
|
ServiceFailure, NotAuthorized, InvalidRequest, NotImplemented,
|
280
|
NotFound {
|
281
|
return impl.query(null, queryEngine, query);
|
282
|
}
|
283
|
|
284
|
@Override
|
285
|
public ObjectLocationList resolve(Identifier pid) throws InvalidToken,
|
286
|
ServiceFailure, NotAuthorized, NotFound, NotImplemented {
|
287
|
return impl.resolve(null, pid);
|
288
|
}
|
289
|
|
290
|
@Override
|
291
|
@Deprecated
|
292
|
public ObjectLocationList resolve(Session session, Identifier pid)
|
293
|
throws InvalidToken, ServiceFailure, NotAuthorized, NotFound,
|
294
|
NotImplemented {
|
295
|
return impl.resolve(session, pid);
|
296
|
}
|
297
|
|
298
|
@Override
|
299
|
public ObjectList search(String queryType, String query) throws InvalidToken,
|
300
|
ServiceFailure, NotAuthorized, InvalidRequest, NotImplemented {
|
301
|
return impl.search(null, queryType, query);
|
302
|
}
|
303
|
|
304
|
@Override
|
305
|
@Deprecated
|
306
|
public ObjectList search(Session session, String queryType, String query)
|
307
|
throws InvalidToken, ServiceFailure, NotAuthorized, InvalidRequest,
|
308
|
NotImplemented {
|
309
|
return impl.search(session, queryType, query);
|
310
|
}
|
311
|
|
312
|
@Override
|
313
|
public Identifier archive(Identifier pid) throws InvalidToken,
|
314
|
ServiceFailure, NotAuthorized, NotFound, NotImplemented {
|
315
|
return impl.archive(null, pid);
|
316
|
}
|
317
|
|
318
|
@Override
|
319
|
@Deprecated
|
320
|
public Identifier archive(Session session, Identifier pid)
|
321
|
throws InvalidToken, ServiceFailure, InvalidRequest, NotAuthorized,
|
322
|
NotFound, NotImplemented {
|
323
|
return impl.archive(session, pid);
|
324
|
}
|
325
|
|
326
|
@Override
|
327
|
public Identifier create(Identifier pid, InputStream object,
|
328
|
SystemMetadata sysmeta) throws InvalidToken, ServiceFailure,
|
329
|
NotAuthorized, IdentifierNotUnique, UnsupportedType,
|
330
|
InsufficientResources, InvalidSystemMetadata, NotImplemented,
|
331
|
InvalidRequest {
|
332
|
return this.create(null, pid, object, sysmeta);
|
333
|
}
|
334
|
|
335
|
@Override
|
336
|
@Deprecated
|
337
|
public Identifier create(Session session, Identifier pid, InputStream object,
|
338
|
SystemMetadata sysmeta) throws InvalidToken, ServiceFailure,
|
339
|
NotAuthorized, IdentifierNotUnique, UnsupportedType,
|
340
|
InsufficientResources, InvalidSystemMetadata, NotImplemented,
|
341
|
InvalidRequest {
|
342
|
|
343
|
//convert sysmeta to newer version
|
344
|
org.dataone.service.types.v2.SystemMetadata v2Sysmeta = null;
|
345
|
try {
|
346
|
v2Sysmeta = TypeMarshaller.convertTypeFromType(sysmeta, org.dataone.service.types.v2.SystemMetadata.class);
|
347
|
} catch (Exception e) {
|
348
|
// report as service failure
|
349
|
ServiceFailure sf = new ServiceFailure("1030", e.getMessage());
|
350
|
sf.initCause(e);
|
351
|
throw sf;
|
352
|
}
|
353
|
|
354
|
return impl.create(session, pid, object, v2Sysmeta);
|
355
|
}
|
356
|
|
357
|
@Override
|
358
|
public Identifier delete(Identifier pid) throws InvalidToken,
|
359
|
ServiceFailure, NotAuthorized, NotFound, NotImplemented {
|
360
|
return impl.delete(null, pid);
|
361
|
}
|
362
|
|
363
|
@Override
|
364
|
@Deprecated
|
365
|
public Identifier delete(Session session, Identifier pid)
|
366
|
throws InvalidToken, ServiceFailure, InvalidRequest, NotAuthorized,
|
367
|
NotFound, NotImplemented {
|
368
|
return impl.delete(session, pid);
|
369
|
}
|
370
|
|
371
|
@Override
|
372
|
public Identifier generateIdentifier(String scheme, String fragment)
|
373
|
throws InvalidToken, ServiceFailure, NotAuthorized, NotImplemented,
|
374
|
InvalidRequest {
|
375
|
return impl.generateIdentifier(null, scheme, fragment);
|
376
|
}
|
377
|
|
378
|
@Override
|
379
|
@Deprecated
|
380
|
public Identifier generateIdentifier(Session session, String scheme, String fragment)
|
381
|
throws InvalidToken, ServiceFailure, NotAuthorized, NotImplemented,
|
382
|
InvalidRequest {
|
383
|
return impl.generateIdentifier(session, scheme, fragment);
|
384
|
}
|
385
|
|
386
|
@Override
|
387
|
public ObjectFormat getFormat(ObjectFormatIdentifier fmtid)
|
388
|
throws ServiceFailure, NotFound, NotImplemented, InvalidRequest {
|
389
|
return impl.getFormat(fmtid);
|
390
|
}
|
391
|
|
392
|
@Override
|
393
|
public Log getLogRecords(Date fromDate, Date toDate, Event event,
|
394
|
String pidFilter, Integer start, Integer count) throws InvalidToken, InvalidRequest,
|
395
|
ServiceFailure, NotAuthorized, NotImplemented,
|
396
|
InsufficientResources {
|
397
|
return this.getLogRecords(null, fromDate, toDate, event, pidFilter, start, count);
|
398
|
}
|
399
|
|
400
|
@Override
|
401
|
@Deprecated
|
402
|
public Log getLogRecords(Session session, Date fromDate, Date toDate, Event event,
|
403
|
String pidFilter, Integer start, Integer count) throws InvalidToken,
|
404
|
InvalidRequest, ServiceFailure, NotAuthorized, NotImplemented,
|
405
|
InsufficientResources {
|
406
|
org.dataone.service.types.v2.Log log = impl.getLogRecords(session, fromDate, toDate, event.xmlValue(), pidFilter, start, count);
|
407
|
Log retLog = null;
|
408
|
try {
|
409
|
retLog = TypeMarshaller.convertTypeFromType(log, Log.class);
|
410
|
} catch (Exception e) {
|
411
|
// report as service failure
|
412
|
ServiceFailure sf = new ServiceFailure("1490", e.getMessage());
|
413
|
sf.initCause(e);
|
414
|
throw sf;
|
415
|
}
|
416
|
return retLog;
|
417
|
}
|
418
|
|
419
|
@Override
|
420
|
public boolean hasReservation(Subject subject, Identifier pid)
|
421
|
throws InvalidToken, ServiceFailure, NotFound, NotAuthorized,
|
422
|
NotImplemented, InvalidRequest, IdentifierNotUnique {
|
423
|
return impl.hasReservation(null, subject, pid);
|
424
|
}
|
425
|
|
426
|
@Override
|
427
|
@Deprecated
|
428
|
public boolean hasReservation(Session session, Subject subject, Identifier pid)
|
429
|
throws InvalidToken, ServiceFailure, NotFound, NotAuthorized,
|
430
|
NotImplemented, InvalidRequest, IdentifierNotUnique {
|
431
|
return impl.hasReservation(session, subject, pid);
|
432
|
|
433
|
}
|
434
|
|
435
|
@Override
|
436
|
public ChecksumAlgorithmList listChecksumAlgorithms()
|
437
|
throws ServiceFailure, NotImplemented {
|
438
|
return impl.listChecksumAlgorithms();
|
439
|
}
|
440
|
|
441
|
@Override
|
442
|
public ObjectFormatList listFormats() throws ServiceFailure, NotImplemented {
|
443
|
org.dataone.service.types.v2.ObjectFormatList formats = impl.listFormats();
|
444
|
ObjectFormatList retFormats = null;
|
445
|
try {
|
446
|
retFormats = TypeMarshaller.convertTypeFromType(formats, ObjectFormatList.class);
|
447
|
} catch (Exception e) {
|
448
|
// report as service failure
|
449
|
ServiceFailure sf = new ServiceFailure("4841", e.getMessage());
|
450
|
sf.initCause(e);
|
451
|
throw sf;
|
452
|
}
|
453
|
return retFormats;
|
454
|
}
|
455
|
|
456
|
@Override
|
457
|
public NodeList listNodes() throws NotImplemented, ServiceFailure {
|
458
|
org.dataone.service.types.v2.NodeList nodes = impl.listNodes();
|
459
|
NodeList retNodes = null;
|
460
|
try {
|
461
|
retNodes = TypeMarshaller.convertTypeFromType(nodes, NodeList.class);
|
462
|
} catch (Exception e) {
|
463
|
// report as service failure
|
464
|
ServiceFailure sf = new ServiceFailure("4801", e.getMessage());
|
465
|
sf.initCause(e);
|
466
|
throw sf;
|
467
|
}
|
468
|
return retNodes;
|
469
|
}
|
470
|
|
471
|
@Override
|
472
|
public Date ping() throws NotImplemented, ServiceFailure,
|
473
|
InsufficientResources {
|
474
|
return impl.ping();
|
475
|
}
|
476
|
|
477
|
@Override
|
478
|
public Identifier registerSystemMetadata(Identifier pid,
|
479
|
SystemMetadata sysmeta) throws NotImplemented, NotAuthorized,
|
480
|
ServiceFailure, InvalidRequest, InvalidSystemMetadata, InvalidToken {
|
481
|
return this.registerSystemMetadata(null, pid, sysmeta);
|
482
|
|
483
|
}
|
484
|
|
485
|
@Override
|
486
|
@Deprecated
|
487
|
public Identifier registerSystemMetadata(Session session, Identifier pid,
|
488
|
SystemMetadata sysmeta) throws NotImplemented, NotAuthorized,
|
489
|
ServiceFailure, InvalidRequest, InvalidSystemMetadata, InvalidToken {
|
490
|
//convert sysmeta to newer version
|
491
|
org.dataone.service.types.v2.SystemMetadata v2Sysmeta = null;
|
492
|
try {
|
493
|
v2Sysmeta = TypeMarshaller.convertTypeFromType(sysmeta, org.dataone.service.types.v2.SystemMetadata.class);
|
494
|
} catch (Exception e) {
|
495
|
// report as service failure
|
496
|
ServiceFailure sf = new ServiceFailure("1030", e.getMessage());
|
497
|
sf.initCause(e);
|
498
|
throw sf;
|
499
|
}
|
500
|
|
501
|
return impl.registerSystemMetadata(session, pid, v2Sysmeta);
|
502
|
}
|
503
|
|
504
|
@Override
|
505
|
public Identifier reserveIdentifier(Identifier pid) throws InvalidToken,
|
506
|
ServiceFailure, NotAuthorized, IdentifierNotUnique, NotImplemented,
|
507
|
InvalidRequest {
|
508
|
return impl.reserveIdentifier(null, pid);
|
509
|
}
|
510
|
|
511
|
@Override
|
512
|
@Deprecated
|
513
|
public Identifier reserveIdentifier(Session session, Identifier pid)
|
514
|
throws InvalidToken, ServiceFailure, NotAuthorized,
|
515
|
IdentifierNotUnique, NotImplemented, InvalidRequest {
|
516
|
return impl.reserveIdentifier(session, pid);
|
517
|
}
|
518
|
|
519
|
@Override
|
520
|
public boolean setObsoletedBy(Identifier pid, Identifier obsoletedByPid, long serialVersion)
|
521
|
throws NotImplemented, NotFound, NotAuthorized, ServiceFailure,
|
522
|
InvalidRequest, InvalidToken, VersionMismatch {
|
523
|
return impl.setObsoletedBy(null, pid, obsoletedByPid, serialVersion);
|
524
|
}
|
525
|
|
526
|
@Override
|
527
|
@Deprecated
|
528
|
public boolean setObsoletedBy(Session session, Identifier pid, Identifier obsoletedByPid, long serialVersion)
|
529
|
throws NotImplemented, NotFound,
|
530
|
NotAuthorized, ServiceFailure, InvalidRequest, InvalidToken,
|
531
|
VersionMismatch {
|
532
|
return impl.setObsoletedBy(session, pid, obsoletedByPid, serialVersion);
|
533
|
|
534
|
}
|
535
|
|
536
|
@Override
|
537
|
public boolean isAuthorized(Identifier pid, Permission permission)
|
538
|
throws ServiceFailure, InvalidToken, NotFound, NotAuthorized,
|
539
|
NotImplemented, InvalidRequest {
|
540
|
return impl.isAuthorized(null, pid, permission);
|
541
|
}
|
542
|
|
543
|
@Override
|
544
|
@Deprecated
|
545
|
public boolean isAuthorized(Session session, Identifier pid, Permission permission)
|
546
|
throws ServiceFailure, InvalidToken, NotFound, NotAuthorized,
|
547
|
NotImplemented, InvalidRequest {
|
548
|
return impl.isAuthorized(session, pid, permission);
|
549
|
}
|
550
|
|
551
|
@Override
|
552
|
public boolean setAccessPolicy(Identifier pid,
|
553
|
AccessPolicy accessPolicy, long serialVersion)
|
554
|
throws InvalidToken, NotFound, NotImplemented, NotAuthorized,
|
555
|
ServiceFailure, InvalidRequest, VersionMismatch {
|
556
|
return impl.setAccessPolicy(null, pid, accessPolicy, serialVersion);
|
557
|
}
|
558
|
|
559
|
@Override
|
560
|
@Deprecated
|
561
|
public boolean setAccessPolicy(Session session, Identifier pid,
|
562
|
AccessPolicy accessPolicy, long serialVersion) throws InvalidToken, NotFound,
|
563
|
NotImplemented, NotAuthorized, ServiceFailure, InvalidRequest,
|
564
|
VersionMismatch {
|
565
|
return impl.setAccessPolicy(session, pid, accessPolicy, serialVersion);
|
566
|
}
|
567
|
|
568
|
@Override
|
569
|
public Identifier setRightsHolder(Identifier pid, Subject userId, long serialVersion)
|
570
|
throws InvalidToken, ServiceFailure, NotFound, NotAuthorized,
|
571
|
NotImplemented, InvalidRequest, VersionMismatch {
|
572
|
return impl.setRightsHolder(null, pid, userId, serialVersion);
|
573
|
}
|
574
|
|
575
|
@Override
|
576
|
@Deprecated
|
577
|
public Identifier setRightsHolder(Session session, Identifier pid,
|
578
|
Subject userId, long serialVersion) throws InvalidToken, ServiceFailure,
|
579
|
NotFound, NotAuthorized, NotImplemented, InvalidRequest,
|
580
|
VersionMismatch {
|
581
|
return impl.setRightsHolder(session, pid, userId, serialVersion);
|
582
|
|
583
|
}
|
584
|
|
585
|
}
|