Examples of optBoolean()


Examples of net.sf.json.JSONObject.optBoolean()

        goals = Util.fixEmpty(req.getParameter("goals").trim());
        alternateSettings = Util.fixEmpty(req.getParameter("alternateSettings").trim());
        mavenOpts = Util.fixEmpty(req.getParameter("mavenOpts").trim());
        mavenName = req.getParameter("maven_version");
        aggregatorStyleBuild = !req.hasParameter("maven.perModuleBuild");
        if (json.optBoolean("usePrivateRepository"))
            localRepository = req.bindJSON(LocalRepositoryLocator.class,json.getJSONObject("explicitLocalRepository"));
        else
            localRepository = null;
        perModuleEmail = req.hasParameter("maven.perModuleEmail");
        ignoreUpstremChanges = !json.has("triggerByDependency");
View Full Code Here

Examples of net.sf.json.JSONObject.optBoolean()

            // Loop over changes
            List<AbstractFacet> newFacets = new ArrayList<AbstractFacet>();
            for (int i = 0; i < changes.size(); i++) {
                JSONObject change = changes.getJSONObject(i);
                // Skip deleted objects.  Someday, we might consider deleting them here
                if (change.optBoolean("deleted", false)) {
                    continue;
                }
                JSONObject observation = change.getJSONObject("doc");
                if (observation.optString("type").equals("observation")) {
                    MymeeObservationFacet newFacet = createOrUpdateObservation(updateInfo, rootURL, observation);
View Full Code Here

Examples of org.amplafi.json.JSONObject.optBoolean()

            System.out.println("    to: " + j.getString("to"));
            System.out.println("  true: " + j.getString("true"));
            System.out.println("   foo: " + j.getJSONArray("foo"));
            System.out.println("    op: " + j.getString("op"));
            System.out.println("   ten: " + j.getInt("ten"));
            System.out.println("  oops: " + j.optBoolean("oops"));

            j = XML.toJSONObject("<xml one = 1 two=' \"2\" '><five></five>First \u0009&lt;content&gt;<five></five> This is \"content\". <three>  3  </three>JSON does not preserve the sequencing of elements and contents.<three>  III  </three>  <three>  T H R E E</three><four/>Content text is an implied structure in XML. <six content=\"6\"/>JSON does not have implied structure:<seven>7</seven>everything is explicit.<![CDATA[CDATA blocks<are><supported>!]]></xml>");
            System.out.println(j.toString(2));
            System.out.println(XML.toString(j));
            System.out.println("");
View Full Code Here

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

        if (config == null) {
            config = new JSONObject();
        }

        if (config.optBoolean("includeDefault")) {
            config = underlay(config, resource.getResourceResolver().getResource(DEFAULT_CONFIG));
        }

        widget.put("rtePlugins", config);
View Full Code Here

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

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

            map.put(BulkWorkflowEngine.KEY_PURGE_WORKFLOW,
                    params.optBoolean(BulkWorkflowEngine.KEY_PURGE_WORKFLOW,
                            BulkWorkflowEngine.DEFAULT_PURGE_WORKFLOW));

            bulkWorkflowEngine.initialize(request.getResource(), map);
            bulkWorkflowEngine.start(request.getResource());
View Full Code Here

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

                    task.getRcp().setBatchSize((int) data.getLong(PARAM_BATCHSIZE));
                }
                task.setRecursive(data.optBoolean(PARAM_RECURSIVE, false));
                task.getRcp().setUpdate(data.optBoolean(PARAM_UPDATE, false));
                task.getRcp().setOnlyNewer(data.optBoolean(PARAM_ONLY_NEWER, false));
                task.getRcp().setNoOrdering(data.optBoolean(PARAM_NO_ORDERING, false));
                if (data.has(PARAM_THROTTLE)) {
                    task.getRcp().setThrottle(data.getLong(PARAM_THROTTLE));
                }
                if (data.has(PARAM_EXCLUDES)) {
                    JSONArray excludes = data.getJSONArray(PARAM_EXCLUDES);
View Full Code Here

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

                // add additional data
                if (data.has(PARAM_BATCHSIZE)) {
                    task.getRcp().setBatchSize((int) data.getLong(PARAM_BATCHSIZE));
                }
                task.setRecursive(data.optBoolean(PARAM_RECURSIVE, false));
                task.getRcp().setUpdate(data.optBoolean(PARAM_UPDATE, false));
                task.getRcp().setOnlyNewer(data.optBoolean(PARAM_ONLY_NEWER, false));
                task.getRcp().setNoOrdering(data.optBoolean(PARAM_NO_ORDERING, false));
                if (data.has(PARAM_THROTTLE)) {
                    task.getRcp().setThrottle(data.getLong(PARAM_THROTTLE));
View Full Code Here

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

                // add additional data
                if (data.has(PARAM_BATCHSIZE)) {
                    task.getRcp().setBatchSize((int) data.getLong(PARAM_BATCHSIZE));
                }
                task.setRecursive(data.optBoolean(PARAM_RECURSIVE, false));
                task.getRcp().setUpdate(data.optBoolean(PARAM_UPDATE, false));
                task.getRcp().setOnlyNewer(data.optBoolean(PARAM_ONLY_NEWER, false));
                task.getRcp().setNoOrdering(data.optBoolean(PARAM_NO_ORDERING, false));
                if (data.has(PARAM_THROTTLE)) {
                    task.getRcp().setThrottle(data.getLong(PARAM_THROTTLE));
                }
View Full Code Here

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

                if (data.has(PARAM_BATCHSIZE)) {
                    task.getRcp().setBatchSize((int) data.getLong(PARAM_BATCHSIZE));
                }
                task.setRecursive(data.optBoolean(PARAM_RECURSIVE, false));
                task.getRcp().setUpdate(data.optBoolean(PARAM_UPDATE, false));
                task.getRcp().setOnlyNewer(data.optBoolean(PARAM_ONLY_NEWER, false));
                task.getRcp().setNoOrdering(data.optBoolean(PARAM_NO_ORDERING, false));
                if (data.has(PARAM_THROTTLE)) {
                    task.getRcp().setThrottle(data.getLong(PARAM_THROTTLE));
                }
                if (data.has(PARAM_EXCLUDES)) {
View Full Code Here

Examples of org.apache.wink.json4j.JSONObject.optBoolean()

    public void test_optBoolean() {
        Exception ex = null;

        try {
            JSONObject jObject = new JSONObject("{\"bool\":true}");
            assertTrue(jObject.optBoolean("bool"));
            assertTrue(jObject.optBoolean("bool2") == false);
            assertTrue(jObject.optBoolean("bool2", true) == true);

        } catch (Exception ex1) {
            ex = ex1;
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.