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