Interface AssessmentPartBankAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign AssessmentPart to
Bank mappings. An AssessmentPart may appear in multiple
Bank objects and removing the last reference to an
AssessmentPart is the equivalent of deleting it. Each Bank may
have its own authorizations governing who is allowed to operate on it.
Adding a reference of an AssessmentPart to another
Bank is not a copy operation (eg: does not change its Id ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignAssessmentPartToBank(Id assessmentPartId, Id bankId) Adds an existingAssessmentPartto anBank.booleanTests if this user can alter assessment part/bank mappings.booleancanAssignAssessmentPartsToBank(Id bankId) Tests if this user can alter assessment part/bank mappings.getAssignableBankIds(Id bankId) Gets a list of bank including and under the given bank node in which any assessment part can be assigned.getAssignableBankIdsForAssessmentPart(Id bankId, Id assessmentPartId) Gets a list of bank including and under the given bank node in which a specific assessment part can be assigned.voidreassignAssessmentPartToBank(Id assessmentPartId, Id fromBiankId, Id toBankId) Moves anAssessmentPartfrom oneBankto another.voidunassignAssessmentPartFromBank(Id assessmentPartId, Id bankId) Removes anAssessmentPartfrom anBank.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
-
canAssignAssessmentParts
boolean canAssignAssessmentParts()Tests if this user can alter assessment part/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.
-
canAssignAssessmentPartsToBank
Tests if this user can alter assessment part/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 bank including and under the given bank node in which any assessment part 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.
-
getAssignableBankIdsForAssessmentPart
IdList getAssignableBankIdsForAssessmentPart(Id bankId, Id assessmentPartId) throws OperationFailedException Gets a list of bank including and under the given bank node in which a specific assessment part can be assigned.- Parameters:
bankId- theIdof theBankassessmentPartId- theIdof theAssessmentPart- Returns:
- list of assignable bank
Ids - Throws:
NullArgumentException-bankIdorassessmentPartIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignAssessmentPartToBank
void assignAssessmentPartToBank(Id assessmentPartId, Id bankId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingAssessmentPartto anBank.- Parameters:
assessmentPartId- theIdof theAssessmentPartbankId- theIdof theBank- Throws:
AlreadyExistsException-assessmentPartIdis already assigned tobankIdNotFoundException-assessmentPartIdorbankIdnot foundNullArgumentException-assessmentPartIdorbankIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignAssessmentPartFromBank
void unassignAssessmentPartFromBank(Id assessmentPartId, Id bankId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes anAssessmentPartfrom anBank.- Parameters:
assessmentPartId- theIdof theAssessmentPartbankId- theIdof theBank- Throws:
NotFoundException-assessmentPartIdorbankIdnot found orassessmentPartIdnot assigned tobankIdNullArgumentException-assessmentPartIdorbankIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignAssessmentPartToBank
void reassignAssessmentPartToBank(Id assessmentPartId, Id fromBiankId, Id toBankId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves anAssessmentPartfrom oneBankto another. Mappings to otherBanksare unaffected.- Parameters:
assessmentPartId- theIdof theAssessmentPartfromBiankId- theIdof the currentBanktoBankId- theIdof the destinationBank- Throws:
AlreadyExistsException-assessmentPartIdalready assigned totoBankIdNotFoundException-assessmentPartId, fromBankId, ortoBankIdnot found orassessmentPartIdnot mapped tofromBankIdNullArgumentException-assessmentPartId, fromBankId, ortoBankIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-