hudson.plugins.checkstyle.util
Class GraphConfigurationDetail

java.lang.Object
  extended by hudson.plugins.checkstyle.util.GraphConfiguration
      extended by hudson.plugins.checkstyle.util.GraphConfigurationDetail
All Implemented Interfaces:
hudson.model.ModelObject
Direct Known Subclasses:
DefaultGraphConfigurationDetail, UserGraphConfigurationDetail

public abstract class GraphConfigurationDetail
extends GraphConfiguration
implements hudson.model.ModelObject

Configures the trend graph of this plug-in.


Field Summary
 
Fields inherited from class hudson.plugins.checkstyle.util.GraphConfiguration
DEFAULT_HEIGHT, DEFAULT_WIDTH
 
Constructor Summary
GraphConfigurationDetail(hudson.model.AbstractProject<?,?> project, java.lang.String pluginName, java.lang.String value)
          Creates a new instance of GraphConfigurationDetail.
GraphConfigurationDetail(hudson.model.AbstractProject<?,?> project, java.lang.String pluginName, java.lang.String value, ResultAction<?> lastAction)
          Creates a new instance of GraphConfigurationDetail.
 
Method Summary
static hudson.util.FormValidation checkHeight(java.lang.String height)
          Performs on-the-fly validation on the trend graph height.
protected static java.io.File createDefaultsFile(hudson.model.AbstractProject<?,?> project, java.lang.String pluginName)
          Creates a file with for the default values.
 void doDifference(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
          Draws a PNG image with a graph with warning differences.
 void doDifferenceMap(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
          Draws a MAP with the warnings difference graph.
 void doFixed(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
          Draws a PNG image with the new versus fixed warnings graph.
 void doFixedMap(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
          Draws a MAP with the new versus fixed warnings graph.
 void doHealth(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
          Draws a PNG image with a graph with warnings by health thresholds.
 void doHealthMap(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
          Draws a MAP with a graph with warnings by health thresholds.
 void doPriority(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
          Draws a PNG image with a graph with warnings by priority.
 void doPriorityMap(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
          Draws a MAP width a graph with warnings by priority.
 void doSave(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
          Saves the configured values.
 java.lang.String getBuildCountString()
          Returns the build count as a string.
 java.lang.String getDayCountString()
          Returns the day count as a string.
abstract  java.lang.String getDescription()
          Returns the description for this view.
 hudson.model.AbstractProject<?,?> getOwner()
          Returns the project.
 java.lang.String getPluginName()
          Returns the plug-in name.
 java.lang.String getRootUrl()
          Returns the root URL of this object.
 boolean hasMeaningfulGraph()
          Checks whether a meaningful graph is available.
 boolean isHealthGraphAvailable()
          Checks if the health graph is available.
protected abstract  void persistValue(java.lang.String value, org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response)
          Persists the configured values.
 
Methods inherited from class hudson.plugins.checkstyle.util.GraphConfiguration
createGraph, getBuildCount, getDayCount, getGraphType, getHeight, getWidth, isBuildCountDefined, isDayCountDefined, isDefault, isValid, isValidBuildCount, isValidHeight, isValidWidth, isVisible, serializeToString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface hudson.model.ModelObject
getDisplayName
 

Constructor Detail

GraphConfigurationDetail

public GraphConfigurationDetail(hudson.model.AbstractProject<?,?> project,
                                java.lang.String pluginName,
                                java.lang.String value)
Creates a new instance of GraphConfigurationDetail.

Parameters:
project - the owning project to configure the graphs for
pluginName - the name of the plug-in
value - the initial value of this configuration

GraphConfigurationDetail

public GraphConfigurationDetail(hudson.model.AbstractProject<?,?> project,
                                java.lang.String pluginName,
                                java.lang.String value,
                                ResultAction<?> lastAction)
Creates a new instance of GraphConfigurationDetail.

Parameters:
project - the owning project to configure the graphs for
pluginName - the name of the plug-in
value - the initial value of this configuration
lastAction - the last valid action for this project
Method Detail

createDefaultsFile

protected static java.io.File createDefaultsFile(hudson.model.AbstractProject<?,?> project,
                                                 java.lang.String pluginName)
Creates a file with for the default values.

Parameters:
project - the project used as directory for the file
pluginName - the name of the plug-in
Returns:
the created file

getOwner

public hudson.model.AbstractProject<?,?> getOwner()
Returns the project.

Returns:
the project

getRootUrl

public java.lang.String getRootUrl()
Returns the root URL of this object.

Returns:
the root URL of this object

getPluginName

public java.lang.String getPluginName()
Returns the plug-in name.

Returns:
the plug-in name

getDescription

public abstract java.lang.String getDescription()
Returns the description for this view.

Returns:
the description for this view

doSave

public void doSave(org.kohsuke.stapler.StaplerRequest request,
                   org.kohsuke.stapler.StaplerResponse response)
Saves the configured values. Subclasses need to implement the actual persistence.

Parameters:
request - Stapler request
response - Stapler response

checkHeight

public static hudson.util.FormValidation checkHeight(java.lang.String height)
Performs on-the-fly validation on the trend graph height.

Parameters:
height - the height
Returns:
the form validation

hasMeaningfulGraph

public boolean hasMeaningfulGraph()
Checks whether a meaningful graph is available.

Returns:
true, if there is such a graph

persistValue

protected abstract void persistValue(java.lang.String value,
                                     org.kohsuke.stapler.StaplerRequest request,
                                     org.kohsuke.stapler.StaplerResponse response)
                              throws java.io.IOException
Persists the configured values.

Parameters:
value - the values configured by the user.
request - Stapler request
response - Stapler response
Throws:
java.io.IOException - if the values could not be persisted

getBuildCountString

public java.lang.String getBuildCountString()
Returns the build count as a string. If no build count is defined, then an empty string is returned.

Returns:
the day count string

getDayCountString

public java.lang.String getDayCountString()
Returns the day count as a string. If no day count is defined, then an empty string is returned.

Returns:
the day count string

doFixed

public void doFixed(org.kohsuke.stapler.StaplerRequest request,
                    org.kohsuke.stapler.StaplerResponse response)
Draws a PNG image with the new versus fixed warnings graph.

Parameters:
request - the request
response - the response

doFixedMap

public void doFixedMap(org.kohsuke.stapler.StaplerRequest request,
                       org.kohsuke.stapler.StaplerResponse response)
Draws a MAP with the new versus fixed warnings graph.

Parameters:
request - the request
response - the response

doDifference

public void doDifference(org.kohsuke.stapler.StaplerRequest request,
                         org.kohsuke.stapler.StaplerResponse response)
Draws a PNG image with a graph with warning differences.

Parameters:
request - the request
response - the response

doDifferenceMap

public void doDifferenceMap(org.kohsuke.stapler.StaplerRequest request,
                            org.kohsuke.stapler.StaplerResponse response)
Draws a MAP with the warnings difference graph.

Parameters:
request - the request
response - the response

doPriority

public void doPriority(org.kohsuke.stapler.StaplerRequest request,
                       org.kohsuke.stapler.StaplerResponse response)
Draws a PNG image with a graph with warnings by priority.

Parameters:
request - the request
response - the response

doPriorityMap

public void doPriorityMap(org.kohsuke.stapler.StaplerRequest request,
                          org.kohsuke.stapler.StaplerResponse response)
Draws a MAP width a graph with warnings by priority.

Parameters:
request - the request
response - the response

isHealthGraphAvailable

public boolean isHealthGraphAvailable()
Checks if the health graph is available.

Returns:
true, if the health graph is available

doHealth

public void doHealth(org.kohsuke.stapler.StaplerRequest request,
                     org.kohsuke.stapler.StaplerResponse response)
Draws a PNG image with a graph with warnings by health thresholds.

Parameters:
request - the request
response - the response

doHealthMap

public void doHealthMap(org.kohsuke.stapler.StaplerRequest request,
                        org.kohsuke.stapler.StaplerResponse response)
Draws a MAP with a graph with warnings by health thresholds.

Parameters:
request - the request
response - the response


Copyright © 2009. All Rights Reserved.