com.sonyericsson.jenkins.plugins.bfa.graphs
Class ProjectGraphAction

java.lang.Object
  extended by com.sonyericsson.jenkins.plugins.bfa.BfaGraphAction
      extended by com.sonyericsson.jenkins.plugins.bfa.graphs.ProjectGraphAction
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Action, hudson.model.ModelObject, hudson.model.RootAction

public class ProjectGraphAction
extends BfaGraphAction

Action class for displaying graphs on the project page.

Author:
Fredrik Persson <fredrik6.persson@sonymobile.com>

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class com.sonyericsson.jenkins.plugins.bfa.BfaGraphAction
DEFAULT_GRAPH_HEIGHT, DEFAULT_GRAPH_WIDTH, EXCLUDE_ABORTED, ID_SEPARATOR, URL_PARAM_ALL_MASTERS, URL_PARAM_SHOW_ABORTED, URL_PARAM_TIME_PERIOD, URL_PARAM_VALUE_MAX, URL_PARAM_VALUE_MONTH, URL_PARAM_VALUE_TODAY, URL_PARAM_WHICH_GRAPH
 
Constructor Summary
ProjectGraphAction(hudson.model.AbstractProject project)
          Standard constructor.
 
Method Summary
 String getDisplayName()
           
protected  hudson.util.Graph getGraph(GraphType which, Date timePeriod, boolean hideManAborted, boolean forAllMasters, Map<String,String> rawReqParams)
          Get the graph corresponding to the specified arguments.
protected  String getGraphCacheId(GraphType whichGraph, String reqTimePeriod, boolean hideAborted, boolean forAllMasters)
          Get a unique id used in the caching of the graph.
 String getGraphsPageTitle()
          Get the title to display in the top of the detailed graphs page.
 GraphType[] getGraphTypes()
          Returns an array of GraphTypes, where each element represents a graph.
 String getIconFileName()
           
 hudson.model.ModelObject getOwner()
          Get the owner.
 String getUrlName()
           
static void invalidateBuildNbrGraphCache(hudson.model.AbstractProject project)
          Invalidate the cache for the build number graph for the specified project.
static void invalidateProjectGraphCache(hudson.model.AbstractProject project)
          Invalidate all graph caches for the specified project.
 
Methods inherited from class com.sonyericsson.jenkins.plugins.bfa.BfaGraphAction
getDefaultGraphHeight, getDefaultGraphWidth, getGraph, showGraphDelayText, showMasterSwitch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectGraphAction

public ProjectGraphAction(hudson.model.AbstractProject project)
Standard constructor.

Parameters:
project - the parent project of this action
Method Detail

getDisplayName

public String getDisplayName()

getIconFileName

public String getIconFileName()

getUrlName

public String getUrlName()

getOwner

public hudson.model.ModelObject getOwner()
Description copied from class: BfaGraphAction
Get the owner.

Specified by:
getOwner in class BfaGraphAction
Returns:
The owner

getGraphTypes

public GraphType[] getGraphTypes()
Description copied from class: BfaGraphAction
Returns an array of GraphTypes, where each element represents a graph. These are the types used to display the graphs/images on the detailed graphs page, that is, they will be the 'which'-parameter to getGraph(GraphType which, Date ...). The graphs are displayed in the same order as the numbers in the array.

Specified by:
getGraphTypes in class BfaGraphAction
Returns:
An array of GraphTypes where each element represents a graph to display

getGraphsPageTitle

public String getGraphsPageTitle()
Description copied from class: BfaGraphAction
Get the title to display in the top of the detailed graphs page.

Specified by:
getGraphsPageTitle in class BfaGraphAction
Returns:
The title as a String

getGraph

protected hudson.util.Graph getGraph(GraphType which,
                                     Date timePeriod,
                                     boolean hideManAborted,
                                     boolean forAllMasters,
                                     Map<String,String> rawReqParams)
Description copied from class: BfaGraphAction
Get the graph corresponding to the specified arguments.

Specified by:
getGraph in class BfaGraphAction
Parameters:
which - Which graph to display
timePeriod - How old statistics should be included in the graph
hideManAborted - Hide manually aborted causes
forAllMasters - Show for all masters
rawReqParams - The url parameters that came with the request
Returns:
A Graph

getGraphCacheId

protected String getGraphCacheId(GraphType whichGraph,
                                 String reqTimePeriod,
                                 boolean hideAborted,
                                 boolean forAllMasters)
Description copied from class: BfaGraphAction
Get a unique id used in the caching of the graph.

Specified by:
getGraphCacheId in class BfaGraphAction
Parameters:
whichGraph - Which graph
reqTimePeriod - The selected time period
hideAborted - Hide aborted builds
forAllMasters - For all masters
Returns:
An id corresponding to the specified arguments

invalidateBuildNbrGraphCache

public static void invalidateBuildNbrGraphCache(hudson.model.AbstractProject project)
Invalidate the cache for the build number graph for the specified project.

Parameters:
project - The project whose build number graph to invalidate

invalidateProjectGraphCache

public static void invalidateProjectGraphCache(hudson.model.AbstractProject project)
Invalidate all graph caches for the specified project.

Parameters:
project - The project whose graphs to invalidate


Copyright © 2004-2014. All Rights Reserved.