Class AbstractPullRequestFilter<T>

    • Constructor Detail

      • AbstractPullRequestFilter

        protected AbstractPullRequestFilter​(TypeFilter<T> filter)
        Constructor.
        Parameters:
        filter - TypeFilter to validate the data
    • Method Detail

      • isAccepted

        protected boolean isAccepted​(com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketPullRequest pullRequest)
        Validates the pull requests is accepted by the filter.
        Parameters:
        pullRequest - the BitbucketPullRequest
        Returns:
        true if and only if the pull requests was verified positive by the filter
      • getFilter

        protected TypeFilter<T> getFilter()
        Return instance of a filter to validate the data.
        Returns:
        TypeFilter to validate the data
      • getData

        protected abstract T getData​(com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketPullRequest pullRequest)
        Extracts data from pull requests to validate.
        Parameters:
        pullRequest - the BitbucketPullRequest
        Returns:
        extracted data to validation
      • getMessage

        protected abstract String getMessage​(com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketPullRequest pullRequest)
        Prepare a message for user to logs.
        Parameters:
        pullRequest - the BitbucketPullRequest
        Returns:
        a message for user