Class InheritanceRebuildAction
- java.lang.Object
-
- hudson.plugins.project_inheritance.projects.rebuild.InheritanceRebuildAction
-
- All Implemented Interfaces:
Action
,ModelObject
public class InheritanceRebuildAction extends Object implements Action
This class implements the actions that are necessary to rebuild a parameterised, inheritable job.Do note that this method could also be made much more generic to suit all possible
AbstractBuild
types. This would make it a suitable, complete and improved replacement for the old 2010 "Rebuilder" plugin, as that one can only rebuild jobs with a limited set of parameter-types. TODO: Explore if such a generality is possible. It should be.- Author:
- mhschroe
-
-
Constructor Summary
Constructors Constructor Description InheritanceRebuildAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doConfigSubmit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
This method contains the necessary steps to re-build a Project based on the altered parameters present in theStaplerRequest
.InheritanceBuild
getBuild()
InheritanceBuild
getBuild(org.kohsuke.stapler.StaplerRequest req)
String
getDisplayName()
String
getIconFileName()
List<ParameterDefinition>
getParametersFor(org.kohsuke.stapler.StaplerRequest request)
List<ParameterDefinition>
getParametersFor(org.kohsuke.stapler.StaplerRequest request, Boolean showHidden)
InheritanceProject
getProject()
Returns theInheritanceProject
associated with the currentStaplerRequest
.InheritanceProject
getProject(org.kohsuke.stapler.StaplerRequest request)
This method returns theInheritanceProject
associated with the given request; if any are.String
getUrlName()
-
-
-
Method Detail
-
getProject
public InheritanceProject getProject()
Returns theInheritanceProject
associated with the currentStaplerRequest
.- Returns:
- null, if no
InheritanceProject
is associated with the given request.
-
getProject
public InheritanceProject getProject(org.kohsuke.stapler.StaplerRequest request)
This method returns theInheritanceProject
associated with the given request; if any are. Otherwise, returns null- Parameters:
request
- the request to check for anInheritanceProject
- Returns:
- null, if no such project is associated with the request
-
getBuild
public InheritanceBuild getBuild()
-
getBuild
public InheritanceBuild getBuild(org.kohsuke.stapler.StaplerRequest req)
-
getIconFileName
public String getIconFileName()
- Specified by:
getIconFileName
in interfaceAction
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfaceAction
- Specified by:
getDisplayName
in interfaceModelObject
-
getUrlName
public String getUrlName()
- Specified by:
getUrlName
in interfaceAction
-
getParametersFor
public List<ParameterDefinition> getParametersFor(org.kohsuke.stapler.StaplerRequest request)
-
getParametersFor
public List<ParameterDefinition> getParametersFor(org.kohsuke.stapler.StaplerRequest request, Boolean showHidden)
-
doConfigSubmit
public void doConfigSubmit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws javax.servlet.ServletException, IOException, InterruptedException, Descriptor.FormException
This method contains the necessary steps to re-build a Project based on the altered parameters present in theStaplerRequest
. It is called by the form submission dialog defined in the "index.jelly" file for this class.- Parameters:
req
- the user requestrsp
- the response to the user- Throws:
javax.servlet.ServletException
- in case of server errorIOException
- in case of saving errorInterruptedException
- in case of interrupted waitDescriptor.FormException
- in case of bad form data input
-
-