Package org.exoplatform.agenda.service
Interface AgendaEventAttendeeService
-
public interface AgendaEventAttendeeService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.exoplatform.social.core.identity.model.IdentitydecryptUserIdentity(long eventId, String token, EventAttendeeResponse response)Reads token content and retrieves user Social Identity from email or username contained in tokenStringgenerateEncryptedToken(long eventId, String email)Generates a token that will be used to authenticate user when requesting REST API in anonymous modeStringgenerateEncryptedToken(long eventId, String emailOrUsername, EventAttendeeResponse response)Generates a token that will be used to authenticate user when requesting REST API in anonymous mode.EventAttendeeListgetEventAttendees(long eventId)Return the list of attendees of an eventList<EventAttendee>getEventAttendees(long eventId, ZonedDateTime occurrenceId, EventAttendeeResponse... responses)Return the list of attendees of an event having a specific responses.EventAttendeeListgetEventAttendees(long eventId, EventAttendeeResponse... responses)Return the list of attendees of an event having a specific responses.EventAttendeeResponsegetEventResponse(long eventId, ZonedDateTime occurrenceId, long identityId)Retrieves the event response of a user.booleanisEventAttendee(long eventId, long identityId)Checks whether the user is an attendee of the event or notSet<AgendaEventModificationType>saveEventAttendees(Event event, List<EventAttendee> attendees, long creatorIdentityId, boolean sendInvitations, boolean resetResponses, AgendaEventModification eventModifications)voidsendEventResponse(long eventId, long identityId, EventAttendeeResponse response)voidsendEventResponse(long eventId, long identityId, EventAttendeeResponse response, boolean broadcast)voidsendInvitations(Event event, List<EventAttendee> eventAttendees, AgendaEventModification eventModifications)Sends an invitation to event attendees of type: user, space or external user.voidsendUpcomingEventResponse(long eventId, ZonedDateTime occurrenceId, long identityId, EventAttendeeResponse response)Sends an event response for a recurrent event starting from a specific occurrence
-
-
-
Method Detail
-
getEventAttendees
EventAttendeeList getEventAttendees(long eventId)
Return the list of attendees of an event- Parameters:
eventId- agendaEventidentifier- Returns:
EventAttendeeList
-
getEventAttendees
List<EventAttendee> getEventAttendees(long eventId, ZonedDateTime occurrenceId, EventAttendeeResponse... responses)
Return the list of attendees of an event having a specific responses.- Parameters:
eventId- agendaEventidentifieroccurrenceId- event occurrence idresponses- Array of answers of attendees to retrieve- Returns:
ListofEventAttendee
-
getEventAttendees
EventAttendeeList getEventAttendees(long eventId, EventAttendeeResponse... responses)
Return the list of attendees of an event having a specific responses.- Parameters:
eventId- agendaEventidentifierresponses- Array of answers of attendees to retrieve- Returns:
EventAttendeeList
-
sendInvitations
void sendInvitations(Event event, List<EventAttendee> eventAttendees, AgendaEventModification eventModifications)
Sends an invitation to event attendees of type: user, space or external user.- Parameters:
event-EventeventAttendees-ListofEventAttendeeof the eventeventModifications-AgendaEventModificationcontains aSetofAgendaEventModificationTypeto indicate event modification types: fields modifications, creation or deletion
-
saveEventAttendees
Set<AgendaEventModificationType> saveEventAttendees(Event event, List<EventAttendee> attendees, long creatorIdentityId, boolean sendInvitations, boolean resetResponses, AgendaEventModification eventModifications)
- Parameters:
event-Eventto attach attendeesattendees-ListofEventAttendeeto save for eventcreatorIdentityId- technical identifier ifIdentityupdating eventsendInvitations- whether send invitations to other attendees or notresetResponses- whether reset attendees responses or not to defaultEventAttendeeResponse.NEEDS_ACTIONeventModifications-AgendaEventModificationcontains aSetofAgendaEventModificationTypeto indicate event modification types: fields modifications, creation or deletion- Returns:
SetofAgendaEventModificationTypecontaining modifications made on event attendees
-
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-Eventtechnical identifieremail- 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-Eventtechnical identifieremailOrUsername- User name or emailresponse-EventAttendeeResponsevalue 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 IllegalAccessExceptionReads token content and retrieves user Social Identity from email or username contained in token- Parameters:
token- encrypted tokeneventId-Eventtechnical identifierresponse-EventAttendeeResponsevalue for chosen answer- Returns:
Identityof 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 valueEventAttendeeResponse.NEEDS_ACTIONwill be retrieved.- Parameters:
eventId- Technical identifier ofEventoccurrenceId- event occurrence ididentityId-Identitytechnical identifier of user- Returns:
EventAttendeeResponse, no null value is returned- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- when event with provided identifier doesn't existsIllegalAccessException- when user is not an invitee of the event
-
sendEventResponse
void sendEventResponse(long eventId, long identityId, EventAttendeeResponse response) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException- Parameters:
eventId- Technical identifier ofEventidentityId-Identitytechnical identifier of userresponse- User response of typeEventAttendeeResponseto the event. The valueEventAttendeeResponse.NEEDS_ACTIONisn't allowed.- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- when event with provided identifier doesn't existsIllegalAccessException- 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, IllegalAccessExceptionSends an event response for a recurrent event starting from a specific occurrence- Parameters:
eventId- Technical identifier ofEventoccurrenceId- event occurrence ididentityId-Identitytechnical identifier of userresponse- User response of typeEventAttendeeResponseto the event. The valueEventAttendeeResponse.NEEDS_ACTIONisn't allowed.- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- when event with provided identifier doesn't existsIllegalAccessException- 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 ofEventidentityId-Identitytechnical identifier of userresponse- User response of typeEventAttendeeResponseto the event. The valueEventAttendeeResponse.NEEDS_ACTIONisn't allowed.broadcast- whether broadcast event about this change or not- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- when event with provided identifier doesn't existsIllegalAccessException- 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 ofEventidentityId- user name- Returns:
- true if user is an attendee of the event, else return false
-
-