public interface EventCalendarAssignmentSession extends OsidSession
This session provides methods to re-assign Events
to
Calendars.
An Event
may map to multiple
Calendars
and removing the last reference to an
Event
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 Event
to another
Calendar
is not a copy operation (eg: does not change its
Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignEventToCalendar(Id eventId,
Id calendarId)
Adds an existing
Event to a Calendar. |
boolean |
canAssignEvents()
Tests if this user can alter event/calendar mappings.
|
boolean |
canAssignEventsToCalendar(Id calendarId)
Tests if this user can alter event/calendar mappings.
|
IdList |
getAssignableCalendarIds(Id calendarId)
Gets a list of calendars including and under the given calendar node
in which any event can be assigned.
|
IdList |
getAssignableCalendarIdsForEvent(Id calendarId,
Id eventId)
Gets a list of calendars including and under the given calendar node
in which a specific event can be assigned.
|
void |
reassignEventToCalendar(Id eventId,
Id fromBillingId,
Id toBiillingId)
Moves an
Event from one Calendar to
another. |
void |
unassignEventFromCalendar(Id eventId,
Id calendarId)
Removes an
Event from a Calendar. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignEvents()
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 canAssignEventsToCalendar(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 getAssignableCalendarIdsForEvent(Id calendarId, Id eventId) throws OperationFailedException
calendarId
- the Id
of the Calendar
eventId
- the Id
of the Event
Ids
NullArgumentException
- calendarId
or
eventId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignEventToCalendar(Id eventId, Id calendarId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Event
to a Calendar.
eventId
- the Id
of the Event
calendarId
- the Id
of the Calendar
AlreadyExistsException
- eventId
is
already assigned to calendarId
NotFoundException
- eventId
or
calendarId
not foundNullArgumentException
- eventId
or
calendarId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignEventFromCalendar(Id eventId, Id calendarId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Event
from a Calendar.
eventId
- the Id
of the Event
calendarId
- the Id
of the Calendar
NotFoundException
- eventId or calendarId not
found or eventId not assigned to calendarId
NullArgumentException
- eventId
or
calendarId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void reassignEventToCalendar(Id eventId, Id fromBillingId, Id toBiillingId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Event
from one Calendar
to
another. Mappings to other Calendars
are unaffected.eventId
- the Id
of the Event
fromBillingId
- the Id
of the current
Calendar
toBiillingId
- the Id
of the destination
Calendar
NotFoundException
- eventId, fromCalendarId,
or toCalendarId
not found or
eventId
not mapped to fromCalendarId
NullArgumentException
- eventId, fromCalendarId,
or toCalendarId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.