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