@Extension public class DisplayNameListener extends ItemListener
ExtensionPoint.LegacyInstancesAreScopedToHudson
Constructor and Description |
---|
DisplayNameListener() |
Modifier and Type | Method and Description |
---|---|
void |
onCopied(Item src,
Item item)
Called after a new job is created by copying from an existing job.
|
void |
onRenamed(Item item,
String oldName,
String newName)
Called after a job is renamed.
|
all, fireLocationChange, fireOnCopied, fireOnCreated, fireOnDeleted, fireOnUpdated, onBeforeShutdown, onCreated, onDeleted, onLoaded, onLocationChanged, onUpdated, register
public void onCopied(Item src, Item item)
ItemListener
ItemListener.onCreated(Item)
.
If you choose to handle this method, think about whether you want to call super.onCopied or not.onCopied
in class ItemListener
src
- The source item that the new one was copied from. Never null.item
- The newly created item. Never null.public void onRenamed(Item item, String oldName, String newName)
ItemListener
ItemListener.onLocationChanged(hudson.model.Item, java.lang.String, java.lang.String)
.onRenamed
in class ItemListener
item
- The job being renamed.oldName
- The old name of the job.newName
- The new name of the job. Same as Item.getName()
.Copyright © 2018. All rights reserved.