List of usage examples for org.json JSONArray getJSONArray
public JSONArray getJSONArray(int index) throws JSONException
From source file:com.liferay.mobile.android.v7.journalarticle.JournalArticleService.java
public JSONArray search(long companyId, long groupId, JSONArray folderIds, long classNameId, String articleId, double version, String title, String description, String content, JSONArray ddmStructureKeys, JSONArray ddmTemplateKeys, long displayDateGT, long displayDateLT, int status, long reviewDate, boolean andOperator, int start, int end, JSONObjectWrapper obc) throws Exception { JSONObject _command = new JSONObject(); try {/*from w ww. j a va 2 s. co m*/ JSONObject _params = new JSONObject(); _params.put("companyId", companyId); _params.put("groupId", groupId); _params.put("folderIds", checkNull(folderIds)); _params.put("classNameId", classNameId); _params.put("articleId", checkNull(articleId)); _params.put("version", version); _params.put("title", checkNull(title)); _params.put("description", checkNull(description)); _params.put("content", checkNull(content)); _params.put("ddmStructureKeys", checkNull(ddmStructureKeys)); _params.put("ddmTemplateKeys", checkNull(ddmTemplateKeys)); _params.put("displayDateGT", displayDateGT); _params.put("displayDateLT", displayDateLT); _params.put("status", status); _params.put("reviewDate", reviewDate); _params.put("andOperator", andOperator); _params.put("start", start); _params.put("end", end); mangleWrapper(_params, "obc", "com.liferay.portal.kernel.util.OrderByComparator<com.liferay.journal.model.JournalArticle>", obc); _command.put("/journal.journalarticle/search", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getJSONArray(0); }
From source file:com.liferay.mobile.android.v7.journalarticle.JournalArticleService.java
public JSONArray search(long companyId, long groupId, JSONArray folderIds, long classNameId, String articleId, double version, String title, String description, String content, String ddmStructureKey, String ddmTemplateKey, long displayDateGT, long displayDateLT, int status, long reviewDate, boolean andOperator, int start, int end, JSONObjectWrapper obc) throws Exception { JSONObject _command = new JSONObject(); try {//from w w w .j a v a 2s. c o m JSONObject _params = new JSONObject(); _params.put("companyId", companyId); _params.put("groupId", groupId); _params.put("folderIds", checkNull(folderIds)); _params.put("classNameId", classNameId); _params.put("articleId", checkNull(articleId)); _params.put("version", version); _params.put("title", checkNull(title)); _params.put("description", checkNull(description)); _params.put("content", checkNull(content)); _params.put("ddmStructureKey", checkNull(ddmStructureKey)); _params.put("ddmTemplateKey", checkNull(ddmTemplateKey)); _params.put("displayDateGT", displayDateGT); _params.put("displayDateLT", displayDateLT); _params.put("status", status); _params.put("reviewDate", reviewDate); _params.put("andOperator", andOperator); _params.put("start", start); _params.put("end", end); mangleWrapper(_params, "obc", "com.liferay.portal.kernel.util.OrderByComparator<com.liferay.journal.model.JournalArticle>", obc); _command.put("/journal.journalarticle/search", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getJSONArray(0); }
From source file:com.liferay.mobile.android.v7.journalarticle.JournalArticleService.java
public JSONArray search(long companyId, long groupId, JSONArray folderIds, long classNameId, String keywords, double version, String ddmStructureKey, String ddmTemplateKey, long displayDateGT, long displayDateLT, int status, long reviewDate, int start, int end, JSONObjectWrapper obc) throws Exception { JSONObject _command = new JSONObject(); try {/*from www . j a v a 2s . co m*/ JSONObject _params = new JSONObject(); _params.put("companyId", companyId); _params.put("groupId", groupId); _params.put("folderIds", checkNull(folderIds)); _params.put("classNameId", classNameId); _params.put("keywords", checkNull(keywords)); _params.put("version", version); _params.put("ddmStructureKey", checkNull(ddmStructureKey)); _params.put("ddmTemplateKey", checkNull(ddmTemplateKey)); _params.put("displayDateGT", displayDateGT); _params.put("displayDateLT", displayDateLT); _params.put("status", status); _params.put("reviewDate", reviewDate); _params.put("start", start); _params.put("end", end); mangleWrapper(_params, "obc", "com.liferay.portal.kernel.util.OrderByComparator<com.liferay.journal.model.JournalArticle>", obc); _command.put("/journal.journalarticle/search", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getJSONArray(0); }
From source file:com.liferay.mobile.android.v7.journalarticle.JournalArticleService.java
public JSONArray getArticles(long groupId, long folderId, int start, int end, JSONObjectWrapper obc) throws Exception { JSONObject _command = new JSONObject(); try {// ww w. j ava 2s . c o m JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("folderId", folderId); _params.put("start", start); _params.put("end", end); mangleWrapper(_params, "obc", "com.liferay.portal.kernel.util.OrderByComparator<com.liferay.journal.model.JournalArticle>", obc); _command.put("/journal.journalarticle/get-articles", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getJSONArray(0); }
From source file:com.liferay.mobile.android.v7.journalarticle.JournalArticleService.java
public JSONArray getArticles(long groupId, long folderId) throws Exception { JSONObject _command = new JSONObject(); try {/*from w w w . jav a 2 s.co m*/ JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("folderId", folderId); _command.put("/journal.journalarticle/get-articles", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getJSONArray(0); }
From source file:com.liferay.mobile.android.v7.journalarticle.JournalArticleService.java
public JSONArray getArticlesByStructureId(long groupId, long classNameId, String ddmStructureKey, int status, int start, int end, JSONObjectWrapper obc) throws Exception { JSONObject _command = new JSONObject(); try {//from www . j av a 2 s. c o m JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("classNameId", classNameId); _params.put("ddmStructureKey", checkNull(ddmStructureKey)); _params.put("status", status); _params.put("start", start); _params.put("end", end); mangleWrapper(_params, "obc", "com.liferay.portal.kernel.util.OrderByComparator<com.liferay.journal.model.JournalArticle>", obc); _command.put("/journal.journalarticle/get-articles-by-structure-id", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getJSONArray(0); }
From source file:com.liferay.mobile.android.v7.journalarticle.JournalArticleService.java
public JSONArray getArticlesByStructureId(long groupId, String ddmStructureKey, int status, int start, int end, JSONObjectWrapper obc) throws Exception { JSONObject _command = new JSONObject(); try {//from ww w . j a v a 2s. c o m JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("ddmStructureKey", checkNull(ddmStructureKey)); _params.put("status", status); _params.put("start", start); _params.put("end", end); mangleWrapper(_params, "obc", "com.liferay.portal.kernel.util.OrderByComparator<com.liferay.journal.model.JournalArticle>", obc); _command.put("/journal.journalarticle/get-articles-by-structure-id", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getJSONArray(0); }
From source file:com.liferay.mobile.android.v7.journalarticle.JournalArticleService.java
public JSONArray getArticlesByStructureId(long groupId, String ddmStructureKey, int start, int end, JSONObjectWrapper obc) throws Exception { JSONObject _command = new JSONObject(); try {//ww w.j a v a 2s. c o m JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("ddmStructureKey", checkNull(ddmStructureKey)); _params.put("start", start); _params.put("end", end); mangleWrapper(_params, "obc", "com.liferay.portal.kernel.util.OrderByComparator<com.liferay.journal.model.JournalArticle>", obc); _command.put("/journal.journalarticle/get-articles-by-structure-id", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getJSONArray(0); }
From source file:com.liferay.mobile.android.v7.journalarticle.JournalArticleService.java
public JSONArray getGroupArticles(long groupId, long userId, long rootFolderId, int status, int start, int end, JSONObjectWrapper orderByComparator) throws Exception { JSONObject _command = new JSONObject(); try {/* w w w . ja va2 s . co m*/ JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("userId", userId); _params.put("rootFolderId", rootFolderId); _params.put("status", status); _params.put("start", start); _params.put("end", end); mangleWrapper(_params, "orderByComparator", "com.liferay.portal.kernel.util.OrderByComparator<com.liferay.journal.model.JournalArticle>", orderByComparator); _command.put("/journal.journalarticle/get-group-articles", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getJSONArray(0); }
From source file:com.liferay.mobile.android.v7.journalarticle.JournalArticleService.java
public JSONArray getGroupArticles(long groupId, long userId, long rootFolderId, int start, int end, JSONObjectWrapper orderByComparator) throws Exception { JSONObject _command = new JSONObject(); try {// ww w . j a v a2 s .co m JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("userId", userId); _params.put("rootFolderId", rootFolderId); _params.put("start", start); _params.put("end", end); mangleWrapper(_params, "orderByComparator", "com.liferay.portal.kernel.util.OrderByComparator<com.liferay.journal.model.JournalArticle>", orderByComparator); _command.put("/journal.journalarticle/get-group-articles", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getJSONArray(0); }