Class JobConfigHistoryJobListener

  • All Implemented Interfaces:
    hudson.ExtensionPoint

    @Extension
    public class JobConfigHistoryJobListener
    extends hudson.model.listeners.ItemListener
    Saves the job configuration if the job is created or renamed.
    Author:
    Stefan Brausch
    • Constructor Detail

      • JobConfigHistoryJobListener

        public JobConfigHistoryJobListener()
    • Method Detail

      • onCreated

        public void onCreated​(hudson.model.Item item)
        Overrides:
        onCreated in class hudson.model.listeners.ItemListener
      • onLocationChanged

        public void onLocationChanged​(hudson.model.Item item,
                                      String oldFullName,
                                      String newFullName)
        Overrides:
        onLocationChanged in class hudson.model.listeners.ItemListener
      • onRenamed

        public void onRenamed​(hudson.model.Item item,
                              String oldName,
                              String newName)

        Also checks if we have history stored under the old name. If so, copies all history to the folder for new name, and deletes the old history folder.

        Overrides:
        onRenamed in class hudson.model.listeners.ItemListener
      • onDeleted

        public void onDeleted​(hudson.model.Item item)
        Overrides:
        onDeleted in class hudson.model.listeners.ItemListener