package com.cloudmine.api.rest;

import com.android.volley.NetworkResponse;
import com.android.volley.Response;
import com.cloudmine.api.CMSessionToken;
import com.cloudmine.api.rest.options.CMServerFunction;
import com.cloudmine.api.rest.response.CMObjectResponse;
import me.cloudmine.annotations.Expand;
import me.cloudmine.annotations.Optional;

/**
 * <br>Copyright CloudMine LLC. All rights reserved
 * <br> See LICENSE file included with SDK for details.
 */
public class BaseAccessListLoadRequest extends CloudMineRequest<CMObjectResponse>{
    public static final int REQUEST_TYPE = 421;

    private static final String BASE_URL = "/user/access";

    @Expand
    public BaseAccessListLoadRequest(CMSessionToken sessionToken, @Optional CMServerFunction serverFunction, @Optional Response.Listener<CMObjectResponse> successListener, @Optional Response.ErrorListener errorListener) {
        super(Method.GET, BASE_URL, (String)null, sessionToken, serverFunction, successListener, errorListener);
    }

    @Override
    protected Response<CMObjectResponse> parseNetworkResponse(NetworkResponse networkResponse) {
        return Response.success(new CMObjectResponse(new String(networkResponse.data), networkResponse.statusCode), getCacheEntry(networkResponse));
    }

    @Override
    public int getRequestType() {
        return REQUEST_TYPE;
    }
}

@@ -346,16 +346,71 @@
 l;%0A%0A/**%0A
+ * Load ACL information for a specific, logged in user%0A
  * %3Cbr%3EC
@@ -705,16 +705,344 @@
 cess%22;%0A%0A
+    /**%0A     * Create a BaseAccessListLoadRequest that will load the access lists of the user whose%0A     * sessionToken is passed in%0A     * @param sessionToken a valid sessionToken for the user whose ACL information is to be fetched%0A     * @param serverFunction%0A     * @param successListener%0A     * @param errorListener%0A     */%0A
     @Exp

Comment ACLLoadRequest