Interface SubtaskIssueBatchAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession, SubtaskIssueAdminSession
This session creates and deletes Subtasks 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 a Subtask , a SubtaskForm is requested using
getSubtaskFormsForCreate() specifying the desired issue, queue,
and record Types or none if no record Types are needed.
Each of the returned SubtaskForms 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 a SubtaskForm is submiited
to a create operation, it cannot be reused with another create operation
unless the first operation was unsuccessful. Each SubtaskForm
corresponds to an attempted transaction.
The SubtaskForms returned from
getSubtaskFormsForCreate() may be linked to the originating request
through the peer Ids of the SubtaskForm . In the case
where there may be duplicates, any SubtaskForm of the same peer
Ids may be used for a create operation.
Once a batch of SubtaskForms are submitted for create, a
CreateResponse is returned for each SubtaskForm , although
the ordering is not defined. Only errors that pertain to the entire create
operation are returned from createSubtasks() , errors specific to
an individual SubtaskForm are indicated in the corresponding
CreateResponse . CreateResponses may be linked to the
originating SubtaskForm through the SubtaskForm Id
.
-
Method Summary
Modifier and TypeMethodDescriptioncreateSubtasks(IssueBatchFormList issueForms) Creates a new set ofSubtasks.Deletes allSubtasksin thisFrontOffice.deleteSubtasksForIssue(Id issueId) Deletes all subtasks for the given issue.deleteSubtasksForQueue(Id queueId) Deletes all subtasks for the given queue.getSubtaskFormsForCreate(SubtaskIssuePeerList peers, Type[] issueRecordTypes) Gets the subtask forms for creating a bunch of new subtasks.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.Methods inherited from interface SubtaskIssueAdminSession
canCreateSubtasks, canCreateSubtaskWithRecordTypes, createSubtask, getFrontOffice, getFrontOfficeId, getSubtaskFormForCreateModifier and TypeMethodDescriptionbooleanTests if this user can create subtaskIssues.booleancanCreateSubtaskWithRecordTypes(Type[] issueRecordTypes) Tests if this user can create a singleIssueusing the desired record types.createSubtask(IssueForm issueForm) Creates a subtaskIssue.Gets theFrontOfficeassociated with this session.Gets theFrontOfficeIdassociated with this session.getSubtaskFormForCreate(Id issueId, Id queueId, Type[] issueRecordTypes) Gets the issue form for creating subtasks.
-
Method Details
-
getSubtaskFormsForCreate
IssueBatchFormList getSubtaskFormsForCreate(SubtaskIssuePeerList peers, Type[] issueRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the subtask forms for creating a bunch of new subtasks. A SubtaskForm is returned for each queue and issue.- Parameters:
peers- anIdof a queueissueRecordTypes- array of issue record types to be included in each create operation or an empty list if none- Returns:
- the issue forms
- Throws:
NotFoundException- aqueueIdorissueIdis not foundNullArgumentException-peersorissueRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createSubtasks
CreateResponseList createSubtasks(IssueBatchFormList issueForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofSubtasks. 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.
-
deleteAllSubtasks
Deletes allSubtasksin thisFrontOffice.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteSubtasksForQueue
DeleteResponseList deleteSubtasksForQueue(Id queueId) throws OperationFailedException, PermissionDeniedException Deletes all subtasks for the given queue.- Parameters:
queueId- anIdof a queue- Returns:
- the delete responses
- Throws:
NullArgumentException-queueIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteSubtasksForIssue
DeleteResponseList deleteSubtasksForIssue(Id issueId) throws OperationFailedException, PermissionDeniedException Deletes all subtasks for the given issue.- Parameters:
issueId- anIdof an issue- Returns:
- the delete responses
- Throws:
NullArgumentException-issueIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-