public interface AssessmentOfferedBatchAdminSession extends AssessmentOfferedAdminSession
This session creates, updates, and deletes AssessmentsOffered
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
AssessmentOffered,
an AssessmentOfferedForm
is requested using getAssessmentOfferedFormsForCreate()
specifying the desired assessment and record Types
or none
if no record Types
are needed. Each of the returned
AssessmentOfferedForms
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 AssessmentOfferedForm
is submiited to
a create operation, it cannot be reused with another create operation
unless the first operation was unsuccessful. Each
AssessmentOfferedForm
corresponds to an attempted transaction.
The AssessmentOfferedForms
returned from
getAssessmentOfferedFormsForCreate()
may be linked to the
originating request through the peer Ids
of the
AssessmentOfferedForm.
In the case where there may be duplicates,
any AssessmentOfferedForm
of the same peer Ids
may be used for a create operation.
Once a batch of AssessmentOfferedForms
are submitted
for create, a CreateResponse
is returned for each
AssessmentOfferedForm,
although the ordering is not defined. Only
errors that pertain to the entire create operation are returned from
createAssessmentsOffered(),
errors specific to an
individual AssessmentOfferedForm
are indicated in the
corresponding CreateResponse.
CreateResponses
may be linked to the originating AssessmentOfferedForm
through the AssessmentOfferedForm
Id
.
For updates, AssessmentOfferedForms
are requested to
the AssessmentOffered
Id
that is to be
updated using getAssessmentOfferedFormsForUpdate()
where
the reference Id
in the AssessmentOfferedForm
may be used to link the request. Similarly, the
AssessmentOfferedForm
has metadata about the data that can be
updated and it can perform validation before submitting the update. The
AssessmentOfferedForm
can only be used once for a
successful update and cannot be reused.
Once a batch of AssessmentOfferedForms
are submitted
for update, an UpdateResponse
is returned for each
AssessmentOfferedForm,
although the ordering is not defined. Only
errors that pertain to the entire update operation are returned from
updateAssessmentsOffered(),
errors specific to an
individual AssessmentOfferedForm
are indicated in the
corresponding UpdateResponse.
UpdateResponses
may be linked to the originating AssessmentOfferedForm
through the AssessmentOfferedForm
Id.
The delete operations delete AssessmentsOffered
in
bulk. To unmap an AssessmentOffered
from the current
Bank,
the AssessmentOfferedBankAssignmentSession
should be used. These delete operations attempt to remove the
AssessmentOffered
itself thus removing it from all known
Bank
catalogs. Bulk delete operations return the results in
DeleteResponses.
Modifier and Type | Method and Description |
---|---|
AliasResponseList |
aliasAssessmentsOffered(AliasRequestList aliasRequests)
Adds an
Id to an AssessmentOffered for
the purpose of creating compatibility. |
CreateResponseList |
createAssessmentsOffered(AssessmentOfferedBatchFormList assessmentOfferedForms)
Creates a new set of
AssessmentsOffered. |
DeleteResponseList |
deleteAllAssessmentsOffered()
Deletes all
AssessmentsOffered in this Bank
. |
DeleteResponseList |
deleteAssessmentsOffered(IdList assessmentOfferedIds)
Deletes assessments offered for the given
Ids. |
DeleteResponseList |
deleteAssessmentsOfferedForAssessment(Id assessmentId)
Deletes all assessments offered for the given assessment,
|
DeleteResponseList |
deleteIneffectiveAssessmentsOfferedByDate(DateTime date)
Deletes assessments offeredexpired before the given date.
|
AssessmentOfferedBatchFormList |
getAssessmentOfferedFormsForCreate(IdList assessmentIds,
Type[] assessmentOfferedRecordTypes)
Gets the assessment offered forms for creating a bunch of new
assessments offered.
|
AssessmentOfferedBatchFormList |
getAssessmentOfferedFormsForUpdate(IdList assessmentOfferedIds)
Gets the assessment offered forms for updating an existing set of
assessments offered.
|
UpdateResponseList |
updateAssessmentsOffered(AssessmentOfferedBatchFormList assessmentOfferedForms)
Updates existing assessments offered.
|
aliasAssessmentOffered, canCreateAssessmentOfferedWithRecordTypes, canCreateAssessmentsOffered, canDeleteAssessmentsOffered, canManageAssessmentOfferedAliases, canUpdateAssessmentsOffered, createAssessmentOffered, deleteAssessmentOffered, getAssessmentOfferedFormForCreate, getAssessmentOfferedFormForUpdate, getBank, getBankId, updateAssessmentOffered
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
AssessmentOfferedBatchFormList getAssessmentOfferedFormsForCreate(IdList assessmentIds, Type[] assessmentOfferedRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
assessmentIds
- a list of assessment Ids
assessmentOfferedRecordTypes
- array of assessment offered
record types to be included in each create operation or an
empty list if noneNotFoundException
- an assessmentId
is
not foundNullArgumentException
- assessmentids
or
assessmentOfferedRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to request forms with
given record typesmandatory
- This method must be implemented. CreateResponseList createAssessmentsOffered(AssessmentOfferedBatchFormList assessmentOfferedForms) throws OperationFailedException, PermissionDeniedException
AssessmentsOffered.
This method
returns an error if the entire operation fails. Otherwise, the status
of an individual create operation is indicated in the
BatchCreateResponse
.assessmentOfferedForms
- the assessment offered formsNullArgumentException
- assessmentOfferedForms
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AssessmentOfferedBatchFormList getAssessmentOfferedFormsForUpdate(IdList assessmentOfferedIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
assessmentOfferedIds
- the Ids
of the
AssessmentOffered
NotFoundException
- an assessmentOfferedId
is not foundNullArgumentException
- assessmentOfferedIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. UpdateResponseList updateAssessmentsOffered(AssessmentOfferedBatchFormList assessmentOfferedForms) throws OperationFailedException, PermissionDeniedException
BatchCreateResponse
.assessmentOfferedForms
- the form containing the elements to be
updatedNullArgumentException
- assessmentOfferedForms
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteAllAssessmentsOffered() throws OperationFailedException, PermissionDeniedException
AssessmentsOffered
in this Bank
.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteAssessmentsOffered(IdList assessmentOfferedIds) throws OperationFailedException, PermissionDeniedException
Ids.
assessmentOfferedIds
- the Ids
of the assessments
offered to deleteNullArgumentException
- assessmentOfferedIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteAssessmentsOfferedForAssessment(Id assessmentId) throws OperationFailedException, PermissionDeniedException
assessmentId
- an Id
of an assessmentNullArgumentException
- assessmentId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteIneffectiveAssessmentsOfferedByDate(DateTime date) throws OperationFailedException, PermissionDeniedException
date
- a dateNullArgumentException
- date
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AliasResponseList aliasAssessmentsOffered(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException
Id
to an AssessmentOffered
for
the purpose of creating compatibility. The primary Id
of the AssessmentOffered
is determined by the provider.
The new Id
is an alias to the primary Id.
If the alias is a pointer to another assessment offered, it is
reassigned to the given assessment offered Id.
aliasRequests
- the alias requestsNullArgumentException
- aliasRequests
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.