Class ACLImpl

    • Constructor Detail

      • ACLImpl

        public ACLImpl​(String name,
                       boolean isReadOnly)
      • ACLImpl

        public ACLImpl()
      • ACLImpl

        public ACLImpl​(String name)
    • Method Detail

      • getName

        public String getName()
        Description copied from interface: ACL
        Gets the ACL name.
        Specified by:
        getName in interface ACL
        Returns:
        the ACL name
      • getACEs

        public ACE[] getACEs()
        Description copied from interface: ACL
        Returns the ACEs defined by this list as an array.
        Specified by:
        getACEs in interface ACL
      • setACEs

        public void setACEs​(ACE[] aces)
        Description copied from interface: ACL
        Sets the ACEs defined by this ACL.
        Specified by:
        setACEs in interface ACL
        Parameters:
        aces - the ACE array
      • isReadOnly

        public boolean isReadOnly()
      • blockInheritance

        public boolean blockInheritance​(String username)
        Description copied from interface: ACL
        Block the inheritance.
        Specified by:
        blockInheritance in interface ACL
        Parameters:
        username - the user blocking the inheritance
        Returns:
        true if the ACL was changed.
      • unblockInheritance

        public boolean unblockInheritance()
        Description copied from interface: ACL
        Unblock the inheritance.
        Specified by:
        unblockInheritance in interface ACL
        Returns:
        true if the ACL was changed.
      • add

        public boolean add​(ACE ace)
        Description copied from interface: ACL
        Add an ACE.
        Specified by:
        add in interface ACL
        Specified by:
        add in interface Collection<ACE>
        Specified by:
        add in interface List<ACE>
        Overrides:
        add in class ArrayList<ACE>
        Returns:
        true if the ACL was changed.
      • getAdminEverythingACES

        protected List<ACE> getAdminEverythingACES()
      • replace

        public boolean replace​(ACE oldACE,
                               ACE newACE)
        Description copied from interface: ACL
        Replace the oldACE with newACE, only if the oldACE exists.

        The newACE keeps the same index as oldACE.

        Specified by:
        replace in interface ACL
        Returns:
        true if the ACL was changed.
      • removeByUsername

        public boolean removeByUsername​(String username)
        Description copied from interface: ACL
        Remove all ACEs for username.
        Specified by:
        removeByUsername in interface ACL
        Returns:
        true if the ACL was changed.
      • replacePermission

        public void replacePermission​(String oldPerm,
                                      String newPerm)
        Description copied from interface: ACL
        Replaces a permission with another in this ACL.
        Specified by:
        replacePermission in interface ACL
        Parameters:
        oldPerm - the old permission
        newPerm - the new permission
      • clone

        public Object clone()
        Description copied from interface: ACL
        Returns a recursive copy of the ACL sharing no mutable substructure with the original.
        Specified by:
        clone in interface ACL
        Overrides:
        clone in class ArrayList<ACE>
        Returns:
        a copy