List of usage examples for org.json JSONObject JSONObject
public JSONObject()
From source file:com.liferay.mobile.android.v7.journalfolder.JournalFolderService.java
public JSONObject getFolder(long folderId) throws Exception { JSONObject _command = new JSONObject(); try {//from w ww. jav a 2 s .c om JSONObject _params = new JSONObject(); _params.put("folderId", folderId); _command.put("/journal.journalfolder/get-folder", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getJSONObject(0); }
From source file:com.liferay.mobile.android.v7.journalfolder.JournalFolderService.java
public JSONArray getFolders(long groupId, long parentFolderId, int status) throws Exception { JSONObject _command = new JSONObject(); try {/*from w w w. j ava 2 s .co m*/ JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("parentFolderId", parentFolderId); _params.put("status", status); _command.put("/journal.journalfolder/get-folders", _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.journalfolder.JournalFolderService.java
public JSONArray getFolders(long groupId) throws Exception { JSONObject _command = new JSONObject(); try {/* w w w . ja va2 s .c om*/ JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _command.put("/journal.journalfolder/get-folders", _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.journalfolder.JournalFolderService.java
public JSONArray getFolders(long groupId, long parentFolderId) throws Exception { JSONObject _command = new JSONObject(); try {// w ww . j a va2 s. c o m JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("parentFolderId", parentFolderId); _command.put("/journal.journalfolder/get-folders", _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.journalfolder.JournalFolderService.java
public JSONArray getFolders(long groupId, long parentFolderId, int status, int start, int end) throws Exception { JSONObject _command = new JSONObject(); try {/*from w ww . ja va2 s. c om*/ JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("parentFolderId", parentFolderId); _params.put("status", status); _params.put("start", start); _params.put("end", end); _command.put("/journal.journalfolder/get-folders", _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.journalfolder.JournalFolderService.java
public JSONArray getFolders(long groupId, long parentFolderId, int start, int end) throws Exception { JSONObject _command = new JSONObject(); try {/*from w w w . ja v a 2s. c om*/ JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("parentFolderId", parentFolderId); _params.put("start", start); _params.put("end", end); _command.put("/journal.journalfolder/get-folders", _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.journalfolder.JournalFolderService.java
public JSONObject moveFolder(long folderId, long parentFolderId, JSONObjectWrapper serviceContext) throws Exception { JSONObject _command = new JSONObject(); try {//from w w w .j a v a2 s . c o m JSONObject _params = new JSONObject(); _params.put("folderId", folderId); _params.put("parentFolderId", parentFolderId); mangleWrapper(_params, "serviceContext", "com.liferay.portal.kernel.service.ServiceContext", serviceContext); _command.put("/journal.journalfolder/move-folder", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getJSONObject(0); }
From source file:com.liferay.mobile.android.v7.journalfolder.JournalFolderService.java
public JSONArray getDdmStructures(JSONArray groupIds, long folderId, int restrictionType) throws Exception { JSONObject _command = new JSONObject(); try {/*from www . j av a 2 s . co m*/ JSONObject _params = new JSONObject(); _params.put("groupIds", checkNull(groupIds)); _params.put("folderId", folderId); _params.put("restrictionType", restrictionType); _command.put("/journal.journalfolder/get-ddm-structures", _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.journalfolder.JournalFolderService.java
public void subscribe(long groupId, long folderId) throws Exception { JSONObject _command = new JSONObject(); try {//ww w . ja v a 2 s .co m JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("folderId", folderId); _command.put("/journal.journalfolder/subscribe", _params); } catch (JSONException _je) { throw new Exception(_je); } session.invoke(_command); }
From source file:com.liferay.mobile.android.v7.journalfolder.JournalFolderService.java
public void unsubscribe(long groupId, long folderId) throws Exception { JSONObject _command = new JSONObject(); try {/*from ww w . j a va 2s .com*/ JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("folderId", folderId); _command.put("/journal.journalfolder/unsubscribe", _params); } catch (JSONException _je) { throw new Exception(_je); } session.invoke(_command); }