Interface IssueAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
- All Known Subinterfaces:
IssueBatchAdminSession
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.
-
Method Summary
Modifier 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.createIssue(IssueForm issueForm) Creates a newIssue.voiddeleteIssue(Id issueId) Deletes anIssue.getIssueFormForCreate(Type[] issueRecordTypes) Gets the issue form for creating new issues.getIssueFormForUpdate(Id issueId) Gets the issue form for updating an existing issue.Gets theOublietteassociated with this session.Gets theOublietteIdassociated with this session.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
-
getOublietteId
Id getOublietteId()Gets theOublietteIdassociated with this session.- Returns:
- the
Oubliette Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getOubliette
Gets theOublietteassociated with this session.- Returns:
- the oubliette
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateIssues
boolean canCreateIssues()Tests if this user can createIssues. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anIssuewill 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:
falseifIssuecreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateIssueWithRecordTypes
Tests if this user can create a singleIssueusing the desired record types. WhileHoldManager.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.
-
getIssueFormForCreate
IssueForm getIssueFormForCreate(Type[] issueRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the issue form for creating new issues. A new form should be requested for each create transaction.- Parameters:
issueRecordTypes- array of issue record types- Returns:
- the issue form
- Throws:
NullArgumentException-issueRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createIssue
Creates a newIssue.- Parameters:
issueForm- the form for thisIssue- 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 fromgetIssueFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateIssues
boolean canUpdateIssues()Tests if this user can updateIssues. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anIssuewill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.- Returns:
falseifIssuemodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getIssueFormForUpdate
Gets the issue form for updating an existing issue. A new issue form should be requested for each update transaction.- Parameters:
issueId- theIdof theIssue- Returns:
- the issue form
- Throws:
NotFoundException-issueIdis not foundNullArgumentException-issueIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
updateIssue
Updates an existing issue.- Parameters:
issueForm- the form containing the elements to be updated- Throws:
IllegalStateException-issueFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-issueIdorissueFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-issueFormdid not originate fromgetIssueFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteIssues
boolean canDeleteIssues()Tests if this user can deleteIssues. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anIssuewill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.- Returns:
falseifIssuedeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteIssue
void deleteIssue(Id issueId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes anIssue.- Parameters:
issueId- theIdof theIssueto remove- Throws:
NotFoundException-issueIdnot foundNullArgumentException-issueIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageIssueAliases
boolean canManageIssueAliases()Tests if this user can manageIdaliases forIssues. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.- Returns:
falseifIssuealiasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasIssue
void aliasIssue(Id issueId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto anIssuefor the purpose of creating compatibility. The primaryIdof theIssueis determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another issue, it is reassigned to the given issueId.- Parameters:
issueId- theIdof anIssuealiasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-issueIdnot foundNullArgumentException-issueIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-