hudson.plugins.jobConfigHistory
Class JobConfigHistoryJobListener

java.lang.Object
  extended by hudson.model.listeners.ItemListener
      extended by hudson.plugins.jobConfigHistory.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

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Constructor Summary
JobConfigHistoryJobListener()
           
 
Method Summary
 void onCreated(hudson.model.Item item)
          
 void onDeleted(hudson.model.Item item)
          
 void onRenamed(hudson.model.Item item, String oldName, String newName)
           Also checks if we have history stored under the old name.
 
Methods inherited from class hudson.model.listeners.ItemListener
all, fireLocationChange, fireOnCopied, fireOnCreated, fireOnDeleted, fireOnUpdated, onBeforeShutdown, onCopied, onLoaded, onLocationChanged, onUpdated, register
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobConfigHistoryJobListener

public JobConfigHistoryJobListener()
Method Detail

onCreated

public void onCreated(hudson.model.Item item)

Overrides:
onCreated 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


Copyright © 2004–2014. All rights reserved.