org.apache.maven.plugin.checkstyle
Class AbstractCheckstyleReport

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.reporting.AbstractMavenReport
          extended by org.apache.maven.plugin.checkstyle.AbstractCheckstyleReport
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.apache.maven.reporting.MavenMultiPageReport, org.apache.maven.reporting.MavenReport
Direct Known Subclasses:
CheckstyleAggregateReport, CheckstyleReport

public abstract class AbstractCheckstyleReport
extends org.apache.maven.reporting.AbstractMavenReport

Base abstract class for Checkstyle reports.

Since:
2.8
Version:
$Id: AbstractCheckstyleReport.html 816667 2012-05-08 14:02:08Z hboutemy $

Field Summary
protected  CheckstyleExecutor checkstyleExecutor
           
protected  CheckstyleRssGenerator checkstyleRssGenerator
          CheckstyleRssGenerator.
protected  org.codehaus.plexus.resource.ResourceManager locator
           
static String PLUGIN_RESOURCES
           
protected  org.apache.maven.project.MavenProject project
          The Maven Project Object.
protected  org.apache.maven.doxia.tools.SiteTool siteTool
          SiteTool.
protected  boolean skip
          Skip entire check.
protected  ByteArrayOutputStream stringOutputStream
           
 
Fields inherited from interface org.apache.maven.reporting.MavenReport
CATEGORY_PROJECT_INFORMATION, CATEGORY_PROJECT_REPORTS, ROLE
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractCheckstyleReport()
           
 
Method Summary
protected abstract  CheckstyleExecutorRequest createRequest()
          Create the Checkstyle executor request.
 void executeReport(Locale locale)
          
protected  com.puppycrawl.tools.checkstyle.DefaultLogger getConsoleListener()
          Creates and returns the console listener.
 String getDescription(Locale locale)
          
protected  com.puppycrawl.tools.checkstyle.api.AuditListener getListener()
          Creates and returns the report generation listener.
 String getName(Locale locale)
          
protected  String getOutputDirectory()
          
protected  org.apache.maven.project.MavenProject getProject()
          
protected  org.apache.maven.doxia.siterenderer.Renderer getSiteRenderer()
          
 void setReportOutputDirectory(File reportOutputDirectory)
          
 
Methods inherited from class org.apache.maven.reporting.AbstractMavenReport
canGenerateReport, closeReport, execute, generate, generate, generate, getCategoryName, getReportOutputDirectory, getSink, getSinkFactory, isExternalReport
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.maven.reporting.MavenReport
getOutputName
 

Field Detail

PLUGIN_RESOURCES

public static final String PLUGIN_RESOURCES
See Also:
Constant Field Values

skip

protected boolean skip
Skip entire check.

Since:
2.2
Is defined by:
expression:
${checkstyle.skip}
default-value:
false

siteTool

protected org.apache.maven.doxia.tools.SiteTool siteTool
SiteTool.

Since:
2.2
Is a Plexus component defined by:
role:
org.apache.maven.doxia.tools.SiteTool
Is readonly.
Is required.

project

protected org.apache.maven.project.MavenProject project
The Maven Project Object.

Is defined by:
default-value:
${project}
Is readonly.
Is required.

locator

protected org.codehaus.plexus.resource.ResourceManager locator
Is a Plexus component defined by:
Is readonly.
Is required.

checkstyleRssGenerator

protected CheckstyleRssGenerator checkstyleRssGenerator
CheckstyleRssGenerator.

Since:
2.4
Is a Plexus component defined by:
role:
org.apache.maven.plugin.checkstyle.rss.CheckstyleRssGenerator
role-hint:
default
Is readonly.
Is required.

checkstyleExecutor

protected CheckstyleExecutor checkstyleExecutor
Since:
2.5
Is a Plexus component defined by:
role:
org.apache.maven.plugin.checkstyle.CheckstyleExecutor
role-hint:
default
Is readonly.
Is required.

stringOutputStream

protected ByteArrayOutputStream stringOutputStream
Constructor Detail

AbstractCheckstyleReport

public AbstractCheckstyleReport()
Method Detail

getName

public String getName(Locale locale)


getDescription

public String getDescription(Locale locale)


getOutputDirectory

protected String getOutputDirectory()

Specified by:
getOutputDirectory in class org.apache.maven.reporting.AbstractMavenReport

getProject

protected org.apache.maven.project.MavenProject getProject()

Specified by:
getProject in class org.apache.maven.reporting.AbstractMavenReport

getSiteRenderer

protected org.apache.maven.doxia.siterenderer.Renderer getSiteRenderer()

Specified by:
getSiteRenderer in class org.apache.maven.reporting.AbstractMavenReport

executeReport

public void executeReport(Locale locale)
                   throws org.apache.maven.reporting.MavenReportException

Specified by:
executeReport in class org.apache.maven.reporting.AbstractMavenReport
Throws:
org.apache.maven.reporting.MavenReportException

createRequest

protected abstract CheckstyleExecutorRequest createRequest()
                                                    throws org.apache.maven.reporting.MavenReportException
Create the Checkstyle executor request.

Returns:
The executor request.
Throws:
org.apache.maven.reporting.MavenReportException - If something goes wrong during creation.

getListener

protected com.puppycrawl.tools.checkstyle.api.AuditListener getListener()
                                                                 throws org.apache.maven.reporting.MavenReportException
Creates and returns the report generation listener.

Returns:
The audit listener.
Throws:
org.apache.maven.reporting.MavenReportException - If something goes wrong.

getConsoleListener

protected com.puppycrawl.tools.checkstyle.DefaultLogger getConsoleListener()
                                                                    throws org.apache.maven.reporting.MavenReportException
Creates and returns the console listener.

Returns:
The console listener.
Throws:
org.apache.maven.reporting.MavenReportException - If something goes wrong.

setReportOutputDirectory

public void setReportOutputDirectory(File reportOutputDirectory)

Specified by:
setReportOutputDirectory in interface org.apache.maven.reporting.MavenReport
Overrides:
setReportOutputDirectory in class org.apache.maven.reporting.AbstractMavenReport


Copyright © 2005-2011 The Apache Software Foundation. All Rights Reserved.