public interface DirectlyModifiableTopLevelItemGroup extends ModifiableTopLevelItemGroup
| Modifier and Type | Method and Description |
|---|---|
<I extends TopLevelItem> |
add(I item,
String name)
Adds an item to this group.
|
boolean |
canAdd(TopLevelItem item)
Returns true if a particular item may be added to this group.
|
void |
remove(TopLevelItem item)
Removes an item from this group.
|
copy, createProject, createProjectFromXMLdoCreateItemgetFullDisplayName, getFullName, getItem, getItems, getRootDirFor, getUrl, getUrlChildPrefix, onDeleted, onRenamedgetRootDirgetDisplayNameboolean canAdd(TopLevelItem item)
item - an item currently elsewhereadd(I, java.lang.String) may be called with this item<I extends TopLevelItem> I add(I item, String name) throws IOException, IllegalArgumentException
Jenkins.putItem(hudson.model.TopLevelItem) this does not try to call Item#delete on an existing item, nor does it fire ItemListener#onCreated, nor check permissions.
Normally you would call Item#onLoad after calling this method (the implementation is not expected to do so).I - the kind of itemitem - an item to add which is currently elsewherename - the desired item name in this group (might simply be the original Item#getName)item, but might be a new cppy if necessaryIOException - if adding failsIllegalArgumentException - if canAdd(hudson.model.TopLevelItem) is false, or an item with this name already exists, or this item is as yet unnamedvoid remove(TopLevelItem item) throws IOException, IllegalArgumentException
ItemGroup.onDeleted(T) this is not expected to fire any events.item - an item which was part of this groupIOException - if removing failsIllegalArgumentException - if this was not part of the group to begin withCopyright © 2019. All rights reserved.