Example usage for org.json JSONArray getJSONArray

List of usage examples for org.json JSONArray getJSONArray

Introduction

In this page you can find the example usage for org.json JSONArray getJSONArray.

Prototype

public JSONArray getJSONArray(int index) throws JSONException 

Source Link

Document

Get the JSONArray associated with an index.

Usage

From source file:com.liferay.mobile.android.v62.dlapp.DLAppService.java

public JSONArray getFolders(long repositoryId, long parentFolderId, int start, int end) throws Exception {
    JSONObject _command = new JSONObject();

    try {/*from www  .ja v  a 2 s . c  om*/
        JSONObject _params = new JSONObject();

        _params.put("repositoryId", repositoryId);
        _params.put("parentFolderId", parentFolderId);
        _params.put("start", start);
        _params.put("end", end);

        _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, int start,
        int end) throws Exception {
    JSONObject _command = new JSONObject();

    try {//from   w ww .  java  2s  . c  o m
        JSONObject _params = new JSONObject();

        _params.put("repositoryId", repositoryId);
        _params.put("parentFolderId", parentFolderId);
        _params.put("includeMountFolders", includeMountFolders);
        _params.put("start", start);
        _params.put("end", end);

        _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, int start, int end, JSONObjectWrapper obc)
        throws Exception {
    JSONObject _command = new JSONObject();

    try {/* w w  w.j a v  a 2 s  .c  o m*/
        JSONObject _params = new JSONObject();

        _params.put("repositoryId", repositoryId);
        _params.put("parentFolderId", parentFolderId);
        _params.put("start", start);
        _params.put("end", end);
        mangleWrapper(_params, "obc", "com.liferay.portal.kernel.util.OrderByComparator", obc);

        _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, int start,
        int end, JSONObjectWrapper obc) throws Exception {
    JSONObject _command = new JSONObject();

    try {/*from ww w  . j  a v  a 2 s.  c o m*/
        JSONObject _params = new JSONObject();

        _params.put("repositoryId", repositoryId);
        _params.put("parentFolderId", parentFolderId);
        _params.put("includeMountFolders", includeMountFolders);
        _params.put("start", start);
        _params.put("end", end);
        mangleWrapper(_params, "obc", "com.liferay.portal.kernel.util.OrderByComparator", obc);

        _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, int status, boolean includeMountFolders,
        int start, int end, JSONObjectWrapper obc) throws Exception {
    JSONObject _command = new JSONObject();

    try {/*from   w  w  w.j  av a  2  s  .c o m*/
        JSONObject _params = new JSONObject();

        _params.put("repositoryId", repositoryId);
        _params.put("parentFolderId", parentFolderId);
        _params.put("status", status);
        _params.put("includeMountFolders", includeMountFolders);
        _params.put("start", start);
        _params.put("end", end);
        mangleWrapper(_params, "obc", "com.liferay.portal.kernel.util.OrderByComparator", obc);

        _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 getFoldersAndFileEntriesAndFileShortcuts(long repositoryId, long folderId, int status,
        boolean includeMountFolders, int start, int end) throws Exception {
    JSONObject _command = new JSONObject();

    try {/*  w  w w.  j  ava 2  s . c  om*/
        JSONObject _params = new JSONObject();

        _params.put("repositoryId", repositoryId);
        _params.put("folderId", folderId);
        _params.put("status", status);
        _params.put("includeMountFolders", includeMountFolders);
        _params.put("start", start);
        _params.put("end", end);

        _command.put("/dlapp/get-folders-and-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 getFoldersAndFileEntriesAndFileShortcuts(long repositoryId, long folderId, int status,
        boolean includeMountFolders, int start, int end, JSONObjectWrapper obc) throws Exception {
    JSONObject _command = new JSONObject();

    try {//from  ww w. j av a 2 s  .c om
        JSONObject _params = new JSONObject();

        _params.put("repositoryId", repositoryId);
        _params.put("folderId", folderId);
        _params.put("status", status);
        _params.put("includeMountFolders", includeMountFolders);
        _params.put("start", start);
        _params.put("end", end);
        mangleWrapper(_params, "obc", "com.liferay.portal.kernel.util.OrderByComparator", obc);

        _command.put("/dlapp/get-folders-and-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 getFoldersAndFileEntriesAndFileShortcuts(long repositoryId, long folderId, int status,
        JSONArray mimeTypes, boolean includeMountFolders, int start, int end, JSONObjectWrapper obc)
        throws Exception {
    JSONObject _command = new JSONObject();

    try {/*from   ww w.  j  ava2  s .  c  om*/
        JSONObject _params = new JSONObject();

        _params.put("repositoryId", repositoryId);
        _params.put("folderId", folderId);
        _params.put("status", status);
        _params.put("mimeTypes", checkNull(mimeTypes));
        _params.put("includeMountFolders", includeMountFolders);
        _params.put("start", start);
        _params.put("end", end);
        mangleWrapper(_params, "obc", "com.liferay.portal.kernel.util.OrderByComparator", obc);

        _command.put("/dlapp/get-folders-and-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 getGroupFileEntries(long groupId, long userId, int start, int end) throws Exception {
    JSONObject _command = new JSONObject();

    try {//from  w  w  w .  j  a  va2s  . c om
        JSONObject _params = new JSONObject();

        _params.put("groupId", groupId);
        _params.put("userId", userId);
        _params.put("start", start);
        _params.put("end", end);

        _command.put("/dlapp/get-group-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 getGroupFileEntries(long groupId, long userId, long rootFolderId, int start, int end)
        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("userId", userId);
        _params.put("rootFolderId", rootFolderId);
        _params.put("start", start);
        _params.put("end", end);

        _command.put("/dlapp/get-group-file-entries", _params);
    } catch (JSONException _je) {
        throw new Exception(_je);
    }

    JSONArray _result = session.invoke(_command);

    if (_result == null) {
        return null;
    }

    return _result.getJSONArray(0);
}