Class GerritUserCause
- 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
-
- Direct Known Subclasses:
GerritManualCause
public class GerritUserCause extends GerritCause
Represents a Cause for a re-triggered/user-triggered Gerrit job.- 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 GerritUserCause()
Default constructor.GerritUserCause(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event, boolean silentMode)
Standard Constructor.GerritUserCause(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event, boolean silentMode, TriggerContext context)
Standard Constructor.GerritUserCause(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event, boolean silentMode, TriggerContext context, String authenticationName)
Standard Constructor.GerritUserCause(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event, boolean silentMode, String authenticationName)
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.-
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
-
GerritUserCause
public GerritUserCause()
Default constructor. Do not use this unless you are a serializer.
-
GerritUserCause
public GerritUserCause(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event, boolean silentMode, TriggerContext context)
Standard Constructor.- Parameters:
event
- the event.silentMode
- if silentMode.context
- the context.
-
GerritUserCause
public GerritUserCause(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event, boolean silentMode, TriggerContext context, String authenticationName)
Standard Constructor.- Parameters:
event
- the event.silentMode
- if silentMode.context
- the context.authenticationName
- the username.
-
GerritUserCause
public GerritUserCause(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event, boolean silentMode, String authenticationName)
Standard Constructor.- Parameters:
event
- the event.silentMode
- if silentMode.authenticationName
- the username.
-
GerritUserCause
public GerritUserCause(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event, boolean silentMode)
Standard Constructor. Will take the userName from the current web-context.- Parameters:
event
- the event.silentMode
- if silentMode.
-
-
Method Detail
-
getUserName
@Exported(visibility=3) public String getUserName()
The username.- Returns:
- the username.
-
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 classGerritCause
- 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 classGerritCause
- Returns:
- the short description for silent mode.
- See Also:
GerritCause.getShortGerritDescription()
,GerritCause.getShortDescription()
-
-