Package org.sakaiproject.signup.logic
Interface SignupMeetingService
-
public interface SignupMeetingServiceSignupMeetingService is an interface, which provides methods to manipulate the SignupMeeting object to the DB, send email, post/edit Calendar and check permission.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<String>getAllCategories(String siteId)Get all the Categories from a siteList<String>getAllLocations(String siteId)Get all the Locations from a siteList<SignupMeeting>getAllSignupMeetings(String currentSiteId, String userId)This returns a list of SignupMeeting for a specified site that are available to the user in the siteList<SignupMeeting>getRecurringSignupMeetings(String currentSiteId, String userId, Long recurrenceId, Date startDate)This returns a subset list of SignupMeetings with the same recurrenceId from starting date for the siteList<SignupMeeting>getSignupMeetings(String currentLocationId, String currentUserId, Date searchEndDate)This returns a subset list of SignupMeeting from Now to searchEndDate for the siteList<SignupMeeting>getSignupMeetings(String currentSiteId, String userId, Date startDate, Date endDate)This returns a subset list of SignupMeeting from startDate to endDate for the siteList<SignupMeeting>getSignupMeetingsInSite(String siteId, Date startDate, Date endDate)This returns a subset list of SignupMeeting from startDate to endDate for the site.List<SignupMeeting>getSignupMeetingsInSites(List<String> siteIds, Date startDate, Date endDate)This returns a subset list of SignupMeeting from startDate to endDate for the sites with out cachedList<SignupMeeting>getSignupMeetingsInSitesWithCache(List<String> siteIds, Date startDate, int timeFrameInDays)This returns a subset list of SignupMeeting from startDate to endDate for the sites, The result maybe 5 minutes old due to ECacheList<SignupMeeting>getSignupMeetingsInSiteWithCache(String siteId, Date startDate, int timeFrameInDays)This returns a subset list of SignupMeeting from startDate to endDate for the site.StringgetUsersLocalDateTimeString(Instant instant)booleanisAllowedToCreateAnyInSite(String userId, String siteId)Check permission for creating event/meeting either at a site level or at a group levelbooleanisAllowedToCreateinGroup(String userId, String siteId, String groupId)Test to see if the user has permission to create an event/meeting at group level in the sitebooleanisAllowedToCreateinSite(String userId, String siteId)Test to see if the user has permission to create an event/meeting at site level in the sitebooleanisEventExisted(Long eventId)Test to see if the event exists.SignupMeetingloadSignupMeeting(Long meetingId, String userId, String siteId)This retrieve a SignupMeeting object from database according to the SignupMeeting IdSignupTargetSiteEventInfoloadSignupMeetingWithAutoSelectedSite(Long meetingId, String userId, String siteId)This retrieve a SignupDefaultSiteEvent object from database according to the SignupMeeting Id.voidmodifyCalendar(SignupMeeting meeting)This method will modify the posted calendar at Scheduler tool for this event/meetingvoidpostToCalendar(SignupMeeting signupMeeting)This method will post the event/meeting into the Calendar at Scheduler toolvoidremoveCalendarEvents(List<SignupMeeting> meetings)This method will remove a list of the posted Calendar for the events/meetings in Scheduler toolvoidremoveCalendarEventsOnModifiedMeeting(List<SignupMeeting> meetings)This method will remove a list of the posted Calendar for a set of modified events/meetings in Scheduler toolvoidremoveMeetings(List<SignupMeeting> meetings)This deletes a list of SignupMeeting objects.LongsaveMeeting(SignupMeeting signupMeeting, String userId)This saves meeting object into databasevoidsaveMeetings(List<SignupMeeting> signupMeetings, String userId)This saves meeting objects into databasevoidsendCancellationEmail(SignupEventTrackingInfo eventTrackingInfo)This sends cancellation email to event/meeting organizer as well as to the people on waiting list, who get promoted due to the attendee's cancellationvoidsendEmail(SignupMeeting signupMeeting, String messageType)This will send different kind of emails to all related participants in a meeting accourding to the meesage typevoidsendEmailToAttendee(SignupEventTrackingInfo eventTrackingInfo)Send email to attendee when they sign up/cancel their attendancevoidsendEmailToOrganizer(SignupEventTrackingInfo eventTrackingInfo)An email will be sent to event/meeting organizer when attendee has taken some actions such as signup and cancelvoidsendEmailToParticipantsByOrganizerAction(SignupEventTrackingInfo signupEventTrackingInfo)This will send email to participants by organizervoidsendUpdateCommentEmail(SignupEventTrackingInfo eventTrackingInfo)This sends an email notifying the receiver that the comment has been modifiedvoidupdateModifiedMeetings(List<SignupMeeting> meetings, List<SignupTimeslot> removedTimeslots, boolean isOrganizer)This updates a list of SingupMeeting objects into the database storage.voidupdateSignupMeeting(SignupMeeting meeting, boolean isOrganizer)This updates the SingupMeeting object into the database storage.voidupdateSignupMeetings(List<SignupMeeting> meetings, boolean isOrganizer)This updates a list of SingupMeeting objects into the database storage.
-
-
-
Method Detail
-
getAllSignupMeetings
List<SignupMeeting> getAllSignupMeetings(String currentSiteId, String userId)
This returns a list of SignupMeeting for a specified site that are available to the user in the site- Parameters:
currentSiteId- a unique id which represents the current siteuserId- the internal user id (not username)- Returns:
- a list of SignupMeeting objects
-
getSignupMeetings
List<SignupMeeting> getSignupMeetings(String currentLocationId, String currentUserId, Date searchEndDate)
This returns a subset list of SignupMeeting from Now to searchEndDate for the site- Parameters:
currentLocationId- a unique id which represents the current site IdcurrentUserId- the internal user id (not username)searchEndDate- date,which constraints the search ending date.- Returns:
- a list of SignupMeeting objects
-
getSignupMeetings
List<SignupMeeting> getSignupMeetings(String currentSiteId, String userId, Date startDate, Date endDate)
This returns a subset list of SignupMeeting from startDate to endDate for the site- Parameters:
currentSiteId- a unique id which represents the current siteuserId- the internal user id (not username)startDate- date,which constraints the search starting date.endDate- date,which constraints the search ending date.- Returns:
- a list of SignupMeeting objects
-
getSignupMeetingsInSiteWithCache
List<SignupMeeting> getSignupMeetingsInSiteWithCache(String siteId, Date startDate, int timeFrameInDays)
This returns a subset list of SignupMeeting from startDate to endDate for the site. The result might be 5 minutes old data due to ECache- Parameters:
siteId- unique id which represents the multiple sitesstartDate- date,which constraints the search starting date.timeFrameInDays- number of days ,which constraints the search ending date.- Returns:
- a list of SignupMeeting objects
-
getSignupMeetingsInSitesWithCache
List<SignupMeeting> getSignupMeetingsInSitesWithCache(List<String> siteIds, Date startDate, int timeFrameInDays)
This returns a subset list of SignupMeeting from startDate to endDate for the sites, The result maybe 5 minutes old due to ECache- Parameters:
siteIds- a collection of unique ids which represents the multiple sitesstartDate- date,which constraints the search starting date.timeFrameInDays- number of days ,which constraints the search ending date.- Returns:
- a list of SignupMeeting objects
-
getSignupMeetingsInSite
List<SignupMeeting> getSignupMeetingsInSite(String siteId, Date startDate, Date endDate)
This returns a subset list of SignupMeeting from startDate to endDate for the site.- Parameters:
siteId- unique id which represents the multiple sitesstartDate- date,which constraints the search starting date.endDate- end date ,which constraints the search ending date.- Returns:
- a list of SignupMeeting objects
-
getSignupMeetingsInSites
List<SignupMeeting> getSignupMeetingsInSites(List<String> siteIds, Date startDate, Date endDate)
This returns a subset list of SignupMeeting from startDate to endDate for the sites with out cached- Parameters:
siteIds- a collection of unique ids which represents the multiple sitesstartDate- date,which constraints the search starting date.endDate- endDate ,which constraints the search ending date.- Returns:
- a list of SignupMeeting objects
-
getRecurringSignupMeetings
List<SignupMeeting> getRecurringSignupMeetings(String currentSiteId, String userId, Long recurrenceId, Date startDate)
This returns a subset list of SignupMeetings with the same recurrenceId from starting date for the site- Parameters:
currentSiteId- a unique id which represents the current siteuserId- the internal user id (not username)recurrenceId- recurrenceId,which constraints the recurring meetings.startDate- date,which constraints the search starting date.- Returns:
- a list of SignupMeeting objects
-
saveMeeting
Long saveMeeting(SignupMeeting signupMeeting, String userId) throws PermissionException
This saves meeting object into database- Parameters:
signupMeeting- a SignupMeeting objectuserId- the internal user id (not username)- Returns:
- a unique Id for the SignupMeeting object from DB
- Throws:
PermissionException- thrown if the user does not have access
-
saveMeetings
void saveMeetings(List<SignupMeeting> signupMeetings, String userId) throws PermissionException
This saves meeting objects into database- Parameters:
signupMeeting- a list of SignupMeeting objectsuserId- the internal user id (not username)- Throws:
PermissionException- thrown if the user does not have access
-
updateSignupMeeting
void updateSignupMeeting(SignupMeeting meeting, boolean isOrganizer) throws Exception
This updates the SingupMeeting object into the database storage. If it's an organizer, permission: signup.update is required. Otherwise permission: signup.attend/signup.attend.all is required- Parameters:
meeting- a SignupMeeting objectisOrganizer- true if the user is event-organizer- Throws:
Exception- thrown if something goes bad
-
updateSignupMeetings
void updateSignupMeetings(List<SignupMeeting> meetings, boolean isOrganizer) throws Exception
This updates a list of SingupMeeting objects into the database storage. If it's an organizer, permission: signup.update is required. Otherwise permission: signup.attend/signup.attend.all is required- Parameters:
meetings- a list of SignupMeeting objectsisOrganizer- true if the user is event-organizer- Throws:
Exception- thrown if something goes bad
-
updateModifiedMeetings
void updateModifiedMeetings(List<SignupMeeting> meetings, List<SignupTimeslot> removedTimeslots, boolean isOrganizer) throws Exception
This updates a list of SingupMeeting objects into the database storage. If it's an organizer, permission: signup.update is required. Otherwise permission: signup.attend/signup.attend.all is required- Parameters:
meetings- a list of SignupMeeting objectsremovedTimeslots- a list of SignupTimeslot objects, which will be removed from the meetingisOrganizer- true if the user is event-organizer- Throws:
Exception- thrown if something goes bad
-
loadSignupMeetingWithAutoSelectedSite
SignupTargetSiteEventInfo loadSignupMeetingWithAutoSelectedSite(Long meetingId, String userId, String siteId)
This retrieve a SignupDefaultSiteEvent object from database according to the SignupMeeting Id. However, if the siteId is null, it will return a SignupTargetSiteEventInfo object with a target siteId, in which the user has the highest permission level.- Parameters:
meetingId- a unique Id for SignupMeeting objectuserId- the internal user id (not username)siteId- a unique id which represents the current site- Returns:
- a SignupTargetSiteEventInfo object
-
loadSignupMeeting
SignupMeeting loadSignupMeeting(Long meetingId, String userId, String siteId)
This retrieve a SignupMeeting object from database according to the SignupMeeting Id- Parameters:
meetingId- a unique Id for SignupMeeting objectuserId- the internal user id (not username)siteId- a unique id which represents the current site- Returns:
- a SignupMeeting object
-
isAllowedToCreateinSite
boolean isAllowedToCreateinSite(String userId, String siteId)
Test to see if the user has permission to create an event/meeting at site level in the site- Parameters:
userId- the internal user id (not username)siteId- a unique id which represents the current site- Returns:
- true, if the user has permission to creating an event/meeting for this site
-
isAllowedToCreateinGroup
boolean isAllowedToCreateinGroup(String userId, String siteId, String groupId)
Test to see if the user has permission to create an event/meeting at group level in the site- Parameters:
userId- the internal user id (not username)siteId- a unique id which represents the current sitegroupId- a unique id which represents the groupId at the site- Returns:
- true, if the user has permission to creating an event/meeting at group level in the site
-
isAllowedToCreateAnyInSite
boolean isAllowedToCreateAnyInSite(String userId, String siteId)
Check permission for creating event/meeting either at a site level or at a group level- Parameters:
userId- the internal user id (not username)siteId- a unique id which represents the current site- Returns:
- true, if the user has the permission to create
-
sendEmail
void sendEmail(SignupMeeting signupMeeting, String messageType) throws Exception
This will send different kind of emails to all related participants in a meeting accourding to the meesage type- Parameters:
signupMeeting- a SignupMeeting objectmessageType- a string type, which classifies what type of message, which should be emailed away- Throws:
Exception- thrown if something goes bad
-
sendEmailToOrganizer
void sendEmailToOrganizer(SignupEventTrackingInfo eventTrackingInfo) throws Exception
An email will be sent to event/meeting organizer when attendee has taken some actions such as signup and cancel- Parameters:
eventTrackingInfo- an EventTrackingInfo object, which contains all the information about user action such as signup and cancel as well as auto-promotion- Throws:
Exception- thrown if something goes bad
-
sendCancellationEmail
void sendCancellationEmail(SignupEventTrackingInfo eventTrackingInfo) throws Exception
This sends cancellation email to event/meeting organizer as well as to the people on waiting list, who get promoted due to the attendee's cancellation- Parameters:
eventTrackingInfo- an EventTrackingInfo object, which contains all the information about user action such as signup and cancel as well as auto-promotion- Throws:
Exception- thrown if something goes bad
-
sendUpdateCommentEmail
void sendUpdateCommentEmail(SignupEventTrackingInfo eventTrackingInfo) throws Exception
This sends an email notifying the receiver that the comment has been modified- Parameters:
eventTrackingInfo- an EventTrackingInfo object, which contains all the information about user action such as signup and cancel as well as auto-promotion- Throws:
Exception- thrown if something goes bad
-
sendEmailToParticipantsByOrganizerAction
void sendEmailToParticipantsByOrganizerAction(SignupEventTrackingInfo signupEventTrackingInfo) throws Exception
This will send email to participants by organizer- Parameters:
signupEventTrackingInfo- an EventTrackingInfo object, which contains all the information about user action such as signup and cancel as well as auto-promotion- Throws:
Exception- thrown if something goes bad
-
postToCalendar
void postToCalendar(SignupMeeting signupMeeting) throws Exception
This method will post the event/meeting into the Calendar at Scheduler tool- Parameters:
signupMeeting- a SignupMeeting object- Throws:
Exception- thrown if something goes bad
-
modifyCalendar
void modifyCalendar(SignupMeeting meeting) throws Exception
This method will modify the posted calendar at Scheduler tool for this event/meeting- Parameters:
meeting- a SignupMeeting object- Throws:
Exception- thrown if something goes bad
-
removeMeetings
void removeMeetings(List<SignupMeeting> meetings) throws Exception
This deletes a list of SignupMeeting objects. It should remove all or none of them in one transaction Then sends email cancellation notification if the meeting has not already occurred.- Parameters:
meetings- a list of SignupMeeting objects, which will be deleted from Database storage- Throws:
Exception- thrown if something goes bad
-
removeCalendarEventsOnModifiedMeeting
void removeCalendarEventsOnModifiedMeeting(List<SignupMeeting> meetings) throws Exception
This method will remove a list of the posted Calendar for a set of modified events/meetings in Scheduler tool- Parameters:
meetings- a list of SignupMeeting objects- Throws:
Exception- thrown if something goes bad
-
removeCalendarEvents
void removeCalendarEvents(List<SignupMeeting> meetings) throws Exception
This method will remove a list of the posted Calendar for the events/meetings in Scheduler tool- Parameters:
meetings- a list of SignupMeeting objects- Throws:
Exception- thrown if something goes bad
-
isEventExisted
boolean isEventExisted(Long eventId)
Test to see if the event exists.- Parameters:
eventId- a Long Id for event- Returns:
- true if the event is existed.
-
sendEmailToAttendee
void sendEmailToAttendee(SignupEventTrackingInfo eventTrackingInfo) throws Exception
Send email to attendee when they sign up/cancel their attendance- Parameters:
eventTrackingInfo- an EventTrackingInfo object, which contains all the information about user action such as signup and cancel- Throws:
Exception- thrown if something goes bad
-
getAllLocations
List<String> getAllLocations(String siteId) throws Exception
Get all the Locations from a site- Parameters:
siteId- String - a site Id- Returns:
- a list of Locations in a site
- Throws:
Exception
-
getAllCategories
List<String> getAllCategories(String siteId) throws Exception
Get all the Categories from a site- Parameters:
siteId- String - a site Id- Returns:
- a list of Categories in a site
- Throws:
Exception
-
-