public interface IssueBatchAdminSession extends IssueAdminSession
This session creates, updates, and deletes Issues
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
Issue,
an IssueForm
is requested using
getIssueFormsForCreate()
specifying the desired queues,
resources, and record Types
or none if no record
Types
are needed. Each of the returned IssueForms
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
IssueForm
is submiited to a create operation, it cannot be reused
with another create operation unless the first operation was unsuccessful.
Each IssueForm
corresponds to an attempted transaction.
The IssueForms
returned from
getIssueFormsForCreate()
may be linked to the originating request
through the peer Ids
of the IssueForm.
In
the case where there may be duplicates, any IssueForm
of
the same peer Ids
may be used for a create operation.
Once a batch of IssueForms
are submitted for create, a
CreateResponse
is returned for each IssueForm,
although the ordering is not defined. Only errors that pertain to
the entire create operation are returned from createIssues(),
errors specific to an individual IssueForm
are
indicated in the corresponding CreateResponse.
CreateResponses
may be linked to the originating IssueForm
through the IssueForm
Id
.
For updates, IssueForms
are requested to the
Issue
Id
that is to be updated using
getIssueFormsForUpdate()
where the reference Id
in
the IssueForm
may be used to link the request. Similarly,
the IssueForm
has metadata about the data that can be
updated and it can perform validation before submitting the update. The
IssueForm
can only be used once for a successful update and
cannot be reused.
Once a batch of IssueForms
are submitted for update, an
UpdateResponse
is returned for each IssueForm,
although the ordering is not defined. Only errors that pertain to
the entire update operation are returned from updateIssues(),
errors specific to an individual IssueForm
are
indicated in the corresponding UpdateResponse.
UpdateResponses
may be linked to the originating IssueForm
through the IssueForm
Id.
The delete operations delete Issues
in bulk. To unmap
an Issue
from the current FrontOffice,
the
IssueFrontOfficeAssignmentSession
should be used. These
delete operations attempt to remove the Issue
itself thus
removing it from all known FrontOffice
catalogs. Bulk
delete operations return the results in DeleteResponses.
Modifier and Type | Method and Description |
---|---|
AliasResponseList |
aliasIssues(AliasRequestList aliasRequests)
Adds an
Id to an Issue for the purpose
of creating compatibility. |
CreateResponseList |
createIssues(IssueBatchFormList issueForms)
Creates a new set of
Issues. |
DeleteResponseList |
deleteAllIssues()
Deletes all
Issues in this FrontOffice . |
DeleteResponseList |
deleteIssues(IdList issueIds)
Deletes issues for the given
Ids. |
DeleteResponseList |
deleteIssuesByDate(DateTime date)
Deletes issues ineffective before the given date.
|
DeleteResponseList |
deleteIssuesForQueue(Id queueId)
Deletes issues for the given queue.
|
DeleteResponseList |
deleteIssuesForResource(Id resourceId)
Deletes issues for the given resource.
|
IssueBatchFormList |
getIssueFormsForCreate(IssuePeerList peers,
Type[] issueRecordTypes)
Gets the issue forms for creating a bunch of new issues.
|
IssueBatchFormList |
getIssueFormsForUpdate(IdList issueIds)
Gets the issue forms for updating an existing set of issues.
|
UpdateResponseList |
updateIssues(IssueBatchFormList issueForms)
Updates existing issues.
|
aliasIssue, canCreateIssues, canCreateIssueWithRecordTypes, canDeleteIssues, canManageIssueAliases, canUpdateIssues, closeIssue, createIssue, deleteIssue, getFrontOffice, getFrontOfficeId, getIssueFormForCreate, getIssueFormForUpdate, reopenIssue, updateIssue
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
IssueBatchFormList getIssueFormsForCreate(IssuePeerList peers, Type[] issueRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
peers
- the issue peersissueRecordTypes
- array of issue record types to be included in
each create operation or an empty list if noneNotFoundException
- a resourceId
or
queueId
is not foundNullArgumentException
- peers
or
issueRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to request forms with
given record typesmandatory
- This method must be implemented. CreateResponseList createIssues(IssueBatchFormList issueForms) throws OperationFailedException, PermissionDeniedException
Issues.
This method returns an
error if the entire operation fails. Otherwise, the status of an
individual create operation is indicated in the
BatchCreateResponse
.issueForms
- the issue formsNullArgumentException
- issueForms
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IssueBatchFormList getIssueFormsForUpdate(IdList issueIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
issueIds
- the Ids
of the Issue
NotFoundException
- an issueId
is not
foundNullArgumentException
- issueIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. UpdateResponseList updateIssues(IssueBatchFormList issueForms) throws OperationFailedException, PermissionDeniedException
BatchCreateResponse
.issueForms
- the form containing the elements to be updatedNullArgumentException
- issueForms
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteAllIssues() throws OperationFailedException, PermissionDeniedException
Issues
in this FrontOffice
.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteIssues(IdList issueIds) throws OperationFailedException, PermissionDeniedException
Ids.
issueIds
- the Ids
of the issues to deleteNullArgumentException
- issueIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteIssuesForQueue(Id queueId) throws OperationFailedException, PermissionDeniedException
queueId
- the Ids
of a queueNullArgumentException
- queueId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteIssuesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
resourceId
- the Ids
of a resourceNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteIssuesByDate(DateTime date) throws OperationFailedException, PermissionDeniedException
date
- a dateNullArgumentException
- date
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AliasResponseList aliasIssues(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException
Id
to an Issue
for the purpose
of creating compatibility. The primary Id
of the
Issue
is determined by the provider. The new Id
is an alias to the primary Id.
If the alias is a
pointer to another issue, it is reassigned to the given issue
Id.
aliasRequests
- the alias requestsNullArgumentException
- aliasRequests
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.