Package org.apache.sling.commons.json

Examples of org.apache.sling.commons.json.JSONObject.optInt()


    assertNotNull(aceObject);
   
    String principalString = aceObject.optString("principal");
    assertEquals(testUserId, principalString);

          int order = aceObject.optInt("order");
          assertEquals(0, order);

    JSONArray grantedArray = aceObject.optJSONArray("granted");
    assertNotNull(grantedArray);
    assertEquals(1, grantedArray.length());
View Full Code Here


    assertEquals(1, jsonObject.length());
   
    JSONObject aceObject = jsonObject.optJSONObject(testGroupId);
    assertNotNull(aceObject);

          int order = aceObject.optInt("order");
          assertEquals(0, order);

    String principalString = aceObject.optString("principal");
    assertEquals(testGroupId, principalString);
   
View Full Code Here

    assertNotNull(aceObject);

    String principalString = aceObject.optString("principal");
    assertEquals(testUserId, principalString);
   
          int order = aceObject.optInt("order");
          assertEquals(0, order);

    JSONArray grantedArray = aceObject.optJSONArray("granted");
    assertNotNull(grantedArray);
    assertEquals(3, grantedArray.length());
View Full Code Here

            map.put(BulkWorkflowEngine.KEY_WORKFLOW_MODEL,
                    params.getString(BulkWorkflowEngine.KEY_WORKFLOW_MODEL));

            map.put(BulkWorkflowEngine.KEY_BATCH_SIZE,
                    params.optInt(BulkWorkflowEngine.KEY_BATCH_SIZE, BulkWorkflowEngine.DEFAULT_BATCH_SIZE));

            map.put(BulkWorkflowEngine.KEY_INTERVAL,
                    params.optInt(BulkWorkflowEngine.KEY_INTERVAL, BulkWorkflowEngine.DEFAULT_INTERVAL));

            map.put(BulkWorkflowEngine.KEY_BATCH_TIMEOUT,
View Full Code Here

            map.put(BulkWorkflowEngine.KEY_BATCH_SIZE,
                    params.optInt(BulkWorkflowEngine.KEY_BATCH_SIZE, BulkWorkflowEngine.DEFAULT_BATCH_SIZE));

            map.put(BulkWorkflowEngine.KEY_INTERVAL,
                    params.optInt(BulkWorkflowEngine.KEY_INTERVAL, BulkWorkflowEngine.DEFAULT_INTERVAL));

            map.put(BulkWorkflowEngine.KEY_BATCH_TIMEOUT,
                    params.optInt(BulkWorkflowEngine.KEY_BATCH_TIMEOUT, BulkWorkflowEngine.DEFAULT_BATCH_TIMEOUT));

            map.put(BulkWorkflowEngine.KEY_ESTIMATED_TOTAL,
View Full Code Here

            map.put(BulkWorkflowEngine.KEY_INTERVAL,
                    params.optInt(BulkWorkflowEngine.KEY_INTERVAL, BulkWorkflowEngine.DEFAULT_INTERVAL));

            map.put(BulkWorkflowEngine.KEY_BATCH_TIMEOUT,
                    params.optInt(BulkWorkflowEngine.KEY_BATCH_TIMEOUT, BulkWorkflowEngine.DEFAULT_BATCH_TIMEOUT));

            map.put(BulkWorkflowEngine.KEY_ESTIMATED_TOTAL,
                    params.optLong(BulkWorkflowEngine.KEY_ESTIMATED_TOTAL, BulkWorkflowEngine.DEFAULT_ESTIMATED_TOTAL));

            map.put(BulkWorkflowEngine.KEY_PURGE_WORKFLOW,
View Full Code Here

        JSONObject json = new JSONObject(data);

        rootPath = json.optString("rootPath", "");
        template = json.optString("template", "");
        total = json.optInt("total", 0);
        bucketSize = json.optInt("bucketSize", DEFAULT_BUCKET_SIZE);
        saveThreshold = json.optInt("saveThreshold", DEFAULT_SAVE_THRESHOLD);

        properties = new HashMap<String, Object>();
View Full Code Here

        JSONObject json = new JSONObject(data);

        rootPath = json.optString("rootPath", "");
        template = json.optString("template", "");
        total = json.optInt("total", 0);
        bucketSize = json.optInt("bucketSize", DEFAULT_BUCKET_SIZE);
        saveThreshold = json.optInt("saveThreshold", DEFAULT_SAVE_THRESHOLD);

        properties = new HashMap<String, Object>();

        JSONArray jsonArray = json.getJSONArray("properties");
View Full Code Here

        rootPath = json.optString("rootPath", "");
        template = json.optString("template", "");
        total = json.optInt("total", 0);
        bucketSize = json.optInt("bucketSize", DEFAULT_BUCKET_SIZE);
        saveThreshold = json.optInt("saveThreshold", DEFAULT_SAVE_THRESHOLD);

        properties = new HashMap<String, Object>();

        JSONArray jsonArray = json.getJSONArray("properties");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.