public interface AuditBatchAdminSession extends AuditAdminSession
This session creates and deletes Audits
in bulk. The
data for create is provided by the consumer via the form object.
OsidForms
are requested for each create or update and may not be
reused.
To create an Audit,
an AuditForm
is
requested using getAuditFormsForCreate()
specifying the
desired record Types
or none if no record Types
are needed. Each of the returned AuditForms
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
AuditForm
is submiited to a create operation, it cannot be reused
with another create operation unless the first operation was unsuccessful.
Each AuditForms
corresponds to an attempted transaction.
The AuditForms
returned from
getSubtaskFormsForCreate()
may be linked to the originating
request through the peer Ids
of the AuditForm.
In the case where there may be duplicates, any AuditForm
of the same peer Ids
may be used for a create
operation.
Once a batch of AuditForms
are submitted for create, a
CreateResponse
is returned for each AuditForms,
although the ordering is not defined. Only errors that pertain to
the entire create operation are returned from createSubtasks(),
errors specific to an individual AuditForm
are
indicated in the corresponding CreateResponse.
CreateResponses
may be linked to the originating AuditForm
through the AuditForm
Id
.
Modifier and Type | Method and Description |
---|---|
AliasResponseList |
aliasAudits(AliasRequestList aliasRequests)
Adds an
Id to an Audit for the purpose
of creating compatibility. |
CreateResponseList |
createAudits(AuditBatchFormList auditForms)
Creates a new set of
Audits. |
DeleteResponseList |
deleteAllAudits()
Deletes all
Audits in this Inquest. |
AuditBatchFormList |
getAuditFormsForCreate(long n,
Type[] auditRecordTypes)
Gets the audit forms for creating a bunch of new audtits.
|
AuditBatchFormList |
getAuditFormsForUpdate(IdList auditIds)
Gets the audit forms for updating an existing set of audits.
|
UpdateResponseList |
updateAudits(AuditBatchFormList auditForms)
Updates existing auditis.
|
aliasAudit, canCreateAudit, canCreateAuditWithRecordTypes, canDeleteAudits, canManageAuditAliases, canUpdateAudits, createAudit, deleteAudit, getAuditFormForCreate, getAuditFormForUpdate, getInquest, getInquestId, updateAudit
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
AuditBatchFormList getAuditFormsForCreate(long n, Type[] auditRecordTypes) throws OperationFailedException, PermissionDeniedException
n
- number of forms to retrieveauditRecordTypes
- array of audtit record types to be included
in each create operation or an empty list if noneNullArgumentException
- auditRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to request forms with
given record typesmandatory
- This method must be implemented. CreateResponseList createAudits(AuditBatchFormList auditForms) throws OperationFailedException, PermissionDeniedException
Audits.
This method returns an
error if the entire operation fails. Otherwise, the status of an
individual create operation is indicated in the
BatchCreateResponse
.auditForms
- the audit formsNullArgumentException
- auditForms
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AuditBatchFormList getAuditFormsForUpdate(IdList auditIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
auditIds
- the Ids
of the Audits
NotFoundException
- an auditId
is not
foundNullArgumentException
- auditIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. UpdateResponseList updateAudits(AuditBatchFormList auditForms) throws OperationFailedException, PermissionDeniedException
BatchCreateResponse
.auditForms
- the form containing the elements to be updatedNullArgumentException
- auditForms
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteAllAudits() throws OperationFailedException, PermissionDeniedException
Audits
in this Inquest.
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AliasResponseList aliasAudits(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException
Id
to an Audit
for the purpose
of creating compatibility. The primary Id
of the
Audit
is determined by the provider. The new Id
is an alias to the primary Id.
If the alias is a
pointer to another audit, it is reassigned to the given audit
Id.
aliasRequests
- the alias requestsNullArgumentException
- aliasRequests
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.