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

java.lang.Object
  extended by hudson.model.Cause
      extended by hudson.triggers.SCMTrigger.SCMTriggerCause
          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, hudson.model.Cause.UserIdCause
 
Constructor Summary
GerritUserCause()
          Default constructor.
GerritUserCause(GerritTriggeredEvent event, boolean silentMode)
          Standard Constructor.
GerritUserCause(GerritTriggeredEvent event, boolean silentMode, String authenticationName)
          Standard Constructor.
GerritUserCause(GerritTriggeredEvent event, boolean silentMode, TriggerContext context)
          Standard Constructor.
GerritUserCause(GerritTriggeredEvent event, boolean silentMode, TriggerContext context, String authenticationName)
          Standard Constructor.
 
Method Summary
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
onAddedTo
 
Methods inherited from class hudson.model.Cause
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(GerritTriggeredEvent event,
                       boolean silentMode,
                       TriggerContext context)
Standard Constructor.

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

GerritUserCause

public GerritUserCause(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(GerritTriggeredEvent event,
                       boolean silentMode,
                       String authenticationName)
Standard Constructor.

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

GerritUserCause

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


Copyright © 2004-2013. All Rights Reserved.