This is an automated email from the ASF dual-hosted git repository. hboutemy pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-reporting-api.git
commit 58e883ecfe80050f0bcf079955cfdcabb2aee593 Author: Herve Boutemy <[email protected]> AuthorDate: Sun May 2 12:21:33 2010 +0000 merged back modifications done in Maven-2 trunk git-svn-id: https://svn.apache.org/repos/asf/maven/shared/trunk@940199 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/maven/reporting/MavenReport.java | 62 +++++++++++++++++++--- .../maven/reporting/MavenReportException.java | 15 ++++++ .../maven/reporting/MavenReportRenderer.java | 15 +++++- 3 files changed, 84 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/apache/maven/reporting/MavenReport.java b/src/main/java/org/apache/maven/reporting/MavenReport.java index bc16f80..927c00c 100644 --- a/src/main/java/org/apache/maven/reporting/MavenReport.java +++ b/src/main/java/org/apache/maven/reporting/MavenReport.java @@ -29,36 +29,86 @@ import java.util.Locale; * * @author Brett Porter * @author <a href="[email protected]">Emmanuel Venisse</a> + * @author <a href="mailto:[email protected]">Vincent Siveton</a> * @version $Id$ + * @since 2.0 */ public interface MavenReport { + /** Plexus lookup name */ String ROLE = MavenReport.class.getName(); - /** @deprecated For removal in Maven 3.0 or when reporting-api is decoupled from the core, as categories are dynamic. */ + /** Category for project information reports */ String CATEGORY_PROJECT_INFORMATION = "Project Info"; - /** @deprecated For removal in Maven 3.0 or when reporting-api is decoupled from the core, as categories are dynamic. */ + /** Category for project reports */ String CATEGORY_PROJECT_REPORTS = "Project Reports"; - // eventually, we must replace this with the o.a.m.d.s.Sink class as a parameter + /** + * Generate the report depending the wanted locale. + * <br/> + * Mainly used for external reports like javadoc. + * + * @param sink the sink to use for the generation. + * @param locale the wanted locale to generate the report, could be null. + * @throws MavenReportException if any + */ void generate( Sink sink, Locale locale ) throws MavenReportException; + /** + * @return the output name of this report. + */ String getOutputName(); - String getName( Locale locale ); - + /** + * Get the category name for this report. + * + * @return the category name of this report. Should be <code>CATEGORY_PROJECT_INFORMATION</code> + * or <code>CATEGORY_PROJECT_REPORTS</code> + * {@link #CATEGORY_PROJECT_INFORMATION} + * {@link #CATEGORY_PROJECT_REPORTS} + */ String getCategoryName(); + /** + * @param locale the wanted locale to return the report's name, could be null. + * @return the name of this report. + */ + String getName( Locale locale ); + + /** + * @param locale the wanted locale to return the report's description, could be null. + * @return the description of this report. + */ String getDescription( Locale locale ); - // TODO: remove? + /** + * Set a new output directory. Useful for staging. + * + * @param outputDirectory the new output directory + */ void setReportOutputDirectory( File outputDirectory ); + /** + * @return the current report output directory. + */ File getReportOutputDirectory(); + /** + * An external report is a report which calls a third party program which generates some reports too. + * A good example is javadoc tool. + * + * @return <tt>true</tt> if this report is external, <tt>false</tt> otherwise. + * Default should <tt>false</tt>. + */ boolean isExternalReport(); + /** + * Verify some conditions before generate the report. + * + * @return <tt>true</tt> if this report could be generated, <tt>false</tt> otherwise. + * Default should <tt>true</tt>. + */ boolean canGenerateReport(); } diff --git a/src/main/java/org/apache/maven/reporting/MavenReportException.java b/src/main/java/org/apache/maven/reporting/MavenReportException.java index 14d0794..00b08a9 100644 --- a/src/main/java/org/apache/maven/reporting/MavenReportException.java +++ b/src/main/java/org/apache/maven/reporting/MavenReportException.java @@ -25,14 +25,29 @@ package org.apache.maven.reporting; * @author Brett Porter * @author <a href="[email protected]">Emmanuel Venisse</a> * @version $Id$ + * @since 2.0 */ public class MavenReportException extends Exception { + /** The serialVersionUID **/ + public static final long serialVersionUID = -6200353563231163785L; + + /** + * Default constructor. + * + * @param msg the exception message. + */ public MavenReportException( String msg ) { super( msg ); } + /** + * Other constructor. + * + * @param msg the exception message. + * @param e the exception. + */ public MavenReportException( String msg, Exception e ) { super( msg, e ); diff --git a/src/main/java/org/apache/maven/reporting/MavenReportRenderer.java b/src/main/java/org/apache/maven/reporting/MavenReportRenderer.java index 6471460..c3d40bf 100644 --- a/src/main/java/org/apache/maven/reporting/MavenReportRenderer.java +++ b/src/main/java/org/apache/maven/reporting/MavenReportRenderer.java @@ -20,14 +20,25 @@ package org.apache.maven.reporting; */ /** - * @author Jason van Zyl + * Basis for rendering report. + * + * @author <a href="mailto:[email protected]">Jason van Zyl</a> * @author <a href="[email protected]">Emmanuel Venisse</a> * @version $Id$ - * @todo Later it may be appropriate to create something like a VelocityMavenReportRenderer that could take a velocity template and pipe that through Doxia rather than coding them up like this. + * @since 2.0 + * @TODO Later it may be appropriate to create something like a VelocityMavenReportRenderer + * that could take a velocity template and pipe that through Doxia rather than coding + * them up like this. */ public interface MavenReportRenderer { + /** + * @return the wanted report's title. + */ String getTitle(); + /** + * Renderer a report. + */ void render(); } \ No newline at end of file -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
