Project

General

Profile

Revision 6603

Added by Chris Jones about 9 years ago

Handle multipart params where the libclient methods are using them.

View differences:

src/edu/ucsb/nceas/metacat/restservice/CNResourceHandler.java
994 994
        
995 995
        // get the serialVersion
996 996
        try {
997
            serialVersionStr = params.get("serialVersion")[0];
997
            serialVersionStr = multipartparams.get("serialVersion").get(0);
998 998
            serialVersion = new Long(serialVersionStr).longValue();
999 999
            
1000 1000
        } catch (NullPointerException e) {
......
1040 1040
        
1041 1041
        // get the serialVersion
1042 1042
        try {
1043
            serialVersionStr = params.get("serialVersion")[0];
1043
            serialVersionStr = multipartparams.get("serialVersion").get(0);
1044 1044
            serialVersion = new Long(serialVersionStr).longValue();
1045 1045
            
1046 1046
        } catch (NullPointerException e) {
......
1052 1052
        
1053 1053
        // get the replication status param
1054 1054
        try {
1055
            replicationStatus = params.get("status")[0];
1055
            replicationStatus = multipartparams.get("replicationStatus").get(0);
1056 1056
            status = ReplicationStatus.convert(replicationStatus);
1057 1057
        } catch (Exception e) {
1058 1058
            // TODO Auto-generated catch block
......
1060 1060
        }
1061 1061
        
1062 1062
        // get the target node reference param
1063
        targetNode = params.get("nodeRef")[0];
1063
        targetNode = multipartparams.get("nodeRef").get(0);
1064 1064
        targetNodeRef = new NodeReference();
1065 1065
        targetNodeRef.setValue(targetNode);
1066 1066
        
......
1097 1097

  
1098 1098
        // get the serialVersion
1099 1099
        try {
1100
            serialVersionStr = params.get("serialVersion")[0];
1100
            serialVersionStr = multipartparams.get("serialVersion").get(0);
1101 1101
            serialVersion = new Long(serialVersionStr).longValue();
1102 1102
            
1103 1103
        } catch (NullPointerException e) {

Also available in: Unified diff