public interface OffsetEventCalendarAssignmentSession extends OsidSession
This session provides methods to re-assign OffsetEvents
to Calendars.
An OffsetEvent
may map to
multiple Calendars
and removing the last reference to an
OffsetEvent
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 an OffsetEvent
to
another Calendar
is not a copy operation (eg: does not
change its Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignOffsetEventToCalendar(Id offsetEventId,
Id calendarId)
Adds an existing
OffsetEvent to a Calendar. |
boolean |
canAssignOffsetEvents()
Tests if this user can alter offset event/calendar mappings.
|
boolean |
canAssignOffsetEventsToCalendar(Id calendarId)
Tests if this user can alter offset event/calendar mappings.
|
IdList |
getAssignableCalendarIds(Id calendarId)
Gets a list of calendars including and under the given calendar node
in which any offset event can be assigned.
|
IdList |
getAssignableCalendarIdsForOffsetEvent(Id calendarId,
Id offsetEventId)
Gets a list of calendars including and under the given calendar node
in which a specific offset event can be assigned.
|
void |
unassignOffsetEventFromCalendar(Id offsetEventId,
Id calendarId)
Removes an
OffsetEvent from a Calendar. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignOffsetEvents()
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 canAssignOffsetEventsToCalendar(Id calendarId)
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.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 getAssignableCalendarIdsForOffsetEvent(Id calendarId, Id offsetEventId) throws OperationFailedException
calendarId
- the Id
of the Calendar
offsetEventId
- the Id
of the
offsetEventId
Ids
NullArgumentException
- calendarId
or
offsetEventId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignOffsetEventToCalendar(Id offsetEventId, Id calendarId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
OffsetEvent
to a Calendar.
offsetEventId
- the Id
of the OffsetEvent
calendarId
- the Id
of the Calendar
AlreadyExistsException
- offsetEventId
is already assigned to calendarId
NotFoundException
- offsetEventId
or
calendarId
not foundNullArgumentException
- offsetEventId
or
calendarId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignOffsetEventFromCalendar(Id offsetEventId, Id calendarId) throws NotFoundException, OperationFailedException, PermissionDeniedException
OffsetEvent
from a Calendar.
offsetEventId
- the Id
of the OffsetEvent
calendarId
- the Id
of the Calendar
NotFoundException
- offsetEventId
or
calendarId
not found or offsetEventId
not assigned to calendarId
NullArgumentException
- offsetEventId
or
calendarId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.