Package hudson.model.listeners
Class SaveableListener
java.lang.Object
hudson.model.listeners.SaveableListener
- All Implemented Interfaces:
ExtensionPoint
- Direct Known Subclasses:
Nodes.ScheduleMaintenanceAfterSavingNode
Receives notifications about save actions on
Saveable
objects in Hudson.
This is an abstract class so that methods added in the future won't break existing listeners.
- Since:
- 1.334
- Author:
- Andrew Bayer
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExtensionList<SaveableListener>
all()
Returns all the registeredSaveableListener
descriptors.static void
fireOnChange
(Saveable o, XmlFile file) Fires theonChange(hudson.model.Saveable, hudson.XmlFile)
event.static void
fireOnDeleted
(Saveable o, XmlFile file) Fires theonDeleted(hudson.model.Saveable, hudson.XmlFile)
event.void
Called when a change is made to aSaveable
object.void
Called when aSaveable
object gets deleted.void
register()
Deprecated.void
Reverse operation ofregister()
.
-
Constructor Details
-
SaveableListener
public SaveableListener()
-
-
Method Details
-
onChange
Called when a change is made to aSaveable
object.- Parameters:
o
- The saveable object.file
- TheXmlFile
for this saveable object.
-
onDeleted
Called when aSaveable
object gets deleted.- Parameters:
o
- The saveable object.file
- TheXmlFile
for this saveable object.- Since:
- 2.480
-
register
Deprecated.as of 1.281 PutExtension
on your class to get it auto-registered.Registers this object as an active listener so that it can start getting callbacks invoked. -
unregister
public void unregister()Reverse operation ofregister()
. -
fireOnChange
Fires theonChange(hudson.model.Saveable, hudson.XmlFile)
event. -
fireOnDeleted
Fires theonDeleted(hudson.model.Saveable, hudson.XmlFile)
event.- Since:
- 2.480
-
all
Returns all the registeredSaveableListener
descriptors.
-
Extension
on your class to get it auto-registered.