Revision 9061
Added by Jing Tao almost 10 years ago
src/edu/ucsb/nceas/metacat/dataone/v1/CNodeService.java | ||
---|---|---|
446 | 446 |
String pidFilter, Integer start, Integer count) throws InvalidToken, |
447 | 447 |
InvalidRequest, ServiceFailure, NotAuthorized, NotImplemented, |
448 | 448 |
InsufficientResources { |
449 |
Log retLog = new Log(); |
|
450 |
if(pidFilter != null && !pidFilter.equals("")) { |
|
451 |
String serviceFailure = "1490"; |
|
452 |
String notFound = "1020"; |
|
453 |
Identifier pid = new Identifier(); |
|
454 |
pid.setValue(pidFilter); |
|
455 |
try { |
|
456 |
impl.checkV1SystemMetaPidExist(pid, serviceFailure, "The object for given PID "+pid.getValue()+" couldn't be identified if it exists", notFound, |
|
457 |
"The given PID: "+pid.getValue()+" doesn't exist in this node"); |
|
458 |
} catch (NotFound e) { |
|
459 |
//return 0 record since the pid doesn't exist |
|
460 |
logMetacat.info(e.getMessage()); |
|
461 |
return retLog; |
|
462 |
} |
|
463 |
|
|
464 |
} |
|
449 | 465 |
String eventValue = null; |
450 | 466 |
if(event != null) { |
451 | 467 |
eventValue = event.xmlValue(); |
452 | 468 |
} |
453 | 469 |
org.dataone.service.types.v2.Log log = impl.getLogRecords(session, fromDate, toDate, eventValue, pidFilter, start, count); |
454 |
Log retLog = null; |
|
455 | 470 |
try { |
456 | 471 |
retLog = TypeMarshaller.convertTypeFromType(log, Log.class); |
457 | 472 |
} catch (Exception e) { |
Also available in: Unified diff
In the getLogRecords method, the pidFilter is checked if it exists.