public class ACLItem extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ACLItem.Right |
Modifier and Type | Field and Description |
---|---|
static char[] |
ALL_PRIVILEGE_CHARS |
static String |
ALL_PRIVILEGES |
static ACLItem.Right[] |
ALL_RIGHTS |
Constructor and Description |
---|
ACLItem(String user,
ACLItem.Right[] rights,
String grantor) |
ACLItem(String user,
String rightsOrPrivileges,
String grantor) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getGrantor() |
String |
getPrivileges() |
ACLItem.Right[] |
getRights() |
String |
getUser() |
int |
hashCode() |
static boolean |
isPrivilege(char ch)
Test is a character is a privilege code.
|
static ACLItem |
parse(String aclItemStr) |
static char[] |
privilegesOf(ACLItem.Right[] rights)
Produce a string of privileges matching the provided rights.
|
static ACLItem.Right[] |
rightsOf(String rightsOrPrivileges)
Parse a rights string into rights objects.
|
void |
setGrantor(String grantor) |
void |
setPrivileges(String privileges) |
void |
setRights(ACLItem.Right[] rights) |
void |
setRights(String rights) |
void |
setUser(String user) |
String |
toString() |
public static final String ALL_PRIVILEGES
public static final char[] ALL_PRIVILEGE_CHARS
public static final ACLItem.Right[] ALL_RIGHTS
public ACLItem(String user, ACLItem.Right[] rights, String grantor)
public static boolean isPrivilege(char ch)
public static ACLItem.Right[] rightsOf(String rightsOrPrivileges) throws ParseException
rightsOrPrivileges
- String of rights or privileges to parse.ACLItem.Right
s representing the string of rights or privileges.ParseException
- If a privilege is not an alphabetic character.public static char[] privilegesOf(ACLItem.Right[] rights)
rights
- Rights to serializepublic String getUser()
public void setUser(String user)
public String getPrivileges()
public void setPrivileges(String privileges)
public ACLItem.Right[] getRights()
public void setRights(ACLItem.Right[] rights)
public void setRights(String rights) throws ParseException
ParseException
public String getGrantor()
public void setGrantor(String grantor)
public static ACLItem parse(String aclItemStr) throws ParseException
ParseException