Record Class CalendarOwner
- Record Components:
identityId- the social identity of the owning eXo user, or nullusername- that user's eXo login, or nulldisplayName- how to name the owner to the viewer, or null
Two grains, matching the two witnesses CollectionOwnership hears.
When this deployment recognised a colleague's eXo calendar, the
owner is one of its users and all three fields are set — identity, login
and full name — so agenda can show the person, avatar and popover
included. When only the server said the collection is somebody
else's, its owner principal is an eXo user only when exactly one user of
this deployment is connected to that server as that principal
(EXO-90243), and is then named the same way; otherwise the owner is a
display name alone: what the principal calls itself, or failing that the
last segment of the path the server returned. NONE is the answer
for the user's own calendars and for a share whose owner cannot be named.
Services-local like its sibling enum: computed per listing, persisted
nowhere, and copied field by field onto the API's RemoteCalendar.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CalendarOwnerNobody to name: the user's own calendar, or a share of unknown owner. -
Constructor Summary
ConstructorsConstructorDescriptionCalendarOwner(Long identityId, String username, String displayName) Creates an instance of aCalendarOwnerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns 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.Returns the value of theidentityIdrecord component.static CalendarOwnerAn owner known only by the name the server gives them.final StringtoString()Returns a string representation of this record class.username()Returns the value of theusernamerecord component.
-
Field Details
-
NONE
Nobody to name: the user's own calendar, or a share of unknown owner.
-
-
Constructor Details
-
CalendarOwner
Creates an instance of aCalendarOwnerrecord class.- Parameters:
identityId- the value for theidentityIdrecord componentusername- the value for theusernamerecord componentdisplayName- the value for thedisplayNamerecord component
-
-
Method Details
-
named
An owner known only by the name the server gives them.- Parameters:
displayName- what to call them; null when even that is unknown- Returns:
- the owner,
NONEwhen the name is null
-
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). -
identityId
Returns the value of theidentityIdrecord component.- Returns:
- the value of the
identityIdrecord component
-
username
Returns the value of theusernamerecord component.- Returns:
- the value of the
usernamerecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-