Project

General

Profile

Bug #2526

Parameters retrieved incorrectly in CNResourceHandler

Added by Robert Waltz over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Metacat
Start date:
2012-03-26
Due date:
% Done:

100%

Milestone:
CCI-1.0.0
Product Version:
*
Story Points:
Sprint:

Description

in edu.ucsb.nceas.metacat.restservice.CNResourceHandler there are two ways in which serialVersion is accessed from HTTP PUT operations. In setReplicationPolicy and updateReplicationMetadata the serialVersion is accessed by the call:

serialVersionStr = multipartparams.get("serialVersion").get(0);

This manner appears to work with the way that libClient is encoding the request body.

In the following methods- owner, setAccess, setObsoletedBy, deleteReplica- the serialVersion is accessed by the call:

serialVersionStr = params.get("serialVersion")[0];

This manner does not work with the way the libClient is encoding the request body.

I also noted that other multipart params are accessed incorrectly.


Related issues

Related to Infrastructure - Task #2528: Attempt to set access rights fails Closed 2012-03-26
Related to Infrastructure - Story #2527: Verify AccessRights and ReplicationPolicy REST calls from Python CLI Closed 2012-03-26

History

#1 Updated by Andrew Pippin over 12 years ago

https://cn-dev-3.dataone.org/cn/v1/accessRules (CNAuthorization.setAccessPolicy()) is using the queryString to get the serialVersion instead of pulling it out of the MMP (See: #2528)

#2 Updated by Chris Jones over 12 years ago

  • Status changed from New to Closed

I've modified CNResourceHandler's deleteReplica(), owner(), reserve(), and setObsoletedBy() methods to use params from the MMP entities. This should resolve outstanding param issues.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 14.8 MB)