Package org.exoplatform.agenda.service
Interface AgendaEventDatePollService
-
public interface AgendaEventDatePollService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<EventDateOption>createEventPoll(long eventId, List<EventDateOption> dateOptions, long userIdentityId)Creates a list of date options for a given eventvoiddismissDateOption(long dateOptionId, long identityId)Dismisses an event vote on an event for a participant.EventDateOptiongetEventDateOption(long dateOptionId, ZoneId userTimeZone)RetrievesEventDateOptionidentified by its Technical identifierList<EventDateOption>getEventDateOptions(long eventId, ZoneId userTimeZone)voidresetEventVotes(long eventId)Delete all votes on a selected eventvoidsaveEventVotes(long eventId, List<Long> acceptedDatePollIds, long identityId)Saves all votes of user on an event.voidselectEventDateOption(long dateOptionId)Select Date Option used to create eventSet<AgendaEventModificationType>updateEventDateOptions(long eventId, List<EventDateOption> dateOptions)Update the list of Event Date optionsvoidvoteDateOption(long dateOptionId, long identityId)Add an event vote on an event for a participant.
-
-
-
Method Detail
-
getEventDateOptions
List<EventDateOption> getEventDateOptions(long eventId, ZoneId userTimeZone)
- Parameters:
eventId- Technical identifier ofEventuserTimeZone-ZoneIdUser time zone used to transform event options dates- Returns:
ListofEventDateOptionof corresponding event
-
getEventDateOption
EventDateOption getEventDateOption(long dateOptionId, ZoneId userTimeZone)
RetrievesEventDateOptionidentified by its Technical identifier- Parameters:
dateOptionId- Technical identifier ofEventDateOptionuserTimeZone-ZoneIdUser time zone used to transform event options dates- Returns:
EventDateOptionif 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 ofEventdateOptions-ListofEventDateOptioncorresponding toEventuserIdentityId- User technical identifier (Identity.getId())- Returns:
Listof createdEventDateOption
-
updateEventDateOptions
Set<AgendaEventModificationType> updateEventDateOptions(long eventId, List<EventDateOption> dateOptions)
Update the list of Event Date options- Parameters:
eventId- Technical identifier ofEventdateOptions-ListofEventDateOptioncorresponding toEvent- Returns:
SetofAgendaEventModificationTypecontaining modifications made on event reminders
-
saveEventVotes
void saveEventVotes(long eventId, List<Long> acceptedDatePollIds, long identityId) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessExceptionSaves 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 ofEventacceptedDatePollIds-Listof accepted date poll options Technical identifieridentityId- userIdentitytechnical identifier- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- when event with given id is not foundIllegalAccessException- when user can't vote on event
-
voteDateOption
void voteDateOption(long dateOptionId, long identityId) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessExceptionAdd an event vote on an event for a participant.- Parameters:
dateOptionId- Technical identifier ofEventDateOptionidentityId- Technical identifier ofIdentityof type user- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- whenEventDateOptionis not found using identifierIllegalAccessException- when user is not participant of the event
-
dismissDateOption
void dismissDateOption(long dateOptionId, long identityId) throws org.exoplatform.commons.exception.ObjectNotFoundExceptionDismisses an event vote on an event for a participant.- Parameters:
dateOptionId- Technical identifier ofEventDateOptionidentityId- Technical identifier ofIdentityof type user- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- whenEventDateOptionis not found using identifier
-
selectEventDateOption
void selectEventDateOption(long dateOptionId) throws org.exoplatform.commons.exception.ObjectNotFoundExceptionSelect Date Option used to create event- Parameters:
dateOptionId- Technical identifier ofEventDateOption- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- whenEventDateOptionis not found using identifier
-
resetEventVotes
void resetEventVotes(long eventId)
Delete all votes on a selected event- Parameters:
eventId- Technical identifier ofEvent
-
-