public interface AssessmentPartBankAssignmentSession extends 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
).
Modifier and Type | Method and Description |
---|---|
void |
assignAssessmentPartToBank(Id assessmentPartId,
Id bankId)
Adds an existing
AssessmentPart to an Bank. |
boolean |
canAssignAssessmentParts()
Tests if this user can alter assessment part/bank mappings.
|
boolean |
canAssignAssessmentPartsToBank(Id bankId)
Tests if this user can alter assessment part/bank mappings.
|
IdList |
getAssignableBankIds(Id bankId)
Gets a list of bank including and under the given bank node in which
any assessment part can be assigned.
|
IdList |
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.
|
void |
reassignAssessmentPartToBank(Id assessmentPartId,
Id fromBiankId,
Id toBankId)
Moves an
AssessmentPart from one Bank to
another. |
void |
unassignAssessmentPartFromBank(Id assessmentPartId,
Id bankId)
Removes an
AssessmentPart from an Bank. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignAssessmentParts()
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer lookup operations to
unauthorized users. false
if mapping is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canAssignAssessmentPartsToBank(Id bankId)
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer lookup operations to
unauthorized users.bankId
- the Id
of the Bank
false
if mapping is not authorized, true
otherwiseNullArgumentException
- bankId
is
null
mandatory
- This method must be implemented. IdList getAssignableBankIds(Id bankId) throws OperationFailedException
bankId
- the Id
of the Bank
Ids
NullArgumentException
- bankId
is
null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getAssignableBankIdsForAssessmentPart(Id bankId, Id assessmentPartId) throws OperationFailedException
bankId
- the Id
of the Bank
assessmentPartId
- the Id
of the
AssessmentPart
Ids
NullArgumentException
- bankId
or
assessmentPartId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignAssessmentPartToBank(Id assessmentPartId, Id bankId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
AssessmentPart
to an Bank.
assessmentPartId
- the Id
of the
AssessmentPart
bankId
- the Id
of the Bank
AlreadyExistsException
- assessmentPartId
is already assigned to bankId
NotFoundException
- assessmentPartId
or
bankId
not foundNullArgumentException
- assessmentPartId
or bankId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignAssessmentPartFromBank(Id assessmentPartId, Id bankId) throws NotFoundException, OperationFailedException, PermissionDeniedException
AssessmentPart
from an Bank.
assessmentPartId
- the Id
of the
AssessmentPart
bankId
- the Id
of the Bank
NotFoundException
- assessmentPartId
or
bankId
not found or assessmentPartId
not assigned to bankId
NullArgumentException
- assessmentPartId
or bankId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void reassignAssessmentPartToBank(Id assessmentPartId, Id fromBiankId, Id toBankId) throws NotFoundException, OperationFailedException, PermissionDeniedException
AssessmentPart
from one Bank
to
another. Mappings to other Banks
are unaffected.assessmentPartId
- the Id
of the
AssessmentPart
fromBiankId
- the Id
of the current Bank
toBankId
- the Id
of the destination Bank
NotFoundException
- assessmentPartId,
fromBankId,
or toBankId
not found or
assessmentPartId
not mapped to
fromBankId
NullArgumentException
- assessmentPartId,
fromBankId,
or toBankId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.