- java.lang.Object
-
- java.nio.file.attribute.AclEntry
-
public final class AclEntry extends Object
An entry in an access control list (ACL).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 aUserPrincipal
corresponding to the identity that the entry grants or denies accessThe
permissions
component is a set ofpermissions
The
flags
component is a set offlags
to indicate how entries are inherited and propagated
ACL entries are created using an associated
AclEntry.Builder
object by invoking itsbuild
method.ACL entries are immutable and are safe for use by multiple concurrent threads.
- Since:
- 1.7
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
AclEntry.Builder
A builder ofAclEntry
objects.
-
Method Summary
Methods Modifier and Type Method and Description boolean
equals(Object ob)
Compares the specified object with this ACL entry for equality.Set<AclEntryFlag>
flags()
Returns a copy of the flags component.int
hashCode()
Returns the hash-code value for this ACL entry.static AclEntry.Builder
newBuilder()
Constructs a new builder.static AclEntry.Builder
newBuilder(AclEntry entry)
Constructs a new builder with the components of an existing ACL entry.Set<AclEntryPermission>
permissions()
Returns a copy of the permissions component.UserPrincipal
principal()
Returns the principal component.String
toString()
Returns the string representation of this ACL entry.AclEntryType
type()
Returns the ACL entry type.
-
-
-
Method Detail
-
newBuilder
public static AclEntry.Builder 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
public static AclEntry.Builder newBuilder(AclEntry entry)
Constructs a new builder with the components of an existing ACL entry.- Parameters:
entry
- an ACL entry- Returns:
- a new builder
-
type
public AclEntryType type()
Returns the ACL entry type.
-
principal
public UserPrincipal principal()
Returns the principal component.
-
permissions
public Set<AclEntryPermission> permissions()
Returns a copy of the permissions component.The returned set is a modifiable copy of the permissions.
-
flags
public Set<AclEntryFlag> flags()
Returns a copy of the flags component.The returned set is a modifiable copy of the flags.
-
equals
public boolean equals(Object ob)
Compares the specified object with this ACL entry for equality.If the given object is not an
AclEntry
then 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.equals
method.- Overrides:
equals
in classObject
- Parameters:
ob
- the object to which this object is to be compared- Returns:
true
if, and only if, the given object is an AclEntry that is identical to this AclEntry- See Also:
Object.hashCode()
,HashMap
-
hashCode
public int hashCode()
Returns the hash-code value for this ACL entry.This method satisfies the general contract of the
Object.hashCode()
method.- Overrides:
hashCode
in classObject
- Returns:
- a hash code value for this object.
- See Also:
Object.equals(java.lang.Object)
,System.identityHashCode(java.lang.Object)
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
25/12/2024 07:48:47 Cette version de la page est en cache (à la date du 25/12/2024 07:48:47) afin d'accélérer le traitement. Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la dernère version de la page.Document créé le 11/06/2005, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-java/nio/file/attribute/AclEntry.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.