|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.model.listeners.ItemListener
public class ItemListener
Receives notifications about CRUD operations of Item
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
---|
ExtensionPoint.LegacyInstancesAreScopedToHudson |
Constructor Summary | |
---|---|
ItemListener()
|
Method Summary | |
---|---|
static ExtensionList<ItemListener> |
all()
All the registered ItemListener s. |
static void |
fireOnCopied(Item src,
Item result)
|
static void |
fireOnCreated(Item item)
|
static void |
fireOnUpdated(Item item)
|
void |
onBeforeShutdown()
|
void |
onCopied(Item src,
Item item)
Called after a new job is created by copying from an existing job. |
void |
onCreated(Item item)
Called after a new job is created and added to Jenkins ,
before the initial configuration page is provided. |
void |
onDeleted(Item item)
Called right before a job is going to be deleted. |
void |
onLoaded()
Called after all the jobs are loaded from disk into Jenkins
object. |
void |
onRenamed(Item item,
String oldName,
String newName)
Called after a job is renamed. |
void |
onUpdated(Item item)
Called after a job has its configuration updated. |
void |
register()
Deprecated. as of 1.286 put Extension on your class to have it auto-registered. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ItemListener()
Method Detail |
---|
public void onCreated(Item item)
Jenkins
,
before the initial configuration page is provided.
This is useful for changing the default initial configuration of newly created jobs. For example, you can enable/add builders, etc.
public void onCopied(Item src, Item item)
onCreated(Item)
.
If you choose to handle this method, think about whether you want to call super.onCopied or not.
src
- The source item that the new one was copied from. Never null.item
- The newly created item. Never null.onCreated(Item)
.public void onLoaded()
Jenkins
object.
public void onDeleted(Item item)
public void onRenamed(Item item, String oldName, String newName)
item
- The job being renamed.oldName
- The old name of the job.newName
- The new name of the job. Same as Item.getName()
.public void onUpdated(Item item)
public void onBeforeShutdown()
public void register()
Extension
on your class to have it auto-registered.
public static ExtensionList<ItemListener> all()
ItemListener
s.
public static void fireOnCopied(Item src, Item result)
public static void fireOnCreated(Item item)
public static void fireOnUpdated(Item item)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |