Class Attendee

    • Constructor Detail

      • Attendee

        protected Attendee()
        Constructs an empty attendee. This constructor is dedicated to the persistence engine.
      • Attendee

        protected Attendee​(String id,
                           CalendarComponent component)
        Constructs a participant in the specified calendar component.
        Parameters:
        id - the unique identifier of the attendee. It can be an address email, an identifier of a user in Silverpeas, or anything from which we can notify him.
        component - a calendar component in which the attendee participates.
    • Method Detail

      • getId

        public String getId()
        The unique identifier of this attendee. It can an email address, a unique identifier of a user in Silverpeas, or whatever that can be used to notify the attendee.
        Specified by:
        getId in interface IdentifiableEntity
        Overrides:
        getId in class AbstractJpaEntity<Attendee,​UuidIdentifier>
        Returns:
        the unique identifier of the attendee.
      • getFullName

        public abstract String getFullName()
        Gets the full name of this attendee. According to the type of the attendee, this can be the actual full name of the user or its email address.
        Returns:
        the attendee full name (either its first and last name or its email address)
      • getCalendarComponent

        public CalendarComponent getCalendarComponent()
        Gets the calendar component for which this attendee participates.
        Returns:
        the calendar component in which this attendee participates.
      • getParticipationStatus

        public Attendee.ParticipationStatus getParticipationStatus()
        The status of the participation of this attendee.
        Returns:
        the participation status.
      • isAttendeeIn

        public boolean isAttendeeIn​(CalendarComponent component)
        Is this attendee participates in the specified calendar component?
        Parameters:
        component - a calendar component.
        Returns:
        true if he participates in the given calendar component, false otherwise.
      • getDelegate

        public Optional<Attendee> getDelegate()
        The delegate to whom or from whom the attendance as been delegated. If the participation status of this attendee is Attendee.ParticipationStatus.DELEGATED then this method returns the attendee to whom the delegation has been done. Otherwise, it returns the attendee that has delegated its attendance to this attendee.
        Returns:
        optionally the attendee to whom or from whom a delegation has been done. If this attendee isn't concerned by any delegation, then nothing is returned (the optional attendee is empty).
      • delegateTo

        public void delegateTo​(User user)
        Delegates the participation of this attendee to another participant. The delegated is added among the calendar event's attendees.
        Parameters:
        user - a user in Silverpeas.
      • delegateTo

        public void delegateTo​(String email)
        Delegates the participation of this attendee to another participant. The delegated is added among the calendar event's attendees.
        Parameters:
        email - the email of another attendee. This attendee is expected to be a person external to Silverpeas.
      • accept

        public void accept()
        Accepts the attendance.
        Calling this method represents an answer action.
        Call setParticipationStatus(ParticipationStatus) method to modify the status without specifying that is in case of an answer.
      • decline

        public void decline()
        Declines the attendance.
        Calling this method represents an answer action.
        Call setParticipationStatus(ParticipationStatus) method to modify the status without specifying that is in case of an answer.
      • tentativelyAccept

        public void tentativelyAccept()
        Tentatively accepts the attendance.
        Calling this method represents an answer action.
        Call setParticipationStatus(ParticipationStatus) method to modify the status without specifying that is in case of an answer.
      • getPresenceStatus

        public Attendee.PresenceStatus getPresenceStatus()
        The status of presence in his participation as it was asked by the calendar event author. If not set, by default, his presence status is Attendee.PresenceStatus.REQUIRED.
        Returns:
        the presence status of this attendee.
      • setPresenceStatus

        public void setPresenceStatus​(Attendee.PresenceStatus presenceStatus)
        Sets a new presence status to this attendee.
        Parameters:
        presenceStatus - the status of presence in his participation.
      • withPresenceStatus

        public Attendee withPresenceStatus​(Attendee.PresenceStatus presenceStatus)
        Sets a new presence status to this attendee.
        Parameters:
        presenceStatus - the status of presence in his participation.
        Returns:
        himself.