Interface CommitmentCalendarAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, 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 ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignCommitmentToCalendar(Id commitmentId, Id calendarId) Adds an existingCommitmentto aCalendar.booleanTests if this user can alter commitment/calendar mappings.booleancanAssignCommitmentsToCalendar(Id calendarId) Tests if this user can alter commitment/calendar mappings.getAssignableCalendarIds(Id calendarId) Gets a list of calendars including and under the given calendar node in which any commitment can be assigned.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.voidreassignCommitmentToCalendar(Id commitmentId, Id fromCalendarId, Id toCalendarId) Moves aCommitmentfrom oneCalendarto another.voidunassignCommitmentFromCalendar(Id commitmentId, Id calendarId) Removes aCommitmentfrom aCalendar.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
canAssignCommitments
boolean canAssignCommitments()Tests if this user can alter commitment/calendar mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignCommitmentsToCalendar
Tests if this user can alter commitment/calendar mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Parameters:
calendarId- theIdof theCalendar- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-calendarIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableCalendarIds
Gets a list of calendars including and under the given calendar node in which any commitment can be assigned.- Parameters:
calendarId- theIdof theCalendar- Returns:
- list of assignable calendar
Ids - Throws:
NullArgumentException-calendarIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableCalendarIdsForCommitment
IdList getAssignableCalendarIdsForCommitment(Id calendarId, Id commitmentId) throws OperationFailedException Gets a list of calendars including and under the given calendar node in which a specific commitment can be assigned.- Parameters:
calendarId- theIdof theCalendarcommitmentId- theIdof theCommitment- Returns:
- list of assignable calendar
Ids - Throws:
NullArgumentException-calendarIdorcommitmentIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignCommitmentToCalendar
void assignCommitmentToCalendar(Id commitmentId, Id calendarId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingCommitmentto aCalendar.- Parameters:
commitmentId- theIdof theCommitmentcalendarId- theIdof theCalendar- Throws:
AlreadyExistsException-commitmentIdis already assigned tocalendarIdNotFoundException-commitmentIdorcalendarIdnot foundNullArgumentException-commitmentIdorcalendarIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignCommitmentFromCalendar
void unassignCommitmentFromCalendar(Id commitmentId, Id calendarId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aCommitmentfrom aCalendar.- Parameters:
commitmentId- theIdof theCommitmentcalendarId- theIdof theCalendar- Throws:
NotFoundException-commitmentIdorcalendarIdnot found orcommitmentIdnot assigned tocalendarIdNullArgumentException-commitmentIdorcalendarIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignCommitmentToCalendar
void reassignCommitmentToCalendar(Id commitmentId, Id fromCalendarId, Id toCalendarId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aCommitmentfrom oneCalendarto another. Mappings to otherCalendarsare unaffected.- Parameters:
commitmentId- theIdof theCommitmentfromCalendarId- theIdof the currentCalendartoCalendarId- theIdof the destinationCalendar- Throws:
AlreadyExistsException-commitmentIdalready assigned totoCalendarIdNotFoundException-commitmentId, fromCalendarId, ortoCalendarIdnot found orcommitmentIdnot mapped tofromCalendarIdNullArgumentException-commitmentId, fromCalendarId, ortoCalendarIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-