@Extension public static final class Fingerprint.ProjectRenameListener extends ItemListener
ExtensionPoint.LegacyInstancesAreScopedToHudson| Constructor and Description |
|---|
ProjectRenameListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
onLocationChanged(Item item,
String oldName,
String newName)
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 oldName, String newName)
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 differentoldName - the former Item.getFullName()newName - the current Item.getFullName()Items.computeRelativeNamesAfterRenaming(java.lang.String, java.lang.String, java.lang.String, hudson.model.ItemGroup)Copyright © 2019. All rights reserved.