Record Class CalendarSyncState
- Record Components:
id- the binding, which is what an action refers tocalendarId- the eXo calendar this is about, so the calendar list can mark the row itself rather than leaving the notice on a settings page nobody in trouble thinks to open. Zero when there is no eXo calendar — a collection the server refused to create has nonename- what the calendar is called, read from the server so a rename in the user's own client shows herestatus- the engine's own state for this bindinglastSyncEnd- when it last finished, in epoch milliseconds, or null when it never has
The engine knows this per binding and has always kept it in the database and the logs. A user seeing their agenda has no way to tell a calendar that is synchronising from one whose server refused it — both simply sit there — so the states that call for an action are surfaced and the rest is not.
-
Constructor Summary
ConstructorsConstructorDescriptionCalendarSyncState(long id, long calendarId, String name, CalendarSyncStatus status, Long lastSyncEnd) Creates an instance of aCalendarSyncStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thecalendarIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longid()Returns the value of theidrecord component.Returns the value of thelastSyncEndrecord component.name()Returns the value of thenamerecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.booleanWhether this state is one the user should be told about.
-
Constructor Details
-
CalendarSyncState
public CalendarSyncState(long id, long calendarId, String name, CalendarSyncStatus status, Long lastSyncEnd) Creates an instance of aCalendarSyncStaterecord class.- Parameters:
id- the value for theidrecord componentcalendarId- the value for thecalendarIdrecord componentname- the value for thenamerecord componentstatus- the value for thestatusrecord componentlastSyncEnd- the value for thelastSyncEndrecord component
-
-
Method Details
-
worthTelling
public boolean worthTelling()Whether this state is one the user should be told about.A calendar that is synchronising is not news, and a tombstone has its own row — the hidden-calendars one, which offers to bring it back rather than to worry about it; so does a hidden share (
CalendarSyncStatus.HIDDEN_SHARE, EXO-90239), which is a choice the user made and not a state to warn them about. What is left is the states where something the user might do would change the outcome — a retired subscription among them (CalendarSyncStatus.RETIRED_SUBSCRIPTION, EXO-90275): its calendar no longer synchronises, and only the user can delete it.- Returns:
- true when this belongs on screen
-
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 '=='. -
id
public long id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
calendarId
public long calendarId()Returns the value of thecalendarIdrecord component.- Returns:
- the value of the
calendarIdrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
lastSyncEnd
Returns the value of thelastSyncEndrecord component.- Returns:
- the value of the
lastSyncEndrecord component
-