Class ExtendedACLEntries


  • @NotThreadSafe
    public class ExtendedACLEntries
    extends java.lang.Object
    Stores the extended ACL entries.
    • Field Detail

      • mNamedUserActions

        protected java.util.Map<java.lang.String,​AclActions> mNamedUserActions
      • mNamedGroupActions

        protected java.util.Map<java.lang.String,​AclActions> mNamedGroupActions
    • Constructor Detail

      • ExtendedACLEntries

        public ExtendedACLEntries()
        Creates an empty extended ACL.
      • ExtendedACLEntries

        public ExtendedACLEntries​(ExtendedACLEntries other)
        Creates a copy.
        Parameters:
        other - the object to copy
    • Method Detail

      • getEntries

        public java.util.List<AclEntry> getEntries()
        Returns a list of AclEntry which represent this ACL instance. The mask will only be included if extended ACL entries exist.
        Returns:
        an immutable list of ACL entries
      • getNamedUserActions

        public java.util.Map<java.lang.String,​AclActions> getNamedUserActions()
        Returns:
        named user actions
      • getNamedGroupActions

        public java.util.Map<java.lang.String,​AclActions> getNamedGroupActions()
        Returns:
        named group actions
      • hasExtended

        public boolean hasExtended()
        Returns:
        true if has extended ACL (named users, named groups)
      • removeEntry

        public void removeEntry​(AclEntry entry)
        Removes the specified entry. A base entry is not allowed to be removed.
        Parameters:
        entry - the entry to be removed
      • setEntry

        public void setEntry​(AclEntry entry)
        Sets an entry into the access control list. If an entry with the same type and subject already exists, overwrites the existing entry; Otherwise, adds this new entry.
        Parameters:
        entry - the entry to be added or updated
      • getNamedUser

        public AclActions getNamedUser​(java.lang.String user)
        Parameters:
        user - the user to look up
        Returns:
        the actions for the user, or null if the user is not found
      • getNamedGroup

        public AclActions getNamedGroup​(java.lang.String group)
        Parameters:
        group - the group to look up
        Returns:
        the actions for the group, or null if the group is not found
      • getMask

        public AclActions getMask()
        Returns:
        the mask actions
      • updateMask

        public void updateMask​(AclActions groupActions)
        Update the mask to be the union of owning group entry, named user entry and named group entry.
        Parameters:
        groupActions - the group entry to be integrated into the mask
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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