Interface OffsetEventEnablerCalendarAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign OffsetEventEnabler
to Calendar mappings. An OffsetEventEnabler may appear in
multiple Calendar objects and removing the last reference to an
OffsetEventEnabler is the equivalent of deleting it. Each
Calendar may have its own authorizations governing who is allowed to
operate on it.
Adding a reference of an OffsetEventEnabler to another
Calendar is not a copy operation (eg: does not change its Id ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignOffsetEventEnablerToCalendar(Id offsetEventEnablerId, Id calendarId) Adds an existingOffsetEventEnablerto anCalendar.booleanTests if this user can alter offset event enabler/calendar mappings.booleancanAssignOffsetEventEnablersToCalendar(Id calendarId) Tests if this user can alter offset event enabler/calendar mappings.getAssignableCalendarIds(Id calendarId) Gets a list of calendars including and under the given calendar node in which any offset event enabler can be assigned.getAssignableCalendarIdsForOffsetEventEnabler(Id calendarId, Id eventEnablerId) Gets a list of calendars including and under the given calendar node in which a specific offset event enabler can be assigned.voidreassignOffsetEventEnablerToCalendar(Id offsetEventEnablerId, Id fromCalendarId, Id toCalendarId) Moves anOffsetEventEnablerfrom oneCalendarto another.voidunassignOffsetEventEnablerFromCalendar(Id offsetEventEnablerId, Id calendarId) Removes anOffsetEventEnablerfrom anCalendar.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
canAssignOffsetEventEnablers
boolean canAssignOffsetEventEnablers()Tests if this user can alter offset event enabler/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 lookup operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignOffsetEventEnablersToCalendar
Tests if this user can alter offset event enabler/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 lookup 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 offset event enabler 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.
-
getAssignableCalendarIdsForOffsetEventEnabler
IdList getAssignableCalendarIdsForOffsetEventEnabler(Id calendarId, Id eventEnablerId) throws OperationFailedException Gets a list of calendars including and under the given calendar node in which a specific offset event enabler can be assigned.- Parameters:
calendarId- theIdof theCalendareventEnablerId- theIdof theOffsetEventEnabler- Returns:
- list of assignable calendar
Ids - Throws:
NullArgumentException-calendarIdoreventEnablerIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignOffsetEventEnablerToCalendar
void assignOffsetEventEnablerToCalendar(Id offsetEventEnablerId, Id calendarId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingOffsetEventEnablerto anCalendar.- Parameters:
offsetEventEnablerId- theIdof theOffsetEventEnablercalendarId- theIdof theCalendar- Throws:
AlreadyExistsException-offsetEventEnablerIdalready mapped tocalendarIdNotFoundException-offsetEventEnablerIdorcalendarIdnot foundNullArgumentException-offsetEventEnablerIdorcalendarIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignOffsetEventEnablerFromCalendar
void unassignOffsetEventEnablerFromCalendar(Id offsetEventEnablerId, Id calendarId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes anOffsetEventEnablerfrom anCalendar.- Parameters:
offsetEventEnablerId- theIdof theOffsetEventEnablercalendarId- theIdof theCalendar- Throws:
NotFoundException-offsetEventEnablerIdorcalendarIdnot found oroffsetEventEnablerIdnot assigned tocalendarIdNullArgumentException-offsetEventEnablerIdorcalendarIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignOffsetEventEnablerToCalendar
void reassignOffsetEventEnablerToCalendar(Id offsetEventEnablerId, Id fromCalendarId, Id toCalendarId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves anOffsetEventEnablerfrom oneCalendarto another. Mappings to otherCalendarsare unaffected.- Parameters:
offsetEventEnablerId- theIdof theOffsetEventEnablerfromCalendarId- theIdof the currentCalendartoCalendarId- theIdof the destinationCalendar- Throws:
AlreadyExistsException-offsetEventEnablerIdalready assigned totoCalendarIdNotFoundException-offsetEventEnablerId, fromCalendarId, ortoCalendarIdnot found oroffsetEventEnablerIdnot mapped tofromCalendarIdNullArgumentException-offsetEventEnablerId, fromCalendarId, ortoCalendarIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-