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(String name, boolean useImages, boolean isCheckStyleActivated, boolean isDryActivated, boolean isFindBugsActivated, boolean isPmdActivated, boolean isOpenTasksActivated, boolean isWarningsActivated, boolean canHideZeroWarningsProjects)
          Creates a new instance of WarningsTablePortlet.
 
Method Summary
protected  Class<? extends hudson.plugins.analysis.core.AbstractProjectAction<?>> getAction()
           
 String getCheckStyle(Collection<hudson.model.Job<?,?>> jobs)
          Returns the number of Checkstyle warnings for the specified jobs.
 String getCheckStyle(hudson.model.Job<?,?> job)
          Returns the number of Checkstyle warnings for the specified job.
 String getCompilerWarnings(hudson.model.Job<?,?> job)
          Returns the total number of warnings for the specified job.
 String getDry(Collection<hudson.model.Job<?,?>> jobs)
          Returns the number of Dry warnings for the specified jobs.
 String getDry(hudson.model.Job<?,?> job)
          Returns the number of duplicate code warnings for the specified job.
 String getFindBugs(Collection<hudson.model.Job<?,?>> jobs)
          Returns the number of FindBugs warnings for the specified jobs.
 String getFindBugs(hudson.model.Job<?,?> job)
          Returns the number of FindBugs warnings for the specified job.
 String getPmd(Collection<hudson.model.Job<?,?>> jobs)
          Returns the number of PMD warnings for the specified jobs.
 String getPmd(hudson.model.Job<?,?> job)
          Returns the number of PMD warnings for the specified job.
 String getTasks(Collection<hudson.model.Job<?,?>> jobs)
          Returns the number of open tasks for the specified jobs.
 String getTasks(hudson.model.Job<?,?> job)
          Returns the number of open tasks for the specified job.
 String getTotal(Collection<hudson.model.Job<?,?>> jobs)
          Returns the total number of warnings for all jobs.
 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.
 String getWarnings(Collection<hudson.model.Job<?,?>> jobs)
          Returns the number of compiler warnings for the specified jobs.
 boolean isCheckStyleActivated()
          Returns whether CheckStyle results should be shown.
 boolean isDryActivated()
          Returns whether DRY results should be shown.
 boolean isFindBugsActivated()
          Returns whether FindBugs results should be shown.
 boolean isOpenTasksActivated()
          Returns whether open tasks should be shown.
 boolean isPmdActivated()
          Returns whether PMD results should be shown.
 boolean isTotalsVisible()
          Returns whether the totals column should be shown.
protected  boolean isVisibleJob(hudson.model.Job<?,?> job)
          
 boolean isWarningsActivated()
          Returns whether compiler warnings results should be shown.
 boolean useIcons()
          Returns whether icons should be used in the table header.
 
Methods inherited from class hudson.plugins.analysis.dashboard.AbstractWarningsTablePortlet
filter, filterZeroWarningsJobs, getCanHideZeroWarningsProjects, getPluginName, getWarnings, getWarnings, getWarnings, selectAction, toInt
 
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

WarningsTablePortlet

@DataBoundConstructor
public WarningsTablePortlet(String name,
                                                 boolean useImages,
                                                 boolean isCheckStyleActivated,
                                                 boolean isDryActivated,
                                                 boolean isFindBugsActivated,
                                                 boolean isPmdActivated,
                                                 boolean isOpenTasksActivated,
                                                 boolean isWarningsActivated,
                                                 boolean canHideZeroWarningsProjects)
Creates a new instance of WarningsTablePortlet.

Parameters:
name - the name of the portlet
useImages - determines whether images should be used in the table header.
isCheckStyleActivated - determines whether to show the warnings from Checkstyle
isDryActivated - determines whether to show the warnings from DRY
isFindBugsActivated - determines whether to show the warnings from FindBugs
isPmdActivated - determines whether to show the warnings from PMD
isOpenTasksActivated - determines whether to show open tasks
isWarningsActivated - determines whether to show compiler warnings
canHideZeroWarningsProjects - determines if zero warnings projects should be hidden in the table
Method Detail

getAction

protected Class<? extends hudson.plugins.analysis.core.AbstractProjectAction<?>> getAction()
Specified by:
getAction 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 should 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 should be used

isTotalsVisible

public boolean isTotalsVisible()
Returns whether the totals column should be shown.

Returns:
true if the totals column should be shown, false otherwise

isCheckStyleActivated

public boolean isCheckStyleActivated()
Returns whether CheckStyle results should be shown.

Returns:
true if CheckStyle results should be shown, false otherwise

isDryActivated

public boolean isDryActivated()
Returns whether DRY results should be shown.

Returns:
true if DRY results should be shown, false otherwise

isFindBugsActivated

public boolean isFindBugsActivated()
Returns whether FindBugs results should be shown.

Returns:
true if FindBugs results should be shown, false otherwise

isPmdActivated

public boolean isPmdActivated()
Returns whether PMD results should be shown.

Returns:
true if PMD results should be shown, false otherwise

isOpenTasksActivated

public boolean isOpenTasksActivated()
Returns whether open tasks should be shown.

Returns:
true if open tasks should be shown, false otherwise

isWarningsActivated

public boolean isWarningsActivated()
Returns whether compiler warnings results should be shown.

Returns:
true if compiler warnings results should be shown, false otherwise

isVisibleJob

protected boolean isVisibleJob(hudson.model.Job<?,?> job)

Overrides:
isVisibleJob in class hudson.plugins.analysis.dashboard.AbstractWarningsTablePortlet

getCheckStyle

public 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 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 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 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 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

getCompilerWarnings

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

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

getTotal

public 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 String getCheckStyle(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 String getDry(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 String getFindBugs(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 String getPmd(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 String getTasks(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 String getWarnings(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 String getTotal(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 © 2004-2012 Hudson. All Rights Reserved.