Record Class ServerCapabilities

java.lang.Object
java.lang.Record
org.exoplatform.caldav.client.ServerCapabilities
Record Components:
syncCollection - whether the server advertises the RFC 6578 sync-collection REPORT and answered a sync token to start from
calendarMultiget - whether the calendar-multiget REPORT is advertised
calendarQuery - whether the calendar-query REPORT is advertised
ctag - whether the collection carries a CalendarServer ctag
davHeader - the raw DAV response header, or null — kept for diagnostics, never parsed into decisions here

public record ServerCapabilities(boolean syncCollection, boolean calendarMultiget, boolean calendarQuery, boolean ctag, String davHeader) extends Record
Which incremental-sync tier a collection's server can serve, read from one Depth:0 PROPFIND (supported-report-set, ctag, sync token) plus the DAV response header. Deliberately stateless and uncached here: the probe is bound-time information whose caching (in the pair's sync state) belongs to the caller, not to this client.
  • Constructor Details

    • ServerCapabilities

      public ServerCapabilities(boolean syncCollection, boolean calendarMultiget, boolean calendarQuery, boolean ctag, String davHeader)
      Creates an instance of a ServerCapabilities record class.
      Parameters:
      syncCollection - the value for the syncCollection record component
      calendarMultiget - the value for the calendarMultiget record component
      calendarQuery - the value for the calendarQuery record component
      ctag - the value for the ctag record component
      davHeader - the value for the davHeader record component
  • Method Details

    • tier

      The cheapest tier this server can serve. The windowed calendar-query floor below ServerCapabilities.SyncTier.ETAG_LISTING is not probed: it is the engine's runtime fallback for a listing that turns out to carry no usable ETags, which no capability answer predicts.
      Returns:
      the tier to start each run at
    • 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.
    • syncCollection

      public boolean syncCollection()
      Returns the value of the syncCollection record component.
      Returns:
      the value of the syncCollection record component
    • calendarMultiget

      public boolean calendarMultiget()
      Returns the value of the calendarMultiget record component.
      Returns:
      the value of the calendarMultiget record component
    • calendarQuery

      public boolean calendarQuery()
      Returns the value of the calendarQuery record component.
      Returns:
      the value of the calendarQuery record component
    • ctag

      public boolean ctag()
      Returns the value of the ctag record component.
      Returns:
      the value of the ctag record component
    • davHeader

      public String davHeader()
      Returns the value of the davHeader record component.
      Returns:
      the value of the davHeader record component