Package org.exoplatform.caldav.client
Record Class CollectionAcl
java.lang.Object
java.lang.Record
org.exoplatform.caldav.client.CollectionAcl
- Record Components:
readable- whether the server grantedDAV:aclunderstood- whether every entry was parsed, false as well when the ACL is not readableentries- the entries in document order, empty unless understoodcurrentUserPrivileges- the caller's own privileges on the collection as Clark names, empty when the server answered nonereason- what could not be parsed, for the log; null when understood
public record CollectionAcl(boolean readable, boolean understood, List<AccessControlEntry> entries, Set<String> currentUserPrivileges, String reason)
extends Record
A collection's
DAV:acl as the server answered it to its owner
(EXO-90253), with the two facts that decide whether it may be written back.
Readable: the server granted the property. Reading it needs
DAV:read-acl (RFC 3744 §3.6), and a server may answer it in a 403
or 404 propstat; currentUserPrivileges() then says whether the
privilege was missing.
Understood: every entry parsed into an AccessControlEntry.
Writing an ACL replaces every modifiable entry, so a list read with one
entry skipped would delete that entry — somebody's share, possibly made
outside eXo — the moment it is written back. An ACL that is not understood
is never written.
-
Constructor Summary
ConstructorsConstructorDescriptionCollectionAcl(boolean readable, boolean understood, List<AccessControlEntry> entries, Set<String> currentUserPrivileges, String reason) Creates an instance of aCollectionAclrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecurrentUserPrivilegesrecord component.entries()Returns the value of theentriesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static CollectionAclnotUnderstood(Set<String> currentUserPrivileges, String reason) An ACL granted but holding something this client cannot represent.static CollectionAclof(List<AccessControlEntry> entries, Set<String> currentUserPrivileges) An ACL read and parsed entirely.booleanreadable()Returns the value of thereadablerecord component.reason()Returns the value of thereasonrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theunderstoodrecord component.static CollectionAclunreadable(Set<String> currentUserPrivileges) An ACL the server did not grant.
-
Constructor Details
-
CollectionAcl
public CollectionAcl(boolean readable, boolean understood, List<AccessControlEntry> entries, Set<String> currentUserPrivileges, String reason) Creates an instance of aCollectionAclrecord class.- Parameters:
readable- the value for thereadablerecord componentunderstood- the value for theunderstoodrecord componententries- the value for theentriesrecord componentcurrentUserPrivileges- the value for thecurrentUserPrivilegesrecord componentreason- the value for thereasonrecord component
-
-
Method Details
-
of
An ACL read and parsed entirely.- Parameters:
entries- the entriescurrentUserPrivileges- the caller's privileges- Returns:
- the ACL
-
unreadable
An ACL the server did not grant.- Parameters:
currentUserPrivileges- the caller's privileges, possibly empty- Returns:
- the ACL
-
notUnderstood
An ACL granted but holding something this client cannot represent.- Parameters:
currentUserPrivileges- the caller's privilegesreason- what was not understood- Returns:
- the ACL
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
readable
public boolean readable()Returns the value of thereadablerecord component.- Returns:
- the value of the
readablerecord component
-
understood
public boolean understood()Returns the value of theunderstoodrecord component.- Returns:
- the value of the
understoodrecord component
-
entries
Returns the value of theentriesrecord component.- Returns:
- the value of the
entriesrecord component
-
currentUserPrivileges
Returns the value of thecurrentUserPrivilegesrecord component.- Returns:
- the value of the
currentUserPrivilegesrecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-