Revision 8971
Added by Jing Tao about 10 years ago
src/edu/ucsb/nceas/metacat/dataone/CNodeService.java | ||
---|---|---|
405 | 405 |
//since this is cn, we don't need worry about the mn solr index. |
406 | 406 |
HazelcastService.getInstance().getSystemMetadataMap().remove(pid); |
407 | 407 |
HazelcastService.getInstance().getIdentifiers().remove(pid); |
408 |
String username = session.getSubject().getValue();//just for logging purpose |
|
409 |
//since data objects were not registered in the identifier table, we use pid as the docid |
|
410 |
EventLog.getInstance().log(request.getRemoteAddr(), request.getHeader("User-Agent"), username, pid.getValue(), Event.DELETE.xmlValue()); |
|
408 | 411 |
|
409 | 412 |
} else { |
410 | 413 |
throw new ServiceFailure("4962", "Couldn't delete the object " + pid.getValue() + |
... | ... | |
941 | 944 |
|
942 | 945 |
if(localId != null && EventLog.getInstance().isDeleted(localId)) { |
943 | 946 |
error = DELETEDMESSAGE; |
947 |
} else if (localId == null && EventLog.getInstance().isDeleted(pid.getValue())) { |
|
948 |
error = DELETEDMESSAGE; |
|
944 | 949 |
} |
945 | 950 |
throw new NotFound("1420", "Couldn't find an object identified by " + pid.getValue()+". "+error); |
946 | 951 |
} |
... | ... | |
1423 | 1428 |
|
1424 | 1429 |
if(localId != null && EventLog.getInstance().isDeleted(localId)) { |
1425 | 1430 |
error = DELETEDMESSAGE; |
1431 |
} else if (localId == null && EventLog.getInstance().isDeleted(pid.getValue())) { |
|
1432 |
error = DELETEDMESSAGE; |
|
1426 | 1433 |
} |
1427 | 1434 |
throw new NotFound("4874", "Couldn't find an object identified by " + pid.getValue()+". "+error); |
1428 | 1435 |
|
src/edu/ucsb/nceas/metacat/dataone/D1NodeService.java | ||
---|---|---|
729 | 729 |
|
730 | 730 |
if(localId != null && EventLog.getInstance().isDeleted(localId)) { |
731 | 731 |
error = DELETEDMESSAGE; |
732 |
} else if (localId == null && EventLog.getInstance().isDeleted(pid.getValue())) { |
|
733 |
error = DELETEDMESSAGE; |
|
732 | 734 |
} |
733 | 735 |
throw new NotFound("1420", "No record found for: " + pid.getValue()+". "+error); |
734 | 736 |
} |
... | ... | |
1017 | 1019 |
|
1018 | 1020 |
if(localId != null && EventLog.getInstance().isDeleted(localId)) { |
1019 | 1021 |
error = error + ". "+DELETEDMESSAGE; |
1022 |
} else if (localId == null && EventLog.getInstance().isDeleted(pid.getValue())) { |
|
1023 |
error = error + ". "+DELETEDMESSAGE; |
|
1020 | 1024 |
} |
1021 | 1025 |
throw new NotFound("1800", error); |
1022 | 1026 |
} |
Also available in: Unified diff
Add delete log for data objects on CNs.