Interface AgendaEventAttendeeService


  • public interface AgendaEventAttendeeService
    • Method Detail

      • getEventAttendees

        List<EventAttendee> getEventAttendees​(long eventId,
                                              ZonedDateTime occurrenceId,
                                              EventAttendeeResponse... responses)
        Return the list of attendees of an event having a specific responses.
        Parameters:
        eventId - agenda Event identifier
        occurrenceId - event occurrence id
        responses - Array of answers of attendees to retrieve
        Returns:
        List of EventAttendee
      • getEventAttendees

        EventAttendeeList getEventAttendees​(long eventId,
                                            EventAttendeeResponse... responses)
        Return the list of attendees of an event having a specific responses.
        Parameters:
        eventId - agenda Event identifier
        responses - Array of answers of attendees to retrieve
        Returns:
        EventAttendeeList
      • generateEncryptedToken

        String generateEncryptedToken​(long eventId,
                                      String email)
        Generates a token that will be used to authenticate user when requesting REST API in anonymous mode
        Parameters:
        eventId - Event technical identifier
        email - User email
        Returns:
        encrypted token containing "EVENT_ID|EMAIL"
      • generateEncryptedToken

        String generateEncryptedToken​(long eventId,
                                      String emailOrUsername,
                                      EventAttendeeResponse response)
        Generates a token that will be used to authenticate user when requesting REST API in anonymous mode. This
        Parameters:
        eventId - Event technical identifier
        emailOrUsername - User name or email
        response - EventAttendeeResponse value for chosen answer
        Returns:
        encrypted token containing "EVENT_ID|EMAIL|ATTENDEE_RESPONSE"
      • decryptUserIdentity

        org.exoplatform.social.core.identity.model.Identity decryptUserIdentity​(long eventId,
                                                                                String token,
                                                                                EventAttendeeResponse response)
                                                                         throws IllegalAccessException
        Reads token content and retrieves user Social Identity from email or username contained in token
        Parameters:
        token - encrypted token
        eventId - Event technical identifier
        response - EventAttendeeResponse value for chosen answer
        Returns:
        Identity of user
        Throws:
        IllegalAccessException - when the token has bad format
      • getEventResponse

        EventAttendeeResponse getEventResponse​(long eventId,
                                               ZonedDateTime occurrenceId,
                                               long identityId)
                                        throws org.exoplatform.commons.exception.ObjectNotFoundException,
                                               IllegalAccessException
        Retrieves the event response of a user. If the user didn't responded to the event, the default value EventAttendeeResponse.NEEDS_ACTION will be retrieved.
        Parameters:
        eventId - Technical identifier of Event
        occurrenceId - event occurrence id
        identityId - Identity technical identifier of user
        Returns:
        EventAttendeeResponse, no null value is returned
        Throws:
        org.exoplatform.commons.exception.ObjectNotFoundException - when event with provided identifier doesn't exists
        IllegalAccessException - when user is not an invitee of the event
      • sendUpcomingEventResponse

        void sendUpcomingEventResponse​(long eventId,
                                       ZonedDateTime occurrenceId,
                                       long identityId,
                                       EventAttendeeResponse response)
                                throws org.exoplatform.commons.exception.ObjectNotFoundException,
                                       IllegalAccessException
        Sends an event response for a recurrent event starting from a specific occurrence
        Parameters:
        eventId - Technical identifier of Event
        occurrenceId - event occurrence id
        identityId - Identity technical identifier of user
        response - User response of type EventAttendeeResponse to the event. The value EventAttendeeResponse.NEEDS_ACTION isn't allowed.
        Throws:
        org.exoplatform.commons.exception.ObjectNotFoundException - when event with provided identifier doesn't exists
        IllegalAccessException - when user is not an invitee of the event
      • sendEventResponse

        void sendEventResponse​(long eventId,
                               long identityId,
                               EventAttendeeResponse response,
                               boolean broadcast)
                        throws org.exoplatform.commons.exception.ObjectNotFoundException,
                               IllegalAccessException
        Parameters:
        eventId - Technical identifier of Event
        identityId - Identity technical identifier of user
        response - User response of type EventAttendeeResponse to the event. The value EventAttendeeResponse.NEEDS_ACTION isn't allowed.
        broadcast - whether broadcast event about this change or not
        Throws:
        org.exoplatform.commons.exception.ObjectNotFoundException - when event with provided identifier doesn't exists
        IllegalAccessException - when user is not an invitee of the event
      • isEventAttendee

        boolean isEventAttendee​(long eventId,
                                long identityId)
        Checks whether the user is an attendee of the event or not
        Parameters:
        eventId - Technical identifier of Event
        identityId - user name
        Returns:
        true if user is an attendee of the event, else return false