Class CommitDecoratorFactory
java.lang.Object
io.jenkins.plugins.forensics.util.CommitDecoratorFactory
- All Implemented Interfaces:
ExtensionPoint
Jenkins' extension point that allows plugins to create
CommitDecorator instances based on a supported SCM and RepositoryBrowser.- Author:
- Ullrich Hafner
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Optional<CommitDecorator>createCommitDecorator(SCM scm, edu.hm.hafner.util.FilteredLog logger) Returns a commit decorator for the specifiedSCMand the associatedRepositoryBrowser.static CommitDecoratorfindCommitDecorator(Run<?, ?> run) Returns a commit decorator for the specifiedbuild.static CommitDecoratorfindCommitDecorator(SCM scm, edu.hm.hafner.util.FilteredLog logger) Returns a commit decorator for the specifiedscm.
-
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 specifiedSCMand the associatedRepositoryBrowser.- Parameters:
scm- theSCMto create the commit decorator forlogger- a logger to report error messages- Returns:
- a commit decorator for the specified
SCMand the associatedRepositoryBrowser
-
findCommitDecorator
Returns a commit decorator for the specifiedscm.- Parameters:
scm- the SCM to get the decorator forlogger- a logger to report error messages- Returns:
- a commit decorator for the specified SCM or a
CommitDecorator.NullDecoratorif the SCM is not supported or if the SCM does not provide aRepositoryBrowserimplementation
-
findCommitDecorator
Returns a commit decorator for the specifiedbuild.- Parameters:
run- the current build- Returns:
- a commit decorator for the SCM of the specified build or a
CommitDecorator.NullDecoratorif the SCM is not supported or if the SCM does not provide aRepositoryBrowserimplementation
-