Package alluxio.security.authorization
Class AclEntry
- java.lang.Object
-
- alluxio.security.authorization.AclEntry
-
- All Implemented Interfaces:
java.io.Serializable
public final class AclEntry extends java.lang.Object implements java.io.Serializable
An entry inAccessControlList
.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AclEntry.Builder
Builder forAclEntry
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
static AclEntry
fromCliString(java.lang.String stringEntry)
Creates anAclEntry
from a string.static AclEntry
fromCliStringWithoutPermissions(java.lang.String stringEntry)
Creates anAclEntry
from a string without permissions.AclActions
getActions()
java.lang.String
getSubject()
AclEntryType
getType()
int
hashCode()
boolean
isDefault()
void
setDefault(boolean defaultEntry)
Sets the entry to be default.java.lang.String
toCliString()
static java.lang.String
toDefault(java.lang.String stringEntry)
Convert a normal ACL to a string representing a default ACL.java.lang.String
toString()
-
-
-
Method Detail
-
getType
public AclEntryType getType()
- Returns:
- the type
-
getSubject
public java.lang.String getSubject()
- Returns:
- the subject
-
getActions
public AclActions getActions()
- Returns:
- a copy of actions
-
isDefault
public boolean isDefault()
- Returns:
- whether the action applies to default ACL
-
setDefault
public void setDefault(boolean defaultEntry)
Sets the entry to be default.- Parameters:
defaultEntry
- indicating default or not
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toCliString
public java.lang.String toCliString()
- Returns:
- the string representation for the CLI
-
toDefault
public static java.lang.String toDefault(java.lang.String stringEntry)
Convert a normal ACL to a string representing a default ACL.- Parameters:
stringEntry
- normal ACL, if it is already default ACL, then return the default ACL- Returns:
- a default ACL
-
fromCliString
public static AclEntry fromCliString(java.lang.String stringEntry)
Creates anAclEntry
from a string. The possible string inputs are: Owning User: user::[rwx] Named User: user:[user name]:[rwx] Owning Group: group::[rwx] Named Group: group:[group name]:[rwx] Mask: mask::[rwx] Other: other::[rwx] all the above entries, but with default:added to the beginning of the entry default:user::[rwx] [rwx]: all combinations are possible ('---' to 'rwx')- Parameters:
stringEntry
- the CLI string representation- Returns:
- the
AclEntry
instance created from the CLI string representation
-
fromCliStringWithoutPermissions
public static AclEntry fromCliStringWithoutPermissions(java.lang.String stringEntry)
Creates anAclEntry
from a string without permissions. The possible string inputs are: Named User: user:USER_NAME[:] Named Group: group:GROUP_NAME[:] Mask: mask[:][:] Default versions of Named User: default:user:USER_NAME[:] Default versions of Named Group: default:group:GROUP_NAME[:] Default version of the mask: default: mask[:][:]- Parameters:
stringEntry
- the CLI string representation, without permissions- Returns:
- the
AclEntry
instance created from the CLI string representation
-
-