hudson.plugins.analysis.collector.dashboard
Class WarningsTablePortlet

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

public class WarningsTablePortlet
extends hudson.plugins.analysis.dashboard.AbstractWarningsTablePortlet

A portlet that shows a table with the number of warnings in a job.

Author:
Ulli Hafner

Nested Class Summary
static class WarningsTablePortlet.WarningsPerJobDescriptor
          Extension point registration.
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Constructor Summary
WarningsTablePortlet(java.lang.String name, boolean useImages)
          Creates a new instance of WarningsTablePortlet.
 
Method Summary
protected  java.lang.Class<? extends hudson.plugins.analysis.core.AbstractProjectAction<?>> getAction()
          
 java.lang.String getCheckStyle(java.util.Collection<hudson.model.Job<?,?>> jobs)
          Returns the number of Checkstyle warnings for the specified jobs.
 java.lang.String getCheckStyle(hudson.model.Job<?,?> job)
          Returns the number of Checkstyle warnings for the specified job.
 java.lang.String getDry(java.util.Collection<hudson.model.Job<?,?>> jobs)
          Returns the number of Dry warnings for the specified jobs.
 java.lang.String getDry(hudson.model.Job<?,?> job)
          Returns the number of duplicate code warnings for the specified job.
 java.lang.String getFindBugs(java.util.Collection<hudson.model.Job<?,?>> jobs)
          Returns the number of FindBugs warnings for the specified jobs.
 java.lang.String getFindBugs(hudson.model.Job<?,?> job)
          Returns the number of FindBugs warnings for the specified job.
protected  java.lang.String getPluginName()
          
 java.lang.String getPmd(java.util.Collection<hudson.model.Job<?,?>> jobs)
          Returns the number of PMD warnings for the specified jobs.
 java.lang.String getPmd(hudson.model.Job<?,?> job)
          Returns the number of PMD warnings for the specified job.
 java.lang.String getTasks(java.util.Collection<hudson.model.Job<?,?>> jobs)
          Returns the number of open tasks for the specified jobs.
 java.lang.String getTasks(hudson.model.Job<?,?> job)
          Returns the number of open tasks for the specified job.
 java.lang.String getTotal(java.util.Collection<hudson.model.Job<?,?>> jobs)
          Returns the total number of warnings for all jobs.
 java.lang.String getTotal(hudson.model.Job<?,?> job)
          Returns the number of warnings for the specified job.
 boolean getUseImages()
          Returns whether images should be used in the table header.
 java.lang.String getWarnings(java.util.Collection<hudson.model.Job<?,?>> jobs)
          Returns the number of compiler warnings for the specified jobs.
 java.lang.String getWarnings(hudson.model.Job<?,?> job)
          Returns the total number of warnings for the specified job.
 boolean isCheckStyleInstalled()
          Returns whether the Checkstyle plug-in is installed.
 boolean isDryInstalled()
          Returns whether the Dry plug-in is installed.
 boolean isFindBugsInstalled()
          Returns whether the FindBugs plug-in is installed.
 boolean isPmdInstalled()
          Returns whether the PMD plug-in is installed.
 boolean isTasksInstalled()
          Returns whether the Open Tasks plug-in is installed.
 boolean isWarningsInstalled()
          Returns whether the Warnings plug-in is installed.
 boolean useIcons()
          Returns whether icons should be used in the table header.
 
Methods inherited from class hudson.plugins.analysis.dashboard.AbstractWarningsTablePortlet
getWarnings, getWarnings
 
Methods inherited from class hudson.plugins.analysis.dashboard.AbstractPortlet
isDashboardViewInstalled
 
Methods inherited from class hudson.plugins.view.dashboard.DashboardPortlet
all, getDashboard, getDescriptor, getDisplayName, getJob, getName, getUrl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WarningsTablePortlet

@DataBoundConstructor
public WarningsTablePortlet(java.lang.String name,
                                                 boolean useImages)
Creates a new instance of WarningsTablePortlet.

Parameters:
name - the name of the portlet
useImages - determines whether images should be used in the table header.
Method Detail

getAction

protected java.lang.Class<? extends hudson.plugins.analysis.core.AbstractProjectAction<?>> getAction()

Specified by:
getAction in class hudson.plugins.analysis.dashboard.AbstractPortlet

getPluginName

protected java.lang.String getPluginName()

Specified by:
getPluginName in class hudson.plugins.analysis.dashboard.AbstractPortlet

getUseImages

public boolean getUseImages()
Returns whether images should be used in the table header.

Returns:
true if images should be used, false if text shuld be used

useIcons

public boolean useIcons()
Returns whether icons should be used in the table header.

Returns:
true if icons should be used, false if text shuld be used

isCheckStyleInstalled

public boolean isCheckStyleInstalled()
Returns whether the Checkstyle plug-in is installed.

Returns:
true if the Checkstyle plug-in is installed, false if not.

isDryInstalled

public boolean isDryInstalled()
Returns whether the Dry plug-in is installed.

Returns:
true if the Dry plug-in is installed, false if not.

isFindBugsInstalled

public boolean isFindBugsInstalled()
Returns whether the FindBugs plug-in is installed.

Returns:
true if the FindBugs plug-in is installed, false if not.

isPmdInstalled

public boolean isPmdInstalled()
Returns whether the PMD plug-in is installed.

Returns:
true if the PMD plug-in is installed, false if not.

isTasksInstalled

public boolean isTasksInstalled()
Returns whether the Open Tasks plug-in is installed.

Returns:
true if the Open Tasks plug-in is installed, false if not.

isWarningsInstalled

public boolean isWarningsInstalled()
Returns whether the Warnings plug-in is installed.

Returns:
true if the Warnings plug-in is installed, false if not.

getCheckStyle

public java.lang.String getCheckStyle(hudson.model.Job<?,?> job)
Returns the number of Checkstyle warnings for the specified job.

Parameters:
job - the job to get the warnings for
Returns:
the number of Checkstyle warnings

getDry

public java.lang.String getDry(hudson.model.Job<?,?> job)
Returns the number of duplicate code warnings for the specified job.

Parameters:
job - the job to get the warnings for
Returns:
the number of duplicate code warnings

getFindBugs

public java.lang.String getFindBugs(hudson.model.Job<?,?> job)
Returns the number of FindBugs warnings for the specified job.

Parameters:
job - the job to get the warnings for
Returns:
the number of FindBugs warnings

getPmd

public java.lang.String getPmd(hudson.model.Job<?,?> job)
Returns the number of PMD warnings for the specified job.

Parameters:
job - the job to get the warnings for
Returns:
the number of PMD warnings

getTasks

public java.lang.String getTasks(hudson.model.Job<?,?> job)
Returns the number of open tasks for the specified job.

Parameters:
job - the job to get the tasks for
Returns:
the number of open tasks

getWarnings

public java.lang.String getWarnings(hudson.model.Job<?,?> job)
Returns the total number of warnings for the specified job.

Overrides:
getWarnings in class hudson.plugins.analysis.dashboard.AbstractWarningsTablePortlet
Parameters:
job - the job to get the warnings for
Returns:
the number of compiler warnings

getTotal

public java.lang.String getTotal(hudson.model.Job<?,?> job)
Returns the number of warnings for the specified job.

Parameters:
job - the job to get the warnings for
Returns:
the number of warnings

getCheckStyle

public java.lang.String getCheckStyle(java.util.Collection<hudson.model.Job<?,?>> jobs)
Returns the number of Checkstyle warnings for the specified jobs.

Parameters:
jobs - the jobs to get the warnings for
Returns:
the number of Checkstyle warnings

getDry

public java.lang.String getDry(java.util.Collection<hudson.model.Job<?,?>> jobs)
Returns the number of Dry warnings for the specified jobs.

Parameters:
jobs - the jobs to get the warnings for
Returns:
the number of Dry warnings

getFindBugs

public java.lang.String getFindBugs(java.util.Collection<hudson.model.Job<?,?>> jobs)
Returns the number of FindBugs warnings for the specified jobs.

Parameters:
jobs - the jobs to get the warnings for
Returns:
the number of FindBugs warnings

getPmd

public java.lang.String getPmd(java.util.Collection<hudson.model.Job<?,?>> jobs)
Returns the number of PMD warnings for the specified jobs.

Parameters:
jobs - the jobs to get the warnings for
Returns:
the number of PMD warnings

getTasks

public java.lang.String getTasks(java.util.Collection<hudson.model.Job<?,?>> jobs)
Returns the number of open tasks for the specified jobs.

Parameters:
jobs - the jobs to get the warnings for
Returns:
the number of open tasks warnings

getWarnings

public java.lang.String getWarnings(java.util.Collection<hudson.model.Job<?,?>> jobs)
Returns the number of compiler warnings for the specified jobs.

Overrides:
getWarnings in class hudson.plugins.analysis.dashboard.AbstractWarningsTablePortlet
Parameters:
jobs - the jobs to get the warnings for
Returns:
the number of compiler warnings

getTotal

public java.lang.String getTotal(java.util.Collection<hudson.model.Job<?,?>> jobs)
Returns the total number of warnings for all jobs.

Parameters:
jobs - the jobs to get the warnings for
Returns:
the total number of warnings


Copyright © 2010. All Rights Reserved.