The ACL entry represented by this class is based on the ACL model specified in RFC 3530: Network File System (NFS) version 4 Protocol. Each entry has four components as follows:
The type
component determines if the entry
grants or denies access.
The principal
component, sometimes called the
"who" component, is a UserPrincipal
corresponding to the identity
that the entry grants or denies access
The permissions
component is a set of
permissions
The flags
component is a set of flags
to indicate how entries are inherited and propagated
ACL entries are created using an associated Builder
object by
invoking its build
method.
ACL entries are immutable and are safe for use by multiple concurrent threads.
Modifier and Type | Class and Description |
---|---|
public static class | AclEntry.
A builder of |
Modifier and Type | Field and Description |
---|---|
private final Set | |
private volatile int | |
private final Set | |
private final AclEntryType | |
private final UserPrincipal |
Access | Constructor and Description |
---|---|
private | AclEntry(AclEntryType type, UserPrincipal who, Set<AclEntryPermission> perms, Set<AclEntryFlag> flags)
|
Modifier and Type | Method and Description |
---|---|
public boolean | Returns: true if, and only if, the given object is an AclEntry that
is identical to this AclEntrythe object to which this object is to be compared ob)Overrides java. |
public Set | |
public int | |
public static AclEntry. | |
public static AclEntry. | Returns: a new builderan ACL entry entry)Constructs a new builder with the components of an existing ACL entry. |
public Set | |
public UserPrincipal | |
public String | Returns: the string representation of this entryOverrides java. |
public AclEntryType |
flags | back to summary |
---|---|
private final Set<AclEntryFlag> flags |
hash | back to summary |
---|---|
private volatile int hash |
perms | back to summary |
---|---|
private final Set<AclEntryPermission> perms |
type | back to summary |
---|---|
private final AclEntryType type |
who | back to summary |
---|---|
private final UserPrincipal who |
AclEntry | back to summary |
---|---|
private AclEntry(AclEntryType type, UserPrincipal who, Set<AclEntryPermission> perms, Set<AclEntryFlag> flags) |
equals | back to summary |
---|---|
public boolean equals(Object ob) Overrides java. Compares the specified object with this ACL entry for equality. If the given object is not an For two ACL entries to be considered equals requires that they are both the same type, their who components are equal, their permissions components are equal, and their flags components are equal. This method satisfies the general contract of the |
flags | back to summary |
---|---|
public Set Returns a copy of the flags component. The returned set is a modifiable copy of the flags.
|
hashCode | back to summary |
---|---|
public int hashCode() Overrides java. Returns the hash-code value for this ACL entry. This method satisfies the general contract of the
|
newBuilder | back to summary |
---|---|
public static AclEntry. Constructs a new builder. The initial value of the type and who
components is |
newBuilder | back to summary |
---|---|
public static AclEntry. Constructs a new builder with the components of an existing ACL entry. |
permissions | back to summary |
---|---|
public Set Returns a copy of the permissions component. The returned set is a modifiable copy of the permissions.
|
principal | back to summary |
---|---|
public UserPrincipal principal() Returns the principal component.
|
toString | back to summary |
---|---|
public String toString() Overrides java. Returns the string representation of this ACL entry. |
type | back to summary |
---|---|
public AclEntryType type() Returns the ACL entry type.
|
AclEntry
objects.
A Builder
object is obtained by invoking one of the newBuilder
methods defined by the AclEntry
class.
Builder objects are mutable and are not safe for use by multiple concurrent threads without appropriate synchronization.
Modifier and Type | Field and Description |
---|---|
private Set | |
private Set | |
private AclEntryType | |
private UserPrincipal |
Access | Constructor and Description |
---|---|
private | Builder(AclEntryType type, UserPrincipal who, Set<AclEntryPermission> perms, Set<AclEntryFlag> flags)
|
Modifier and Type | Method and Description |
---|---|
public AclEntry | |
private static void | |
public AclEntry. | Returns: this builderthe flags component flags)Sets the flags component of this builder. |
public AclEntry. | Returns: this builderthe flags component flags)Sets the flags component of this builder. |
public AclEntry. | Returns: this builderthe permissions component perms)Sets the permissions component of this builder. |
public AclEntry. | Returns: this builderthe permissions component perms)Sets the permissions component of this builder. |
public AclEntry. | Returns: this builderthe principal component who)Sets the principal component of this builder. |
public AclEntry. | Returns: this builderthe component type type)Sets the type component of this builder. |
flags | back to summary |
---|---|
private Set<AclEntryFlag> flags |
perms | back to summary |
---|---|
private Set<AclEntryPermission> perms |
type | back to summary |
---|---|
private AclEntryType type |
who | back to summary |
---|---|
private UserPrincipal who |
Builder | back to summary |
---|---|
private Builder(AclEntryType type, UserPrincipal who, Set<AclEntryPermission> perms, Set<AclEntryFlag> flags) |
build | back to summary |
---|---|
public AclEntry build() Constructs an
|
checkSet | back to summary |
---|---|
private static void checkSet(Set<?> set, Class<?> type) |
setFlags | back to summary |
---|---|
public AclEntry. Sets the flags component of this builder. On return, the flags component of this builder is a copy of the given set.
|
setFlags | back to summary |
---|---|
public AclEntry. Sets the flags component of this builder. On return, the flags component of this builder is a copy of the flags in the given array.
|
setPermissions | back to summary |
---|---|
public AclEntry. Sets the permissions component of this builder. On return, the permissions component of this builder is a copy of the given set.
|
setPermissions | back to summary |
---|---|
public AclEntry. Sets the permissions component of this builder. On return, the permissions component of this builder is a copy of the permissions in the given array.
|
setPrincipal | back to summary |
---|---|
public AclEntry. Sets the principal component of this builder.
|
setType | back to summary |
---|---|
public AclEntry. Sets the type component of this builder.
|