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 TypeMethodDescriptionvoid
doConfigSubmit
(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Saves the form to the configuration and disk.void
doIndex
(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.boolean
True if the password fields should be pre-filled.boolean
void
nonParameterizedRebuild
(Run currentBuild, org.kohsuke.stapler.StaplerResponse2 response) Call this method while rebuilding non parameterized build.void
onAttached
(Run<?, ?> r) void
void
parameterizedRebuild
(Run currentBuild, org.kohsuke.stapler.StaplerResponse2 response) Handles the rebuild request with parameter.Methods inherited from class com.sonyericsson.rebuild.AbstractRebuildAction
getIconFileName, isMatrixRun, isRebuildAvailable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
getDisplayName
in interfaceAction
- Specified by:
getDisplayName
in interfaceModelObject
-
getUrlName
- Specified by:
getUrlName
in interfaceAction
-
getRun
- Specified by:
getRun
in classAbstractRebuildAction
-
getTaskUrl
DecouplegetUrlName()
from the actual URL, otherwise we cannot customize the target.- Specified by:
getTaskUrl
in classAbstractRebuildAction
- Returns:
-
getProject
Description copied from class:AbstractRebuildAction
Method will return current project.- Specified by:
getProject
in classAbstractRebuildAction
- Returns:
- currentProject.
-
isRequiresPOST
public boolean isRequiresPOST()- Specified by:
isRequiresPOST
in 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:
onAttached
in interfaceRunAction2
-
onLoad
- Specified by:
onLoad
in interfaceRunAction2
-