Record Class AclWriteResult

java.lang.Object
java.lang.Record
org.exoplatform.caldav.client.AclWriteResult
Record Components:
status - the HTTP status
preconditions - the local names of the DAV:error children, a Clark name for one outside the DAV namespace; empty when none
missingPrivileges - the privileges need-privileges named, 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 Details

    • AclWriteResult

      public AclWriteResult(int status, List<String> preconditions, List<String> missingPrivileges)
      Creates an instance of a AclWriteResult record class.
      Parameters:
      status - the value for the status record component
      preconditions - the value for the preconditions record component
      missingPrivileges - the value for the missingPrivileges record 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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • status

      public int status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • preconditions

      public List<String> preconditions()
      Returns the value of the preconditions record component.
      Returns:
      the value of the preconditions record component
    • missingPrivileges

      public List<String> missingPrivileges()
      Returns the value of the missingPrivileges record component.
      Returns:
      the value of the missingPrivileges record component