hudson.plugins.covcomplplot
Class CovComplPlotTaget

java.lang.Object
  extended by hudson.plugins.covcomplplot.CovComplPlotTaget
All Implemented Interfaces:
Serializable

public class CovComplPlotTaget
extends Object
implements Serializable

Target containing coverage and complexity of methods. This class mostly handles graph and map generation. This class also handles detailed method list( CovComplPlotMethods generation when the detailed view is shown.

Author:
JunHo Yoon
See Also:
Serialized Form

Nested Class Summary
 class CovComplPlotTaget.GraphImpl
          Implementation of scatter plot graph
 
Field Summary
 Object lock
          Synchronization lock
 
Constructor Summary
CovComplPlotTaget(hudson.model.AbstractBuild<?,?> owner, List<MethodInfo> methodInfoList, Analyzer analyzer, Calendar ownersTimeStamp)
          Constructor
 
Method Summary
 void doDynamic(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, String type, int cov, int compl, int page)
          Dynamic handling of Stapler request.
 org.jfree.data.xy.DefaultXYZDataset generateXYDataset()
          Create DefaultXYZDataset instance from methodOccurenceMatrix
 String getCustomJavaScript()
          Get custom java script
 String getDescription()
          Get the description of the graph.
 CovComplPlotTaget.GraphImpl getGraph()
          Get graph.
 List<MethodInfo> getMethodInfoList()
          Get all MethodInfo list.
 hudson.model.AbstractBuild<?,?> getOwner()
          Get the AbstractBuild instance which owns this instance.
static CovComplPlotTaget loadCovComplScatterPlotTarget(hudson.model.AbstractBuild<?,?> build)
          Load CovComplPlotTaget instance from datafile
static void saveCovComplScatterPlotTarget(CovComplPlotTaget target)
          Save CovComplPlotTaget in the datafile named.
 void setOwner(hudson.model.AbstractBuild<?,?> owner)
          Set owner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lock

public Object lock
Synchronization lock

Constructor Detail

CovComplPlotTaget

public CovComplPlotTaget(hudson.model.AbstractBuild<?,?> owner,
                         List<MethodInfo> methodInfoList,
                         Analyzer analyzer,
                         Calendar ownersTimeStamp)
Constructor

Parameters:
owner - AbstractBuild instance which owns this instance.
methodInfoList - MethodInfo list
ownersTimeStamp - timestamp of owner.
Method Detail

getOwner

public hudson.model.AbstractBuild<?,?> getOwner()
Get the AbstractBuild instance which owns this instance.

Returns:
AbstractBuild instance.

getGraph

public CovComplPlotTaget.GraphImpl getGraph()
Get graph. This method is called to show a graph from jelly.
 projectName/build/graph/map
 

Returns:
GraphImpl object

doDynamic

public void doDynamic(org.kohsuke.stapler.StaplerRequest req,
                      org.kohsuke.stapler.StaplerResponse rsp,
                      String type,
                      @QueryParameter(value="cov")
                      int cov,
                      @QueryParameter(value="compl")
                      int compl,
                      @QueryParameter(value="page")
                      int page)
               throws javax.servlet.ServletException,
                      IOException
Dynamic handling of Stapler request. This method create appropriate CovComplPlotMethods object based on the given parameters and redirect the StaplerRequest to the created object.

Parameters:
req - stapler request
rsp - stapler response
cov - coverage range start value
compl - complexity range start value
page - page
Throws:
javax.servlet.ServletException
IOException

getCustomJavaScript

public String getCustomJavaScript()
Get custom java script

Returns:
custom java script string

getDescription

public String getDescription()
Get the description of the graph. The description is different according to which analyzer is used. For example, coverage in clover processing means statement coverage.

Returns:
description

generateXYDataset

public org.jfree.data.xy.DefaultXYZDataset generateXYDataset()
Create DefaultXYZDataset instance from methodOccurenceMatrix

Returns:
DefaultXYZDataset instance.

setOwner

public void setOwner(hudson.model.AbstractBuild<?,?> owner)
Set owner

Parameters:
owner - owner

loadCovComplScatterPlotTarget

public static CovComplPlotTaget loadCovComplScatterPlotTarget(hudson.model.AbstractBuild<?,?> build)
                                                       throws IOException
Load CovComplPlotTaget instance from datafile

Parameters:
build - the build where the datafile is located.
Returns:
CovComplPlotTaget instance
Throws:
IOException - occurs if there is file system failure.

saveCovComplScatterPlotTarget

public static void saveCovComplScatterPlotTarget(CovComplPlotTaget target)
                                          throws IOException
Save CovComplPlotTaget in the datafile named.

Parameters:
target - CovComplPlotTaget instance to be saved.
Throws:
IOException - occurs if there is file system failure.

getMethodInfoList

public List<MethodInfo> getMethodInfoList()
Get all MethodInfo list.

Returns:
MethodInfo list


Copyright © 2004-2011. All Rights Reserved.