Class Aphrodite

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated 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.
      void addCommentToPullRequest​(org.jboss.set.aphrodite.domain.PullRequest pullRequest, String comment)
      Deprecated.
      Use org.jboss.set.aphrodite.domain.spi.PullRequestHome#addComment() instead.
      void addLabelToPullRequest​(org.jboss.set.aphrodite.domain.PullRequest pullRequest, String labelName)
      Deprecated.
      Use org.jboss.set.aphrodite.domain.spi.PullRequestHome#addLabel() instead.
      void close()  
      org.jboss.set.aphrodite.domain.Issue createIssue​(IssueCreationDetails details)
      Create skeletal issue.
      List<org.jboss.set.aphrodite.domain.PullRequest> findPullRequestsRelatedTo​(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
      Deprecated.
      Use org.jboss.set.aphrodite.domain.spi.PullRequestHome#findReferencedPullRequests() instead.
      List<org.jboss.set.aphrodite.domain.PullRequest> findReferencedPullRequests​(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
      Return all the referenced PRs to a given PR using all the repositories defined in the instance.
      List<org.jboss.set.aphrodite.domain.Stream> getAllStreams()
      Returns the streams discovered by all of the active StreamServices
      List<org.jboss.set.aphrodite.domain.Commit> getCommitsSince​(URL url, String branch, long since)
      Returns a list of commits on a given branch between a given date and now
      org.jboss.set.aphrodite.domain.CommitStatus getCommitStatusFromPullRequest​(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
      Deprecated.
      Use org.jboss.set.aphrodite.domain.spi.PullRequestHome#getCommitStatus() instead.
      org.jboss.set.aphrodite.domain.StreamComponent getComponentBy​(URI repository, org.jboss.set.aphrodite.domain.Codebase codebase)
      Deprecated.
      AphroditeConfig getConfig()  
      List<URI> getDistinctURLRepositoriesByStream​(String streamName)
      Deprecated.
      List<URI> getDistinctURLRepositoriesFromStreams()
      Deprecated.
      org.jboss.set.aphrodite.domain.Issue getIssue​(URL url)
      Retrieve an issue object associated with the given URL.
      org.jboss.set.aphrodite.domain.Issue getIssue​(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
      Deprecated.
      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)
      Deprecated. 
      List<org.jboss.set.aphrodite.domain.Label> getLabelsFromPullRequest​(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
      Deprecated.
      Use org.jboss.set.aphrodite.domain.spi.PullRequestHome#getLabels() instead.
      List<org.jboss.set.aphrodite.domain.Label> getLabelsFromRepository​(org.jboss.set.aphrodite.domain.Repository repository)
      Retrieve all labels associated with the provided PullRequest in Repository object.
      org.jboss.set.aphrodite.domain.PullRequest getPullRequest​(URL url)
      Get the PullRequest located at the provided URL.
      List<org.jboss.set.aphrodite.domain.PullRequest> getPullRequestsByState​(org.jboss.set.aphrodite.domain.Repository repository, org.jboss.set.aphrodite.domain.PullRequestState state)
      Retrieve all PullRequests associated with the provided Repository object, which have a state that matches the provided PullRequestState object.
      org.jboss.set.aphrodite.domain.PullRequestUpgrade getPullRequestUpgrade​(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
      Deprecated.
      Map<RepositoryType,​org.jboss.set.aphrodite.domain.RateLimit> getRateLimits()  
      List<org.jboss.set.aphrodite.domain.Issue> getRelatedIssues​(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
      Deprecated.
      org.jboss.set.aphrodite.domain.Repository getRepository​(URL url)
      Get the repository located at the provided URL.
      org.jboss.set.aphrodite.domain.Stream getStream​(String streamName)
      Get a specific Stream object based upon its String name.
      List<org.jboss.set.aphrodite.domain.Stream> getStreamsBy​(URI repository, org.jboss.set.aphrodite.domain.Codebase codebase)
      Deprecated.
      IssueTrackerService getTrackerFor​(URL url)  
      org.jboss.set.aphrodite.domain.Issue getUpstreamIssue​(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
      Deprecated.
      org.jboss.set.aphrodite.domain.PullRequest getUpstreamPullRequest​(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
      Deprecated.
      boolean hasUpgrade​(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
      Deprecated.
      static Aphrodite instance()
      Get an instance of the Aphrodite service.
      static Aphrodite instance​(AphroditeConfig config)
      Get an instance of the Aphrodite service.
      boolean isCPReleased​(String cpVersion)
      Check if a given CP version is released.
      boolean isRepositoryLabelsModifiable​(org.jboss.set.aphrodite.domain.Repository repository)
      Discover if the user logged into a RepositoryService has the correct permissions to apply/remove labels to pull request in the provided Repository
      boolean isUpstreamRequired​(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
      Deprecated.
      void removeLabelFromPullRequest​(org.jboss.set.aphrodite.domain.PullRequest pullRequest, String name)
      Deprecated.
      Use org.jboss.set.aphrodite.domain.spi.PullRequestHome#removeLabel() instead.
      List<org.jboss.set.aphrodite.domain.Issue> searchIssues​(org.jboss.set.aphrodite.domain.SearchCriteria searchCriteria)
      Return all issues, across all Issue Trackers, which match the passed SearchCriteria.
      List<org.jboss.set.aphrodite.domain.Issue> searchIssuesByFilter​(URL filterUrl)
      Return all issues which match the provided filter.
      void setLabelsToPullRequest​(org.jboss.set.aphrodite.domain.PullRequest pullRequest, List<org.jboss.set.aphrodite.domain.Label> labels)
      Deprecated.
      Use org.jboss.set.aphrodite.domain.spi.PullRequestHome#setLabels() instead.
      boolean updateIssue​(org.jboss.set.aphrodite.domain.Issue issue)
      Update a specific Issue at the remote issue tracker service.
    • Method Detail

      • instance

        public static Aphrodite instance()
                                  throws AphroditeException
        Get an instance of the Aphrodite service. If the service has not yet been initialised, then a new service is created. This service will use the JSON configuration file specified in the "aphrodite.config" environment variable.
        Returns:
        instance the singleton instance of the Aphrodite service.
        Throws:
        AphroditeException - if the specified configuration file cannot be opened.
      • instance

        public static Aphrodite instance​(AphroditeConfig config)
                                  throws AphroditeException
        Get an instance of the Aphrodite service. If the service has not yet been initialised, then a new service is created using config. If the service has already been initialised then an IllegalStateException is thrown if a different AphroditeConfig object is passed.
        Parameters:
        config - an AphroditeConfig object containing all configuration data.
        Returns:
        instance the singleton instance of the Aphrodite service.
        Throws:
        AphroditeException - if initialization fails
        IllegalStateException - if an Aphrodite service has already been initialised.
      • getIssue

        public 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 at any of the active issuetrackers.
      • getIssue

        @Deprecated
        public org.jboss.set.aphrodite.domain.Issue getIssue​(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
                                                      throws NotFoundException,
                                                             MalformedURLException
        Deprecated.
        Retrieve issue associated with PR. This method require PR to conform to metadata scheme and have issue linked to this PR with 'Issue: <TICKET>'
        Parameters:
        pullRequest - - PR which will be interrogated.
        Returns:
        • null
        • - if no issue is linked in PR
        • Issue
        • - if there is linked issue that can be fetched
        Throws:
        NotFoundException - - if there is linked issue but either no tracker or issue does not exist in tracker
        MalformedURLException
      • getRelatedIssues

        @Deprecated
        public List<org.jboss.set.aphrodite.domain.Issue> getRelatedIssues​(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
                                                                    throws MalformedURLException,
                                                                           NotFoundException
        Deprecated.
        Retrieve list of related issues associated with PR. This method require PR to conform to metadata scheme and have issue linked to this PR with 'Related Issues: <TICKET>,<TICKET>,<TICKET>'
        Parameters:
        pullRequest - - PR which will be interrogated.
        Returns:
        • null
        • - if no issues are linked in PR
        • Issue
        • - if there are linked issues that can be fetched
        Throws:
        NotFoundException - - if there is linked issue but either no tracker or issue does not exist in tracker
        MalformedURLException
      • getUpstreamIssue

        @Deprecated
        public org.jboss.set.aphrodite.domain.Issue getUpstreamIssue​(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
                                                              throws NotFoundException,
                                                                     MalformedURLException
        Deprecated.
        Retrieve upstream issue associated with this PR. This method require PR to conform to metadata scheme and have issue linked to this PR with 'Upstream Issue: <TICKET>'.
        Parameters:
        pullRequest - - PR which will be interrogated.
        Returns:
        Throws:
        NotFoundException - - if there is linked issue but either no tracker or issue does not exist in tracker
        MalformedURLException
      • getUpstreamPullRequest

        @Deprecated
        public org.jboss.set.aphrodite.domain.PullRequest getUpstreamPullRequest​(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
                                                                          throws MalformedURLException,
                                                                                 NotFoundException
        Deprecated.
        Retrieve upstream PR associated with this PR. This method require PR to conform to metadata scheme and have issue linked to this PR with 'Upstream PR: <TICKET>'.
        Parameters:
        pullRequest - - PR which will be interrogated.
        Returns:
        Throws:
        NotFoundException - - if there is linked PR but either no tracker or issue does not exist in tracker
        MalformedURLException
      • getPullRequestUpgrade

        @Deprecated
        public org.jboss.set.aphrodite.domain.PullRequestUpgrade getPullRequestUpgrade​(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
        Deprecated.
      • isUpstreamRequired

        @Deprecated
        public boolean isUpstreamRequired​(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
        Deprecated.
        Check if PR require upstream or not.
        Parameters:
        pullRequest -
        Returns:
      • hasUpgrade

        @Deprecated
        public boolean hasUpgrade​(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
        Deprecated.
        Check if said PR has upgrade meta present.
        Parameters:
        pullRequest -
        Returns:
      • getIssues

        public 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 a 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

        public List<org.jboss.set.aphrodite.domain.Issue> searchIssues​(org.jboss.set.aphrodite.domain.SearchCriteria searchCriteria)
        Return all issues, across all Issue Trackers, 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.
      • searchIssuesByFilter

        public 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 at any of the Issue Trackers.
      • updateIssue

        public boolean updateIssue​(org.jboss.set.aphrodite.domain.Issue issue)
                            throws NotFoundException,
                                   AphroditeException
        Update a specific 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 associated 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

        public 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
      • addCommentToIssue

        public 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

        public 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.
      • getIssuesAssociatedWith

        @Deprecated
        public List<org.jboss.set.aphrodite.domain.Issue> getIssuesAssociatedWith​(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
        Deprecated.
        Retrieve all Issues associated with the provided pull request 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.
      • getRepository

        public org.jboss.set.aphrodite.domain.Repository getRepository​(URL url)
                                                                throws NotFoundException
        Get the repository located at the provided URL.
        Parameters:
        url - the URL of the repository to be retrieved.
        Returns:
        the Repository object.
        Throws:
        NotFoundException - if a Repository cannot be found at the provided base url, or no service exists with the same host domain as the provided URL.
      • getPullRequestsByState

        public List<org.jboss.set.aphrodite.domain.PullRequest> getPullRequestsByState​(org.jboss.set.aphrodite.domain.Repository repository,
                                                                                       org.jboss.set.aphrodite.domain.PullRequestState state)
                                                                                throws NotFoundException
        Retrieve all PullRequests associated with the provided Repository object, which have a state that matches the provided PullRequestState object.
        Parameters:
        repository - the Repository object whose associated PullRequests should be returned.
        state - the PullRequestState which the returned PullRequest objects must have.
        Returns:
        a list of all matching PullRequest objects, or an empty list if no pullRequests can be found.
        Throws:
        NotFoundException - if an exception is encountered when trying to retrieve pullRequests from a RepositoryService
      • getPullRequest

        public org.jboss.set.aphrodite.domain.PullRequest getPullRequest​(URL url)
                                                                  throws NotFoundException
        Get the PullRequest located at the provided URL.
        Parameters:
        url - the URL of the pullRequest to be retrieved.
        Returns:
        the PullRequest object.
        Throws:
        NotFoundException - if a PullRequest cannot be found at the provided base url.
      • getLabelsFromRepository

        public List<org.jboss.set.aphrodite.domain.Label> getLabelsFromRepository​(org.jboss.set.aphrodite.domain.Repository repository)
                                                                           throws NotFoundException
        Retrieve all labels associated with the provided PullRequest in Repository object.
        Parameters:
        repository - the Repository object whose associated labels should be returned.
        Returns:
        a list of all matching Label objects, or an empty list if no labels can be found.
        Throws:
        NotFoundException - if an error is encountered when trying to retrieve labels from a RepositoryService
      • getLabelsFromPullRequest

        @Deprecated
        public List<org.jboss.set.aphrodite.domain.Label> getLabelsFromPullRequest​(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
                                                                            throws NotFoundException
        Deprecated.
        Use org.jboss.set.aphrodite.domain.spi.PullRequestHome#getLabels() instead.
        Retrieve all labels associated with the provided PullRequest object.
        Parameters:
        pullRequest - request the PullRequest object whose associated labels should be returned.
        Returns:
        a list of all matching Label objects, or an empty list if no pull request can be found.
        Throws:
        NotFoundException - if an error is encountered when trying to retrieve labels from a RepositoryService
      • isRepositoryLabelsModifiable

        public boolean isRepositoryLabelsModifiable​(org.jboss.set.aphrodite.domain.Repository repository)
                                             throws NotFoundException
        Discover if the user logged into a RepositoryService has the correct permissions to apply/remove labels to pull request in the provided Repository
        Parameters:
        repository - the Repository whose permissions are to be checked
        Returns:
        true if the user has permission, otherwise false.
        Throws:
        NotFoundException - if the specified Repository cannot be found.
      • setLabelsToPullRequest

        @Deprecated
        public void setLabelsToPullRequest​(org.jboss.set.aphrodite.domain.PullRequest pullRequest,
                                           List<org.jboss.set.aphrodite.domain.Label> labels)
                                    throws NotFoundException,
                                           AphroditeException
        Deprecated.
        Use org.jboss.set.aphrodite.domain.spi.PullRequestHome#setLabels() instead.
        Set the labels for the provided PullRequest object.
        Parameters:
        pullRequest - the PullRequest object whose will be set.
        labels - the Label apply to the PullRequest
        Throws:
        NotFoundException - if the Label can not be found in the provided PullRequest
        AphroditeException - if add the Label is not consistent with get labels
      • removeLabelFromPullRequest

        @Deprecated
        public void removeLabelFromPullRequest​(org.jboss.set.aphrodite.domain.PullRequest pullRequest,
                                               String name)
                                        throws NotFoundException
        Deprecated.
        Use org.jboss.set.aphrodite.domain.spi.PullRequestHome#removeLabel() instead.
        Delete a label from the provided PullRequest object.
        Parameters:
        pullRequest - the PullRequest whose label will be removed.
        name - the Label name will be removed.
        Throws:
        NotFoundException - if the Label name can not be found in the provided PullRequest, or an exception occurs when contacting the RepositoryService
      • addCommentToPullRequest

        @Deprecated
        public void addCommentToPullRequest​(org.jboss.set.aphrodite.domain.PullRequest pullRequest,
                                            String comment)
                                     throws NotFoundException
        Deprecated.
        Use org.jboss.set.aphrodite.domain.spi.PullRequestHome#addComment() instead.
        Add a Comment to the specified PullRequest object, and propagate the changes to the remote repository.
        Parameters:
        pullRequest - the PullRequest on which the comment will be made.
        comment - the new Comment.
        Throws:
        NotFoundException - if the PullRequest cannot be found at the remote repository.
      • addLabelToPullRequest

        @Deprecated
        public void addLabelToPullRequest​(org.jboss.set.aphrodite.domain.PullRequest pullRequest,
                                          String labelName)
                                   throws NotFoundException
        Deprecated.
        Use org.jboss.set.aphrodite.domain.spi.PullRequestHome#addLabel() instead.
        Attach a label to the specified pull request. Note the label must already exist at remote repository, otherwise it will not be applied. If the specified label is already associated with the provided pull request then no further action is taken.
        Parameters:
        pullRequest - the PullRequest to which the label will be applied.
        labelName - the name of the label to be applied.
        Throws:
        NotFoundException - if the PullRequest cannot be found, or the labelName does not exist.
      • findPullRequestsRelatedTo

        @Deprecated
        public List<org.jboss.set.aphrodite.domain.PullRequest> findPullRequestsRelatedTo​(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
        Deprecated.
        Use org.jboss.set.aphrodite.domain.spi.PullRequestHome#findReferencedPullRequests() instead.
        Retrieve all PullRequest objects related to the supplied pull request. A pull request is related if its URL is referenced in the provided pull request object. Note, this method fails silently if a pull request cannot be retrieved from a URL, with the error message simply logged.
        Parameters:
        pullRequest - request the PullRequest object to be queried against
        Returns:
        a list of PullRequest objects that are related to the supplied pull request object
      • getCommitStatusFromPullRequest

        @Deprecated
        public org.jboss.set.aphrodite.domain.CommitStatus getCommitStatusFromPullRequest​(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
                                                                                   throws NotFoundException
        Deprecated.
        Use org.jboss.set.aphrodite.domain.spi.PullRequestHome#getCommitStatus() instead.
        Retrieve the current CI status of the latest commit associated with a given pull request.
        Parameters:
        pullRequest - the PullRequest object whose status is to be queried
        Returns:
        the CI status of the latest commit associated with the given pull request
        Throws:
        NotFoundException - if no commit status can be found for the provided pull request
      • getAllStreams

        public List<org.jboss.set.aphrodite.domain.Stream> getAllStreams()
        Returns the streams discovered by all of the active StreamServices
        Returns:
        a list of all streams discovered by all StreamService instances.
      • getStream

        public org.jboss.set.aphrodite.domain.Stream getStream​(String streamName)
                                                        throws NotFoundException
        Get a specific Stream object based upon its String name.
        Parameters:
        streamName - the name of the Stream to be returned.
        Returns:
        Stream the first Stream object which corresponds to the specified streamName if it exists at a StreamService.
        Throws:
        NotFoundException - if the specified streamName does not exist at any of the loaded StreamServices.
      • isCPReleased

        public 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.
      • getDistinctURLRepositoriesFromStreams

        @Deprecated
        public List<URI> getDistinctURLRepositoriesFromStreams()
        Deprecated.
        Retrieve all unique Repositories that exists across all Streams.
        Returns:
        a list of unique Repositories.
      • getDistinctURLRepositoriesByStream

        @Deprecated
        public List<URI> getDistinctURLRepositoriesByStream​(String streamName)
        Deprecated.
        Retrieve all Repositories associated with a given Stream, or an empty lists if no Repositories are associated with the given streamName.
        Parameters:
        streamName - the name of the Stream containing the returned repositories.
        Returns:
        a list of unique Repositories, or an empty lists if no Repositories are associated with the given streamName.
      • getStreamsBy

        @Deprecated
        public List<org.jboss.set.aphrodite.domain.Stream> getStreamsBy​(URI repository,
                                                                        org.jboss.set.aphrodite.domain.Codebase codebase)
        Deprecated.
        Find all streams associated with a given repository and codebase.
        Parameters:
        repository - the Repository to be searched against
        codebase - the codebase to be searched against
        Returns:
        a list of Streams associated with the given repository and codebase.
      • getComponentBy

        @Deprecated
        public org.jboss.set.aphrodite.domain.StreamComponent getComponentBy​(URI repository,
                                                                             org.jboss.set.aphrodite.domain.Codebase codebase)
                                                                      throws NotFoundException
        Deprecated.
        Get the StreamComponent which specifies the given repository and codebase. Note, this returns the first matching component found in any of the loaded StreamServices.
        Parameters:
        repository - the Repository to be searched against.
        codebase - the codebase to be searched against.
        Returns:
        the name of the component of this repository. If it does not exist it will return the URL of the repository.
        Throws:
        NotFoundException - if a StreamComponent with the specified repository and codebase does not exist at this stream service.
      • findReferencedPullRequests

        public List<org.jboss.set.aphrodite.domain.PullRequest> findReferencedPullRequests​(org.jboss.set.aphrodite.domain.PullRequest pullRequest)
        Return all the referenced PRs to a given PR using all the repositories defined in the instance. All of them are called in order to get the references for all of them.
        Parameters:
        pullRequest - The PR to obtain the references PRs
        Returns:
        The list of PRs referenced by this PR
      • getCommitsSince

        public List<org.jboss.set.aphrodite.domain.Commit> getCommitsSince​(URL url,
                                                                           String branch,
                                                                           long since)
                                                                    throws NotFoundException
        Returns a list of commits on a given branch between a given date and now
        Parameters:
        url - URL of the Repository
        branch - branch in the Repository
        since - date in milliseconds
        Returns:
        List of commits past the given date
        Throws:
        NotFoundException - if the specified Repository cannot be found.