Record Class MkCalendarResult

java.lang.Object
java.lang.Record
org.exoplatform.caldav.client.MkCalendarResult
Record Components:
status - the HTTP status the server answered
failedPropstatStatuses - every non-2xx status carried at propstat level inside the body, empty when none — a 207 with entries here is a refusal wearing a 2xx

public record MkCalendarResult(int status, List<Integer> failedPropstatStatuses) extends Record
What an MKCALENDAR answered — deliberately never a boolean "created". MKCALENDAR responses have been caught lying against BlueMind in every shape a 2xx can take: a 207 whose failing propstat means nothing was created still counts as 2xx, an empty answer proves nothing, and — proven live 2026-08-20 — a plain 201 arrives even when the server created NOTHING, because a request without supported-calendar-component-set makes BlueMind's kind derivation fail internally, and the failure is swallowed while 201 goes out anyway. So this result carries the raw status plus every non-2xx propstat status found in the body, and even provenCreated() is only the server's claim: the one statement of success a caller may trust is the collection's presence in a fresh listing, which is the caller's read-back to perform — the same confirm-by-listing discipline the browser connector ships today, and a rule rather than a workaround for one bug: a server that swallows one internal failure behind a 2xx can do it again elsewhere.
  • Constructor Summary

    Constructors
    Constructor
    Description
    MkCalendarResult(int status, List<Integer> failedPropstatStatuses)
    Creates an instance of a MkCalendarResult record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the failedPropstatStatuses record component.
    final int
    Returns a hash code value for this object.
    boolean
    Whether the server plainly claimed a creation: a 201 with no failing propstat.
    boolean
    Whether the server refused to create the collection outright — the state the plan maps to REMOTE_CREATE_REFUSED for personal calendars.
    int
    Returns the value of the status record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • MkCalendarResult

      public MkCalendarResult(int status, List<Integer> failedPropstatStatuses)
      Creates an instance of a MkCalendarResult record class.
      Parameters:
      status - the value for the status record component
      failedPropstatStatuses - the value for the failedPropstatStatuses record component
  • Method Details

    • refused

      public boolean refused()
      Whether the server refused to create the collection outright — the state the plan maps to REMOTE_CREATE_REFUSED for personal calendars. NOT the BlueMind behaviour, despite what three rounds of debugging concluded: BlueMind never refuses an MKCALENDAR aimed under the calendar home — it answers 201 even when it creates nothing (a request without supported-calendar-component-set, see the class javadoc), so on that server this never fires and only the confirm-by-listing read-back tells creation from silence.
      Returns:
      true on 403, 405 and 501
    • provenCreated

      public boolean provenCreated()
      Whether the server plainly claimed a creation: a 201 with no failing propstat. A 207 never qualifies — MKCALENDAR is atomic (RFC 4791 section 5.3.1), so a 207 reports at least one rejected property and a collection that was NOT created. Even a true here is a claim to confirm by listing, never a fact — BlueMind has answered exactly this unqualified 201 over a creation that never happened (class javadoc).
      Returns:
      true when the answer was an unqualified 201
    • 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
    • failedPropstatStatuses

      public List<Integer> failedPropstatStatuses()
      Returns the value of the failedPropstatStatuses record component.
      Returns:
      the value of the failedPropstatStatuses record component