Package hudson.model
Class Job.SubItemBuildsLocationImpl
java.lang.Object
hudson.model.listeners.ItemListener
hudson.model.Job.SubItemBuildsLocationImpl
- All Implemented Interfaces:
ExtensionPoint
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
@Extension
public static class Job.SubItemBuildsLocationImpl
extends ItemListener
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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, checkBeforeDelete, fireLocationChange, fireOnCopied, fireOnCreated, fireOnDeleted, fireOnUpdated, onBeforeShutdown, onCheckCopy, onCheckDelete, onCopied, onCreated, onDeleted, onLoaded, onRenamed, onUpdated, register
-
Constructor Details
-
SubItemBuildsLocationImpl
public SubItemBuildsLocationImpl()
-
-
Method Details
-
onLocationChanged
Description copied from class:ItemListener
Called 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 matchesoldFullName
, replace it withnewFullName
.- Overrides:
onLocationChanged
in classItemListener
- Parameters:
item
- an item whose absolute position is now differentoldFullName
- the formerItem.getFullName()
newFullName
- the currentItem.getFullName()
- See Also:
-