Interface ObjectiveObjectiveBankAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign Objectives to
ObjectiveBanks . An Objective may map to multiple
ObjectiveBanks and removing the last reference to an Objective 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 Objective to another
ObjectiveBank is not a copy operation (eg: does not change its Id
).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignObjectiveToObjectiveBank(Id objectiveId, Id objectiveBankId) Adds an existingObjectiveto anObjectiveBank.booleanTests if this user can alter objective/objective bank mappings.booleancanAssignObjectivesToObjectiveBank(Id objectiveBankId) Tests if this user can alter objective/objective bank mappings.getAssignableObjectiveBankIds(Id objectiveBankId) Gets a list of objective banks including and under the given objective bank node in which any objective can be assigned.getAssignableObjectiveBankIdsForObjective(Id objectiveBankId, Id objectiveId) Gets a list of objective banks including and under the given objective bank node in which a specific objective can be assigned.voidreassignObjectiveToObjectiveBank(Id objectiveId, Id fromObjectiveBankId, Id toObjectiveBankId) Moves anObjectivefrom oneObjectiveBankto another.voidunassignObjectiveFromObjectiveBank(Id objectiveId, Id objectiveBankId) Removes anObjectivefrom anObjectiveBank.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
-
canAssignObjectives
boolean canAssignObjectives()Tests if this user can alter objective/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.
-
canAssignObjectivesToObjectiveBank
Tests if this user can alter objective/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 objective 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.
-
getAssignableObjectiveBankIdsForObjective
IdList getAssignableObjectiveBankIdsForObjective(Id objectiveBankId, Id objectiveId) throws OperationFailedException Gets a list of objective banks including and under the given objective bank node in which a specific objective can be assigned.- Parameters:
objectiveBankId- theIdof theObjectiveBankobjectiveId- theIdof theObjective- Returns:
- list of assignable objective bank
Ids - Throws:
NullArgumentException-objectiveIdorobjectiveBankIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignObjectiveToObjectiveBank
void assignObjectiveToObjectiveBank(Id objectiveId, Id objectiveBankId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingObjectiveto anObjectiveBank.- Parameters:
objectiveId- theIdof theObjectiveobjectiveBankId- theIdof theObjectiveBank- Throws:
AlreadyExistsException-objectiveIdalready mapped toobjectiveBankIdNotFoundException-objectiveIdorobjectiveBankIdnot foundNullArgumentException-objectiveIdorobjectiveBankIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignObjectiveFromObjectiveBank
void unassignObjectiveFromObjectiveBank(Id objectiveId, Id objectiveBankId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes anObjectivefrom anObjectiveBank.- Parameters:
objectiveId- theIdof theObjectiveobjectiveBankId- theIdof theObjectiveBank- Throws:
NotFoundException-objectiveIdorobjectiveBankIdnot found orobjectiveIdnot mapped toobjectiveBankIdNullArgumentException-objectiveIdorobjectiveBankIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignObjectiveToObjectiveBank
void reassignObjectiveToObjectiveBank(Id objectiveId, Id fromObjectiveBankId, Id toObjectiveBankId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves anObjectivefrom oneObjectiveBankto another. Mappings to otherObjectiveBanksare unaffected.- Parameters:
objectiveId- theIdof theObjectivefromObjectiveBankId- theIdof the currentObjectiveBanktoObjectiveBankId- theIdof the destinationObjectiveBank- Throws:
AlreadyExistsException-objectiveIdalready assigned totoObjectiveBankIdNotFoundException-objectiveId, fromObjectiveBankId, ortoObjectiveBankIdnot found orobjectiveIdnot mapped tofromObjectiveBankIdNullArgumentException-objectiveId, fromObjectiveBankId, ortoObjectiveBankIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-