Project

General

Profile

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: tao $'
7
 *     '$Date: 2014-12-30 16:34:11 -0800 (Tue, 30 Dec 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.sql.SQLException;
28
import java.util.Date;
29

    
30
import javax.servlet.http.HttpServletRequest;
31

    
32
import org.apache.log4j.Logger;
33
import org.dataone.service.cn.v1.CNAuthorization;
34
import org.dataone.service.cn.v1.CNCore;
35
import org.dataone.service.cn.v1.CNRead;
36
import org.dataone.service.cn.v1.CNReplication;
37
import org.dataone.service.exceptions.BaseException;
38
import org.dataone.service.exceptions.IdentifierNotUnique;
39
import org.dataone.service.exceptions.InsufficientResources;
40
import org.dataone.service.exceptions.InvalidRequest;
41
import org.dataone.service.exceptions.InvalidSystemMetadata;
42
import org.dataone.service.exceptions.InvalidToken;
43
import org.dataone.service.exceptions.NotAuthorized;
44
import org.dataone.service.exceptions.NotFound;
45
import org.dataone.service.exceptions.NotImplemented;
46
import org.dataone.service.exceptions.ServiceFailure;
47
import org.dataone.service.exceptions.UnsupportedType;
48
import org.dataone.service.exceptions.VersionMismatch;
49
import org.dataone.service.types.v1.AccessPolicy;
50
import org.dataone.service.types.v1.Checksum;
51
import org.dataone.service.types.v1.ChecksumAlgorithmList;
52
import org.dataone.service.types.v1.DescribeResponse;
53
import org.dataone.service.types.v1.Event;
54
import org.dataone.service.types.v1.Identifier;
55
import org.dataone.service.types.v1.Log;
56
import org.dataone.service.types.v1.NodeList;
57
import org.dataone.service.types.v1.NodeReference;
58
import org.dataone.service.types.v1.ObjectFormat;
59
import org.dataone.service.types.v1.ObjectFormatIdentifier;
60
import org.dataone.service.types.v1.ObjectFormatList;
61
import org.dataone.service.types.v1.ObjectList;
62
import org.dataone.service.types.v1.ObjectLocationList;
63
import org.dataone.service.types.v1.Permission;
64
import org.dataone.service.types.v1.Replica;
65
import org.dataone.service.types.v1.ReplicationPolicy;
66
import org.dataone.service.types.v1.ReplicationStatus;
67
import org.dataone.service.types.v1.Session;
68
import org.dataone.service.types.v1.Subject;
69
import org.dataone.service.types.v1.SystemMetadata;
70
import org.dataone.service.types.v1_1.QueryEngineDescription;
71
import org.dataone.service.types.v1_1.QueryEngineList;
72
import org.dataone.service.util.TypeMarshaller;
73

    
74
import edu.ucsb.nceas.metacat.IdentifierManager;
75

    
76
/**
77
 * Represents Metacat's implementation of the DataONE Coordinating Node service
78
 * API. Methods implement the various CN* interfaces, and methods common to both
79
 * Member Node and Coordinating Node interfaces are found in the D1NodeService
80
 * super class.
81
 * 
82
 */
83
public class CNodeService implements CNAuthorization, CNCore, CNRead,
84
		CNReplication {
85

    
86
	// pass through to the most recent implementation
87
	private edu.ucsb.nceas.metacat.dataone.CNodeService impl = null;
88

    
89
	/* the logger instance */
90
	private Logger logMetacat = null;
91

    
92
	/**
93
	 * singleton accessor
94
	 */
95
	public static CNodeService getInstance(HttpServletRequest request) {
96
		return new CNodeService(request);
97
	}
98

    
99
	/**
100
	 * Constructor, private for singleton access
101
	 */
102
	private CNodeService(HttpServletRequest request) {
103

    
104
		logMetacat = Logger.getLogger(CNodeService.class);
105

    
106
		impl = edu.ucsb.nceas.metacat.dataone.CNodeService.getInstance(request);
107

    
108
	}
109

    
110
	@Override
111
	public boolean deleteReplicationMetadata(Identifier pid,
112
			NodeReference nodeId, long serialVersion) throws InvalidToken, InvalidRequest,
113
			ServiceFailure, NotAuthorized, NotFound, NotImplemented,
114
			VersionMismatch {
115
		return impl.deleteReplicationMetadata(null, pid, nodeId, serialVersion);
116
	}
117

    
118
	@Override
119
	@Deprecated
120
	public boolean deleteReplicationMetadata(Session session, Identifier pid,
121
			NodeReference nodeId, long serialVersion) throws InvalidToken, InvalidRequest,
122
			ServiceFailure, NotAuthorized, NotFound, NotImplemented,
123
			VersionMismatch {
124
		return impl.deleteReplicationMetadata(session, pid, nodeId, serialVersion);
125

    
126
	}
127

    
128
	@Override
129
	public boolean isNodeAuthorized(Subject targetNodeSubject, Identifier pid)
130
			throws NotImplemented, NotAuthorized, InvalidToken, ServiceFailure,
131
			NotFound, InvalidRequest {
132
		return impl.isNodeAuthorized(null, targetNodeSubject, pid);
133

    
134
	}
135

    
136
	@Override
137
	@Deprecated
138
	public boolean isNodeAuthorized(Session originatingNodeSession, Subject targetNodeSubject, Identifier pid)
139
			throws NotImplemented, NotAuthorized, InvalidToken, ServiceFailure,
140
			NotFound, InvalidRequest {
141
		return impl.isNodeAuthorized(originatingNodeSession, targetNodeSubject, pid);
142
	}
143

    
144
	@Override
145
	public boolean setReplicationPolicy(Identifier pid,
146
			ReplicationPolicy policy, long serialVersion) throws NotImplemented, NotFound,
147
			NotAuthorized, ServiceFailure, InvalidRequest, InvalidToken,
148
			VersionMismatch {
149
		return impl.setReplicationPolicy(null, pid, policy, serialVersion);
150
	}
151

    
152
	@Override
153
	@Deprecated
154
	public boolean setReplicationPolicy(Session session, Identifier pid,
155
			ReplicationPolicy policy, long serialVersion) throws NotImplemented, NotFound,
156
			NotAuthorized, ServiceFailure, InvalidRequest, InvalidToken,
157
			VersionMismatch {
158
		return impl.setReplicationPolicy(session, pid, policy, serialVersion);
159

    
160
	}
161

    
162
	@Override
163
	public boolean setReplicationStatus(Identifier pid,
164
			NodeReference targetNode, ReplicationStatus status, BaseException failure) 
165
			throws ServiceFailure, NotImplemented, InvalidToken, NotAuthorized, InvalidRequest, NotFound {
166
		return impl.setReplicationStatus(null, pid, targetNode, status, failure);
167
	}
168

    
169
	@Override
170
	@Deprecated
171
	public boolean setReplicationStatus(Session session, Identifier pid,
172
			NodeReference targetNode, ReplicationStatus status, BaseException failure)
173
			throws ServiceFailure, NotImplemented, InvalidToken, NotAuthorized,
174
			InvalidRequest, NotFound {
175
		return impl.setReplicationStatus(session, pid, targetNode, status, failure);
176
	}
177

    
178
	@Override
179
	public boolean updateReplicationMetadata(Identifier pid,
180
			Replica replica, long serialVersion) throws NotImplemented, NotAuthorized, ServiceFailure,
181
			NotFound, InvalidRequest, InvalidToken, VersionMismatch {
182
		return impl.updateReplicationMetadata(null, pid, replica, serialVersion);
183
	}
184

    
185
	@Override
186
	@Deprecated
187
	public boolean updateReplicationMetadata(Session session, Identifier pid,
188
			Replica replica, long serialVersion) throws NotImplemented, NotAuthorized,
189
			ServiceFailure, NotFound, InvalidRequest, InvalidToken,
190
			VersionMismatch {
191
		return impl.updateReplicationMetadata(session, pid, replica, serialVersion);
192
	}
193

    
194
	@Override
195
	public DescribeResponse describe(Identifier pid) throws InvalidToken,
196
			NotAuthorized, NotImplemented, ServiceFailure, NotFound {
197
	    String serviceFailure = "4931";
198
        String notFound = "4933";
199
        impl.checkV1SystemMetaPidExist(pid, serviceFailure, "The system metadata for given PID "+pid.getValue()+" couldn't be identified if it exists",  notFound, 
200
                "No system metadata could be found for given PID: "+pid.getValue());
201
		return impl.describe(null, pid);
202
	}
203

    
204
	@Override
205
	@Deprecated
206
	public DescribeResponse describe(Session session, Identifier pid)
207
			throws InvalidToken, NotAuthorized, NotImplemented, ServiceFailure,
208
			NotFound {
209
	    String serviceFailure = "4931";
210
        String notFound = "4933";
211
        impl.checkV1SystemMetaPidExist(pid, serviceFailure, "The system metadata for given PID "+pid.getValue()+" couldn't be identified if it exists",  notFound, 
212
                "No system metadata could be found for given PID: "+pid.getValue());
213
		return impl.describe(session, pid);
214
	}
215

    
216
	@Override
217
	public InputStream get(Identifier pid) throws InvalidToken,
218
			ServiceFailure, NotAuthorized, NotFound, NotImplemented {
219
        String serviceFailure = "1030";
220
        String notFound = "1020";
221
        impl.checkV1SystemMetaPidExist(pid, serviceFailure, "The object specified by "+pid.getValue()+" couldn't be identified if it exists",  notFound, 
222
                "The object specified by "+pid.getValue()+" does not exist at this node");
223
		return impl.get(null, pid);
224
	}
225

    
226
	@Override
227
	@Deprecated
228
	public InputStream get(Session session, Identifier pid) throws InvalidToken,
229
			ServiceFailure, NotAuthorized, NotFound, NotImplemented {
230
	    String serviceFailure = "1030";
231
        String notFound = "1020";
232
        impl.checkV1SystemMetaPidExist(pid, serviceFailure, "The object specified by "+pid.getValue()+" couldn't be identified if it exists",  notFound, 
233
                "The object specified by "+pid.getValue()+" does not exist at this node");
234
		return impl.get(session, pid);
235
	}
236

    
237
	@Override
238
	public Checksum getChecksum(Identifier pid) throws InvalidToken,
239
			ServiceFailure, NotAuthorized, NotFound, NotImplemented {
240
		return impl.getChecksum(null, pid);
241
	}
242

    
243
	@Override
244
	@Deprecated
245
	public Checksum getChecksum(Session session, Identifier pid)
246
			throws InvalidToken, ServiceFailure, NotAuthorized, NotFound,
247
			NotImplemented {
248
		return impl.getChecksum(session, pid);
249
	}
250

    
251
	@Override
252
	public QueryEngineDescription getQueryEngineDescription(String queryEngine)
253
			throws InvalidToken, ServiceFailure, NotAuthorized, NotImplemented,
254
			NotFound {
255
		return impl.getQueryEngineDescription(null, queryEngine);
256
	}
257

    
258
	@Override
259
	public SystemMetadata getSystemMetadata(Identifier pid)
260
			throws InvalidToken, ServiceFailure, NotAuthorized, NotFound,
261
			NotImplemented {
262
	    String serviceFailure = "1090";
263
        String notFound = "1060";
264
        impl.checkV1SystemMetaPidExist(pid, serviceFailure, "The system metadata for given PID "+pid.getValue()+" couldn't be identified if it exists",  notFound, 
265
                "No system metadata could be found for given PID: "+pid.getValue());
266
		return impl.getSystemMetadata(null, pid);
267
	}
268

    
269
	@Override
270
	@Deprecated
271
	public SystemMetadata getSystemMetadata(Session session, Identifier pid)
272
			throws InvalidToken, ServiceFailure, NotAuthorized, NotFound,
273
			NotImplemented {
274
	    String serviceFailure = "1090";
275
        String notFound = "1060";
276
        impl.checkV1SystemMetaPidExist(pid, serviceFailure, "The system metadata for given PID "+pid.getValue()+" couldn't be identified if it exists",  notFound, 
277
                "No system metadata could be found for given PID: "+pid.getValue());
278
		return impl.getSystemMetadata(session, pid);
279
	}
280

    
281
	@Override
282
	public ObjectList listObjects(Date startTime, Date endTime,
283
			ObjectFormatIdentifier formatid, Boolean replicaStatus, Integer start,
284
			Integer count) throws InvalidRequest, InvalidToken, NotAuthorized,
285
			NotImplemented, ServiceFailure {
286
		return impl.listObjects(null, startTime, endTime, formatid, null, replicaStatus, start, count);
287
	}
288

    
289
	@Override
290
	@Deprecated
291
	public ObjectList listObjects(Session session, Date startTime, Date endTime,
292
			ObjectFormatIdentifier formatid, Boolean replicaStatus, Integer start,
293
			Integer count) throws InvalidRequest, InvalidToken, NotAuthorized,
294
			NotImplemented, ServiceFailure {
295
		return impl.listObjects(session, startTime, endTime, formatid, null, replicaStatus, start, count);
296
	}
297

    
298
	@Override
299
	public QueryEngineList listQueryEngines() throws InvalidToken,
300
			ServiceFailure, NotAuthorized, NotImplemented {
301
		return impl.listQueryEngines(null);
302
	}
303

    
304
	@Override
305
	public InputStream query(String queryEngine, String query) throws InvalidToken,
306
			ServiceFailure, NotAuthorized, InvalidRequest, NotImplemented,
307
			NotFound {
308
		return impl.query(null, queryEngine, query);
309
	}
310

    
311
	@Override
312
	public ObjectLocationList resolve(Identifier pid) throws InvalidToken,
313
			ServiceFailure, NotAuthorized, NotFound, NotImplemented {
314
		return impl.resolve(null, pid);
315
	}
316

    
317
	@Override
318
	@Deprecated
319
	public ObjectLocationList resolve(Session session, Identifier pid)
320
			throws InvalidToken, ServiceFailure, NotAuthorized, NotFound,
321
			NotImplemented {
322
		return impl.resolve(session, pid);
323
	}
324

    
325
	@Override
326
	public ObjectList search(String queryType, String query) throws InvalidToken,
327
			ServiceFailure, NotAuthorized, InvalidRequest, NotImplemented {
328
		return impl.search(null, queryType, query);
329
	}
330

    
331
	@Override
332
	@Deprecated
333
	public ObjectList search(Session session, String queryType, String query)
334
			throws InvalidToken, ServiceFailure, NotAuthorized, InvalidRequest,
335
			NotImplemented {
336
		return impl.search(session, queryType, query);
337
	}
338

    
339
	@Override
340
	public Identifier archive(Identifier pid) throws InvalidToken,
341
			ServiceFailure, NotAuthorized, NotFound, NotImplemented {
342
	    String serviceFailure = "4972";
343
        String notFound = "4971";
344
        impl.checkV1SystemMetaPidExist(pid, serviceFailure, "The object specified by "+pid.getValue()+" couldn't be identified if it exists",  notFound, 
345
                "The object specified by "+pid.getValue()+" does not exist at this node.");
346
		return impl.archive(null, pid);
347
	}
348

    
349
	@Override
350
	@Deprecated
351
	public Identifier archive(Session session, Identifier pid)
352
			throws InvalidToken, ServiceFailure, InvalidRequest, NotAuthorized,
353
			NotFound, NotImplemented {
354
	    String serviceFailure = "4972";
355
        String notFound = "4971";
356
        impl.checkV1SystemMetaPidExist(pid, serviceFailure, "The object specified by "+pid.getValue()+" couldn't be identified if it exists",  notFound, 
357
                "The object specified by "+pid.getValue()+" does not exist at this node.");
358
		return impl.archive(session, pid);
359
	}
360

    
361
	@Override
362
	public Identifier create(Identifier pid, InputStream object,
363
			SystemMetadata sysmeta) throws InvalidToken, ServiceFailure,
364
			NotAuthorized, IdentifierNotUnique, UnsupportedType,
365
			InsufficientResources, InvalidSystemMetadata, NotImplemented,
366
			InvalidRequest {
367
		return this.create(null, pid, object, sysmeta);
368
	}
369

    
370
	@Override
371
	@Deprecated
372
	public Identifier create(Session session, Identifier pid, InputStream object,
373
			SystemMetadata sysmeta) throws InvalidToken, ServiceFailure,
374
			NotAuthorized, IdentifierNotUnique, UnsupportedType,
375
			InsufficientResources, InvalidSystemMetadata, NotImplemented,
376
			InvalidRequest {
377
		
378
		//convert sysmeta to newer version
379
		org.dataone.service.types.v2.SystemMetadata v2Sysmeta = null;
380
		try {
381
			v2Sysmeta = TypeMarshaller.convertTypeFromType(sysmeta, org.dataone.service.types.v2.SystemMetadata.class);
382
		} catch (Exception e) {
383
			// report as service failure
384
			ServiceFailure sf = new ServiceFailure("1030", e.getMessage());
385
			sf.initCause(e);
386
			throw sf;
387
		}
388
		
389
		return impl.create(session, pid, object, v2Sysmeta);
390
	}
391

    
392
	@Override
393
	public Identifier delete(Identifier pid) throws InvalidToken,
394
			ServiceFailure, NotAuthorized, NotFound, NotImplemented {
395
	    String serviceFailure = "4962";
396
        String notFound = "4961";
397
        impl.checkV1SystemMetaPidExist(pid, serviceFailure, "The object specified by "+pid.getValue()+" couldn't be identified if it exists",  notFound, 
398
                "The object specified by "+pid.getValue()+" does not exist at this node.");
399
		return impl.delete(null, pid);
400
	}
401

    
402
	@Override
403
	@Deprecated
404
	public Identifier delete(Session session, Identifier pid)
405
			throws InvalidToken, ServiceFailure, InvalidRequest, NotAuthorized,
406
			NotFound, NotImplemented {
407
	    String serviceFailure = "4962";
408
        String notFound = "4961";
409
        impl.checkV1SystemMetaPidExist(pid, serviceFailure, "The object specified by "+pid.getValue()+" couldn't be identified if it exists",  notFound, 
410
                "The object specified by "+pid.getValue()+" does not exist at this node.");
411
		return impl.delete(session, pid);
412
	}
413

    
414
	@Override
415
	public Identifier generateIdentifier(String scheme, String fragment)
416
			throws InvalidToken, ServiceFailure, NotAuthorized, NotImplemented,
417
			InvalidRequest {
418
		return impl.generateIdentifier(null, scheme, fragment);
419
	}
420

    
421
	@Override
422
	@Deprecated
423
	public Identifier generateIdentifier(Session session, String scheme, String fragment)
424
			throws InvalidToken, ServiceFailure, NotAuthorized, NotImplemented,
425
			InvalidRequest {
426
		return impl.generateIdentifier(session, scheme, fragment);
427
	}
428

    
429
	@Override
430
	public ObjectFormat getFormat(ObjectFormatIdentifier fmtid)
431
			throws ServiceFailure, NotFound, NotImplemented, InvalidRequest {
432
		return impl.getFormat(fmtid);
433
	}
434

    
435
	@Override
436
	public Log getLogRecords(Date fromDate, Date toDate, Event event,
437
			String pidFilter, Integer start, Integer count) throws InvalidToken, InvalidRequest,
438
			ServiceFailure, NotAuthorized, NotImplemented,
439
			InsufficientResources {
440
		return this.getLogRecords(null, fromDate, toDate, event, pidFilter, start, count);
441
	}
442

    
443
	@Override
444
	@Deprecated
445
	public Log getLogRecords(Session session, Date fromDate, Date toDate, Event event,
446
			String pidFilter, Integer start, Integer count) throws InvalidToken,
447
			InvalidRequest, ServiceFailure, NotAuthorized, NotImplemented,
448
			InsufficientResources {
449
		org.dataone.service.types.v2.Log log = impl.getLogRecords(session, fromDate, toDate, event.xmlValue(), pidFilter, start, count);
450
		Log retLog = null;
451
		try {
452
			retLog = TypeMarshaller.convertTypeFromType(log, Log.class);
453
		} catch (Exception e) {
454
			// report as service failure
455
			ServiceFailure sf = new ServiceFailure("1490", e.getMessage());
456
			sf.initCause(e);
457
			throw sf;
458
		}
459
		return retLog;
460
	}
461

    
462
	@Override
463
	public boolean hasReservation(Subject subject, Identifier pid)
464
			throws InvalidToken, ServiceFailure, NotFound, NotAuthorized,
465
			NotImplemented, InvalidRequest, IdentifierNotUnique {
466
		return impl.hasReservation(null, subject, pid);
467
	}
468

    
469
	@Override
470
	@Deprecated
471
	public boolean hasReservation(Session session, Subject subject, Identifier pid)
472
			throws InvalidToken, ServiceFailure, NotFound, NotAuthorized,
473
			NotImplemented, InvalidRequest, IdentifierNotUnique {
474
		return impl.hasReservation(session, subject, pid);
475

    
476
	}
477

    
478
	@Override
479
	public ChecksumAlgorithmList listChecksumAlgorithms()
480
			throws ServiceFailure, NotImplemented {
481
		return impl.listChecksumAlgorithms();
482
	}
483

    
484
	@Override
485
	public ObjectFormatList listFormats() throws ServiceFailure, NotImplemented {
486
		org.dataone.service.types.v2.ObjectFormatList formats = impl.listFormats();
487
		ObjectFormatList retFormats = null;
488
		try {
489
			retFormats = TypeMarshaller.convertTypeFromType(formats, ObjectFormatList.class);
490
		} catch (Exception e) {
491
			// report as service failure
492
			ServiceFailure sf = new ServiceFailure("4841", e.getMessage());
493
			sf.initCause(e);
494
			throw sf;
495
		}
496
		return retFormats;
497
	}
498

    
499
	@Override
500
	public NodeList listNodes() throws NotImplemented, ServiceFailure {
501
		org.dataone.service.types.v2.NodeList nodes = impl.listNodes();
502
		NodeList retNodes = null;
503
		try {
504
			retNodes = TypeMarshaller.convertTypeFromType(nodes, NodeList.class);
505
		} catch (Exception e) {
506
			// report as service failure
507
			ServiceFailure sf = new ServiceFailure("4801", e.getMessage());
508
			sf.initCause(e);
509
			throw sf;
510
		}
511
		return retNodes;
512
	}
513

    
514
	@Override
515
	public Date ping() throws NotImplemented, ServiceFailure,
516
			InsufficientResources {
517
		return impl.ping();
518
	}
519

    
520
	@Override
521
	public Identifier registerSystemMetadata(Identifier pid,
522
			SystemMetadata sysmeta) throws NotImplemented, NotAuthorized,
523
			ServiceFailure, InvalidRequest, InvalidSystemMetadata, InvalidToken {
524
		return this.registerSystemMetadata(null, pid, sysmeta);
525
		
526
	}
527

    
528
	@Override
529
	@Deprecated
530
	public Identifier registerSystemMetadata(Session session, Identifier pid,
531
			SystemMetadata sysmeta) throws NotImplemented, NotAuthorized,
532
			ServiceFailure, InvalidRequest, InvalidSystemMetadata, InvalidToken {
533
		//convert sysmeta to newer version
534
		org.dataone.service.types.v2.SystemMetadata v2Sysmeta = null;
535
		try {
536
			v2Sysmeta = TypeMarshaller.convertTypeFromType(sysmeta, org.dataone.service.types.v2.SystemMetadata.class);
537
		} catch (Exception e) {
538
			// report as service failure
539
			ServiceFailure sf = new ServiceFailure("1030", e.getMessage());
540
			sf.initCause(e);
541
			throw sf;
542
		}
543
		
544
		return impl.registerSystemMetadata(session, pid, v2Sysmeta);
545
	}
546

    
547
	@Override
548
	public Identifier reserveIdentifier(Identifier pid) throws InvalidToken,
549
			ServiceFailure, NotAuthorized, IdentifierNotUnique, NotImplemented,
550
			InvalidRequest {
551
		return impl.reserveIdentifier(null, pid);
552
	}
553

    
554
	@Override
555
	@Deprecated
556
	public Identifier reserveIdentifier(Session session, Identifier pid)
557
			throws InvalidToken, ServiceFailure, NotAuthorized,
558
			IdentifierNotUnique, NotImplemented, InvalidRequest {
559
		return impl.reserveIdentifier(session, pid);
560
	}
561

    
562
	@Override
563
	public boolean setObsoletedBy(Identifier pid, Identifier obsoletedByPid, long serialVersion)
564
			throws NotImplemented, NotFound, NotAuthorized, ServiceFailure,
565
			InvalidRequest, InvalidToken, VersionMismatch {
566
		return impl.setObsoletedBy(null, pid, obsoletedByPid, serialVersion);
567
	}
568

    
569
	@Override
570
	@Deprecated
571
	public boolean setObsoletedBy(Session session, Identifier pid, Identifier obsoletedByPid, long serialVersion) 
572
			throws NotImplemented, NotFound,
573
			NotAuthorized, ServiceFailure, InvalidRequest, InvalidToken,
574
			VersionMismatch {
575
		return impl.setObsoletedBy(session, pid, obsoletedByPid, serialVersion);
576

    
577
	}
578

    
579
	@Override
580
	public boolean isAuthorized(Identifier pid, Permission permission)
581
			throws ServiceFailure, InvalidToken, NotFound, NotAuthorized,
582
			NotImplemented, InvalidRequest {
583
		return impl.isAuthorized(null, pid, permission);
584
	}
585

    
586
	@Override
587
	@Deprecated
588
	public boolean isAuthorized(Session session, Identifier pid, Permission permission)
589
			throws ServiceFailure, InvalidToken, NotFound, NotAuthorized,
590
			NotImplemented, InvalidRequest {
591
		return impl.isAuthorized(session, pid, permission);
592
	}
593

    
594
	@Override
595
	public boolean setAccessPolicy(Identifier pid,
596
			AccessPolicy accessPolicy, long serialVersion)
597
			throws InvalidToken, NotFound, NotImplemented, NotAuthorized,
598
			ServiceFailure, InvalidRequest, VersionMismatch {
599
		return impl.setAccessPolicy(null, pid, accessPolicy, serialVersion);
600
	}
601

    
602
	@Override
603
	@Deprecated
604
	public boolean setAccessPolicy(Session session, Identifier pid,
605
			AccessPolicy accessPolicy, long serialVersion) throws InvalidToken, NotFound,
606
			NotImplemented, NotAuthorized, ServiceFailure, InvalidRequest,
607
			VersionMismatch {
608
		return impl.setAccessPolicy(session, pid, accessPolicy, serialVersion);
609
	}
610

    
611
	@Override
612
	public Identifier setRightsHolder(Identifier pid, Subject userId, long serialVersion)
613
			throws InvalidToken, ServiceFailure, NotFound, NotAuthorized,
614
			NotImplemented, InvalidRequest, VersionMismatch {
615
		return impl.setRightsHolder(null, pid, userId, serialVersion);
616
	}
617

    
618
	@Override
619
	@Deprecated
620
	public Identifier setRightsHolder(Session session, Identifier pid,
621
			Subject userId, long serialVersion) throws InvalidToken, ServiceFailure,
622
			NotFound, NotAuthorized, NotImplemented, InvalidRequest,
623
			VersionMismatch {
624
		return impl.setRightsHolder(session, pid, userId, serialVersion);
625

    
626
	}
627

    
628
}
(1-1/2)