public interface CyclicEventCalendarAssignmentSession extends OsidSession
This session provides methods to re-assign CyclicEvents
to Calendars.
A CyclicEvent
may map to
multiple Calendars
and removing the last reference to a
CyclicEvent
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 CyclicEvent
to
another Calendar
is not a copy operation (eg: does not
change its Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignCyclicEventToCalendar(Id cyclicEventId,
Id calendarId)
Adds an existing
CyclicEvent to a Calendar. |
boolean |
canAssignCyclicEvents()
Tests if this user can alter cyclic event/calendar mappings.
|
boolean |
canAssignCyclicEventsToCalendar(Id calendarId)
Tests if this user can alter cyclic event/calendar mappings.
|
IdList |
getAssignableCalendarIds(Id calendarId)
Gets a list of calendars including and under the given calendar node
in which any cyclic event can be assigned.
|
IdList |
getAssignableCalendarIdsForCyclicEvent(Id calendarId,
Id cyclicEventId)
Gets a list of calendars including and under the given calendar node
in which a specific cyclic event can be assigned.
|
void |
reassignCyclicEventToCalendar(Id cyclicEventId,
Id fromCalendarId,
Id toCalendarId)
Moves a
CyclicEvent from one Calendar to
another. |
void |
unassignCyclicEventFromCalendar(Id cyclicEventId,
Id calendarId)
Removes a
CyclicEvent from a Calendar. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignCyclicEvents()
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users. false
if mapping is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canAssignCyclicEventsToCalendar(Id calendarId)
calendarId
- the Id
of the Calendar
false
if mapping is not authorized, true
otherwiseNullArgumentException
- calendarId
is
null
mandatory
- This method must be implemented. IdList getAssignableCalendarIds(Id calendarId) throws OperationFailedException
calendarId
- the Id
of the Calendar
Ids
NullArgumentException
- calendarId
is
null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getAssignableCalendarIdsForCyclicEvent(Id calendarId, Id cyclicEventId) throws OperationFailedException
calendarId
- the Id
of the Calendar
cyclicEventId
- the Id
of the CyclicEvent
Ids
NullArgumentException
- calendarId
or
cyclicEventId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignCyclicEventToCalendar(Id cyclicEventId, Id calendarId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
CyclicEvent
to a Calendar.
cyclicEventId
- the Id
of the CyclicEvent
calendarId
- the Id
of the Calendar
AlreadyExistsException
- cyclicEventId
is already assigned to calendarId
NotFoundException
- cyclicEventId
or
calendarId
not foundNullArgumentException
- cyclicEventId
or
calendarId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignCyclicEventFromCalendar(Id cyclicEventId, Id calendarId) throws NotFoundException, OperationFailedException, PermissionDeniedException
CyclicEvent
from a Calendar.
cyclicEventId
- the Id
of the CyclicEvent
calendarId
- the Id
of the Calendar
NotFoundException
- cyclicEventId
or
calendarId
not found or cyclicEventId
not assigned to calendarId
NullArgumentException
- cyclicEventId
or
calendarId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void reassignCyclicEventToCalendar(Id cyclicEventId, Id fromCalendarId, Id toCalendarId) throws NotFoundException, OperationFailedException, PermissionDeniedException
CyclicEvent
from one Calendar
to
another. Mappings to other Calendars
are unaffected.cyclicEventId
- the Id
of the CyclicEvent
fromCalendarId
- the Id
of the current
Calendar
toCalendarId
- the Id
of the destination
Calendar
NotFoundException
- cyclicEvemtId
fromCalendarId,
or toCalendarId
not
found or cyclicEventId
not mapped to
fromCalendarId
NullArgumentException
- cyclicEventId,
fromCalendarId,
or toCalendarId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.