Interface EventCyclicEventAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to manually assign Events to
CyclicEvents . An Event may be the product of a
OsidRule originating from a SupersedingEvent ,
OffsetEvent , or a RecurringEvent in which case the
CyclicEvent is applied to the rule.
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignEventToCyclicEvent(Id eventId, Id cyclicEventId) Adds an existingEventto aCyclicEvent.booleancanAssignCyclicEventsToCyclicEvent(Id cyclicEventId) Tests if this user can alter event/cyclic event mappings.booleanTests if this user can alter event/cyclic event mappings.Gets a list of cyclic eventIds.Gets theCalendarassociated with this session.Gets theCalendarIdassociated with this session.voidunassignEventFromCyclicEvent(Id eventId, Id cyclicEventId) Removes anEventfrom aCyclicEvent.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
-
getCalendarId
Id getCalendarId()Gets theCalendarIdassociated with this session.- Returns:
- the
Calendar Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getCalendar
Gets theCalendarassociated with this session.- Returns:
- the
Calendarassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canAssignEvents
boolean canAssignEvents()Tests if this user can alter event/cyclic event 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.
-
canAssignCyclicEventsToCyclicEvent
Tests if this user can alter event/cyclic event 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 a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.- Parameters:
cyclicEventId- theIdof theCyclicEvent- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-cyclicEventIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableCyclicEventIds
Gets a list of cyclic eventIds.- Returns:
- list of assignable cyclic event
Ids - Throws:
OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignEventToCyclicEvent
void assignEventToCyclicEvent(Id eventId, Id cyclicEventId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingEventto aCyclicEvent.- Parameters:
eventId- theIdof theEventcyclicEventId- theIdof theCyclicEvent- Throws:
AlreadyExistsException-eventIdis already assigned tocyclicEventIdNotFoundException-eventIdorcyclicEventIdnot foundNullArgumentException-eventIdorcyclicEventIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignEventFromCyclicEvent
void unassignEventFromCyclicEvent(Id eventId, Id cyclicEventId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes anEventfrom aCyclicEvent.- Parameters:
eventId- theIdof theEventcyclicEventId- theIdof theCyclicEvent- Throws:
NotFoundException-eventIdorcyclicEventIdnot found oreventIdis not assigned tocyclicEventIdNullArgumentException-eventIdorcyclicEventIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-