Interface SupersedingEventCalendarAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign SupersedingEvents
to Calendars. A SupersedingEvent may map to multiple
Calendars and removing the last reference to a
SupersedingEvent is the equivalent of deleting it. Each Calendar
may have its own authorizations governing who is allowed to operate on it.
Moving or adding a reference of a SupersedingEvent to another
Calendar is not a copy operation (eg: does not change its
Id).
Like all OsidSessions,
SupersedingEventCalendarAssignmentSessions are dedicated to single
processing threads and a single authenticated user.
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignSupersedingEventToCalendar(Id supersedingEventId, Id calendarId) Adds an existingSupersedingEventto aCalendar.booleanTests if this user can alter superseding event/calendar mappings.booleancanAssignSupersedingEventsToCalendar(Id calendarId) Tests if this user can alter superseding event/calendar mappings.getAssignableCalendarIds(Id calendarId) Gets a list of calendars including and under the given calendar node in which any superseding event can be assigned.getAssignableCalendarIdsForSupersedingEvent(Id calendarId, Id supersedingEventId) Gets a list of calendars including and under the given calendar node in which a specific superseding event can be assigned.voidreassignSupersedingEventToCalendar(Id supersedingEventId, Id fromCalendarId, Id toCalendarId) Moves aSupersedingEventfrom oneCalendarto another.voidunassignSupersedingEventFromCalendar(Id supersedingEventId, Id calendarId) Removes aSupersedingEventfrom aCalendar.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatTypes, getLocales, isAuthenticated, startTransaction, supportsTransactions
-
Method Details
-
canAssignSupersedingEvents
boolean canAssignSupersedingEvents()Tests if this user can alter superseding event/calendar mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignSupersedingEventsToCalendar
Tests if this user can alter superseding event/calendar mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.- Parameters:
calendarId- theIdof theCalendar- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-calendarIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableCalendarIds
Gets a list of calendars including and under the given calendar node in which any superseding event can be assigned.- Parameters:
calendarId- theIdof theCalendar- Returns:
- list of assignable calendar
Ids - Throws:
NullArgumentException-calendarIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableCalendarIdsForSupersedingEvent
IdList getAssignableCalendarIdsForSupersedingEvent(Id calendarId, Id supersedingEventId) throws OperationFailedException Gets a list of calendars including and under the given calendar node in which a specific superseding event can be assigned.- Parameters:
calendarId- theIdof theCalendarsupersedingEventId- theIdof thesupersedingEventId- Returns:
- list of assignable calendar
Ids - Throws:
NullArgumentException-calendarIdorsupersedingEventIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignSupersedingEventToCalendar
void assignSupersedingEventToCalendar(Id supersedingEventId, Id calendarId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingSupersedingEventto aCalendar.- Parameters:
supersedingEventId- theIdof theSupersedingEventcalendarId- theIdof theCalendar- Throws:
AlreadyExistsException-supersedingEventIdis already assigned tocalendarIdNotFoundException-supersedingEventIdorcalendarIdnot foundNullArgumentException-supersedingEventIdorcalendarIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignSupersedingEventFromCalendar
void unassignSupersedingEventFromCalendar(Id supersedingEventId, Id calendarId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aSupersedingEventfrom aCalendar.- Parameters:
supersedingEventId- theIdof theSupersedingEventcalendarId- theIdof theCalendar- Throws:
NotFoundException-supersedingEventIdorcalendarIdnot found orsupersedingEventIdnot assigned tocalendarIdNullArgumentException-supersedingEventIdorcalendarIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignSupersedingEventToCalendar
void reassignSupersedingEventToCalendar(Id supersedingEventId, Id fromCalendarId, Id toCalendarId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aSupersedingEventfrom oneCalendarto another. Mappings to otherCalendarsare unaffected.- Parameters:
supersedingEventId- theIdof theSupersedingeEventfromCalendarId- theIdof the currentCalendartoCalendarId- theIdof the destinationCalendar- Throws:
AlreadyExistsException-supersedingEventIdalready assigned totoCalendarIdNotFoundException-supersedingEventId, fromCalendarId, ortoCalendarIdnot found orsupersedingEventIdnot mapped tofromCalendarIdNullArgumentException-supersedingEventId, fromCalendarId, ortoCalendarIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-