Class GerritManualCause
- java.lang.Object
-
- hudson.model.Cause
-
- hudson.triggers.SCMTrigger.SCMTriggerCause
-
- com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritCause
-
- com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritUserCause
-
- com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritManualCause
-
public class GerritManualCause extends GerritUserCause
A Cause of aManualPatchsetCreated
.- Author:
- Robert Sandell <robert.sandell@sonyericsson.com>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.model.Cause
Cause.LegacyCodeCause, Cause.RemoteCause, Cause.UpstreamCause, Cause.UserCause, Cause.UserIdCause
-
-
Constructor Summary
Constructors Constructor Description GerritManualCause()
Default constructor.GerritManualCause(ManualPatchsetCreated event, boolean silentMode)
Standard constructor.GerritManualCause(ManualPatchsetCreated event, boolean silentMode, TriggerContext context)
Standard constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getShortGerritDescription()
Gives the short description of the GerritCause.protected String
getShortGerritDescriptionSilentMode()
Gives the short description of the GerritCause in silent mode.String
getUserName()
The userName of the user who triggered the manual event.boolean
isManuallyTriggered()
Is this cause of a manually triggered event.-
Methods inherited from class com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritCause
equals, getContext, getEvent, getShortDescription, getUrl, hashCode, isSilentMode, setContext, setEvent, setSilentMode, toString
-
Methods inherited from class hudson.triggers.SCMTrigger.SCMTriggerCause
getRun, onAddedTo, onLoad
-
-
-
-
Constructor Detail
-
GerritManualCause
public GerritManualCause()
Default constructor. Do not use this unless you are a serializer.
-
GerritManualCause
public GerritManualCause(ManualPatchsetCreated event, boolean silentMode, TriggerContext context)
Standard constructor.- Parameters:
event
- the event.silentMode
- if silent mode.context
- the trigger context.- See Also:
GerritCause(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent, boolean, TriggerContext)
-
GerritManualCause
public GerritManualCause(ManualPatchsetCreated event, boolean silentMode)
Standard constructor.- Parameters:
event
- the event.silentMode
- if it is in silent mode.- See Also:
GerritCause(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent, boolean)
-
-
Method Detail
-
getUserName
public String getUserName()
The userName of the user who triggered the manual event.- Overrides:
getUserName
in classGerritUserCause
- Returns:
- the userName
-
isManuallyTriggered
public boolean isManuallyTriggered()
Is this cause of a manually triggered event. Helper for the jelly scripts, it always returns true.- Returns:
- true.
-
getShortGerritDescription
protected String getShortGerritDescription()
Description copied from class:GerritCause
Gives the short description of the GerritCause. Intended to be overridden by subclasses.- Overrides:
getShortGerritDescription
in classGerritUserCause
- Returns:
- the short description.
- See Also:
GerritCause.getShortGerritDescriptionSilentMode()
,GerritCause.getShortDescription()
-
getShortGerritDescriptionSilentMode
protected String getShortGerritDescriptionSilentMode()
Description copied from class:GerritCause
Gives the short description of the GerritCause in silent mode. Intended to be overridden by subclasses.- Overrides:
getShortGerritDescriptionSilentMode
in classGerritUserCause
- Returns:
- the short description for silent mode.
- See Also:
GerritCause.getShortGerritDescription()
,GerritCause.getShortDescription()
-
-