Examples of optBoolean()


Examples of org.json.JSONObject.optBoolean()

        info.expires = new Date(json.getLong(KEY_EXPIRES));

      if (json.has(KEY_TIMESTAMP))
        info.timestamp = new Date(json.getLong(KEY_TIMESTAMP));

      info.lengthComputable = json.optBoolean(KEY_LENGTH_COMPUTABLE);
      if (json.has(KEY_LOADED))
        info.loaded = json.optInt(KEY_LOADED);
      if (json.has(KEY_TOTAL))
        info.total = json.getInt(KEY_TOTAL);
View Full Code Here

Examples of org.json.JSONObject.optBoolean()

    String pattern = requestInfo.relativePath;
    JSONObject requestObject = requestInfo.getJSONRequest();
    try {
      String commitToMerge = requestObject.optString(GitConstants.KEY_MERGE, null);
      if (commitToMerge != null) {
        boolean squash = requestObject.optBoolean(GitConstants.KEY_SQUASH, false);
        return merge(request, response, db, commitToMerge, squash);
      }

      String commitToRebase = requestObject.optString(GitConstants.KEY_REBASE, null);
      String rebaseOperation = requestObject.optString(GitConstants.KEY_OPERATION, null);
View Full Code Here

Examples of org.json.JSONObject.optBoolean()

      return addRemote(request, response, path);
    }
    JSONObject requestObject = OrionServlet.readJSONRequest(request);
    boolean fetch = Boolean.parseBoolean(requestObject.optString(GitConstants.KEY_FETCH, null));
    String srcRef = requestObject.optString(GitConstants.KEY_PUSH_SRC_REF, null);
    boolean tags = requestObject.optBoolean(GitConstants.KEY_PUSH_TAGS, false);
    boolean force = requestObject.optBoolean(GitConstants.KEY_FORCE, false);

    // prepare creds
    GitCredentialsProvider cp = GitUtils.createGitCredentialsProvider(requestObject);
View Full Code Here

Examples of org.json.JSONObject.optBoolean()

    }
    JSONObject requestObject = OrionServlet.readJSONRequest(request);
    boolean fetch = Boolean.parseBoolean(requestObject.optString(GitConstants.KEY_FETCH, null));
    String srcRef = requestObject.optString(GitConstants.KEY_PUSH_SRC_REF, null);
    boolean tags = requestObject.optBoolean(GitConstants.KEY_PUSH_TAGS, false);
    boolean force = requestObject.optBoolean(GitConstants.KEY_FORCE, false);

    // prepare creds
    GitCredentialsProvider cp = GitUtils.createGitCredentialsProvider(requestObject);

    // if all went well, continue with fetch or push
View Full Code Here

Examples of org.json_voltpatches.JSONObject.optBoolean()

                m_hostname = obj.getString("hostname");
                m_clusterName = obj.getString("clusterName");
                m_databaseName = obj.getString("databaseName");
                m_tableName = obj.getString("tableName");
                m_isReplicated = obj.getBoolean("isReplicated");
                m_isCompressed = obj.optBoolean("isCompressed", false);
                m_checksumType = ChecksumType.valueOf(obj.optString("checksumType", "CRC32"));
                if (!m_isReplicated) {
                    JSONArray partitionIds = obj.getJSONArray("partitionIds");
                    m_partitionIds = new int[partitionIds.length()];
                    for (int ii = 0; ii < m_partitionIds.length; ii++) {
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.