Package org.exoplatform.caldav.client
Record Class SyncCollectionResult
java.lang.Object
java.lang.Record
org.exoplatform.caldav.client.SyncCollectionResult
- Record Components:
tokenValid- false when the server rejected the presented token (a 507, or a 403 carrying thevalid-sync-tokenprecondition) — everything else in the result is then empty and the caller must run a full listing insteadsyncToken- the new token to store, null when the token was rejectedchanged- the objects the server reported changed or new since the token, versions included, calendar data never (fetching is the multiget's job)deleted- the server-absolute raw paths reported gone — the responses the REPORT answers with a direct 404 status
public record SyncCollectionResult(boolean tokenValid, String syncToken, List<CalendarObject> changed, List<String> deleted)
extends Record
What an RFC 6578 sync-collection REPORT answered: the hrefs that changed,
the hrefs that are gone, and the token to store for the next run. Token
invalidation is a result, not an exception, because the plan's tiering
treats it as a routine downgrade: the run falls through to the ctag/ETag
tier and comes back with the fresh token this result carries next time.
-
Constructor Summary
ConstructorsConstructorDescriptionSyncCollectionResult(boolean tokenValid, String syncToken, List<CalendarObject> changed, List<String> deleted) Creates an instance of aSyncCollectionResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionchanged()Returns the value of thechangedrecord component.deleted()Returns the value of thedeletedrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static SyncCollectionResultThe one invalid-token result: the caller falls back to a listing.Returns the value of thesyncTokenrecord component.booleanReturns the value of thetokenValidrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SyncCollectionResult
public SyncCollectionResult(boolean tokenValid, String syncToken, List<CalendarObject> changed, List<String> deleted) Creates an instance of aSyncCollectionResultrecord class.- Parameters:
tokenValid- the value for thetokenValidrecord componentsyncToken- the value for thesyncTokenrecord componentchanged- the value for thechangedrecord componentdeleted- the value for thedeletedrecord component
-
-
Method Details
-
invalidToken
The one invalid-token result: the caller falls back to a listing.- Returns:
- a result whose token is rejected and whose lists are empty
-
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 '=='. -
tokenValid
public boolean tokenValid()Returns the value of thetokenValidrecord component.- Returns:
- the value of the
tokenValidrecord component
-
syncToken
Returns the value of thesyncTokenrecord component.- Returns:
- the value of the
syncTokenrecord component
-
changed
Returns the value of thechangedrecord component.- Returns:
- the value of the
changedrecord component
-
deleted
Returns the value of thedeletedrecord component.- Returns:
- the value of the
deletedrecord component
-