Class BuildDiscardPreventer
- java.lang.Object
-
- hudson.plugins.project_inheritance.util.BuildDiscardPreventer
-
- All Implemented Interfaces:
ExtensionPoint
public abstract class BuildDiscardPreventer extends Object implements ExtensionPoint
This class servers as an extension point which, when extended, allow a plugin to prevent the deletion of a build.Do note: Explicit calls to
Run.delete()will still remove the build, but deletions triggered by aBuildDiscarderor via the GUI will be prevented.- Author:
- mhschroe
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description BuildDiscardPreventer()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static ExtensionList<BuildDiscardPreventer>all()Simple wrapper aroundJenkins.getExtensionList(Class).abstract StringgetWhyKeepLog(InheritanceBuild build)Same behaviour and role asRun.getWhyKeepLog()-- only as an extension point.
-
-
-
Method Detail
-
getWhyKeepLog
public abstract String getWhyKeepLog(InheritanceBuild build)
Same behaviour and role asRun.getWhyKeepLog()-- only as an extension point.- Parameters:
build- the build for which to decide keeping the log or not.- Returns:
- null if the run can be deleted, or a message if it must be kept.
-
all
public static ExtensionList<BuildDiscardPreventer> all()
Simple wrapper aroundJenkins.getExtensionList(Class).- Returns:
- the list of registered extensions.
-
-