Author: vsiveton
Date: Tue Jan 29 04:43:53 2008
New Revision: 616287

URL: http://svn.apache.org/viewvc?rev=616287&view=rev
Log:
o improve summary section

Modified:
    
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java
    
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/resources/linkcheck-report.properties

Modified: 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java?rev=616287&r1=616286&r2=616287&view=diff
==============================================================================
--- 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java
 (original)
+++ 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java
 Tue Jan 29 04:43:53 2008
@@ -137,6 +137,7 @@
      * Remote repositories used for the project.
      *
      * @parameter expression="${project.remoteArtifactRepositories}"
+     * @required
      */
     protected List repositories;
 
@@ -562,8 +563,116 @@
         getSink().text( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.summary" ) );
         getSink().sectionTitle1_();
 
+        // Summary of the analysis parameters
+        getSink().paragraph();
+        getSink().rawText( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.summary.overview1" ) );
+        getSink().paragraph_();
+
+        getSink().table();
+
+        getSink().tableRow();
+        getSink().tableHeaderCell();
+        getSink().text( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.table.summary.parameter" ) );
+        getSink().tableHeaderCell_();
+        getSink().tableHeaderCell();
+        getSink().text( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.table.summary.value" ) );
+        getSink().tableHeaderCell_();
+        getSink().tableRow_();
+
+        getSink().tableRow();
+        getSink().tableCell();
+        getSink().rawText( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.table.summary.httpFollowRedirect" ) );
+        getSink().tableCell_();
+        getSink().tableCell();
+        getSink().text( String.valueOf( httpFollowRedirect ) );
+        getSink().tableCell_();
+        getSink().tableRow_();
+
+        getSink().tableRow();
+        getSink().tableCell();
+        getSink().rawText( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.table.summary.httpMethod" ) );
+        getSink().tableCell_();
+        getSink().tableCell();
+        if ( StringUtils.isEmpty( httpMethod ) )
+        {
+            getSink().text( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.table.summary.none" ) );
+        }
+        else
+        {
+            getSink().text( httpMethod );
+        }
+        getSink().tableCell_();
+        getSink().tableRow_();
+
+        getSink().tableRow();
+        getSink().tableCell();
+        getSink().rawText( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.table.summary.excludedPages" ) );
+        getSink().tableCell_();
+        getSink().tableCell();
+        if ( excludedPages == null || excludedPages.length == 0 )
+        {
+            getSink().text( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.table.summary.none" ) );
+        }
+        else
+        {
+            getSink().text( StringUtils.join( excludedPages, "," ) );
+        }
+        getSink().tableCell_();
+        getSink().tableRow_();
+
+        getSink().tableRow();
+        getSink().tableCell();
+        getSink().rawText( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.table.summary.excludedLinks" ) );
+        getSink().tableCell_();
+        getSink().tableCell();
+        if ( excludedLinks == null || excludedLinks.length == 0 )
+        {
+            getSink().text( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.table.summary.none" ) );
+        }
+        else
+        {
+            getSink().text( StringUtils.join( excludedLinks, "," ) );
+        }
+        getSink().tableCell_();
+        getSink().tableRow_();
+
+        getSink().tableRow();
+        getSink().tableCell();
+        getSink().rawText( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.table.summary.excludedHttpStatusErrors" ) );
+        getSink().tableCell_();
+        getSink().tableCell();
+        if ( excludedHttpStatusErrors == null || 
excludedHttpStatusErrors.length == 0 )
+        {
+            getSink().text( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.table.summary.none" ) );
+        }
+        else
+        {
+            getSink().text( toString( excludedHttpStatusErrors ) );
+        }
+        getSink().tableCell_();
+        getSink().tableRow_();
+
+        getSink().tableRow();
+        getSink().tableCell();
+        getSink().rawText( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.table.summary.excludedHttpStatusWarnings" ) );
+        getSink().tableCell_();
+        getSink().tableCell();
+        if ( excludedHttpStatusWarnings == null || 
excludedHttpStatusWarnings.length == 0 )
+        {
+            getSink().text( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.table.summary.none" ) );
+        }
+        else
+        {
+            getSink().text( toString( excludedHttpStatusWarnings ) );
+        }
+        getSink().tableCell_();
+        getSink().tableRow_();
+
+        getSink().table_();
+
+        // Summary of the checked files
         getSink().paragraph();
-        getSink().rawText( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.summary.overview" ) );
+        getSink().rawText( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.summary.overview2" ) );
         getSink().paragraph_();
 
         getSink().table();
@@ -791,5 +900,24 @@
         getSink().figureCaption_();
         getSink().figureGraphics( "images/icon_warning_sml.gif" );
         getSink().figure_();
+    }
+
+    private String toString( int[] a )
+    {
+        if ( a == null || a.length == 0 )
+        {
+            return "";
+        }
+
+        StringBuilder buf = new StringBuilder();
+        buf.append( a[0] );
+
+        for ( int i = 1; i < a.length; i++ )
+        {
+            buf.append( ", " );
+            buf.append( a[i] );
+        }
+
+        return buf.toString();
     }
 }

Modified: 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/resources/linkcheck-report.properties
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/resources/linkcheck-report.properties?rev=616287&r1=616286&r2=616287&view=diff
==============================================================================
--- 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/resources/linkcheck-report.properties
 (original)
+++ 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/resources/linkcheck-report.properties
 Tue Jan 29 04:43:53 2008
@@ -21,7 +21,17 @@
 report.linkcheck.empty=The linkcheck tool has not generated report.
 report.linkcheck.overview=The Link Check tool will search the generated site, 
testing each link it finds. The report presents the status of each link tested.
 report.linkcheck.summary=Summary
-report.linkcheck.summary.overview=The following table presents the summary of 
all checked documents.
+report.linkcheck.summary.overview1=The following table presents the summary of 
the analysis parameters.
+report.linkcheck.summary.overview2=The following table presents the summary of 
all checked documents.
+report.linkcheck.table.summary.parameter=Parameter
+report.linkcheck.table.summary.value=Value
+report.linkcheck.table.summary.httpFollowRedirect=HTTP redirects activated
+report.linkcheck.table.summary.httpMethod=HTTP method used
+report.linkcheck.table.summary.excludedPages=Pages ignored
+report.linkcheck.table.summary.excludedLinks=Links ignored
+report.linkcheck.table.summary.excludedHttpStatusErrors=HTTP errors ignored
+report.linkcheck.table.summary.excludedHttpStatusWarnings=HTTP warning ignored
+report.linkcheck.table.summary.none=None
 report.linkcheck.table.summary.documents=Number Of Documents Analyzed
 report.linkcheck.table.links=Links
 report.linkcheck.table.totalLinks=Total


Reply via email to