Revision 9050
Added by Jing Tao over 9 years ago
CNodeService.java | ||
---|---|---|
339 | 339 |
@Override |
340 | 340 |
public Identifier archive(Identifier pid) throws InvalidToken, |
341 | 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."); |
|
342 | 346 |
return impl.archive(null, pid); |
343 | 347 |
} |
344 | 348 |
|
... | ... | |
347 | 351 |
public Identifier archive(Session session, Identifier pid) |
348 | 352 |
throws InvalidToken, ServiceFailure, InvalidRequest, NotAuthorized, |
349 | 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."); |
|
350 | 358 |
return impl.archive(session, pid); |
351 | 359 |
} |
352 | 360 |
|
... | ... | |
384 | 392 |
@Override |
385 | 393 |
public Identifier delete(Identifier pid) throws InvalidToken, |
386 | 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."); |
|
387 | 399 |
return impl.delete(null, pid); |
388 | 400 |
} |
389 | 401 |
|
... | ... | |
392 | 404 |
public Identifier delete(Session session, Identifier pid) |
393 | 405 |
throws InvalidToken, ServiceFailure, InvalidRequest, NotAuthorized, |
394 | 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."); |
|
395 | 411 |
return impl.delete(session, pid); |
396 | 412 |
} |
397 | 413 |
|
Also available in: Unified diff
Add the code to handle the sid in the delete and archive method.