com.unitedinternet.jenkins.plugins.jobtemplates
Class JobTemplates
java.lang.Object
com.unitedinternet.jenkins.plugins.jobtemplates.JobTemplates
- All Implemented Interfaces:
- hudson.ExtensionPoint, hudson.model.Action, hudson.model.ModelObject, hudson.model.RootAction
@Extension
public class JobTemplates
- extends Object
- implements hudson.model.RootAction
- Author:
- Kathi Stutz
Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JobTemplates
public JobTemplates()
- Set the
Hudson
instance.
getJenkins
public final hudson.model.Hudson getJenkins()
- Returns:
- Jenkins instance
getIconFileName
public final String getIconFileName()
- Return the icon path if user has 'Create' permission.
- Specified by:
getIconFileName
in interface hudson.model.Action
- Returns:
- Path to the icon
getDisplayName
public final String getDisplayName()
- Specified by:
getDisplayName
in interface hudson.model.Action
- Specified by:
getDisplayName
in interface hudson.model.ModelObject
- Returns:
- Display name as String.
getUrlName
public final String getUrlName()
- Specified by:
getUrlName
in interface hudson.model.Action
- Returns:
- URL name as String.
getTemplates
public ArrayList<hudson.model.Item> getTemplates()
- Returns the available job templates.
(i.e. all jobs with names starting with 'Template_')
- Returns:
- ArrayList of template jobs
doCreateJob
public final void doCreateJob(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException
- Creates a new job by copying the config of the template job.
- Parameters:
req
- The StaplerRequestrsp
- TheStaplerResponse
- Throws:
IOException
- Thrown when job creation goes wrong
Copyright © 2004-2013. All Rights Reserved.