hudson.plugins.jobConfigHistory
Class JobConfigBadgeAction

java.lang.Object
  extended by hudson.model.listeners.RunListener<hudson.model.AbstractBuild>
      extended by hudson.plugins.jobConfigHistory.JobConfigBadgeAction
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Action, hudson.model.BuildBadgeAction, hudson.model.ModelObject

@Extension
public class JobConfigBadgeAction
extends hudson.model.listeners.RunListener<hudson.model.AbstractBuild>
implements hudson.model.BuildBadgeAction

This class adds a badge to the build history marking builds that occurred after the configuration was changed.

Author:
kstutz

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.model.listeners.RunListener
LISTENERS, targetType
 
Constructor Summary
JobConfigBadgeAction()
          No arguments about a no-argument constructor (necessary because of annotation).
JobConfigBadgeAction(String[] configDates, hudson.model.AbstractBuild build)
          Creates a new JobConfigBadgeAction.
 
Method Summary
 String createLink()
          Creates the target for the link to the showDiffFiles page.
 String getDisplayName()
          Non-use interface method.
 String getIcon()
          Returns the path to our nice little icon.
 String getIconFileName()
          Non-use interface method.
 String getTooltip()
          Returns tooltip so users know what our nice little icon stands for.
 String getUrlName()
          Non-use interface method.
 boolean oldConfigsExist()
          Check if the config history files that are attached to the build still exist.
 void onStarted(hudson.model.AbstractBuild build, hudson.model.TaskListener listener)
           
 boolean showBadge()
          Returns true if the config change build badges should appear (depending on plugin settings and user permissions).
 
Methods inherited from class hudson.model.listeners.RunListener
all, fireCompleted, fireDeleted, fireFinalized, fireStarted, onCompleted, onDeleted, onFinalized, register, setUpEnvironment, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobConfigBadgeAction

public JobConfigBadgeAction()
No arguments about a no-argument constructor (necessary because of annotation).


JobConfigBadgeAction

public JobConfigBadgeAction(String[] configDates,
                            hudson.model.AbstractBuild build)
Creates a new JobConfigBadgeAction.

Parameters:
configDates - The dates of the last two config changes
build - The respective build
Method Detail

onStarted

public void onStarted(hudson.model.AbstractBuild build,
                      hudson.model.TaskListener listener)
Overrides:
onStarted in class hudson.model.listeners.RunListener<hudson.model.AbstractBuild>

showBadge

public boolean showBadge()
Returns true if the config change build badges should appear (depending on plugin settings and user permissions). Called from badge.jelly.

Returns:
True if badges should appear.

oldConfigsExist

public boolean oldConfigsExist()
Check if the config history files that are attached to the build still exist.

Returns:
True if both files exist.

createLink

public String createLink()
Creates the target for the link to the showDiffFiles page.

Returns:
Link target as String.

getTooltip

public String getTooltip()
Returns tooltip so users know what our nice little icon stands for.

Returns:
Explanatory text as string

getIcon

public String getIcon()
Returns the path to our nice little icon.

Returns:
Icon path as string

getIconFileName

public String getIconFileName()
Non-use interface method.

Specified by:
getIconFileName in interface hudson.model.Action

getDisplayName

public String getDisplayName()
Non-use interface method.

Specified by:
getDisplayName in interface hudson.model.Action
Specified by:
getDisplayName in interface hudson.model.ModelObject

getUrlName

public String getUrlName()
Non-use interface method.

Specified by:
getUrlName in interface hudson.model.Action


Copyright © 2004-2013. All Rights Reserved.