Interface SubtaskIssueAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
- All Known Subinterfaces:
SubtaskIssueBatchAdminSession
This session creates subtask Issues . Subtasks are issues that
are created in the contex of an existing issue.
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.
To create a subtask, an IssueForm is requested using
getSubtaskFormForCreate() specifying the desired issue and record
Types or none if no record Types are needed. The returned
IssueForm 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
the 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.
-
Method Summary
Modifier 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.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
-
getFrontOfficeId
Id getFrontOfficeId()Gets theFrontOfficeIdassociated with this session.- Returns:
- the
FrontOffice Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getFrontOffice
Gets theFrontOfficeassociated with this session.- Returns:
- the front office
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateSubtasks
boolean canCreateSubtasks()Tests if this user can create subtaskIssues. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a subtask will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.- Returns:
falseif subtaskIssuecreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateSubtaskWithRecordTypes
Tests if this user can create a singleIssueusing the desired record types. WhileTrackingManager.getIssueRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificIssue. Providing an empty array tests if anIssuecan be created with no records.- Parameters:
issueRecordTypes- array of issue record types- Returns:
trueifIssuecreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-issueRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getSubtaskFormForCreate
IssueForm getSubtaskFormForCreate(Id issueId, Id queueId, Type[] issueRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the issue form for creating subtasks. A new form should be requested for each create transaction.- Parameters:
issueId- theIdof theIssuequeueId- theIdof theQueuein which the subtask should be createdissueRecordTypes- array of issue record types- Returns:
- the issue form
- Throws:
NotFoundException-issueIdorqueueIdis not foundNullArgumentException-issueId, queueIdorissueRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createSubtask
Creates a subtaskIssue. A subtask is a nestedIssue.- Parameters:
issueForm- the form for the subtask- Returns:
- the new
Issue - Throws:
IllegalStateException-issueFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-issueFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-issueFormdid not originate fromgetSubtaskFormForCreate()- Compliance:
mandatory- This method must be implemented.
-