public class ActionUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private hudson.model.FreeStyleProject |
job |
Constructor and Description |
---|
ActionUtil(hudson.model.FreeStyleProject job)
Constructor to initialise FreeStyleProject.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
defineName(java.lang.String name,
java.lang.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(java.lang.String newName,
java.lang.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(java.lang.String newName, java.lang.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, java.io.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.java.io.IOException
- If an input or output exception occurred.public static java.lang.String defineName(java.lang.String name, java.lang.String jobName)
name
- Desired new name of the pipeline job to be created (optional).jobName
- Current job name against which to compare.