Class CommitDecoratorFactory

java.lang.Object
io.jenkins.plugins.forensics.util.CommitDecoratorFactory
All Implemented Interfaces:
ExtensionPoint

public abstract class CommitDecoratorFactory extends Object implements ExtensionPoint
Jenkins' extension point that allows plugins to create CommitDecorator instances based on a supported SCM and RepositoryBrowser.
Author:
Ullrich Hafner
  • Constructor Details

    • CommitDecoratorFactory

      public CommitDecoratorFactory()
  • Method Details

    • createCommitDecorator

      public abstract Optional<CommitDecorator> createCommitDecorator(SCM scm, edu.hm.hafner.util.FilteredLog logger)
      Returns a commit decorator for the specified SCM and the associated RepositoryBrowser.
      Parameters:
      scm - the SCM to create the commit decorator for
      logger - a logger to report error messages
      Returns:
      a commit decorator for the specified SCM and the associated RepositoryBrowser
    • findCommitDecorator

      public static CommitDecorator findCommitDecorator(SCM scm, edu.hm.hafner.util.FilteredLog logger)
      Returns a commit decorator for the specified scm.
      Parameters:
      scm - the SCM to get the decorator for
      logger - a logger to report error messages
      Returns:
      a commit decorator for the specified SCM or a CommitDecorator.NullDecorator if the SCM is not supported or if the SCM does not provide a RepositoryBrowser implementation
    • findCommitDecorator

      public static CommitDecorator findCommitDecorator(Run<?,?> run)
      Returns a commit decorator for the specified build.
      Parameters:
      run - the current build
      Returns:
      a commit decorator for the SCM of the specified build or a CommitDecorator.NullDecorator if the SCM is not supported or if the SCM does not provide a RepositoryBrowser implementation