Package org.exoplatform.caldav.client
Record Class DavOptions
java.lang.Object
java.lang.Record
org.exoplatform.caldav.client.DavOptions
- Record Components:
davTokens- the compliance classes, lower-cased, never nullallowedMethods- the allowed methods, upper-cased, never null
What a resource says it supports, as
CalDavClient.capabilities(org.exoplatform.caldav.client.CalDavEndpoint, java.lang.String)
gathers it: the
compliance classes of its DAV header (RFC 4918 §10.1) and the
methods of its Allow header (RFC 9110 §10.2.1) — the two pieces of
evidence the sharing capability is selected from (EXO-90253).
Normalised once, here: compliance classes are compared case-insensitively and methods by their upper-case name, and a header a server repeats is read as the union of its values, which is what RFC 9110 §5.3 makes of a list header sent twice.
-
Constructor Summary
ConstructorsConstructorDescriptionDavOptions(Set<String> davTokens, Set<String> allowedMethods) Creates an instance of aDavOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanadvertises(String token) Whether theDAVheader carries a compliance class.Returns the value of theallowedMethodsrecord component.booleanWhether theAllowheader names a method.Returns the value of thedavTokensrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static DavOptionsThe evidence as two raw header value lists.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DavOptions
Creates an instance of aDavOptionsrecord class.- Parameters:
davTokens- the value for thedavTokensrecord componentallowedMethods- the value for theallowedMethodsrecord component
-
-
Method Details
-
of
The evidence as two raw header value lists.- Parameters:
davHeaders- everyDAVheader value the server sentallowHeaders- everyAllowheader value the server sent- Returns:
- the normalised evidence
-
advertises
Whether theDAVheader carries a compliance class.- Parameters:
token- the class, any case- Returns:
- true when advertised
-
allows
Whether theAllowheader names a method.- Parameters:
method- the method name, any case- Returns:
- true when allowed
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
davTokens
Returns the value of thedavTokensrecord component.- Returns:
- the value of the
davTokensrecord component
-
allowedMethods
Returns the value of theallowedMethodsrecord component.- Returns:
- the value of the
allowedMethodsrecord component
-