Package org.exoplatform.caldav.client
Record Class CalendarCollection
java.lang.Object
java.lang.Record
org.exoplatform.caldav.client.CalendarCollection
-
Constructor Summary
ConstructorsConstructorDescriptionCalendarCollection(String href, String displayName, String ctag, String syncToken, String color, boolean writable) A collection whose server declared no component set.CalendarCollection(String href, String displayName, String ctag, String syncToken, String color, boolean writable, Set<String> components) Creates an instance of aCalendarCollectionrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncolor()Returns the value of thecolorrecord component.Returns the value of thecomponentsrecord component.ctag()Returns the value of thectagrecord component.Returns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanWhether this collection holds events at all.href()Returns the value of thehrefrecord component.Returns the value of thesyncTokenrecord component.final StringtoString()Returns a string representation of this record class.booleanwritable()Returns the value of thewritablerecord component.
-
Constructor Details
-
CalendarCollection
public CalendarCollection(String href, String displayName, String ctag, String syncToken, String color, boolean writable) A collection whose server declared no component set.The six-argument form every caller used before the set was read: an undeclared set is an empty one, which
holdsEvents()reads as "the server did not say" — the RFC 4791 default of supporting everything.- Parameters:
href- the collection pathdisplayName- the name the server gives itctag- the collection change tagsyncToken- the RFC 6578 sync tokencolor- the colour the server carrieswritable- whether the caller may write to it
-
CalendarCollection
public CalendarCollection(String href, String displayName, String ctag, String syncToken, String color, boolean writable, Set<String> components) Creates an instance of aCalendarCollectionrecord class.- Parameters:
href- the value for thehrefrecord componentdisplayName- the value for thedisplayNamerecord componentctag- the value for thectagrecord componentsyncToken- the value for thesyncTokenrecord componentcolor- the value for thecolorrecord componentwritable- the value for thewritablerecord componentcomponents- the value for thecomponentsrecord component
-
-
Method Details
-
holdsEvents
public boolean holdsEvents()Whether this collection holds events at all.RFC 4791 §5.2.3 makes
supported-calendar-component-setoptional, and a collection that omits it supports every component. An empty set is therefore a server that did not say, not a server that said "nothing" — both answer true. Only an explicit set without VEVENT answers false, which is what keeps a task list from becoming a calendar.- Returns:
- true unless the server explicitly excluded events
-
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 '=='. -
href
Returns the value of thehrefrecord component.- Returns:
- the value of the
hrefrecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
ctag
Returns the value of thectagrecord component.- Returns:
- the value of the
ctagrecord component
-
syncToken
Returns the value of thesyncTokenrecord component.- Returns:
- the value of the
syncTokenrecord component
-
color
Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-
writable
public boolean writable()Returns the value of thewritablerecord component.- Returns:
- the value of the
writablerecord component
-
components
Returns the value of thecomponentsrecord component.- Returns:
- the value of the
componentsrecord component
-