List of usage examples for org.json JSONArray getJSONArray
public JSONArray getJSONArray(int index) throws JSONException
From source file:com.liferay.mobile.android.v62.dlapp.DLAppService.java
public JSONArray getFileEntries(long repositoryId, long folderId) throws Exception { JSONObject _command = new JSONObject(); try {/*from w w w . j a va 2 s . co m*/ JSONObject _params = new JSONObject(); _params.put("repositoryId", repositoryId); _params.put("folderId", folderId); _command.put("/dlapp/get-file-entries", _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.v62.dlapp.DLAppService.java
public JSONArray getFileEntries(long repositoryId, long folderId, long fileEntryTypeId) throws Exception { JSONObject _command = new JSONObject(); try {//from w w w. ja v a 2s .c o m JSONObject _params = new JSONObject(); _params.put("repositoryId", repositoryId); _params.put("folderId", folderId); _params.put("fileEntryTypeId", fileEntryTypeId); _command.put("/dlapp/get-file-entries", _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.v62.dlapp.DLAppService.java
public JSONArray getFileEntries(long repositoryId, long folderId, JSONArray mimeTypes) throws Exception { JSONObject _command = new JSONObject(); try {//from ww w . j a v a 2 s . c om JSONObject _params = new JSONObject(); _params.put("repositoryId", repositoryId); _params.put("folderId", folderId); _params.put("mimeTypes", checkNull(mimeTypes)); _command.put("/dlapp/get-file-entries", _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.v62.dlapp.DLAppService.java
public JSONArray getFileEntries(long repositoryId, long folderId, int start, int end) throws Exception { JSONObject _command = new JSONObject(); try {//from www . j a va 2 s .c om JSONObject _params = new JSONObject(); _params.put("repositoryId", repositoryId); _params.put("folderId", folderId); _params.put("start", start); _params.put("end", end); _command.put("/dlapp/get-file-entries", _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.v62.dlapp.DLAppService.java
public JSONArray getFileEntries(long repositoryId, long folderId, long fileEntryTypeId, int start, int end) throws Exception { JSONObject _command = new JSONObject(); try {//w w w . j av a2 s . c o m JSONObject _params = new JSONObject(); _params.put("repositoryId", repositoryId); _params.put("folderId", folderId); _params.put("fileEntryTypeId", fileEntryTypeId); _params.put("start", start); _params.put("end", end); _command.put("/dlapp/get-file-entries", _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.v62.dlapp.DLAppService.java
public JSONArray getFileEntries(long repositoryId, long folderId, int start, int end, JSONObjectWrapper obc) throws Exception { JSONObject _command = new JSONObject(); try {/*from w w w. j a v a2 s.com*/ JSONObject _params = new JSONObject(); _params.put("repositoryId", repositoryId); _params.put("folderId", folderId); _params.put("start", start); _params.put("end", end); mangleWrapper(_params, "obc", "com.liferay.portal.kernel.util.OrderByComparator", obc); _command.put("/dlapp/get-file-entries", _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.v62.dlapp.DLAppService.java
public JSONArray getFileEntries(long repositoryId, long folderId, long fileEntryTypeId, int start, int end, JSONObjectWrapper obc) throws Exception { JSONObject _command = new JSONObject(); try {/*w ww. j av a 2 s . c om*/ JSONObject _params = new JSONObject(); _params.put("repositoryId", repositoryId); _params.put("folderId", folderId); _params.put("fileEntryTypeId", fileEntryTypeId); _params.put("start", start); _params.put("end", end); mangleWrapper(_params, "obc", "com.liferay.portal.kernel.util.OrderByComparator", obc); _command.put("/dlapp/get-file-entries", _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.v62.dlapp.DLAppService.java
public JSONArray getFileEntriesAndFileShortcuts(long repositoryId, long folderId, int status, int start, int end) 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("repositoryId", repositoryId); _params.put("folderId", folderId); _params.put("status", status); _params.put("start", start); _params.put("end", end); _command.put("/dlapp/get-file-entries-and-file-shortcuts", _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.v62.dlapp.DLAppService.java
public JSONArray getFolders(long repositoryId, long parentFolderId) throws Exception { JSONObject _command = new JSONObject(); try {// w w w . j a va2 s.c om JSONObject _params = new JSONObject(); _params.put("repositoryId", repositoryId); _params.put("parentFolderId", parentFolderId); _command.put("/dlapp/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.v62.dlapp.DLAppService.java
public JSONArray getFolders(long repositoryId, long parentFolderId, boolean includeMountFolders) throws Exception { JSONObject _command = new JSONObject(); try {/* w w w .j a v a 2 s. com*/ JSONObject _params = new JSONObject(); _params.put("repositoryId", repositoryId); _params.put("parentFolderId", parentFolderId); _params.put("includeMountFolders", includeMountFolders); _command.put("/dlapp/get-folders", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getJSONArray(0); }