public interface IssueAdminSession extends OsidSession
This session creates, updates, and deletes Issues.
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
getIssueFormForCreate()
specifying the desired 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.
For updates, IssueForms
are requested to the
Issue
Id
that is to be updated using
getIssueFormForUpdate().
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.
The delete operations delete Issues.
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.
This session includes an Id
aliasing mechanism to
assign an external Id
to an internally assigned Id.
Modifier and Type | Method and Description |
---|---|
void |
aliasIssue(Id issueId,
Id aliasId)
Adds an
Id to an Issue for the purpose
of creating compatibility. |
boolean |
canCreateIssues()
Tests if this user can create
Issues. |
boolean |
canCreateIssueWithRecordTypes(Type[] issueRecordTypes)
Tests if this user can create a single
Issue using the
desired record types. |
boolean |
canDeleteIssues()
Tests if this user can delete
Issues. |
boolean |
canManageIssueAliases()
Tests if this user can manage
Id aliases for
Issues. |
boolean |
canUpdateIssues()
Tests if this user can update
Issues. |
void |
closeIssue(Id issueId,
Type resolutionType)
Closes an issue.
|
Issue |
createIssue(IssueForm issueForm)
Creates a new
Issue. |
void |
deleteIssue(Id issueId)
Deletes an
Issue. |
FrontOffice |
getFrontOffice()
Gets the
FrontOffice associated with this session. |
Id |
getFrontOfficeId()
Gets the
FrontOffice Id associated with
this session. |
IssueForm |
getIssueFormForCreate(Id queueId,
Id resourceId,
Type[] issueRecordTypes)
Gets the issue form for creating new issues.
|
IssueForm |
getIssueFormForUpdate(Id issueId)
Gets the issue form for updating an existing issue.
|
void |
reopenIssue(Id issueId)
Reopend an issue.
|
void |
updateIssue(IssueForm issueForm)
Updates an existing issue.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getFrontOfficeId()
FrontOffice
Id
associated with
this session. FrontOffice Id
associated with this sessionmandatory
- This method must be implemented. FrontOffice getFrontOffice() throws OperationFailedException, PermissionDeniedException
FrontOffice
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canCreateIssues()
Issues.
A return of true
does not guarantee successful authorization. A return of false
indicates that it is known creating an Issue
will
result in a PERMISSION_DENIED.
This is intended as a
hint to an application that may opt not to offer create operations to
an unauthorized user. false
if Issue
creation is not
authorized, true
otherwisemandatory
- This method must be implemented. boolean canCreateIssueWithRecordTypes(Type[] issueRecordTypes)
Issue
using the
desired record types. While
TrackingManager.getIssueRecordTypes()
can be used to examine
which records are supported, this method tests which record(s) are
required for creating a specific Issue.
Providing an
empty array tests if an Issue
can be created with no
records.issueRecordTypes
- array of issue record types true
if Issue
creation using the
specified record Types
is supported,
false
otherwiseNullArgumentException
- issueRecordTypes
is null
mandatory
- This method must be implemented. IssueForm getIssueFormForCreate(Id queueId, Id resourceId, Type[] issueRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
queueId
- a queue Id
resourceId
- a customer Id
issueRecordTypes
- array of issue record typesNotFoundException
- queueId
or
resourceId
is not foundNullArgumentException
- queueId, resourceId
or issueRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get form for requested
record typesmandatory
- This method must be implemented. Issue createIssue(IssueForm issueForm) throws OperationFailedException, PermissionDeniedException
Issue.
issueForm
- the form for this Issue
Issue
IllegalStateException
- issueForm
already used in a create transactionInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- issueForm
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- issueForm
did not
originate from getIssueFormForCreate()
mandatory
- This method must be implemented. boolean canUpdateIssues()
Issues.
A return of true
does not guarantee successful authorization. A return of false
indicates that it is known updating an Issue
will
result in a PERMISSION_DENIED.
This is intended as a
hint to an application that may opt not to offer update operations to
an unauthorized user. false
if Issue
modification is
not authorized, true
otherwisemandatory
- This method must be implemented. IssueForm getIssueFormForUpdate(Id issueId) throws NotFoundException, OperationFailedException, PermissionDeniedException
issueId
- the Id
of the Issue
NotFoundException
- issueId
is not foundNullArgumentException
- issueId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void updateIssue(IssueForm issueForm) throws OperationFailedException, PermissionDeniedException
issueForm
- the form containing the elements to be updatedIllegalStateException
- issueForm
already used in an update transactionInvalidArgumentException
- the form contains an invalid
valueNullArgumentException
- issueId
or
issueForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- issueForm
did not
originate from getIssueFormForUpdate()
mandatory
- This method must be implemented. boolean canDeleteIssues()
Issues.
A return of true
does not guarantee successful authorization. A return of false
indicates that it is known deleting an Issue
will
result in a PERMISSION_DENIED.
This is intended as a
hint to an application that may opt not to offer delete operations to
an unauthorized user. false
if Issue
deletion is not
authorized, true
otherwisemandatory
- This method must be implemented. void deleteIssue(Id issueId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Issue.
issueId
- the Id
of the Issue
to
removeNotFoundException
- issueId
not foundNullArgumentException
- issueId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManageIssueAliases()
Id
aliases for
Issues.
A return of true does not guarantee successful
authorization. A return of false indicates that it is known changing
an alias will result in a PERMISSION_DENIED.
This is
intended as a hint to an application that may opt not to offer alias
operations to an unauthorized user. false
if Issue
aliasing is not
authorized, true
otherwisemandatory
- This method must be implemented. void aliasIssue(Id issueId, Id aliasId) throws AlreadyExistsException, NotFoundException, 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
performs as an alias to the primary Id
. If the alias
is a pointer to another issue, it is reassigned to the given issue
Id.
issueId
- the Id
of an Issue
aliasId
- the alias Id
AlreadyExistsException
- aliasId
is
already assignedNotFoundException
- issueId
not foundNullArgumentException
- issueId
or
aliasId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void closeIssue(Id issueId, Type resolutionType) throws NotFoundException, OperationFailedException, PermissionDeniedException
issueId
- the Id
of the Issue
resolutionType
- a resolution typeIllegalStateException
- issue already closedInvalidArgumentException
- resolutionType
is not validNotFoundException
- issueId
not foundNullArgumentException
- issueId
or
resolutionType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void reopenIssue(Id issueId) throws NotFoundException, OperationFailedException, PermissionDeniedException
issueId
- the Id
of the Issue
IllegalStateException
- issue already openNotFoundException
- issueId
not foundNullArgumentException
- issueId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.