Package hudson.model
Class Cause
java.lang.Object
hudson.model.Cause
- Direct Known Subclasses:
Cause.LegacyCodeCause
,Cause.RemoteCause
,Cause.UpstreamCause
,Cause.UpstreamCause.DeeplyNestedUpstreamCause
,Cause.UserCause
,Cause.UserIdCause
,SCMTrigger.SCMTriggerCause
,TimerTrigger.TimerTriggerCause
Cause object base class. This class hierarchy is used to keep track of why
a given build was started. This object encapsulates the UI rendering of the cause,
as well as providing more useful information in respective subtypes.
The Cause object is connected to a build via the
CauseAction
object.
Views
- description.jelly
- Renders the cause to HTML. By default, it puts the short description.
- Author:
- Michael Donohue
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Deprecated.since 2009-02-08static class
static class
A build is triggered by another build (AKA upstream build.)static class
Deprecated.1.428 useCause.UserIdCause
static class
A build is started by an user action. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract String
One-line human-readable text of the cause.void
onAddedTo
(AbstractBuild build) Deprecated.void
Called when the cause is registered.void
onLoad
(AbstractBuild<?, ?> build) Deprecated.void
Called when a build is loaded from disk.void
print
(TaskListener listener) Report a line to the listener about this cause.
-
Constructor Details
-
Cause
public Cause()
-
-
Method Details
-
getShortDescription
One-line human-readable text of the cause. Historically, this method's return value was used to render HTML on the UI as well. Since Jenkins 2.315 and 2.303.2, the return value is interpreted as text. To have rich HTML output on the UI, provide a customdescription.jelly
view for your subclass. See the documentation. -
onAddedTo
Called when the cause is registered.- Since:
- 1.568
-
onAddedTo
Deprecated. -
onLoad
Called when a build is loaded from disk. Useful in case the cause needs to keep a build reference; this ought to betransient
.- Since:
- 1.568
-
onLoad
Deprecated. -
print
Report a line to the listener about this cause.- Since:
- 1.362
-