Class KiiACLEntry


  • public final class KiiACLEntry
    extends java.lang.Object
    Entry of ACL.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object that)
      Conditions of two ACLEntry object regarded as same:
      - Parent object type is same and has same ID.
      - Subject object type is same and has same ID.
      - Has same Action
      - Has same state of granted/ revoked
      KiiACL.Action getAction()
      Returns the action of the ACL entry.
      KiiSubject getSubject()
      Returns the subject of the ACL entry.
      boolean grant()
      Checks whether the entry is for grant/revoke.
      int hashCode()  
      void setAction​(KiiACL.Action action)
      Set action of this ACLEntriy.
      void setGrant​(boolean grant)
      Set operation grant/revoke of this ACLEntriy.
      void setSubject​(KiiSubject subject)
      Set subject of this ACLEntriy.
      • Methods inherited from class java.lang.Object

        clone, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • KiiACLEntry

        public KiiACLEntry​(@NonNull
                           KiiSubject subject,
                           @NonNull
                           KiiACL.Action action,
                           boolean grant)
        Creates an ACL Entry.
        Parameters:
        subject - Subject of this operation. KiiSubject
        action - Action to be grant/revoked.
        grant - true for grant, false for revoke.
    • Method Detail

      • setSubject

        public void setSubject​(@NonNull
                               KiiSubject subject)
        Set subject of this ACLEntriy.
        Parameters:
        subject -
      • setAction

        public void setAction​(@NonNull
                              KiiACL.Action action)
        Set action of this ACLEntriy.
        Parameters:
        action -
      • setGrant

        public void setGrant​(boolean grant)
        Set operation grant/revoke of this ACLEntriy.
        Parameters:
        grant - true for grant, false for revoke.
      • getSubject

        @NonNull
        public KiiSubject getSubject()
        Returns the subject of the ACL entry.
      • getAction

        @NonNull
        public KiiACL.Action getAction()
        Returns the action of the ACL entry.
      • grant

        public boolean grant()
        Checks whether the entry is for grant/revoke.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object that)
        Conditions of two ACLEntry object regarded as same:
        - Parent object type is same and has same ID.
        - Subject object type is same and has same ID.
        - Has same Action
        - Has same state of granted/ revoked
        Overrides:
        equals in class java.lang.Object
        Parameters:
        that - object to be compared.
        Returns:
        whether the object is equals to this ACLEntry or not.