Class AclEntry
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
typecomponent determines if the entry grants or denies access.The
principalcomponent, sometimes called the "who" component, is aUserPrincipalcorresponding to the identity that the entry grants or denies accessThe
permissionscomponent is a set ofpermissionsThe
flagscomponent is a set offlagsto indicate how entries are inherited and propagated
ACL entries are created using an associated AclEntry.Builder object by
invoking its build method.
ACL entries are immutable and are safe for use by multiple concurrent threads.
- Since:
- 1.7
- External Specifications
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares the specified object with this ACL entry for equality.flags()Returns a copy of the flags component.inthashCode()Returns the hash-code value for this ACL entry.static AclEntry.BuilderConstructs a new builder.static AclEntry.BuildernewBuilder(AclEntry entry) Constructs a new builder with the components of an existing ACL entry.Returns a copy of the permissions component.Returns the principal component.toString()Returns the string representation of this ACL entry.type()Returns the ACL entry type.Methods declared in class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
Method Details
-
newBuilder
Constructs a new builder. The initial value of the type and who components isnull. The initial value of the permissions and flags components is the empty set.- Returns:
- a new builder
-
newBuilder
Constructs a new builder with the components of an existing ACL entry.- Parameters:
entry- an ACL entry- Returns:
- a new builder
-
type
-
principal
-
permissions
Returns a copy of the permissions component.The returned set is a modifiable copy of the permissions.
- Returns:
- the permissions component
-
flags
Returns a copy of the flags component.The returned set is a modifiable copy of the flags.
- Returns:
- the flags component
-
equals
Compares the specified object with this ACL entry for equality.If the given object is not an
AclEntrythen this method immediately returnsfalse.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
Object.equalsmethod. -
hashCode
public int hashCode()Returns the hash-code value for this ACL entry.This method satisfies the general contract of the
Object.hashCode()method. -
toString
-