Project

General

Profile

« Previous | Next » 

Revision 9249

Added by Jing Tao about 9 years ago

Use the NodeReference object to replace the replicaStatus to restrict the listObjects method.

View differences:

CNResourceHandler.java
1279 1279
        Date endTime = null;
1280 1280
        ObjectFormatIdentifier formatId = null;
1281 1281
        Identifier identifier = null;
1282
        boolean replicaStatus = true;
1282
        //boolean replicaStatus = true;
1283
        NodeReference nodeId = null;
1283 1284
        int start = 0;
1284 1285
        int count = 1000;
1285 1286
        Enumeration<String> paramlist = request.getParameterNames();
......
1315 1316
            } else if (name.equals("identifier") && value != null) {
1316 1317
            	identifier = new Identifier();
1317 1318
            	identifier.setValue(value);
1318
            } else if (name.equals("replicaStatus") && value != null) {
1319
                replicaStatus = Boolean.parseBoolean(value);
1319
            /*} else if (name.equals("replicaStatus") && value != null) {
1320
                replicaStatus = Boolean.parseBoolean(value);*/
1321
            } else if (name.equals("nodeId") && value != null) {
1322
                nodeId = new NodeReference();
1323
                nodeId.setValue(value);
1324
                logMetacat.debug("the nodeId value is "+nodeId.getValue());
1320 1325
            } else if (name.equals("start") && value != null) {
1321 1326
                start = Integer.valueOf(value);
1322 1327
            } else if (name.equals("count") && value != null) {
......
1326 1331
        // make the call
1327 1332
        logMetacat.debug("session: " + session + " fromDate: " + startTime
1328 1333
                + " toDate: " + endTime + " formatId: " + formatId
1329
                + " replicaStatus: " + replicaStatus + " start: " + start
1334
                + " start: " + start
1330 1335
                + " count: " + count);        
1331 1336

  
1332 1337
        // get the list
1333 1338
        ObjectList ol = CNodeService.getInstance(request).listObjects(session,
1334
                startTime, endTime, formatId, identifier, replicaStatus, start, count);
1339
                startTime, endTime, formatId, identifier, nodeId, start, count);
1335 1340

  
1336 1341
        // send it
1337 1342
        OutputStream out = response.getOutputStream();

Also available in: Unified diff