|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.maven.reporting.AbstractMavenReportRenderer
public abstract class AbstractMavenReportRenderer
An abstract class to manage report generation, with many helper methods to ease the job: you just need to implement getTitle() and renderBody().
getTitle()
,
renderBody()
Field Summary | |
---|---|
protected Sink |
sink
The current sink to use |
Constructor Summary | |
---|---|
AbstractMavenReportRenderer(Sink sink)
Default constructor. |
Method Summary | |
---|---|
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 Properties object 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 |
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 |
verbatimText(String text)
Convenience method to wrap a text as verbatim style in the current sink . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Sink sink
Constructor Detail |
---|
public AbstractMavenReportRenderer(Sink sink)
sink
- the sink to use.Method Detail |
---|
public void render()
render
in interface MavenReportRenderer
protected void startSection(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(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)
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 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 "-"
charater
text
- a text, could be null.Sink.text(String)
protected void verbatimText(String text)
text
- a text, could be null.text(String)
,
Sink.verbatim(boolean)
,
Sink.verbatim_()
protected void verbatimLink(String text, String href)
text
- a stringhref
- an href could be nulllink(String, String)
,
verbatimText(String)
,
Sink.verbatim(boolean)
,
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 MavenReportRenderer
protected abstract void renderBody()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |