Class GenericEventItemListener
- java.lang.Object
-
- hudson.model.listeners.ItemListener
-
- io.jenkins.plugins.generic.event.listener.GenericEventItemListener
-
- All Implemented Interfaces:
ExtensionPoint
@Extension public class GenericEventItemListener extends ItemListener
This listener collects events about all items.- Author:
- johnniang
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description GenericEventItemListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCanonicalEventUrl(String fullName)
Normalizes url for canonical representationString
getCanonicalEventUrlNewLocation(Item item, String newFullName)
void
onCreated(Item item)
void
onDeleted(Item item)
void
onLocationChanged(Item item, String oldFullName, String newFullName)
void
onUpdated(Item item)
void
setEventSender(EventSender eventSender)
-
Methods inherited from class hudson.model.listeners.ItemListener
all, checkBeforeCopy, fireLocationChange, fireOnCopied, fireOnCreated, fireOnDeleted, fireOnUpdated, onBeforeShutdown, onCheckCopy, onCopied, onLoaded, onRenamed, register
-
-
-
-
Method Detail
-
setEventSender
public void setEventSender(EventSender eventSender)
-
getCanonicalEventUrl
public String getCanonicalEventUrl(String fullName)
Normalizes url for canonical representationFor example, if the url was "view/myView/job/folder/job/taskName/", then result will be "job/folder/job/taskName/"
- Parameters:
fullName
- Project name
-
getCanonicalEventUrlNewLocation
public String getCanonicalEventUrlNewLocation(Item item, String newFullName)
-
onCreated
public void onCreated(Item item)
- Overrides:
onCreated
in classItemListener
-
onDeleted
public void onDeleted(Item item)
- Overrides:
onDeleted
in classItemListener
-
onUpdated
public void onUpdated(Item item)
- Overrides:
onUpdated
in classItemListener
-
onLocationChanged
public void onLocationChanged(Item item, String oldFullName, String newFullName)
- Overrides:
onLocationChanged
in classItemListener
-
-