hudson.plugins.analysis.dashboard
Class AbstractWarningsGraphPortlet

java.lang.Object
  extended by hudson.plugins.view.dashboard.DashboardPortlet
      extended by hudson.plugins.analysis.dashboard.AbstractPortlet
          extended by hudson.plugins.analysis.dashboard.AbstractWarningsGraphPortlet
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.plugins.view.dashboard.DashboardPortlet>, hudson.model.ModelObject

public abstract class AbstractWarningsGraphPortlet
extends AbstractPortlet

A portlet that shows a trend graph of the warnings in the selected jobs.

Author:
Ulli Hafner

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Constructor Summary
AbstractWarningsGraphPortlet(String name, String width, String height, String dayCountString)
          Creates a new instance of AbstractWarningsGraphPortlet.
 
Method Summary
protected  void configureGraph(BuildResultGraph graph)
          Configures the graph configuration.
 String getDayCountString()
          Returns the number of days to consider.
 String getDescription()
          Returns the description of the trend graph.
protected abstract  BuildResultGraph getGraphType()
          Returns the graph type of this portlet.
 int getHeight()
          Returns the height.
protected abstract  String getPluginName()
          Returns the name of the plug-in that is used to create the link to the results.
 hudson.util.Graph getWarningsGraph()
          Returns the trend graph for specified jobs.
 int getWidth()
          Returns the width.
 boolean isEmpty()
          Checks if the results are empty.
protected  AbstractProjectAction<?> selectAction(hudson.model.Job<?,?> job)
          Selects the action to show the results from.
 
Methods inherited from class hudson.plugins.analysis.dashboard.AbstractPortlet
getAction
 
Methods inherited from class hudson.plugins.view.dashboard.DashboardPortlet
all, getComparator, getDashboard, getDescriptor, getDisplayName, getId, getJob, getName, getUrl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractWarningsGraphPortlet

public AbstractWarningsGraphPortlet(String name,
                                    String width,
                                    String height,
                                    String dayCountString)
Creates a new instance of AbstractWarningsGraphPortlet. Note that each instance must configure its graph in the constructor.

Parameters:
name - the name of the portlet
width - width of the graph
height - height of the graph
dayCountString - number of days to consider
See Also:
configures the graph
Method Detail

configureGraph

protected final void configureGraph(BuildResultGraph graph)
Configures the graph configuration.

Parameters:
graph - the graph to show

getDescription

public String getDescription()
Returns the description of the trend graph.

Returns:
the description

getGraphType

protected abstract BuildResultGraph getGraphType()
Returns the graph type of this portlet.

Returns:
the graph type of this portlet

getWarningsGraph

public hudson.util.Graph getWarningsGraph()
Returns the trend graph for specified jobs.

Returns:
the trend graph

getPluginName

protected abstract String getPluginName()
Returns the name of the plug-in that is used to create the link to the results.

Returns:
the name of the plug-in

isEmpty

public boolean isEmpty()
Checks if the results are empty.

Returns:
true if the results are empty, false otherwise

selectAction

protected AbstractProjectAction<?> selectAction(hudson.model.Job<?,?> job)
Selects the action to show the results from. This default implementation simply returns the first action that matches the given type.

Parameters:
job - the job to get the action from
Returns:
the action

getHeight

public int getHeight()
Returns the height.

Returns:
the height

getWidth

public int getWidth()
Returns the width.

Returns:
the width

getDayCountString

public String getDayCountString()
Returns the number of days to consider.

Returns:
the number of days to consider


Copyright © 2004-2012 Hudson. All Rights Reserved.