public abstract class AbstractMavenReportRenderer
extends java.lang.Object
implements org.apache.maven.reporting.MavenReportRenderer
getTitle()
,
renderBody()
Modifier and Type | Field and Description |
---|---|
private int |
section
The current section number
|
protected org.apache.maven.doxia.sink.Sink |
sink
The current sink to use
|
Constructor and Description |
---|
AbstractMavenReportRenderer(org.apache.maven.doxia.sink.Sink sink)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) static java.util.List<java.lang.String> |
applyPattern(java.lang.String text)
The method parses a text and applies the given pattern
{text, url} to create
a list of text/href. |
protected static java.lang.String |
createLinkPatternedText(java.lang.String text,
java.lang.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 java.lang.String |
getTitle() |
protected void |
javaScript(java.lang.String jsCode)
Convenience method to add a Javascript code in the current sink.
|
protected void |
link(java.lang.String href,
java.lang.String name)
Convenience method to wrap a link in the current sink.
|
void |
linkPatternedText(java.lang.String text)
Convenience method to wrap a patterned text in the current link.
|
protected void |
paragraph(java.lang.String paragraph)
Convenience method to wrap a paragraph in the current sink.
|
protected static java.lang.String |
propertiesToString(java.util.Properties props)
Convenience method to display a
Properties object as comma separated String. |
void |
render() |
protected abstract void |
renderBody()
Renderer the body content of the report.
|
protected void |
startSection(java.lang.String name)
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(java.lang.String caption)
Convenience method to wrap a table caption in the current sink.
|
protected void |
tableCell(java.lang.String text)
Convenience method to wrap a table cell start in the current sink.
|
protected void |
tableCell(java.lang.String text,
boolean asHtml)
Convenience method to wrap a table cell start in the current sink.
|
protected void |
tableHeader(java.lang.String[] content)
Convenience method to wrap a table header row start in the current sink.
|
protected void |
tableHeaderCell(java.lang.String text)
Convenience method to wrap the table header cell start in the current sink.
|
protected void |
tableRow(java.lang.String[] content)
Convenience method to wrap a table row start in the current sink.
|
protected void |
text(java.lang.String text)
Convenience method to wrap a text in the current sink.
|
protected void |
verbatimLink(java.lang.String text,
java.lang.String href)
Convenience method to wrap a text with a given link href as verbatim style in the current sink.
|
protected void |
verbatimText(java.lang.String text)
Convenience method to wrap a text as verbatim style in the current sink .
|
protected org.apache.maven.doxia.sink.Sink sink
private int section
public AbstractMavenReportRenderer(org.apache.maven.doxia.sink.Sink sink)
sink
- the sink to use.public void render()
render
in interface org.apache.maven.reporting.MavenReportRenderer
protected void startSection(java.lang.String name)
name
- the name of this section, could be null.text(String)
,
Sink.section1()
,
Sink.sectionTitle1()
,
Sink.sectionTitle1_()
,
Sink.section2()
,
Sink.sectionTitle2()
,
Sink.sectionTitle2_()
,
Sink.section3()
,
Sink.sectionTitle3()
,
Sink.sectionTitle3_()
,
Sink.section4()
,
Sink.sectionTitle4()
,
Sink.sectionTitle4_()
,
Sink.section5()
,
Sink.sectionTitle5()
,
Sink.sectionTitle5_()
protected void endSection()
Sink.section1_()
,
Sink.section2_()
,
Sink.section3_()
,
Sink.section4_()
,
Sink.section5_()
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(java.lang.String text)
text
- the text to put in this cell, could be null.text(String)
,
Sink.tableHeaderCell()
,
Sink.tableHeaderCell_()
protected void tableCell(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.String caption)
caption
- the caption of the table, could be null.text(String)
,
Sink.tableCaption()
,
Sink.tableCaption_()
protected void paragraph(java.lang.String paragraph)
paragraph
- the paragraph to add, could be null.text(String)
,
Sink.paragraph()
,
Sink.paragraph_()
protected void link(java.lang.String href, java.lang.String name)
href
- the link to add, cannot be null.name
- the link name.text(String)
,
Sink.link(String)
,
Sink.link_()
protected void text(java.lang.String text)
If text is empty or has a null
value, add the "-"
charater
text
- a text, could be null.Sink.text(String)
protected void verbatimText(java.lang.String text)
text
- a text, could be null.text(String)
,
Sink.verbatim(boolean)
,
Sink.verbatim_()
protected void verbatimLink(java.lang.String text, java.lang.String href)
text
- a stringhref
- an href could be nulllink(String, String)
,
verbatimText(String)
,
Sink.verbatim(boolean)
,
Sink.verbatim_()
protected void javaScript(java.lang.String jsCode)
jsCode
- a string of JavascriptSink.rawText(String)
public void linkPatternedText(java.lang.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 java.lang.String createLinkPatternedText(java.lang.String text, java.lang.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 java.lang.String propertiesToString(java.util.Properties props)
Properties
object as comma separated String.props
- the properties to display.static java.util.List<java.lang.String> applyPattern(java.lang.String text)
{text, url}
to create
a list of text/href.text
- a text with or without the pattern {text, url}
public abstract java.lang.String getTitle()
getTitle
in interface org.apache.maven.reporting.MavenReportRenderer
protected abstract void renderBody()