Revision 6255
Added by Chris Jones over 13 years ago
src/edu/ucsb/nceas/metacat/dataone/D1NodeService.java | ||
---|---|---|
846 | 846 |
* @throws ServiceFailure * @returns localId of the data object inserted */ - private String insertDataObject(InputStream object, Identifier pid, + protected String insertDataObject(InputStream object, Identifier pid, Session session) throws ServiceFailure { String username = "public"; |
... | ... | |
936 | 936 |
} |
937 | 937 |
} |
938 |
/** |
|
938 |
|
|
939 |
/* |
|
940 |
* Update a systemMetadata document |
|
941 |
* |
|
942 |
* @param sysMeta - the system metadata object in the system to update |
|
943 |
*/ |
|
944 |
protected void updateSystemMetadata(SystemMetadata sysMeta) |
|
945 |
throws ServiceFailure { |
|
946 |
|
|
947 |
logMetacat.debug("D1NodeService.updateSystemMetadata() called."); |
|
948 |
sysMeta.setDateSysMetadataModified(new Date()); |
|
949 |
try { |
|
950 |
IdentifierManager.getInstance().updateSystemMetadata(sysMeta); |
|
951 |
|
|
952 |
} catch (McdbDocNotFoundException e) { |
|
953 |
|
|
954 |
throw new ServiceFailure("1030", "Error updating system metadata: " + |
|
955 |
e.getClass() + ": " + e.getMessage()); |
|
956 |
|
|
957 |
} |
|
958 |
|
|
959 |
} |
|
960 |
|
|
961 |
/* |
|
939 | 962 |
* Write a stream to a file |
940 | 963 |
* |
941 | 964 |
* @param dir - the directory to write to |
Also available in: Unified diff
Add updateSystemMetadata() to D1NodeService as a helper method to wrap the exception handling from calls to IdentifierManager.