com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger
Class GerritUserCause

java.lang.Object
  extended by hudson.model.Cause
      extended by com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritCause
          extended by 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
hudson.model.Cause.LegacyCodeCause, hudson.model.Cause.RemoteCause, hudson.model.Cause.UpstreamCause, hudson.model.Cause.UserCause
 
Constructor Summary
GerritUserCause()
          Default constructor.
GerritUserCause(PatchsetCreated event, boolean silentMode)
          Standard Constructor.
GerritUserCause(PatchsetCreated event, boolean silentMode, java.lang.String authenticationName)
          Standard Constructor.
GerritUserCause(PatchsetCreated event, boolean silentMode, TriggerContext context)
          Standard Constructor.
GerritUserCause(PatchsetCreated event, boolean silentMode, TriggerContext context, java.lang.String authenticationName)
          Standard Constructor.
 
Method Summary
protected  java.lang.String getShortGerritDescription()
          Gives the short description of the GerritCause.
protected  java.lang.String getShortGerritDescriptionSilentMode()
          Gives the short description of the GerritCause in silent mode.
 java.lang.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.model.Cause
onAddedTo, print
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GerritUserCause

public GerritUserCause()
Default constructor. Do not use this unless you are a serializer.


GerritUserCause

public GerritUserCause(PatchsetCreated event,
                       boolean silentMode,
                       TriggerContext context)
Standard Constructor.

Parameters:
event - the event.
silentMode - if silentMode.
context - the context.

GerritUserCause

public GerritUserCause(PatchsetCreated event,
                       boolean silentMode,
                       TriggerContext context,
                       java.lang.String authenticationName)
Standard Constructor.

Parameters:
event - the event.
silentMode - if silentMode.
context - the context.
authenticationName - the username.

GerritUserCause

public GerritUserCause(PatchsetCreated event,
                       boolean silentMode,
                       java.lang.String authenticationName)
Standard Constructor.

Parameters:
event - the event.
silentMode - if silentMode.
authenticationName - the username.

GerritUserCause

public GerritUserCause(PatchsetCreated 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 java.lang.String getUserName()
The username.

Returns:
the username.

getShortGerritDescription

protected java.lang.String getShortGerritDescription()
Description copied from class: GerritCause
Gives the short description of the GerritCause. Intended to be overridden by subclasses.

Overrides:
getShortGerritDescription in class GerritCause
Returns:
the short description.
See Also:
GerritCause.getShortGerritDescriptionSilentMode(), GerritCause.getShortDescription()

getShortGerritDescriptionSilentMode

protected java.lang.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 class GerritCause
Returns:
the short description for silent mode.
See Also:
GerritCause.getShortGerritDescription(), GerritCause.getShortDescription()


Copyright © 2004-2012. All Rights Reserved.