hudson.model
Class Cause

java.lang.Object
  extended by hudson.model.Cause
Direct Known Subclasses:
Cause.LegacyCodeCause, Cause.RemoteCause, Cause.UpstreamCause, Cause.UpstreamCause.DeeplyNestedUpstreamCause, Cause.UserCause, Cause.UserIdCause, SCMTrigger.SCMTriggerCause, TimerTrigger.TimerTriggerCause

@ExportedBean
public abstract class Cause
extends Object

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 subypes. 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:
Run.getCauses(), Queue.Item.getCauses()

Nested Class Summary
static class Cause.LegacyCodeCause
          Deprecated. since 2009-02-08
static class Cause.RemoteCause
           
static class Cause.UpstreamCause
          A build is triggered by the completion of another build (AKA upstream build.)
static class Cause.UserCause
          Deprecated. 1.428 use Cause.UserIdCause
static class Cause.UserIdCause
          A build is started by an user action.
 
Constructor Summary
Cause()
           
 
Method Summary
abstract  String getShortDescription()
          One-line human-readable text of the cause.
 void onAddedTo(AbstractBuild build)
          Called when the cause is registered to AbstractBuild.
 void print(TaskListener listener)
          Report a line to the listener about this cause.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cause

public Cause()
Method Detail

getShortDescription

@Exported(visibility=3)
public abstract String getShortDescription()
One-line human-readable text of the cause.

By default, this method is used to render HTML as well.


onAddedTo

public void onAddedTo(AbstractBuild build)
Called when the cause is registered to AbstractBuild.

Parameters:
build - never null
Since:
1.376

print

public void print(TaskListener listener)
Report a line to the listener about this cause.

Since:
1.362


Copyright © 2004-2013. All Rights Reserved.