Interface ActivityObjectiveBankAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign Activities to
ObjectiveBanks . An Activity may map to multiple
ObjectiveBanks and removing the last reference to a Activity is
the equivalent of deleting it. Each ObjectiveBank may have its own
authorizations governing who is allowed to operate on it.
Moving or adding a reference of an Activity to another
ObjectiveBank is not a copy operation (eg: does not change its Id
).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignActivityToObjectiveBank(Id activityId, Id objectiveBankId) Adds an existingActivityto aObjectiveBank.booleanTests if this user can alter activity/objective bank mappings.booleancanAssignActivitiesToObjectiveBank(Id objectiveBankId) Tests if this user can alter activity/objective bank mappings.getAssignableObjectiveBankIds(Id objectiveBankId) Gets a list of objective banks including and under the given objective bank node in which any activity can be assigned.getAssignableObjectiveBankIdsForActivity(Id objectiveBankId, Id activityId) Gets a list of objective banks including and under the given objective bank node in which a specific activity can be assigned.voidreassignActivityToObjectiveBank(Id activityId, Id fromObjectiveBankId, Id toObjectiveBankId) Moves anActivityfrom oneObjectiveBankto another.voidunassignActivityFromObjectiveBank(Id activityId, Id objectiveBankId) Removes aActivityfrom aObjectiveBank.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
-
canAssignActivities
boolean canAssignActivities()Tests if this user can alter activity/objective bank 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 assignment operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignActivitiesToObjectiveBank
Tests if this user can alter activity/objective bank 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 assignment operations to unauthorized users.- Parameters:
objectiveBankId- theIdof theObjectiveBank- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-objectiveBankIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableObjectiveBankIds
Gets a list of objective banks including and under the given objective bank node in which any activity can be assigned.- Parameters:
objectiveBankId- theIdof theObjectiveBank- Returns:
- list of assignable objective bank
Ids - Throws:
NullArgumentException-objectiveBankIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableObjectiveBankIdsForActivity
IdList getAssignableObjectiveBankIdsForActivity(Id objectiveBankId, Id activityId) throws OperationFailedException Gets a list of objective banks including and under the given objective bank node in which a specific activity can be assigned.- Parameters:
objectiveBankId- theIdof theObjectiveBankactivityId- theIdof theActivity- Returns:
- list of assignable objective bank
Ids - Throws:
NullArgumentException-activityIdorobjectiveBankIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignActivityToObjectiveBank
void assignActivityToObjectiveBank(Id activityId, Id objectiveBankId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingActivityto aObjectiveBank.- Parameters:
activityId- theIdof theActivityobjectiveBankId- theIdof theObjectiveBank- Throws:
AlreadyExistsException-activityIdalready mapped toobjectiveBankIdNotFoundException-activityIdorobjectiveBankIdnot foundNullArgumentException-activityIdorobjectiveBankIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignActivityFromObjectiveBank
void unassignActivityFromObjectiveBank(Id activityId, Id objectiveBankId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aActivityfrom aObjectiveBank.- Parameters:
activityId- theIdof theActivityobjectiveBankId- theIdof theObjectiveBank- Throws:
NotFoundException-activityIdorobjectiveBankIdnot found oractivityIdnot mapped toobjectiveBankIdNullArgumentException-activityIdorobjectiveBankIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignActivityToObjectiveBank
void reassignActivityToObjectiveBank(Id activityId, Id fromObjectiveBankId, Id toObjectiveBankId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves anActivityfrom oneObjectiveBankto another. Mappings to otherObjectiveBanksare unaffected.- Parameters:
activityId- theIdof theActivityfromObjectiveBankId- theIdof the currentObjectiveBanktoObjectiveBankId- theIdof the destinationObjectiveBank- Throws:
AlreadyExistsException-activityIdalready assigned totoObjectiveBankIdNotFoundException-activityId, fromObjectiveBankId, ortoObjectiveBankIdnot found oractivityIdnot mapped tofromObjectiveBankIdNullArgumentException-activityId, fromObjectiveBankId, ortoObjectiveBankIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-