Interface IssueBatchAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, IssueAdminSession, OsidSession, OsidSession
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 .
-
Method Summary
Modifier and TypeMethodDescriptionaliasIssues(AliasRequestList aliasRequests) Adds anIdto anIssuefor the purpose of creating compatibility.createIssues(IssueBatchFormList issueForms) Creates a new set ofIssues.Deletes allIssuesin thisFrontOffice.deleteIssues(IdList issueIds) Deletes issues for the givenIds.deleteIssuesByDate(DateTime date) Deletes issues ineffective before the given date.deleteIssuesForQueue(Id queueId) Deletes issues for the given queue.deleteIssuesForResource(Id resourceId) Deletes issues for the given resource.getIssueFormsForCreate(IssuePeerList peers, Type[] issueRecordTypes) Gets the issue forms for creating a bunch of new issues.getIssueFormsForUpdate(IdList issueIds) Gets the issue forms for updating an existing set of issues.updateIssues(IssueBatchFormList issueForms) Updates existing issues.Methods inherited from interface IssueAdminSession
aliasIssue, canCreateIssues, canCreateIssueWithRecordTypes, canDeleteIssues, canManageIssueAliases, canUpdateIssues, closeIssue, createIssue, deleteIssue, getFrontOffice, getFrontOfficeId, getIssueFormForCreate, getIssueFormForUpdate, reopenIssue, updateIssueModifier and TypeMethodDescriptionvoidaliasIssue(Id issueId, Id aliasId) Adds anIdto anIssuefor the purpose of creating compatibility.booleanTests if this user can createIssues.booleancanCreateIssueWithRecordTypes(Type[] issueRecordTypes) Tests if this user can create a singleIssueusing the desired record types.booleanTests if this user can deleteIssues.booleanTests if this user can manageIdaliases forIssues.booleanTests if this user can updateIssues.voidcloseIssue(Id issueId, Type resolutionType) Closes an issue.createIssue(IssueForm issueForm) Creates a newIssue.voiddeleteIssue(Id issueId) Deletes anIssue.Gets theFrontOfficeassociated with this session.Gets theFrontOfficeIdassociated with this session.getIssueFormForCreate(Id queueId, Id resourceId, Type[] issueRecordTypes) Gets the issue form for creating new issues.getIssueFormForUpdate(Id issueId) Gets the issue form for updating an existing issue.voidreopenIssue(Id issueId) Reopend an issue.voidupdateIssue(IssueForm issueForm) Updates an existing issue.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
-
getIssueFormsForCreate
IssueBatchFormList getIssueFormsForCreate(IssuePeerList peers, Type[] issueRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the issue forms for creating a bunch of new issues. An issue form is returned for each set of queues and resources.- Parameters:
peers- the issue peersissueRecordTypes- array of issue record types to be included in each create operation or an empty list if none- Returns:
- the issue forms
- Throws:
NotFoundException- aresourceIdorqueueIdis not foundNullArgumentException-peersorissueRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createIssues
CreateResponseList createIssues(IssueBatchFormList issueForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofIssues. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateResponse.- Parameters:
issueForms- the issue forms- Returns:
- the create responses
- Throws:
NullArgumentException-issueFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getIssueFormsForUpdate
IssueBatchFormList getIssueFormsForUpdate(IdList issueIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the issue forms for updating an existing set of issues. A new issue form should be requested for each update transaction.- Parameters:
issueIds- theIdsof theIssue- Returns:
- the issue forms
- Throws:
NotFoundException- anissueIdis not foundNullArgumentException-issueIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateIssues
UpdateResponseList updateIssues(IssueBatchFormList issueForms) throws OperationFailedException, PermissionDeniedException Updates existing issues. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateResponse.- Parameters:
issueForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-issueFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllIssues
Deletes allIssuesin thisFrontOffice.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteIssues
DeleteResponseList deleteIssues(IdList issueIds) throws OperationFailedException, PermissionDeniedException Deletes issues for the givenIds.- Parameters:
issueIds- theIdsof the issues to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-issueIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteIssuesForQueue
DeleteResponseList deleteIssuesForQueue(Id queueId) throws OperationFailedException, PermissionDeniedException Deletes issues for the given queue.- Parameters:
queueId- theIdsof a queue- Returns:
- the delete responses
- Throws:
NullArgumentException-queueIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteIssuesForResource
DeleteResponseList deleteIssuesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Deletes issues for the given resource.- Parameters:
resourceId- theIdsof a resource- Returns:
- the delete responses
- Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteIssuesByDate
DeleteResponseList deleteIssuesByDate(DateTime date) throws OperationFailedException, PermissionDeniedException Deletes issues ineffective before the given date.- Parameters:
date- a date- Returns:
- the delete responses
- Throws:
NullArgumentException-dateisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
aliasIssues
AliasResponseList aliasIssues(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto anIssuefor the purpose of creating compatibility. The primaryIdof theIssueis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another issue, it is reassigned to the given issueId.- 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.
-