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

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
              extended by com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritManualCause

public class GerritManualCause
extends GerritUserCause

A Cause of a ManualPatchsetCreated.

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
GerritManualCause()
          Default constructor.
GerritManualCause(ManualPatchsetCreated event, boolean silentMode)
          Standard constructor.
GerritManualCause(ManualPatchsetCreated event, boolean silentMode, TriggerContext context)
          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 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.model.Cause
onAddedTo, print
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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.GerritCause(com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.events.PatchsetCreated, boolean, com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.TriggerContext)

GerritManualCause

public GerritManualCause(ManualPatchsetCreated event,
                         boolean silentMode)
Standard constructor.

Parameters:
event - the event.
silentMode - if it is in silent mode.
See Also:
GerritCause.GerritCause(com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.events.PatchsetCreated, boolean)
Method Detail

getUserName

public java.lang.String getUserName()
The userName of the user who triggered the manual event.

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


Copyright © 2004-2012. All Rights Reserved.