net.sf.statscm
Class StatScmMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.reporting.AbstractMavenReport
          extended by net.sf.statscm.StatScmMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.apache.maven.reporting.MavenReport

public class StatScmMojo
extends org.apache.maven.reporting.AbstractMavenReport

Generate a Source Code Management Metrics Report.


Field Summary
 
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
StatScmMojo()
           
 
Method Summary
protected  java.lang.String buildIncludeExcludeString(java.lang.String[] list)
          Convert an array of strings to a single semi-colon delimited string of the values.
 void execute()
          For running directly.
 void executeReport(java.util.Locale locale)
          Main mojo execution method called by plugin environment.
 java.lang.String getDescription(java.util.Locale loc)
          Description of Report for Reporting API.
 java.lang.String getMessage(java.lang.String messageKey)
           
 java.lang.String getName(java.util.Locale locale)
          Menu Item name for Reporting API.
protected  java.lang.String getOutputDirectory()
          String repesentation of the output generated XDOC Directory.
 java.lang.String getOutputName()
          String name of the html file that the Reporting Menu uses for a link.
protected  org.apache.maven.project.MavenProject getProject()
          Access to the Maven Project representation for Reporting API.
protected  java.lang.String getReportingTargetDirectory()
          Returns the StatSCM report target directory.
protected  org.apache.maven.doxia.siterenderer.Renderer getSiteRenderer()
          Called my Maven Repoerint API.
 StatConf getStatConf()
           
 void setConfigFileParameter(java.lang.String configFile)
           
 void setProject(org.apache.maven.project.MavenProject project)
          Setter to allow unit tests to set up Mojo.
 
Methods inherited from class org.apache.maven.reporting.AbstractMavenReport
canGenerateReport, closeReport, generate, getCategoryName, getReportOutputDirectory, getSink, isExternalReport, setReportOutputDirectory
 
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
 

Constructor Detail

StatScmMojo

public StatScmMojo()
Method Detail

execute

public void execute()
For running directly.

Specified by:
execute in interface org.apache.maven.plugin.Mojo
Overrides:
execute in class org.apache.maven.reporting.AbstractMavenReport

executeReport

public void executeReport(java.util.Locale locale)
                   throws org.apache.maven.reporting.MavenReportException
Main mojo execution method called by plugin environment.

Specified by:
executeReport in class org.apache.maven.reporting.AbstractMavenReport
Parameters:
locale - Locale for 118n.
Throws:
org.apache.maven.reporting.MavenReportException - Throws an error if any failure.

buildIncludeExcludeString

protected java.lang.String buildIncludeExcludeString(java.lang.String[] list)
Convert an array of strings to a single semi-colon delimited string of the values. Blank values are discarded.

Returns:
the delimited string or an empty string if there are no non-blank values.

getSiteRenderer

protected org.apache.maven.doxia.siterenderer.Renderer getSiteRenderer()
Called my Maven Repoerint API.

Specified by:
getSiteRenderer in class org.apache.maven.reporting.AbstractMavenReport
Returns:
Null becuase we handel the rendering ourselves.

getOutputDirectory

protected java.lang.String getOutputDirectory()
String repesentation of the output generated XDOC Directory.

Specified by:
getOutputDirectory in class org.apache.maven.reporting.AbstractMavenReport
Returns:
Absolute path to the generated XDOC Directory.

getReportingTargetDirectory

protected java.lang.String getReportingTargetDirectory()
Returns the StatSCM report target directory.

Returns:
Absolute path to the directory with final HTML result.

getOutputName

public java.lang.String getOutputName()
String name of the html file that the Reporting Menu uses for a link.

Returns:
Name of Html file to link to.

getName

public java.lang.String getName(java.util.Locale locale)
Menu Item name for Reporting API.

Parameters:
locale - Locale for i18n.
Returns:
link menu name.

getDescription

public java.lang.String getDescription(java.util.Locale loc)
Description of Report for Reporting API.

Parameters:
loc - Locale fro 118n.
Returns:
i18n Description of Report.

getProject

protected org.apache.maven.project.MavenProject getProject()
Access to the Maven Project representation for Reporting API.

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

setProject

public void setProject(org.apache.maven.project.MavenProject project)
Setter to allow unit tests to set up Mojo.

Parameters:
project - Maven Project

getMessage

public java.lang.String getMessage(java.lang.String messageKey)

getStatConf

public StatConf getStatConf()

setConfigFileParameter

public void setConfigFileParameter(java.lang.String configFile)
                            throws net.sf.statcvs.output.ConfigurationException
Throws:
net.sf.statcvs.output.ConfigurationException


Copyright © 2006-2009. All Rights Reserved.