Interface AssessmentTakenBankAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign AssessmentTaken
objects to Banks . An AssessmentTaken may map to multiple
Banks and removing the last reference to an
AssessmentTaken is the equivalent of deleting it. Each Bank may
have its own authorizations governing who is allowed to operate on it.
Moving or adding a reference of an AssessmentTaken to another
Bank is not a copy operation (eg: does not change its Id
).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignAssessmentTakenToBank(Id assessmentTakenId, Id bankId) Adds an existingAssessmentTakento aBank.booleanTests if this user can alter assessment taken/bank mappings.booleancanAssignAssessmentsTakenToBank(Id bankId) Tests if this user can alter assessment taken/bank mappings.getAssignableBankIds(Id bankId) Gets a list of banks including and under the given banks node in which any assessment taken can be assigned.getAssignableBankIdsForAssessmentTaken(Id bankId, Id assessmentTakenId) Gets a list of bank including and under the given bank node in which a specific assessment taken can be assigned.voidreassignAssessmentTakenToBank(Id assessmentTakenId, Id fromBankId, Id toBankId) Moves anAssessmentTakenfrom oneBankto another.voidunassignAssessmentTakenFromBank(Id assessmentTakenId, Id bankId) Removes anAssessmentTakenfrom aBank.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
-
canAssignAssessmentsTaken
boolean canAssignAssessmentsTaken()Tests if this user can alter assessment taken/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 lookup operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignAssessmentsTakenToBank
Tests if this user can alter assessment taken/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 lookup operations to unauthorized users.- Parameters:
bankId- theIdof theBank- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-bankIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableBankIds
Gets a list of banks including and under the given banks node in which any assessment taken can be assigned.- Parameters:
bankId- theIdof theBank- Returns:
- list of assignable bank
Ids - Throws:
NullArgumentException-bankIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableBankIdsForAssessmentTaken
IdList getAssignableBankIdsForAssessmentTaken(Id bankId, Id assessmentTakenId) throws OperationFailedException Gets a list of bank including and under the given bank node in which a specific assessment taken can be assigned.- Parameters:
bankId- theIdof theBankassessmentTakenId- theIdof theAssessmentTaken- Returns:
- list of assignable bank
Ids - Throws:
NullArgumentException-bankIdorassessmentTakenIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignAssessmentTakenToBank
void assignAssessmentTakenToBank(Id assessmentTakenId, Id bankId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingAssessmentTakento aBank.- Parameters:
assessmentTakenId- theIdof theAssessmentTakenbankId- theIdof theBank- Throws:
AlreadyExistsException-assessmentTakenIdis already assigned tobankIdNotFoundException-assessmentTakenIdorbankIdnot foundNullArgumentException-assessmentTakenIdorbankIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
unassignAssessmentTakenFromBank
void unassignAssessmentTakenFromBank(Id assessmentTakenId, Id bankId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes anAssessmentTakenfrom aBank.- Parameters:
assessmentTakenId- theIdof theAssessmentTakenbankId- theIdof theBank- Throws:
NotFoundException-assessmentTakenIdorbankIdnot found orassessmentTakenIdnot assigned tobankIdNullArgumentException-assessmentTakenIdorbankIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
reassignAssessmentTakenToBank
void reassignAssessmentTakenToBank(Id assessmentTakenId, Id fromBankId, Id toBankId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves anAssessmentTakenfrom oneBankto another. Mappings to otherBanksare unaffected.- Parameters:
assessmentTakenId- theIdof theAssessmentTakenfromBankId- theIdof the currentBanktoBankId- theIdof the destinationBank- Throws:
AlreadyExistsException-assessmentTakenIdalready assigned totoBankIdNotFoundException-assessmentTakenId, fromBankId, ortoBankIdnot found orassessmentTakenIdnot mapped tofromBankIdNullArgumentException-assessmentTakenId, fromBankId, ortoBankIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-