Interface AssessmentTakenBatchAdminSession
- All Superinterfaces:
AssessmentTakenAdminSession, AutoCloseable, Closeable, OsidSession, OsidSession
This session creates, updates, and deletes AssessmentsTaken in
bulk. The data for create and update is provided by the consumer via the
form object. OsidForms are requested for each create or update and
may not be reused.
Create and update operations differ in their usage. To create an
AssessmentTaken , an AssessmentTakenForm is requested
using getAssessmentTakenFormsForCreate() specifying the desired
assessment offered, resource, and record Types or none if no
record Types are needed. Each of the returned
AssessmentTakenForms will indicate that it is to be used with a create
operation and can be used to examine metdata or validate data prior to
creation. Once an AssessmentTakenForm is submiited to a create
operation, it cannot be reused with another create operation unless the
first operation was unsuccessful. Each AssessmentTakenForm
corresponds to an attempted transaction.
The AssessmentTakenForms returned from
getAssessmentTakenFormsForCreate() may be linked to the originating
request through the peer Ids of the AssessmentTakenForm .
In the case where there may be duplicates, any AssessmentTakenForm
of the same peer Ids may be used for a create operation.
Once a batch of AssessmentTakenForms are submitted for create,
a CreateResponse is returned for each AssessmentTakenForm
, although the ordering is not defined. Only errors that pertain to the
entire create operation are returned from createAssessmentsTaken()
, errors specific to an individual AssessmentTakenForm are
indicated in the corresponding CreateResponse .
CreateResponses may be linked to the originating
AssessmentTakenForm through the AssessmentTakenForm Id .
For updates, AssessmentTakenForms are requested to the
AssessmentTaken Id that is to be updated using
getAssessmentTakenFormsForUpdate() where the reference Id in the
AssessmentTakenForm may be used to link the request. Similarly,
the AssessmentTakenForm has metadata about the data that can be
updated and it can perform validation before submitting the update. The
AssessmentTakenForm can only be used once for a successful update
and cannot be reused.
Once a batch of AssessmentTakenForms are submitted for update,
an UpdateResponse is returned for each AssessmentTakenForm
, although the ordering is not defined. Only errors that pertain to the
entire update operation are returned from updateAssessmentsTaken()
, errors specific to an individual AssessmentTakenForm are
indicated in the corresponding UpdateResponse .
UpdateResponses may be linked to the originating
AssessmentTakenForm through the AssessmentTakenForm Id .
The delete operations delete AssessmentsTaken in bulk. To
unmap an AssessmentTaken from the current Bank , the
AssessmentTakenBankAssignmentSession should be used. These delete
operations attempt to remove the AssessmentTaken itself thus
removing it from all known Bank catalogs. Bulk delete operations
return the results in DeleteResponses .
-
Method Summary
Modifier and TypeMethodDescriptionaliasAssessmentsTaken(AliasRequestList aliasRequests) Adds anIdto anAssessmentTakenfor the purpose of creating compatibility.createAssessmentsTaken(AssessmentTakenBatchFormList assessmentTakenForms) Creates a new set ofAssessmentsTaken.Deletes allAssessmentsTakenin thisBank.deleteAssessmentsTaken(IdList assessmentTakenIds) Deletes assessments taken for the givenIds.deleteAssessmentsTakenForAssessmentOffered(Id assessmentOfferedId) Deletes assessments taken for the given assessment offered.deleteAssessmentsTakenForTaker(Id resourceId) Deletes assessments taken for the given taker.getAssessmentTakenFormsForCreate(AssessmentTakenPeerList peers, Type[] assessmentTakenRecordTypes) Gets the assessment taken forms for creating a bunch of new assessments taken.getAssessmentTakenFormsForUpdate(IdList assessmentTakenIds) Gets the assessment taken forms for updating an existing set of assessments taken.updateAssessmentsTaken(AssessmentTakenBatchFormList assessmentTakenForms) Updates existing assessments taken.Methods inherited from interface AssessmentTakenAdminSession
aliasAssessmentTaken, canCreateAssessmentsTaken, canCreateAssessmentTakenWithRecordTypes, canDeleteAssessmentsTaken, canManageAssessmentTakenAliases, canUpdateAssessmentsTaken, createAssessmentTaken, deleteAssessmentTaken, getAssessmentTakenFormForCreate, getAssessmentTakenFormForUpdate, getBank, getBankId, updateAssessmentTakenModifier and TypeMethodDescriptionvoidaliasAssessmentTaken(Id assessmentTakenId, Id aliasId) Adds anIdto anAssessmentTakenfor the purpose of creating compatibility.booleanTests if this user can createAssessmentTakenobjects.booleancanCreateAssessmentTakenWithRecordTypes(Type[] assessmentTakenRecordTypes) Tests if this user can create a singleAssessmentTakenusing the desired record types.booleanTests if this user can deleteAssessmentsTaken.booleanTests if this user can manageIdaliases forAssessmentsTaken.booleanTests if this user can updateAssessmentTakenobjects.createAssessmentTaken(AssessmentTakenForm assessmentTakenForm) Creates a newAssessmentTaken.voiddeleteAssessmentTaken(Id assessmentTakenId) Deletes anAssessmentTaken.getAssessmentTakenFormForCreate(Id assessmentOfferedId, Type[] assessmentTakenRecordTypes) Gets the assessment taken form for creating new assessments taken.getAssessmentTakenFormForUpdate(Id assessmentTakenId) Gets the assessment taken form for updating an existing assessment taken.getBank()Gets theBankassociated with this session.Gets theBankIdassociated with this session.voidupdateAssessmentTaken(AssessmentTakenForm assessmentTakenForm) Updates an existing assessment taken.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
-
getAssessmentTakenFormsForCreate
AssessmentTakenBatchFormList getAssessmentTakenFormsForCreate(AssessmentTakenPeerList peers, Type[] assessmentTakenRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the assessment taken forms for creating a bunch of new assessments taken. A form is returned for each supplied assessment offered and resource pair.- Parameters:
peers- a list of assessment takenpeersassessmentTakenRecordTypes- array ofassessment taken record types to be included in each create operation or an empty list if none- Returns:
- the assessment taken forms
- Throws:
NotFoundException- anassessmentOfferedIdorresourceIdis not foundNullArgumentException-peersorassessmentTakenRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createAssessmentsTaken
CreateResponseList createAssessmentsTaken(AssessmentTakenBatchFormList assessmentTakenForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofAssessmentsTaken. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateResponse.- Parameters:
assessmentTakenForms- the assessment taken forms- Returns:
- the create responses
- Throws:
NullArgumentException-assessmentTakenFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAssessmentTakenFormsForUpdate
AssessmentTakenBatchFormList getAssessmentTakenFormsForUpdate(IdList assessmentTakenIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the assessment taken forms for updating an existing set of assessments taken. A newassessment taken form should be requested for each update transaction.- Parameters:
assessmentTakenIds- theIdsof theAssessmentTaken- Returns:
- the assessment taken forms
- Throws:
NotFoundException- anassessmentTakenIdis not foundNullArgumentException-assessmentTakenIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateAssessmentsTaken
UpdateResponseList updateAssessmentsTaken(AssessmentTakenBatchFormList assessmentTakenForms) throws OperationFailedException, PermissionDeniedException Updates existing assessments taken. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateResponse.- Parameters:
assessmentTakenForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-assessmentTakenFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllAssessmentsTaken
DeleteResponseList deleteAllAssessmentsTaken() throws OperationFailedException, PermissionDeniedExceptionDeletes allAssessmentsTakenin thisBank.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAssessmentsTaken
DeleteResponseList deleteAssessmentsTaken(IdList assessmentTakenIds) throws OperationFailedException, PermissionDeniedException Deletes assessments taken for the givenIds.- Parameters:
assessmentTakenIds- theIdsof the assessments taken to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-assessmentTakenIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAssessmentsTakenForTaker
DeleteResponseList deleteAssessmentsTakenForTaker(Id resourceId) throws OperationFailedException, PermissionDeniedException Deletes assessments taken for the given taker.- Parameters:
resourceId- anIdof a resource- Returns:
- the delete responses
- Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAssessmentsTakenForAssessmentOffered
DeleteResponseList deleteAssessmentsTakenForAssessmentOffered(Id assessmentOfferedId) throws OperationFailedException, PermissionDeniedException Deletes assessments taken for the given assessment offered.- Parameters:
assessmentOfferedId- anIdof an assessment offered- Returns:
- the delete responses
- Throws:
NullArgumentException-assessmentOfferedIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
aliasAssessmentsTaken
AliasResponseList aliasAssessmentsTaken(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto anAssessmentTakenfor the purpose of creating compatibility. The primaryIdof theAssessmentTakenis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another assessment taken, it is reassigned to the given assessment takenId.- Parameters:
aliasRequests- the alias requests- Returns:
- the alias responses
- Throws:
NullArgumentException-aliasRequestsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-