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
AbstractBuildtypes. 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 voiddoConfigSubmit(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.InheritanceBuildgetBuild()InheritanceBuildgetBuild(org.kohsuke.stapler.StaplerRequest req)StringgetDisplayName()StringgetIconFileName()List<ParameterDefinition>getParametersFor(org.kohsuke.stapler.StaplerRequest request)List<ParameterDefinition>getParametersFor(org.kohsuke.stapler.StaplerRequest request, Boolean showHidden)InheritanceProjectgetProject()Returns theInheritanceProjectassociated with the currentStaplerRequest.InheritanceProjectgetProject(org.kohsuke.stapler.StaplerRequest request)This method returns theInheritanceProjectassociated with the given request; if any are.StringgetUrlName()
-
-
-
Method Detail
-
getProject
public InheritanceProject getProject()
Returns theInheritanceProjectassociated with the currentStaplerRequest.- Returns:
- null, if no
InheritanceProjectis associated with the given request.
-
getProject
public InheritanceProject getProject(org.kohsuke.stapler.StaplerRequest request)
This method returns theInheritanceProjectassociated 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:
getIconFileNamein interfaceAction
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getUrlName
public String getUrlName()
- Specified by:
getUrlNamein 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.FormExceptionThis 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
-
-