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