maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r940199 - in /maven/shared/trunk/maven-reporting-api/src/main/java/org/apache/maven/reporting: MavenReport.java MavenReportException.java MavenReportRenderer.java
Date Sun, 02 May 2010 12:21:34 GMT
Author: hboutemy
Date: Sun May  2 12:21:33 2010
New Revision: 940199

URL: http://svn.apache.org/viewvc?rev=940199&view=rev
Log:
merged back modifications done in Maven-2 trunk

Modified:
    maven/shared/trunk/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReport.java
    maven/shared/trunk/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReportException.java
    maven/shared/trunk/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReportRenderer.java

Modified: maven/shared/trunk/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReport.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReport.java?rev=940199&r1=940198&r2=940199&view=diff
==============================================================================
--- maven/shared/trunk/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReport.java
(original)
+++ maven/shared/trunk/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReport.java
Sun May  2 12:21:33 2010
@@ -29,36 +29,86 @@ import java.util.Locale;
  *
  * @author Brett Porter
  * @author <a href="evenisse@apache.org">Emmanuel Venisse</a>
+ * @author <a href="mailto:vincent.siveton@gmail.com">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();
 }

Modified: maven/shared/trunk/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReportException.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReportException.java?rev=940199&r1=940198&r2=940199&view=diff
==============================================================================
--- maven/shared/trunk/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReportException.java
(original)
+++ maven/shared/trunk/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReportException.java
Sun May  2 12:21:33 2010
@@ -25,14 +25,29 @@ package org.apache.maven.reporting;
  * @author Brett Porter
  * @author <a href="evenisse@apache.org">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 );

Modified: maven/shared/trunk/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReportRenderer.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReportRenderer.java?rev=940199&r1=940198&r2=940199&view=diff
==============================================================================
--- maven/shared/trunk/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReportRenderer.java
(original)
+++ maven/shared/trunk/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReportRenderer.java
Sun May  2 12:21:33 2010
@@ -20,14 +20,25 @@ package org.apache.maven.reporting;
  */
 
 /**
- * @author Jason van Zyl
+ * Basis for rendering report.
+ *
+ * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
  * @author <a href="evenisse@apache.org">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



Mime
View raw message