}
public void renderDocument( Writer writer, Renderer renderer, SiteRenderingContext siteRenderingContext )
throws RendererException, FileNotFoundException
{
SiteRendererSink sink = new SiteRendererSink( renderingContext );
if ( log != null )
{
sink.enableLogging( new MojoLogWrapper( log ) );
}
sink.head();
sink.title();
sink.text( title );
sink.title_();
sink.head_();
sink.body();
sink.section1();
sink.sectionTitle1();
sink.text( title );
sink.sectionTitle1_();
sink.paragraph();
sink.text( desc1 + " " );
sink.link( "http://maven.apache.org" );
sink.text( "Maven" );
sink.link_();
sink.text( " " + desc2 );
sink.paragraph_();
sink.section2();
sink.sectionTitle2();
Locale locale = siteRenderingContext.getLocale();
sink.text( i18n.getString( "site-plugin", locale, "report.category.sectionTitle" ) );
sink.sectionTitle2_();
sink.table();
sink.tableRows( new int[] {Sink.JUSTIFY_LEFT, Sink.JUSTIFY_LEFT}, false );
String name = i18n.getString( "site-plugin", locale, "report.category.column.document" );
String description = i18n.getString( "site-plugin", locale, "report.category.column.description" );
sink.tableRow();
sink.tableHeaderCell();
sink.text( name );
sink.tableHeaderCell_();
sink.tableHeaderCell();
sink.text( description );
sink.tableHeaderCell_();
sink.tableRow_();
if ( categoryReports != null )
{
for ( Iterator i1 = categoryReports.iterator(); i1.hasNext(); )
{
MavenReport report = (MavenReport) i1.next();
sink.tableRow();
sink.tableCell();
sink.link( report.getOutputName() + ".html" );
sink.text( report.getName( locale ) );
sink.link_();
sink.tableCell_();
sink.tableCell();
sink.text( report.getDescription( locale ) );
sink.tableCell_();
sink.tableRow_();
}
}
sink.tableRows_();
sink.table_();
sink.section2_();
sink.section1_();
sink.body_();
sink.flush();
sink.close();
renderer.generateDocument( writer, sink, siteRenderingContext );
}