Package jenkins.model
Interface ModifiableTopLevelItemGroup
- All Superinterfaces:
ItemGroup<TopLevelItem>
,ModelObject
,ModifiableItemGroup<TopLevelItem>
,PersistenceRoot
,Saveable
- All Known Subinterfaces:
DirectlyModifiableTopLevelItemGroup
A
ModifiableItemGroup
to manage TopLevelItem
,
including copying, creating from descriptor and from XML.- Since:
- 1.480
- Author:
- Nicolas De Loof
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescription<T extends TopLevelItem>
TCopies a job.createProject
(TopLevelItemDescriptor type, String name, boolean notify) Creates a new job.createProjectFromXML
(String name, InputStream xml) Creates a new job from its configuration XML.Methods inherited from interface hudson.model.ItemGroup
allItems, allItems, allItems, getAllItems, getAllItems, getAllItems, getFullDisplayName, getFullName, getItem, getItemName, getItems, getItems, getItemsStream, getItemsStream, getRootDirFor, getUrl, getUrlChildPrefix, onDeleted, onRenamed
Methods inherited from interface hudson.model.ModelObject
getDisplayName
Methods inherited from interface hudson.model.ModifiableItemGroup
doCreateItem, doCreateItem
Methods inherited from interface hudson.model.PersistenceRoot
getRootDir
-
Method Details
-
copy
Copies a job.- Parameters:
src
- ATopLevelItem
to be copied.name
- Name of the newly created project.- Returns:
- Newly created
TopLevelItem
. - Throws:
IOException
-
createProjectFromXML
Creates a new job from its configuration XML. The type of the job created will be determined by what's in this XML.- Parameters:
name
- Name of the newly created project.xml
- Item configuration as xml- Returns:
- Newly created
TopLevelItem
. - Throws:
IOException
-
createProject
TopLevelItem createProject(TopLevelItemDescriptor type, String name, boolean notify) throws IOException Creates a new job.- Parameters:
type
- Descriptor for job typename
- Name for jobnotify
- Whether to fire onCreated method for all ItemListeners- Throws:
IllegalArgumentException
- if a project of the give name already exists.IOException
-