Examples of optInt()


Examples of org.json.JSONObject.optInt()

                return;
            }

            LOGGER.log(Level.TRACE, "Before inc blog view count[statistic={0}]", statistic);

            int blogViewCnt = statistic.optInt(Statistic.STATISTIC_BLOG_VIEW_COUNT);

            ++blogViewCnt;
            statistic.put(Statistic.STATISTIC_BLOG_VIEW_COUNT, blogViewCnt);

            statisticRepository.update(Statistic.STATISTIC, statistic);
View Full Code Here

Examples of org.json.JSONObject.optInt()

        if (null == statistic) {
            throw new RepositoryException("Not found statistic");
        }

        statistic.put(Statistic.STATISTIC_BLOG_ARTICLE_COUNT, statistic.optInt(Statistic.STATISTIC_BLOG_ARTICLE_COUNT) + 1);
        statisticRepository.update(Statistic.STATISTIC, statistic);
    }

    /**
     * Blog statistic published article count +1.
View Full Code Here

Examples of org.json.JSONObject.optInt()

        if (null == statistic) {
            throw new RepositoryException("Not found statistic");
        }

        statistic.put(Statistic.STATISTIC_PUBLISHED_ARTICLE_COUNT, statistic.optInt(Statistic.STATISTIC_PUBLISHED_ARTICLE_COUNT) + 1);
        statisticRepository.update(Statistic.STATISTIC, statistic);
    }

    /**
     * Blog statistic article count -1.
View Full Code Here

Examples of org.json.JSONObject.optInt()

            {
                String methodName = (String) json_req.getString("method");
                JSONArray arguments = json_req.getJSONArray("params");
               
                // If this a CallableReference it will have a non-zero objectID
                int object_id = json_req.optInt("objectID");
                StringBuffer sb = new StringBuffer(".doprocessCall(): call ");
                if (object_id != 0)
                {
                    sb.append("objectID=").append(object_id).append(" ");
                }
View Full Code Here

Examples of org.json.JSONObject.optInt()

      log.severe("no method in request");
      return JSONRPCResult.ERR_NOMETHOD;
  }

  // Is this a CallableReference it will have a non-zero objectID
  int object_id = json_req.optInt("objectID");
  if(json_bridge.isDebug())
      if(object_id != 0)
    log.fine("call " + "objectID=" + object_id + " " +
       methodName + "(" + arguments + ")");
      else
View Full Code Here

Examples of org.json.JSONObject.optInt()

            {
                String methodName = json_req.getString("method");
                JSONArray arguments = json_req.getJSONArray("params");

                // If this a CallableReference it will have a non-zero objectID
                int object_id = json_req.optInt("objectID");
                StringBuffer sb = new StringBuffer(".doprocessCall(): call ");
                if (object_id != 0)
                {
                    sb.append("objectID=").append(object_id).append(" ");
                }
View Full Code Here

Examples of org.json.JSONObject.optInt()

      l.onMessage(message);
    }

    if (message instanceof ApplicationDataMessage) {
      JSONObject content = ((ApplicationDataMessage) message).getMessage();
      if ((content.optInt("id", -1) != -1)) {
        defaultFinder.addResponse(content);
      }
    }
  }
View Full Code Here

Examples of org.json.JSONObject.optInt()

      return value.toString();
    }
    if (value instanceof JSONObject) {
      JSONObject v = (JSONObject) value;
      if (v.has("ELEMENT")) {
        Integer i = v.optInt("ELEMENT");
        return "UIAutomation.cache.get(" + i + ",false)";
      } else {
        return v.toString();
      }
    }
View Full Code Here

Examples of org.json.JSONObject.optInt()

        request.getVariableValue(":reference"),
        payload.optDouble("xstart"),
        payload.optDouble("ystart"),
        payload.optDouble("xend"),
        payload.optDouble("yend"),
        payload.optInt("touchCount"));
    setJS(js);
  }

  @Override
  public JSONObject configurationDescription() throws JSONException {
View Full Code Here

Examples of org.json.JSONObject.optInt()

      return value.toString();
    }
    if (value instanceof JSONObject) {
      JSONObject v = (JSONObject) value;
      if (v.has("ELEMENT")) {
        Integer i = v.optInt("ELEMENT");
        return "UIAutomation.cache.get(" + i + ",false)";
      } else {
        return v.toString();
      }
    }
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.