Revision 6650
Added by ben leinfelder about 13 years ago
src/edu/ucsb/nceas/metacat/restservice/MNResourceHandler.java | ||
---|---|---|
264 | 264 |
} else if (resource.startsWith(RESOURCE_META_CHANGED)) { |
265 | 265 |
// system metadata changed |
266 | 266 |
if (httpVerb == POST) { |
267 |
extra = parseTrailing(resource, RESOURCE_META_CHANGED); |
|
268 |
systemMetadataChanged(extra); |
|
267 |
systemMetadataChanged(); |
|
269 | 268 |
status = true; |
270 | 269 |
} |
271 | 270 |
} else if (resource.startsWith(RESOURCE_REPLICAS)) { |
... | ... | |
317 | 316 |
* @throws ServiceFailure |
318 | 317 |
* @throws NotImplemented |
319 | 318 |
*/ |
320 |
private void systemMetadataChanged(String id)
|
|
319 |
private void systemMetadataChanged() |
|
321 | 320 |
throws NotImplemented, ServiceFailure, NotAuthorized, InvalidRequest, |
322 | 321 |
InvalidToken { |
323 | 322 |
|
... | ... | |
325 | 324 |
String serialVersionStr = null; |
326 | 325 |
Date dateSysMetaLastModified = null; |
327 | 326 |
String dateSysMetaLastModifiedStr = null; |
328 |
Identifier pid = new Identifier(); |
|
329 |
pid.setValue(id); |
|
327 |
Identifier pid = null; |
|
330 | 328 |
|
329 |
// get the pid |
|
330 |
try { |
|
331 |
String id = params.get("pid")[0]; |
|
332 |
pid = new Identifier(); |
|
333 |
pid.setValue(id); |
|
334 |
} catch (NullPointerException e) { |
|
335 |
String msg = "The 'pid' must be provided as a parameter and was not."; |
|
336 |
logMetacat.error(msg); |
|
337 |
throw new InvalidRequest("1334", msg); |
|
338 |
} |
|
339 |
|
|
331 | 340 |
// get the serialVersion |
332 | 341 |
try { |
333 | 342 |
serialVersionStr = params.get("serialVersion")[0]; |
Also available in: Unified diff
get pid from normal params, not the URL -- the client should include them in the params -- and not as a serialized "object" since it is just a string value