public interface AssessmentTakenBatchAdminSession extends AssessmentTakenAdminSession
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.
Modifier and Type | Method and Description |
---|---|
AliasResponseList |
aliasAssessmentsTaken(AliasRequestList aliasRequests)
Adds an
Id to an AssessmentTaken for the
purpose of creating compatibility. |
CreateResponseList |
createAssessmentsTaken(AssessmentTakenBatchFormList assessmentTakenForms)
Creates a new set of
AssessmentsTaken. |
DeleteResponseList |
deleteAllAssessmentsTaken()
Deletes all
AssessmentsTaken in this Bank
. |
DeleteResponseList |
deleteAssessmentsTaken(IdList assessmentTakenIds)
Deletes assessments taken for the given
Ids. |
DeleteResponseList |
deleteAssessmentsTakenForAssessmentOffered(Id assessmentOfferedId)
Deletes assessments taken for the given assessment offered.
|
DeleteResponseList |
deleteAssessmentsTakenForTaker(Id resourceId)
Deletes assessments taken for the given taker.
|
AssessmentTakenBatchFormList |
getAssessmentTakenFormsForCreate(AssessmentTakenPeerList peers,
Type[] assessmentTakenRecordTypes)
Gets the assessment taken forms for creating a bunch of new
assessments taken.
|
AssessmentTakenBatchFormList |
getAssessmentTakenFormsForUpdate(IdList assessmentTakenIds)
Gets the assessment taken forms for updating an existing set of
assessments taken.
|
UpdateResponseList |
updateAssessmentsTaken(AssessmentTakenBatchFormList assessmentTakenForms)
Updates existing assessments taken.
|
aliasAssessmentTaken, canCreateAssessmentsTaken, canCreateAssessmentTakenWithRecordTypes, canDeleteAssessmentsTaken, canManageAssessmentTakenAliases, canUpdateAssessmentsTaken, createAssessmentTaken, deleteAssessmentTaken, getAssessmentTakenFormForCreate, getAssessmentTakenFormForUpdate, getBank, getBankId, updateAssessmentTaken
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
AssessmentTakenBatchFormList getAssessmentTakenFormsForCreate(AssessmentTakenPeerList peers, Type[] assessmentTakenRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
peers
- a list of assessment taken peers
assessmentTakenRecordTypes
- array ofassessment taken record
types to be included in each create operation or an empty list
if noneNotFoundException
- an assessmentOfferedId
or resourceId
is not foundNullArgumentException
- peers
or
assessmentTakenRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to request forms with
given record typesmandatory
- This method must be implemented. CreateResponseList createAssessmentsTaken(AssessmentTakenBatchFormList assessmentTakenForms) throws OperationFailedException, PermissionDeniedException
AssessmentsTaken.
This method
returns an error if the entire operation fails. Otherwise, the status
of an individual create operation is indicated in the
BatchCreateResponse
.assessmentTakenForms
- the assessment taken formsNullArgumentException
- assessmentTakenForms
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AssessmentTakenBatchFormList getAssessmentTakenFormsForUpdate(IdList assessmentTakenIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
assessmentTakenIds
- the Ids
of the
AssessmentTaken
NotFoundException
- an assessmentTakenId
is not foundNullArgumentException
- assessmentTakenIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. UpdateResponseList updateAssessmentsTaken(AssessmentTakenBatchFormList assessmentTakenForms) throws OperationFailedException, PermissionDeniedException
BatchCreateResponse
.assessmentTakenForms
- the form containing the elements to be
updatedNullArgumentException
- assessmentTakenForms
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteAllAssessmentsTaken() throws OperationFailedException, PermissionDeniedException
AssessmentsTaken
in this Bank
.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteAssessmentsTaken(IdList assessmentTakenIds) throws OperationFailedException, PermissionDeniedException
Ids.
assessmentTakenIds
- the Ids
of the assessments
taken to deleteNullArgumentException
- assessmentTakenIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteAssessmentsTakenForTaker(Id resourceId) throws OperationFailedException, PermissionDeniedException
resourceId
- an Id
of a resourceNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteAssessmentsTakenForAssessmentOffered(Id assessmentOfferedId) throws OperationFailedException, PermissionDeniedException
assessmentOfferedId
- an Id
of an assessment
offeredNullArgumentException
- assessmentOfferedId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AliasResponseList aliasAssessmentsTaken(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException
Id
to an AssessmentTaken
for the
purpose of creating compatibility. The primary Id
of
the AssessmentTaken
is determined by the provider. The
new Id
is an alias to the primary Id.
If
the alias is a pointer to another assessment taken, it is reassigned
to the given assessment taken Id.
aliasRequests
- the alias requestsNullArgumentException
- aliasRequests
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.