Revision 9093
Added by Jing Tao almost 10 years ago
src/edu/ucsb/nceas/metacat/dataone/v1/CNodeService.java | ||
---|---|---|
685 | 685 |
public Identifier setRightsHolder(Identifier pid, Subject userId, long serialVersion) |
686 | 686 |
throws InvalidToken, ServiceFailure, NotFound, NotAuthorized, |
687 | 687 |
NotImplemented, InvalidRequest, VersionMismatch { |
688 |
String serviceFailure = "4490"; |
|
689 |
String notFound = "4460"; |
|
690 |
impl.checkV1SystemMetaPidExist(pid, serviceFailure, "The object for given PID "+pid.getValue()+" couldn't be identified if it exists", notFound, |
|
691 |
"No object could be found for given PID: "+pid.getValue()); |
|
688 | 692 |
return impl.setRightsHolder(null, pid, userId, serialVersion); |
689 | 693 |
} |
690 | 694 |
|
src/edu/ucsb/nceas/metacat/dataone/CNodeService.java | ||
---|---|---|
764 | 764 |
|
765 | 765 |
} |
766 | 766 |
|
767 |
String serviceFailureCode = "4700"; |
|
767 |
/*String serviceFailureCode = "4700";
|
|
768 | 768 |
Identifier sid = getPIDForSID(pid, serviceFailureCode); |
769 | 769 |
if(sid != null) { |
770 | 770 |
pid = sid; |
771 |
} |
|
771 |
}*/
|
|
772 | 772 |
|
773 | 773 |
// The lock to be used for this identifier |
774 | 774 |
Lock lock = null; |
... | ... | |
1342 | 1342 |
// get the subject |
1343 | 1343 |
Subject subject = session.getSubject(); |
1344 | 1344 |
|
1345 |
String serviceFailureCode = "4490"; |
|
1346 |
Identifier sid = getPIDForSID(pid, serviceFailureCode); |
|
1347 |
if(sid != null) { |
|
1348 |
pid = sid; |
|
1349 |
} |
|
1350 |
|
|
1345 | 1351 |
// are we allowed to do this? |
1346 | 1352 |
if (!isAuthorized(session, pid, Permission.CHANGE_PERMISSION)) { |
1347 | 1353 |
throw new NotAuthorized("4440", "not allowed by " |
Also available in: Unified diff
The setReplicationStatus method only supports sid and the setRightsHolder method supports both PID and SID.