Interface IssueAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
All Known Subinterfaces:
IssueBatchAdminSession

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.

  • Method Details

    • getFrontOfficeId

      Id getFrontOfficeId()
      Gets the FrontOffice Id associated with this session.
      Returns:
      the FrontOffice Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getFrontOffice

      Gets the FrontOffice associated with this session.
      Returns:
      the front office
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canCreateIssues

      boolean canCreateIssues()
      Tests if this user can create 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.
      Returns:
      false if Issue creation is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canCreateIssueWithRecordTypes

      boolean canCreateIssueWithRecordTypes(Type[] issueRecordTypes)
      Tests if this user can create a single 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.
      Parameters:
      issueRecordTypes - array of issue record types
      Returns:
      true if Issue creation using the specified record Types is supported, false otherwise
      Throws:
      NullArgumentException - issueRecordTypes is null
      Compliance:
      mandatory - This method must be implemented.
    • getIssueFormForCreate

      IssueForm getIssueFormForCreate(Id queueId, Id resourceId, Type[] issueRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the issue form for creating new issues. A new form should be requested for each create transaction.
      Parameters:
      queueId - a queue Id
      resourceId - a customer Id
      issueRecordTypes - array of issue record types
      Returns:
      the issue form
      Throws:
      NotFoundException - queueId or resourceId is not found
      NullArgumentException - queueId, resourceId or issueRecordTypes is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - unable to get form for requested record types
      Compliance:
      mandatory - This method must be implemented.
    • createIssue

      Creates a new Issue .
      Parameters:
      issueForm - the form for this Issue
      Returns:
      the new Issue
      Throws:
      IllegalStateException - issueForm already used in a create transaction
      InvalidArgumentException - one or more of the form elements is invalid
      NullArgumentException - issueForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - issueForm did not originate from getIssueFormForCreate()
      Compliance:
      mandatory - This method must be implemented.
    • canUpdateIssues

      boolean canUpdateIssues()
      Tests if this user can update 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.
      Returns:
      false if Issue modification is not authorized, true otherwise
      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 - the Id of the Issue
      Returns:
      the issue form
      Throws:
      NotFoundException - issueId is not found
      NullArgumentException - issueId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateIssue

      void updateIssue(IssueForm issueForm) throws OperationFailedException, PermissionDeniedException
      Updates an existing issue.
      Parameters:
      issueForm - the form containing the elements to be updated
      Throws:
      IllegalStateException - issueForm already used in an update transaction
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - issueId or issueForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - issueForm did not originate from getIssueFormForUpdate()
      Compliance:
      mandatory - This method must be implemented.
    • canDeleteIssues

      boolean canDeleteIssues()
      Tests if this user can delete 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.
      Returns:
      false if Issue deletion is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • deleteIssue

      Deletes an Issue .
      Parameters:
      issueId - the Id of the Issue to remove
      Throws:
      NotFoundException - issueId not found
      NullArgumentException - issueId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canManageIssueAliases

      boolean canManageIssueAliases()
      Tests if this user can manage 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.
      Returns:
      false if Issue aliasing is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • aliasIssue

      Adds an 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 .
      Parameters:
      issueId - the Id of an Issue
      aliasId - the alias Id
      Throws:
      AlreadyExistsException - aliasId is already assigned
      NotFoundException - issueId not found
      NullArgumentException - issueId or aliasId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • closeIssue

      void closeIssue(Id issueId, Type resolutionType) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Closes an issue.
      Parameters:
      issueId - the Id of the Issue
      resolutionType - a resolution type
      Throws:
      IllegalStateException - issue already closed
      InvalidArgumentException - resolutionType is not valid
      NotFoundException - issueId not found
      NullArgumentException - issueId or resolutionType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reopenIssue

      Reopend an issue.
      Parameters:
      issueId - the Id of the Issue
      Throws:
      IllegalStateException - issue already open
      NotFoundException - issueId not found
      NullArgumentException - issueId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.