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