Class ACLItem


  • public class ACLItem
    extends Object
    • Field Detail

      • ALL_PRIVILEGE_CHARS

        public static final char[] ALL_PRIVILEGE_CHARS
    • Method Detail

      • isPrivilege

        public static boolean isPrivilege​(char ch)
        Test is a character is a privilege code.
      • rightsOf

        public static ACLItem.Right[] rightsOf​(String rightsOrPrivileges)
                                        throws ParseException
        Parse a rights string into rights objects. Because privilege strings are also valid rights string the parsing supports both formats.
        Parameters:
        rightsOrPrivileges - String of rights or privileges to parse.
        Returns:
        Array of ACLItem.Rights representing the string of rights or privileges.
        Throws:
        ParseException - If a privilege is not an alphabetic character.
      • privilegesOf

        public static char[] privilegesOf​(ACLItem.Right[] rights)
        Produce a string of privileges matching the provided rights. Grant options from the each right are ignored.
        Parameters:
        rights - Rights to serialize
        Returns:
        Privilege string matching the provided rights
      • getUser

        public String getUser()
      • setUser

        public void setUser​(String user)
      • getPrivileges

        public String getPrivileges()
      • setPrivileges

        public void setPrivileges​(String privileges)
      • getGrantor

        public String getGrantor()
      • setGrantor

        public void setGrantor​(String grantor)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object