Package com.norconex.committer.core.acl
Record Class AclEntry
java.lang.Object
java.lang.Record
com.norconex.committer.core.acl.AclEntry
- Record Components:
kind- what the principal isdir- the directory the id belongs to, as<system>:<name>(for examplead:CORP,entra:<tenant id>,google:acme.com,unix:<host>,source:<kind>for groups that exist only inside the source);nullforAclKind.SPECIALprincipalsid- the principal's identifier in that directory: the most stable one the source gives (an object id or a SID rather than a name, when it gives both)name- a readable name, when the source gives one besides the id; may benullaccess- allowed or denied;nullfor an owner
public record AclEntry(@NonNull AclKind kind, String dir, @NonNull String id, String name, AclAccess access)
extends Record
One principal of an
Acl, and whether it is allowed or denied
reading. As an owner (see Acl.owners()), access is
null.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccess()Returns the value of theaccessrecord component.static AclEntryAn allowed principal.static AclEntryallowSpecial(String id) An allowed principal with a reserved meaning.static AclEntryA denied principal.dir()Returns the value of thedirrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NonNull Stringid()Returns the value of theidrecord component.@NonNull AclKindkind()Returns the value of thekindrecord component.name()Returns the value of thenamerecord component.static AclEntryAn owner.This principal as one text value, the way flat fields carry it:kind:dir:id, orspecial:id.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
SPECIAL_EVERYONE
Everybody, even anonymous users.- See Also:
-
SPECIAL_AUTHENTICATED
Anybody signed in.- See Also:
-
SPECIAL_DOMAIN
Everybody in the organization that owns the document.- See Also:
-
SPECIAL_LINK
Anybody holding a sharing link to the document.- See Also:
-
-
Constructor Details
-
Method Details
-
allow
An allowed principal.- Parameters:
kind- what the principal isdir- the directory it belongs toid- its id in that directory- Returns:
- the entry
-
deny
A denied principal.- Parameters:
kind- what the principal isdir- the directory it belongs toid- its id in that directory- Returns:
- the entry
-
allowSpecial
An allowed principal with a reserved meaning.- Parameters:
id- one of theSPECIAL_*constants- Returns:
- the entry
-
owner
An owner.- Parameters:
kind- what the principal isdir- the directory it belongs toid- its id in that directory- Returns:
- the entry
-
withName
- Parameters:
name- a readable name- Returns:
- a copy of this entry with the given readable name
-
principalText
This principal as one text value, the way flat fields carry it:kind:dir:id, orspecial:id.- Returns:
- the principal as text
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
dir
Returns the value of thedirrecord component.- Returns:
- the value of the
dirrecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
access
Returns the value of theaccessrecord component.- Returns:
- the value of the
accessrecord component
-