@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) @Extension public static class Job.SubItemBuildsLocationImpl extends ItemListener
ExtensionPoint.LegacyInstancesAreScopedToHudson
Constructor and Description |
---|
SubItemBuildsLocationImpl() |
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, checkBeforeCopy, fireLocationChange, fireOnCopied, fireOnCreated, fireOnDeleted, fireOnUpdated, onBeforeShutdown, onCheckCopy, onCopied, onCreated, onDeleted, onLoaded, onRenamed, onUpdated, register
public void onLocationChanged(Item item, String oldFullName, String newFullName)
ItemListener
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 newFullName
.
onLocationChanged
in class ItemListener
item
- 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 © 2004–2021. All rights reserved.