@Extension public static class BuildTrigger.DescriptorImpl.ItemListenerImpl extends ItemListener
ExtensionPoint.LegacyInstancesAreScopedToHudson| Constructor and Description |
|---|
ItemListenerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
onLocationChanged(Item item,
String oldFullName,
String newFullName)
Called after an item’s fully-qualified location has changed.
|
all, fireLocationChange, fireOnCopied, fireOnCreated, fireOnDeleted, fireOnUpdated, onBeforeShutdown, onCopied, onCreated, onDeleted, onLoaded, onRenamed, onUpdated, registerpublic void onLocationChanged(Item item, String oldFullName, String newFullName)
ItemListenerItemListener.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 newFullName.
onLocationChanged in class ItemListeneritem - an item whose absolute position is now differentoldFullName - the former Item.getFullName()newFullName - the current Item.getFullName()Items.computeRelativeNamesAfterRenaming(java.lang.String, java.lang.String, java.lang.String, hudson.model.ItemGroup)Copyright © 2019. All rights reserved.