Class RebuildAction

All Implemented Interfaces:
Action, ModelObject, RunAction2

public class RebuildAction extends AbstractRebuildAction implements RunAction2
Rebuild RootAction implementation class. This class will basically reschedule the build with existing parameters.
Author:
Shemeer S;
  • Field Details

  • Constructor Details

    • RebuildAction

      public RebuildAction(Run<?,?> run)
      RebuildAction constructor.
      Parameters:
      run - The run.
  • Method Details

    • isRememberPasswordEnabled

      public boolean isRememberPasswordEnabled()
      True if the password fields should be pre-filled.
      Returns:
      True if the password fields should be pre-filled.
    • 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
    • getRun

      public Run<?,?> getRun()
      Specified by:
      getRun in class AbstractRebuildAction
    • getTaskUrl

      public String getTaskUrl()
      Decouple getUrlName() from the actual URL, otherwise we cannot customize the target.
      Specified by:
      getTaskUrl in class AbstractRebuildAction
      Returns:
    • getProject

      public Job<?,?> getProject()
      Description copied from class: AbstractRebuildAction
      Method will return current project.
      Specified by:
      getProject in class AbstractRebuildAction
      Returns:
      currentProject.
    • isRequiresPOST

      public boolean isRequiresPOST()
      Specified by:
      isRequiresPOST in class AbstractRebuildAction
    • doIndex

      public void doIndex(org.kohsuke.stapler.StaplerRequest2 request, org.kohsuke.stapler.StaplerResponse2 response) throws IOException
      Handles the rebuild request and redirects to parameterized and non parameterized build when needed.
      Parameters:
      request - StaplerRequest2 the request.
      response - StaplerResponse2 the response handler.
      Throws:
      IOException - in case of Stapler issues
    • parameterizedRebuild

      public void parameterizedRebuild(Run currentBuild, org.kohsuke.stapler.StaplerResponse2 response) throws IOException
      Handles the rebuild request with parameter.
      Parameters:
      currentBuild - the build.
      response - StaplerResponse2 the response handler.
      Throws:
      IOException - in case of Stapler issues
    • nonParameterizedRebuild

      public void nonParameterizedRebuild(Run currentBuild, org.kohsuke.stapler.StaplerResponse2 response) throws IOException
      Call this method while rebuilding non parameterized build. .
      Parameters:
      currentBuild - current build.
      response - current response object.
      Throws:
      IOException - if something unfortunate happens.
    • doConfigSubmit

      public void doConfigSubmit(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws jakarta.servlet.ServletException, IOException
      Saves the form to the configuration and disk.
      Parameters:
      req - StaplerRequest2
      rsp - StaplerResponse2
      Throws:
      jakarta.servlet.ServletException - if something unfortunate happens.
      IOException - if something unfortunate happens.
    • getParameterValue

      public ParameterValue getParameterValue(ParametersDefinitionProperty paramDefProp, String parameterName, ParametersAction paramAction, org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject jo)
      Method for getting the ParameterValue instance from ParameterDefinition or ParamterAction.
      Parameters:
      paramDefProp - ParametersDefinitionProperty
      parameterName - Name of the Parameter.
      paramAction - ParametersAction
      req - StaplerRequest2
      jo - JSONObject
      Returns:
      ParameterValue instance of subclass of ParameterValue
    • getRebuildParameterPage

      public RebuildParameterPage getRebuildParameterPage(ParameterValue value)
      Parameters:
      value - the parameter value to show to rebuild.
      Returns:
      page for the parameter value, or null if no suitable option found.
    • onAttached

      public void onAttached(Run<?,?> r)
      Specified by:
      onAttached in interface RunAction2
    • onLoad

      public void onLoad(Run<?,?> r)
      Specified by:
      onLoad in interface RunAction2