Constructors Constructor Description
All Methods Instance Methods Concrete Methods Modifier and Type Method Description
onDeleted(Item item)Called right before a job is going to be deleted.
onLocationChanged(Item item, String oldFullName, String newFullName)Called after an item’s fully-qualified location has changed.
Methods inherited from class hudson.model.listeners.ItemListener
all, checkBeforeCopy, fireLocationChange, fireOnCopied, fireOnCreated, fireOnDeleted, fireOnUpdated, onBeforeShutdown, onCheckCopy, onCopied, onCreated, onLoaded, onRenamed, onUpdated, register
onLocationChangedDescription copied from class:
ItemListenerCalled after an item’s fully-qualified location has changed. This might be because:
- This item was renamed.
- Some ancestor folder was renamed.
- This item was moved between folders (or from a folder to Jenkins root or vice-versa).
- Some ancestor folder was moved.
ItemListener.onRenamed(hudson.model.Item, java.lang.String, java.lang.String)will already have been called on this item or an ancestor. And where applicable,
ItemListener.onLocationChanged(hudson.model.Item, java.lang.String, java.lang.String)will already have been called on its ancestors.
This method should be used (instead of
ItemListener.onRenamed(hudson.model.Item, java.lang.String, java.lang.String)) by any code which seeks to keep (absolute) references to items up to date: if a persisted reference matches
oldFullName, replace it with
item- an item whose absolute position is now different
oldFullName- the former
newFullName- the current
- See Also:
Items.computeRelativeNamesAfterRenaming(java.lang.String, java.lang.String, java.lang.String, hudson.model.ItemGroup)