Package jenkins.model
Interface DirectlyModifiableTopLevelItemGroup
- All Superinterfaces:
- FullyNamed,- FullyNamedModelObject,- ItemGroup<TopLevelItem>,- ModelObject,- ModifiableItemGroup<TopLevelItem>,- ModifiableTopLevelItemGroup,- PersistenceRoot,- Saveable
Item group which supports items being directly moved in or out of it.
- Since:
- 1.548
- 
Field Summary
- 
Method SummaryModifier and TypeMethodDescription<I extends TopLevelItem>
 IAdds an item to this group.booleancanAdd(TopLevelItem item) Returns true if a particular item may be added to this group.voidremove(TopLevelItem item) Removes an item from this group.Methods inherited from interface jenkins.model.FullyNamedgetFullNameMethods inherited from interface jenkins.model.FullyNamedModelObjectgetFullDisplayNameMethods inherited from interface hudson.model.ItemGroupallItems, allItems, allItems, getAllItems, getAllItems, getAllItems, getItem, getItemName, getItems, getItems, getItemsStream, getItemsStream, getRootDirFor, getUrl, getUrlChildPrefix, onDeleted, onRenamedMethods inherited from interface hudson.model.ModelObjectgetDisplayNameMethods inherited from interface hudson.model.ModifiableItemGroupdoCreateItem, doCreateItemMethods inherited from interface jenkins.model.ModifiableTopLevelItemGroupcopy, createProject, createProjectFromXMLMethods inherited from interface hudson.model.PersistenceRootgetRootDir
- 
Method Details- 
canAddReturns true if a particular item may be added to this group.- Parameters:
- item- an item currently elsewhere
- Returns:
- true if add(I, java.lang.String)may be called with this item
 
- 
addAdds an item to this group. UnlikeJenkins.putItem(hudson.model.TopLevelItem)this does not try to callItem.delete()on an existing item, nor does it fireItemListener.onCreated(hudson.model.Item), nor check permissions. Normally you would callItem.onLoad(hudson.model.ItemGroup<? extends hudson.model.Item>, java.lang.String)after calling this method (the implementation is not expected to do so).- Type Parameters:
- I- the kind of item
- Parameters:
- item- an item to add which is currently elsewhere
- name- the desired item name in this group (might simply be the original- Item.getName())
- Returns:
- normally the same item, but might be a new copy if necessary
- Throws:
- IOException- if adding fails
- IllegalArgumentException- if- canAdd(hudson.model.TopLevelItem)is false, or an item with this name already exists, or this item is as yet unnamed
 
- 
removeRemoves an item from this group. UnlikeItemGroup.onDeleted(T)this is not expected to fire any events.- Parameters:
- item- an item which was part of this group
- Throws:
- IOException- if removing fails
- IllegalArgumentException- if this was not part of the group to begin with
 
 
-