Interface AgendaEventDatePollService


public interface AgendaEventDatePollService
  • Method Details

    • getEventDateOptions

      List<EventDateOption> getEventDateOptions(long eventId, ZoneId userTimeZone)
      Parameters:
      eventId - Technical identifier of Event
      userTimeZone - ZoneId User time zone used to transform event options dates
      Returns:
      List of EventDateOption of corresponding event
    • getEventDateOption

      EventDateOption getEventDateOption(long dateOptionId, ZoneId userTimeZone)
      Retrieves EventDateOption identified by its Technical identifier
      Parameters:
      dateOptionId - Technical identifier of EventDateOption
      userTimeZone - ZoneId User time zone used to transform event options dates
      Returns:
      EventDateOption if found, else null
    • createEventPoll

      List<EventDateOption> createEventPoll(long eventId, List<EventDateOption> dateOptions, long userIdentityId)
      Creates a list of date options for a given event
      Parameters:
      eventId - Technical identifier of Event
      dateOptions - List of EventDateOption corresponding to Event
      userIdentityId - User technical identifier (Identity.getId())
      Returns:
      List of created EventDateOption
    • updateEventDateOptions

      Set<AgendaEventModificationType> updateEventDateOptions(long eventId, List<EventDateOption> dateOptions)
      Update the list of Event Date options
      Parameters:
      eventId - Technical identifier of Event
      dateOptions - List of EventDateOption corresponding to Event
      Returns:
      Set of AgendaEventModificationType containing modifications made on event reminders
    • saveEventVotes

      void saveEventVotes(long eventId, List<Long> acceptedDatePollIds, long identityId) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Saves all votes of user on an event. The dateOptionVotes will provide only accepted date options list. If dateOptionVotes is empty or null, this means the user has dismissed all date options.
      Parameters:
      eventId - Technical identifier of Event
      acceptedDatePollIds - List of accepted date poll options Technical identifier
      identityId - user Identity technical identifier
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException - when event with given id is not found
      IllegalAccessException - when user can't vote on event
    • voteDateOption

      void voteDateOption(long dateOptionId, long identityId) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Add an event vote on an event for a participant.
      Parameters:
      dateOptionId - Technical identifier of EventDateOption
      identityId - Technical identifier of Identity of type user
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException - when EventDateOption is not found using identifier
      IllegalAccessException - when user is not participant of the event
    • dismissDateOption

      void dismissDateOption(long dateOptionId, long identityId) throws org.exoplatform.commons.exception.ObjectNotFoundException
      Dismisses an event vote on an event for a participant.
      Parameters:
      dateOptionId - Technical identifier of EventDateOption
      identityId - Technical identifier of Identity of type user
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException - when EventDateOption is not found using identifier
    • selectEventDateOption

      void selectEventDateOption(long dateOptionId) throws org.exoplatform.commons.exception.ObjectNotFoundException
      Select Date Option used to create event
      Parameters:
      dateOptionId - Technical identifier of EventDateOption
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException - when EventDateOption is not found using identifier
    • resetEventVotes

      void resetEventVotes(long eventId)
      Delete all votes on a selected event
      Parameters:
      eventId - Technical identifier of Event