Interface IssueTrackerService

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      boolean addCommentToIssue​(Collection<org.jboss.set.aphrodite.domain.Issue> issues, org.jboss.set.aphrodite.domain.Comment comment)
      Adds the Comment to all of the provided Issue objects.
      boolean addCommentToIssue​(Map<org.jboss.set.aphrodite.domain.Issue,​org.jboss.set.aphrodite.domain.Comment> commentMap)
      Adds the Comment to the associated Issue object for all Issue/Comment pairs in the Map.
      void addCommentToIssue​(org.jboss.set.aphrodite.domain.Issue issue, org.jboss.set.aphrodite.domain.Comment comment)
      Adds a new comment to the specified issue.
      org.jboss.set.aphrodite.domain.Issue createIssue​(IssueCreationDetails details)
      Create skeletal issue.
      default void destroy()
      allows to destroy and deallocate resources
      org.jboss.set.aphrodite.domain.Issue getIssue​(URL url)
      Retrieve an issue object associated with the given URL.
      List<org.jboss.set.aphrodite.domain.Issue> getIssues​(Collection<URL> urls)
      Retrieve all issues associated with the provided URLs.
      List<org.jboss.set.aphrodite.domain.Issue> getIssuesAssociatedWith​(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
      Retrieve all Issues associated with the provided pullRequest object.
      String getTrackerID()
      Return string format of tracker id, this value, can be used as key/index and compared to AbstractIssueTracker#convertToTrackerID().
      boolean init​(AphroditeConfig config)
      Initiate this IssueTrackerService using the supplied AphroditeConfig.
      boolean init​(IssueTrackerConfig config)
      Initiate this IssueTrackerService using the supplied IssueTrackerConfig.
      boolean isCPReleased​(String cpVersion)
      Check if a given CP version is released.
      List<org.jboss.set.aphrodite.domain.Issue> searchIssues​(org.jboss.set.aphrodite.domain.SearchCriteria searchCriteria)
      Return all issues which match the passed SearchCriteria.
      List<org.jboss.set.aphrodite.domain.Issue> searchIssuesByFilter​(URL filterUrl)
      Return all issues which match the provided filter.
      boolean updateIssue​(org.jboss.set.aphrodite.domain.Issue issue)
      Update an Issue at the remote issue tracker service.
      boolean urlExists​(URL url)
      Checks whether the provided URL is on the same host as this service.
    • Method Detail

      • init

        boolean init​(AphroditeConfig config)
        Initiate this IssueTrackerService using the supplied AphroditeConfig. The first IssueTrackerConfig object found in the AphroditeConfig object, is used to initiate the service and is subsequently removed from the config to prevent the same service being initiated twice.
        Parameters:
        config - a AphroditeConfig object containing at least one IssueTrackerConfig object.
        Returns:
        true if the service was initialised without errors, false otherwise.
        Throws:
        IllegalArgumentException - if no IssueTrackerConfig objects are present.
      • init

        boolean init​(IssueTrackerConfig config)
        Initiate this IssueTrackerService using the supplied IssueTrackerConfig.
        Parameters:
        config - a IssueTrackerConfig object containing all configuration information.
        Returns:
        true if the service was initialised without errors, false otherwise.
      • urlExists

        boolean urlExists​(URL url)
        Checks whether the provided URL is on the same host as this service.
        Parameters:
        url - the URL to check.
        Returns:
        true if the provided URL has the same host as this service, otherwise false.
        Throws:
        NullPointerException - if the provided URL is null.
      • getTrackerID

        String getTrackerID()
        Return string format of tracker id, this value, can be used as key/index and compared to AbstractIssueTracker#convertToTrackerID().
        Returns:
      • getIssuesAssociatedWith

        List<org.jboss.set.aphrodite.domain.Issue> getIssuesAssociatedWith​(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
        Retrieve all Issues associated with the provided pullRequest object. Implementations of this method assume that the urls of the related issues are present in the pullRequest's description field.
        Parameters:
        pullRequest - the PullRequest object whoms associated Issues should be returned.
        Returns:
        a list of all Issue objects, or an empty list if no issues can be found.
      • getIssue

        org.jboss.set.aphrodite.domain.Issue getIssue​(URL url)
                                               throws NotFoundException
        Retrieve an issue object associated with the given URL.
        Parameters:
        url - the URL of the issue to be retrieved.
        Returns:
        the Issue associated with the provided URK.
        Throws:
        NotFoundException - if the provided URL is not associated with an issue.
      • getIssues

        List<org.jboss.set.aphrodite.domain.Issue> getIssues​(Collection<URL> urls)
        Retrieve all issues associated with the provided URLs. This method simply logs any issue URLs that cannot be retrieved from this IssueTrackerServer. If the provided URLs collection is empty, or no issues are found, then an empty List is returned.
        Parameters:
        urls - a collection of issue URLs.
        Returns:
        a list of Issue objects associated with the provided urls.
      • searchIssues

        List<org.jboss.set.aphrodite.domain.Issue> searchIssues​(org.jboss.set.aphrodite.domain.SearchCriteria searchCriteria)
        Return all issues which match the passed SearchCriteria.
        Parameters:
        searchCriteria - all set fields will be search for.
        Returns:
        a list of all Issue objects which match the specified searchCriteria, or an empty list if no issues match the searched criteria or the searchCriteria object contains no entries.
      • searchIssuesByFilter

        List<org.jboss.set.aphrodite.domain.Issue> searchIssuesByFilter​(URL filterUrl)
                                                                 throws NotFoundException
        Return all issues which match the provided filter.
        Parameters:
        filterUrl - the url of the issue tracker filtered to be applied.
        Returns:
        a list of all Issue objects which are returned by the provided filter.
        Throws:
        NotFoundException - if the filterURL is not associated with any filters.
      • updateIssue

        boolean updateIssue​(org.jboss.set.aphrodite.domain.Issue issue)
                     throws NotFoundException,
                            AphroditeException
        Update an Issue at the remote issue tracker service. Note, this does not update issue comments or an issues description. To add a new comment, use addCommentToIssue(Issue, Comment)
        Parameters:
        issue - the issue to be updated at the IssueTrackerService
        Returns:
        true if the issue was successfully updated, false otherwise.
        Throws:
        NotFoundException - if the provided Issue cannot be found at the IssueTracker.
        AphroditeException - if the user credentials supplied for this issue track do not have permission to update this issue, or a field within this issue.
      • addCommentToIssue

        void addCommentToIssue​(org.jboss.set.aphrodite.domain.Issue issue,
                               org.jboss.set.aphrodite.domain.Comment comment)
                        throws NotFoundException
        Adds a new comment to the specified issue.
        Parameters:
        issue - the issue to add a new comment to.
        comment - the comment to be added to the issue.
        Throws:
        NotFoundException - if the provided Issue cannot be found at the IssueTracker.
      • addCommentToIssue

        boolean addCommentToIssue​(Map<org.jboss.set.aphrodite.domain.Issue,​org.jboss.set.aphrodite.domain.Comment> commentMap)
        Adds the Comment to the associated Issue object for all Issue/Comment pairs in the Map. Null comments are ignored.
        Parameters:
        commentMap - the map containing all Issues that are to be updated and the associated comments.
        Returns:
        true if all comments are successfully added to their associated Issue, otherwise false.
      • addCommentToIssue

        boolean addCommentToIssue​(Collection<org.jboss.set.aphrodite.domain.Issue> issues,
                                  org.jboss.set.aphrodite.domain.Comment comment)
        Adds the Comment to all of the provided Issue objects.
        Parameters:
        issues - a collection of all issues that the comment should be added to.
        comment - the comment to be added to all issues.
        Returns:
        true if the comment is successfully added to all issues.
      • isCPReleased

        boolean isCPReleased​(String cpVersion)
        Check if a given CP version is released.
        Parameters:
        cpVersion - the CP version to be tested. Jira accepts GA version format x.y.z.GA, e.g. 7.1.2.GA. Bugzilla accepts version format x.y.z, e.g. 6.4.18.
        Returns:
        true if the given version is released, otherwise false.
      • destroy

        default void destroy()
        allows to destroy and deallocate resources