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