java.lang.Object
com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.actions.RetriggerAction
All Implemented Interfaces:
Action, ModelObject

public class RetriggerAction extends Object implements Action
Action that retriggers one build with the same event parameters as the build this trigger is in.
Author:
Robert Sandell <robert.sandell@sonyericsson.com>
  • Constructor Details

    • RetriggerAction

      public RetriggerAction(TriggerContext context)
      Standard Constructor.
      Parameters:
      context - the original GerritCause's context.
    • RetriggerAction

      public RetriggerAction()
      Default constructor. Only use this if you are a serializer.
  • Method Details

    • getIconFileName

      public String getIconFileName()
      Specified by:
      getIconFileName in interface Action
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface Action
      Specified by:
      getDisplayName in interface ModelObject
    • getUrlName

      public String getUrlName()
      Specified by:
      getUrlName in interface Action
    • isVisible

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean isVisible()
      Displays the retrigger option if permission is granted and the build is not already running.
      Returns:
      true if so.
    • doIndex

      @POST public void doIndex(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) throws IOException
      Handles the request to re-trigger and redirects back to the page that called.
      Parameters:
      request - StaplerRequest the request.
      response - StaplerResponse the response handler.
      Throws:
      IOException - in case of Stapler issues