Class KiiACL


  • public final class KiiACL
    extends java.lang.Object
    Provides ACL operation on KiiCloud.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<KiiACLEntry> listACLEntries()
      Get the current ACL This API access to server and fetch all list of User/Group and granted actions.
      int listACLEntries​(KiiACLCallBack callback)
      Asynchronous call for listACLEntries()
      Background task will be initiated to execute the task.
      void putACLEntry​(KiiACLEntry entry)
      Add an ACL entry locally if it is not present.
      void removeACLEntry​(KiiACLEntry entry)
      Remove an ACL entry locally if it is present.
      void save()
      Save the ACL entry to the cloud.This API will update all the local entry to the cloud.
      On finish it will flush the all entry cached by put/remove operation.
      int save​(KiiACLCallBack callback)
      Asynchronous call for save().
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • save

        public int save​(@NonNull
                        KiiACLCallBack callback)
        Asynchronous call for save(). A background task will be initiated to execute the task.
        Parameters:
        callback - notifies events.
        Returns:
        unique ID which is used to cancel this task
        See Also:
        Kii.cancelTask(int)
      • putACLEntry

        public void putACLEntry​(@NonNull
                                KiiACLEntry entry)
        Add an ACL entry locally if it is not present. This API access does NOT to server and update the ACL immediately. Call save() to reflect the operation on Cloud. Multiple put operation can be done before call save(). save() will flush the all cached operation put/remove.
        Parameters:
        entry - KiiACLEntry of this operation. KiiACLEntry
      • removeACLEntry

        public void removeACLEntry​(@NonNull
                                   KiiACLEntry entry)
        Remove an ACL entry locally if it is present. This API access does NOT to server and update the ACL immediately. Call save() to reflect the operation on Cloud. Multiple put operation can be done before call save(). save() will flush the all cached operation put/remove.
        Parameters:
        entry - KiiACLEntry of this operation. KiiACLEntry
      • listACLEntries

        @WorkerThread
        @NonNull
        public java.util.Set<KiiACLEntry> listACLEntries()
                                                  throws ACLOperationException
        Get the current ACL This API access to server and fetch all list of User/Group and granted actions.
        NOTE: This api access to server. Should not be executed in UI/Main thread.
        Returns:
        Set of KiiACLEntry. Returns empty set if no ACL entries found for the parent.
        Throws:
        ACLOperationException - Thrown if KiiCloud operation failed. (see ACLOperationException)
      • listACLEntries

        public int listACLEntries​(@NonNull
                                  KiiACLCallBack callback)
        Asynchronous call for listACLEntries()
        Background task will be initiated to execute the task.
        Parameters:
        callBack - notifies event.
        Returns:
        id of this task. Can be used to cancel this operation by Kii.cancelTask(int)