Package org.exoplatform.caldav.client
Record Class AclWriteResult
java.lang.Object
java.lang.Record
org.exoplatform.caldav.client.AclWriteResult
- Record Components:
status- the HTTP statuspreconditions- the local names of theDAV:errorchildren, a Clark name for one outside the DAV namespace; empty when nonemissingPrivileges- the privilegesneed-privilegesnamed, as local names for DAV privileges and Clark names for others; empty when none
public record AclWriteResult(int status, List<String> preconditions, List<String> missingPrivileges)
extends Record
What the server answered to an
ACL request (EXO-90253): a claim,
never a fact.
A success status says the server accepted the body; only the ACL read back
afterwards says the grant is there — the same discipline as
MkCalendarResult. A refusal carries what RFC 3744 §7.1.1 and §8.1.1
let a server say about why: the preconditions its DAV:error body
names (need-privileges, no-ace-conflict,
recognized-principal, allowed-principal,
no-abstract, grant-only, limited-number-of-aces…),
and for need-privileges the privileges that were missing. A body
that names nothing leaves both lists empty; the status still stands.
-
Constructor Summary
ConstructorsConstructorDescriptionAclWriteResult(int status, List<String> preconditions, List<String> missingPrivileges) Creates an instance of aAclWriteResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccepted()Whether the server accepted the request: RFC 3744 §8.1 answers 200, and 204 is how some servers acknowledge a body-less success.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themissingPrivilegesrecord component.Returns the value of thepreconditionsrecord component.intstatus()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AclWriteResult
Creates an instance of aAclWriteResultrecord class.- Parameters:
status- the value for thestatusrecord componentpreconditions- the value for thepreconditionsrecord componentmissingPrivileges- the value for themissingPrivilegesrecord component
-
-
Method Details
-
accepted
public boolean accepted()Whether the server accepted the request: RFC 3744 §8.1 answers 200, and 204 is how some servers acknowledge a body-less success.- Returns:
- true on 200 or 204
-
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 '=='. -
status
public int status()Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
preconditions
Returns the value of thepreconditionsrecord component.- Returns:
- the value of the
preconditionsrecord component
-
missingPrivileges
Returns the value of themissingPrivilegesrecord component.- Returns:
- the value of the
missingPrivilegesrecord component
-