public class ActionUtil extends Object
Constructor and Description |
---|
ActionUtil(hudson.model.FreeStyleProject job)
Constructor to initialise FreeStyleProject.
|
Modifier and Type | Method and Description |
---|---|
static String |
defineName(String name,
String jobName)
Creates new name of pipeline job if none is specified.
|
void |
doConvert(org.kohsuke.stapler.StaplerRequest request,
org.kohsuke.stapler.StaplerResponse response)
Calls Transformer class with request parameters and creates new pipeline job from XML.
|
static boolean |
validateForm(String newName,
String originalJob)
Validates if desired new name of converted job does not exist at current level.
|
public ActionUtil(hudson.model.FreeStyleProject job)
job
- Initial job from which conversion is to start.public static boolean validateForm(String newName, String originalJob)
newName
- Desired new name of the pipeline job to be created (optional).originalJob
- Full name of original job that will be converted.public void doConvert(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response) throws javax.servlet.ServletException, IOException
request
- StaplerRequest object from the form.response
- StaplerResponse object that re-directs to newly created job.javax.servlet.ServletException
- If a servlet encounters difficulty; servlet exception is thrown.IOException
- If an input or output exception occurred.public static String defineName(String name, String jobName)
name
- Desired new name of the pipeline job to be created (optional).jobName
- Current job name against which to compare.Copyright © 2016–2017. All rights reserved.