Package com.sonyericsson.rebuild
Class RebuildAction
java.lang.Object
com.sonyericsson.rebuild.AbstractRebuildAction
com.sonyericsson.rebuild.RebuildAction
- All Implemented Interfaces:
Action,ModelObject,RunAction2
Rebuild RootAction implementation class. This class will basically reschedule
the build with existing parameters.
- Author:
- Shemeer S;
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoConfigSubmit(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Saves the form to the configuration and disk.voiddoIndex(org.kohsuke.stapler.StaplerRequest2 request, org.kohsuke.stapler.StaplerResponse2 response) Handles the rebuild request and redirects to parameterized and non parameterized build when needed.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.Job<?,?> Method will return current project.Run<?,?> getRun()DecouplegetUrlName()from the actual URL, otherwise we cannot customize the target.booleanTrue if the password fields should be pre-filled.booleanvoidnonParameterizedRebuild(Run currentBuild, org.kohsuke.stapler.StaplerResponse2 response) Call this method while rebuilding non parameterized build.voidonAttached(Run<?, ?> r) voidvoidparameterizedRebuild(Run currentBuild, org.kohsuke.stapler.StaplerResponse2 response) Handles the rebuild request with parameter.Methods inherited from class com.sonyericsson.rebuild.AbstractRebuildAction
getIconFileName, isMatrixRun, isRebuildAvailableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.model.Action
getIconFileName
-
Field Details
-
DESCRIPTOR
Rebuild Descriptor.
-
-
Constructor Details
-
RebuildAction
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
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getUrlName
- Specified by:
getUrlNamein interfaceAction
-
getRun
- Specified by:
getRunin classAbstractRebuildAction
-
getTaskUrl
DecouplegetUrlName()from the actual URL, otherwise we cannot customize the target.- Specified by:
getTaskUrlin classAbstractRebuildAction- Returns:
-
getProject
Description copied from class:AbstractRebuildActionMethod will return current project.- Specified by:
getProjectin classAbstractRebuildAction- Returns:
- currentProject.
-
isRequiresPOST
public boolean isRequiresPOST()- Specified by:
isRequiresPOSTin classAbstractRebuildAction
-
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- StaplerRequest2rsp- 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- ParametersDefinitionPropertyparameterName- Name of the Parameter.paramAction- ParametersActionreq- StaplerRequest2jo- JSONObject- Returns:
- ParameterValue instance of subclass of ParameterValue
-
getRebuildParameterPage
- Parameters:
value- the parameter value to show to rebuild.- Returns:
- page for the parameter value, or null if no suitable option found.
-
onAttached
- Specified by:
onAttachedin interfaceRunAction2
-
onLoad
- Specified by:
onLoadin interfaceRunAction2
-