public abstract class AbstractMavenReportRenderer extends Object implements org.apache.maven.reporting.MavenReportRenderer
An abstract class to manage report generation, with many helper methods to ease the job: you just need to implement getTitle() and renderBody().
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.
getTitle(), 
renderBody()| Modifier and Type | Field and Description | 
|---|---|
| protected org.apache.maven.doxia.sink.Sink | sinkThe current sink to use | 
| Constructor and Description | 
|---|
| AbstractMavenReportRenderer(org.apache.maven.doxia.sink.Sink sink)Default constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected static String | createLinkPatternedText(String text,
                       String href)Create a link pattern text defined by  {text, url}. | 
| protected void | endSection()Convenience method to wrap section ending in the current sink. | 
| protected void | endTable()Convenience method to wrap the table ending in the current sink. | 
| abstract String | getTitle() | 
| protected void | javaScript(String jsCode)Convenience method to add a Javascript code in the current sink. | 
| protected void | link(String href,
    String name)Convenience method to wrap a link in the current sink. | 
| void | linkPatternedText(String text)Convenience method to wrap a patterned text in the current link. | 
| protected void | paragraph(String paragraph)Convenience method to wrap a paragraph in the current sink. | 
| protected static String | propertiesToString(Properties props)Convenience method to display a  Propertiesobject as comma separated String. | 
| void | render() | 
| protected abstract void | renderBody()Renderer the body content of the report. | 
| protected void | startSection(String name)Convenience method to wrap section creation in the current sink. | 
| protected void | startSection(String name,
            String anchor)Convenience method to wrap section creation in the current sink. | 
| protected void | startTable()Convenience method to wrap the table start in the current sink. | 
| protected void | startTable(int[] justification,
          boolean grid)Convenience method to wrap the table start in the current sink. | 
| protected void | tableCaption(String caption)Convenience method to wrap a table caption in the current sink. | 
| protected void | tableCell(String text)Convenience method to wrap a table cell start in the current sink. | 
| protected void | tableCell(String text,
         boolean asHtml)Convenience method to wrap a table cell start in the current sink. | 
| protected void | tableHeader(String[] content)Convenience method to wrap a table header row start in the current sink. | 
| protected void | tableHeaderCell(String text)Convenience method to wrap the table header cell start in the current sink. | 
| protected void | tableRow(String[] content)Convenience method to wrap a table row start in the current sink. | 
| protected void | text(String text)Convenience method to wrap a text in the current sink. | 
| protected void | verbatimLink(String text,
            String href)Convenience method to wrap a text with a given link href as verbatim style in the current sink. | 
| protected void | verbatimSource(String source)Convenience method to wrap source code as verbatim style in the current sink . | 
| protected void | verbatimText(String text)Convenience method to wrap a text as verbatim style in the current sink . | 
public AbstractMavenReportRenderer(org.apache.maven.doxia.sink.Sink sink)
sink - the sink to use.public void render()
render in interface org.apache.maven.reporting.MavenReportRendererprotected void startSection(String name)
name - the name of this section, could be null.text(String), 
Sink.section(int, org.apache.maven.doxia.sink.SinkEventAttributes), 
Sink.sectionTitle(int, org.apache.maven.doxia.sink.SinkEventAttributes), 
Sink.sectionTitle_(int)protected void startSection(String name, String anchor)
name - the name of this section, could be null.anchor - the anchor of this section, could be null.text(String), 
Sink.section(int, org.apache.maven.doxia.sink.SinkEventAttributes), 
Sink.sectionTitle(int, org.apache.maven.doxia.sink.SinkEventAttributes), 
Sink.sectionTitle_(int)protected void endSection()
IllegalStateException - if too many closing sections.Sink.section_(int)protected void startTable()
Sink.table()protected void startTable(int[] justification,
                          boolean grid)
justification - the justification of table cells.grid - whether to draw a grid around cells.Sink.table(), 
Sink.tableRows(int[],boolean)protected void endTable()
Sink.table_()protected void tableHeaderCell(String text)
text - the text to put in this cell, could be null.text(String), 
Sink.tableHeaderCell(), 
Sink.tableHeaderCell_()protected void tableCell(String text)
The text could be a link patterned text defined by {text, url}
text - the text to put in this cell, could be null.linkPatternedText(String), 
tableCell(String)protected void tableCell(String text, boolean asHtml)
The text could be a link patterned text defined by {text, url}
If asHtml is true, add the text as Html
text - the text to put in this cell, could be null.asHtml - true to add the text as Html, false otherwise.linkPatternedText(String), 
Sink.tableCell(), 
Sink.tableCell_(), 
Sink.rawText(String)protected void tableRow(String[] content)
The texts in the content could be link patterned texts defined by {text, url}
content - an array of text to put in the cells in this row, could be null.tableCell(String), 
Sink.tableRow(), 
Sink.tableRow_()protected void tableHeader(String[] content)
content - an array of text to put in the cells in this row header, could be null.tableHeaderCell(String), 
Sink.tableRow(), 
Sink.tableRow_()protected void tableCaption(String caption)
caption - the caption of the table, could be null.text(String), 
Sink.tableCaption(), 
Sink.tableCaption_()protected void paragraph(String paragraph)
paragraph - the paragraph to add, could be null.text(String), 
Sink.paragraph(), 
Sink.paragraph_()protected void link(String href, String name)
href - the link to add, cannot be null.name - the link name.text(String), 
Sink.link(String), 
Sink.link_()protected void text(String text)
If text is empty or has a null value, add the "-" character
text - a text, could be null.Sink.text(String)protected void verbatimText(String text)
text - a text, could be null.text(String), 
Sink.verbatim(org.apache.maven.doxia.sink.SinkEventAttributes), 
Sink.verbatim_()protected void verbatimLink(String text, String href)
text - a stringhref - an href could be nulllink(String, String), 
verbatimText(String), 
Sink.verbatim(org.apache.maven.doxia.sink.SinkEventAttributes), 
Sink.verbatim_()protected void verbatimSource(String source)
source - a source code, could be null.text(String), 
Sink.verbatim(org.apache.maven.doxia.sink.SinkEventAttributes), 
Sink.verbatim_()protected void javaScript(String jsCode)
jsCode - a string of JavascriptSink.rawText(String)public void linkPatternedText(String text)
The text variable should contained this given pattern {text, url}
 to handle the link creation.
text - a text with link pattern defined.text(String), 
link(String, String), 
applyPattern(String)protected static String createLinkPatternedText(String text, String href)
{text, url}.
 This created pattern could be used by the method linkPatternedText(String) to
 handle a text with link.
text - href - linkPatternedText(String)protected static String propertiesToString(Properties props)
Properties object as comma separated String.props - the properties to display.public abstract String getTitle()
getTitle in interface org.apache.maven.reporting.MavenReportRendererprotected abstract void renderBody()
Copyright © 2002–2024 The Apache Software Foundation. All rights reserved.