Revision 5433
Added by berkley over 14 years ago
src/edu/ucsb/nceas/metacat/dataone/CrudService.java | ||
---|---|---|
198 | 198 |
AuthToken token = new AuthToken(sessionid); |
199 | 199 |
EventLog.getInstance().log(metacatUrl, |
200 | 200 |
username, null, "authenticate"); |
201 |
logCrud.info("authenticate"); |
|
202 | 201 |
return token; |
203 | 202 |
} |
204 | 203 |
catch(Exception e) |
... | ... | |
268 | 267 |
InputStream object, SystemMetadata sysmeta) throws InvalidToken, |
269 | 268 |
ServiceFailure, NotAuthorized, IdentifierNotUnique, UnsupportedType, |
270 | 269 |
InsufficientResources, InvalidSystemMetadata, NotImplemented { |
271 |
|
|
270 |
|
|
272 | 271 |
logMetacat.debug("Starting CrudService.create()..."); |
273 | 272 |
|
273 |
IdentifierManager im = IdentifierManager.getInstance(); |
|
274 |
|
|
274 | 275 |
// authenticate & get user info |
275 | 276 |
SessionData sessionData = getSessionData(token); |
276 | 277 |
String username = "public"; |
... | ... | |
297 | 298 |
|
298 | 299 |
logMetacat.debug("Checking if identifier exists..."); |
299 | 300 |
// Check that the identifier does not already exist |
300 |
IdentifierManager im = IdentifierManager.getInstance(); |
|
301 | 301 |
if (im.identifierExists(guid.getValue())) { |
302 | 302 |
throw new IdentifierNotUnique("1120", |
303 | 303 |
"GUID is already in use by an existing object."); |
... | ... | |
334 | 334 |
logMetacat.debug("Returning from CrudService.create()"); |
335 | 335 |
EventLog.getInstance().log(metacatUrl, |
336 | 336 |
username, localId, "create"); |
337 |
try |
|
338 |
{ |
|
339 |
localId = im.getLocalId(guid.getValue()); |
|
340 |
} |
|
341 |
catch(Exception e) |
|
342 |
{ |
|
343 |
System.out.println("Could not get localId for logging purposes: " + e.getMessage()); |
|
344 |
} |
|
337 | 345 |
logCrud.info("create localId:" + localId + " guid:" + guid.getValue()); |
338 | 346 |
return guid; |
339 | 347 |
} |
Also available in: Unified diff
added code to make sure the localId and guid get added to get and create d1 logs