public interface IssueAdminSession extends OsidSession
This session creates, updates, and deletes Ieeues. 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 Oubliette, the
IssueOublietteAssignmentSession should be used. These delete
operations attempt to remove the Issue itself thus removing
it from all known Oubliette 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. |
Issue |
createIssue(IssueForm issueForm)
Creates a new
Issue. |
void |
deleteIssue(Id issueId)
Deletes an
Issue. |
IssueForm |
getIssueFormForCreate(Type[] issueRecordTypes)
Gets the issue form for creating new issues.
|
IssueForm |
getIssueFormForUpdate(Id issueId)
Gets the issue form for updating an existing issue.
|
Oubliette |
getOubliette()
Gets the
Oubliette associated with this session. |
Id |
getOublietteId()
Gets the
Oubliette Id associated with
this session. |
void |
updateIssue(IssueForm issueForm)
Updates an existing issue.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getOublietteId()
Oubliette Id associated with
this session. Oubliette Id associated with this sessionmandatory - This method must be implemented. Oubliette getOubliette() throws OperationFailedException, PermissionDeniedException
Oubliette 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 HoldManager.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(Type[] issueRecordTypes) throws OperationFailedException, PermissionDeniedException
issueRecordTypes - array of issue record typesNullArgumentException - 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
issueId - the Id of the Issue NotFoundException - issueId is not foundNullArgumentException - issueId is
null OperationFailedException - unable to complete requestmandatory - 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.