Interface IssueHandler

  • All Known Implementing Classes:
    MockIssueHandler

    public interface IssueHandler
    Author:
    jonmv
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean addWatcher​(IssueId issueId, String watcher)
      Reassign the issue with the given ID to the given user, and returns the outcome of this.
      Optional<User> assigneeOf​(IssueId issueId)
      Returns the user assigned to the given issue, if any.
      void commentOn​(IssueId issueId, String comment)
      Add a comment to the issue with the given ID.
      Optional<User> escalate​(IssueId issueId, Contact contact)
      Escalate an issue filed with the given property.
      IssueId file​(Issue issue)
      File an issue with its given property or the default, and with the specific assignee, if present.
      Optional<IssueId> findBySimilarity​(Issue issue)
      Returns the ID of this issue, if it exists and is open, based on a similarity search.
      boolean isActive​(IssueId issueId, Duration maxInactivity)
      Returns whether there has been significant activity on the issue within the given duration.
      boolean isOpen​(IssueId issueId)
      Returns whether the issue is still under investigation.
      boolean issueExists​(Issue issue)
      Returns whether there exists an issue with an exactly matching summary.
      boolean reassign​(IssueId issueId, User assignee)
      Reassign the issue with the given ID to the given user, and returns the outcome of this.
      void update​(IssueId issueId, String description)
      Update the description of the issue with the given ID.
    • Method Detail

      • file

        IssueId file​(Issue issue)
        File an issue with its given property or the default, and with the specific assignee, if present.
        Parameters:
        issue - The issue to file.
        Returns:
        ID of the created issue.
      • findBySimilarity

        Optional<IssueId> findBySimilarity​(Issue issue)
        Returns the ID of this issue, if it exists and is open, based on a similarity search.
        Parameters:
        issue - The issue to search for; relevant fields are the summary and the owner (propertyId).
        Returns:
        ID of the issue, if it is found.
      • update

        void update​(IssueId issueId,
                    String description)
        Update the description of the issue with the given ID.
        Parameters:
        issueId - ID of the issue to comment on.
        description - The updated description.
      • commentOn

        void commentOn​(IssueId issueId,
                       String comment)
        Add a comment to the issue with the given ID.
        Parameters:
        issueId - ID of the issue to comment on.
        comment - The comment to add.
      • isOpen

        boolean isOpen​(IssueId issueId)
        Returns whether the issue is still under investigation.
        Parameters:
        issueId - ID of the issue to examine.
        Returns:
        Whether the given issue is under investigation.
      • isActive

        boolean isActive​(IssueId issueId,
                         Duration maxInactivity)
        Returns whether there has been significant activity on the issue within the given duration.
        Parameters:
        issueId - ID of the issue to examine.
        Returns:
        Whether the given issue is actively worked on.
      • assigneeOf

        Optional<User> assigneeOf​(IssueId issueId)
        Returns the user assigned to the given issue, if any.
        Parameters:
        issueId - ID of the issue for which to find the assignee.
        Returns:
        The user responsible for fixing the given issue, if found.
      • reassign

        boolean reassign​(IssueId issueId,
                         User assignee)
        Reassign the issue with the given ID to the given user, and returns the outcome of this.
        Parameters:
        issueId - ID of the issue to be reassigned.
        assignee - User to which the issue shall be assigned.
        Returns:
        Whether the reassignment was successful.
      • addWatcher

        boolean addWatcher​(IssueId issueId,
                           String watcher)
        Reassign the issue with the given ID to the given user, and returns the outcome of this.
        Parameters:
        issueId - ID of the issue to be watched.
        watcher - watcher to add to the issue.
        Returns:
        Whether adding the watcher was successful.
      • escalate

        Optional<User> escalate​(IssueId issueId,
                                Contact contact)
        Escalate an issue filed with the given property.
        Parameters:
        issueId - ID of the issue to escalate.
        Returns:
        User that was assigned issue as a result of the escalation, if any
      • issueExists

        boolean issueExists​(Issue issue)
        Returns whether there exists an issue with an exactly matching summary.
        Parameters:
        issue - The summary of the issue.
        Returns:
        Whether the issue exists.