org.apache.maven.reporting

Class AbstractMavenReportRenderer

public abstract class AbstractMavenReportRenderer extends Object implements MavenReportRenderer

An abstract class to manage report generation.

Version: $Id: AbstractMavenReportRenderer.java 163373 2005-02-22 03:37:00Z brett $

Author: Jason van Zyl Emmanuel Venisse Vincent Siveton

UNKNOWN: 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.

Field Summary
protected Sinksink
Constructor Summary
AbstractMavenReportRenderer(Sink sink)
Method Summary
protected static StringcreateLinkPatternedText(String text, String href)
Create a link pattern text defined by {text, url}.
protected voidendSection()
protected voidendTable()
abstract StringgetTitle()
protected voidjavaScript(String jsCode)
Add a Javascript code.
protected voidlink(String href, String name)
voidlinkPatternedText(String text)
Add a text with links inside.
protected voidparagraph(String paragraph)
protected static StringpropertiesToString(Properties props)
Convenience method to display a Properties object comma separated.
voidrender()
protected abstract voidrenderBody()
protected voidstartSection(String name)
protected voidstartTable()
protected voidtableCaption(String caption)
protected voidtableCell(String text)
Add a cell in a table.
protected voidtableCell(String text, boolean asHtml)
Add a cell in a table.
protected voidtableHeader(String[] content)
protected voidtableHeaderCell(String text)
protected voidtableRow(String[] content)
protected voidtext(String text)
Add a new text.
protected voidverbatimLink(String text, String href)
Add a verbatim text with a specific link.
protected voidverbatimText(String text)
Add a verbatim text.

Field Detail

sink

protected Sink sink

Constructor Detail

AbstractMavenReportRenderer

public AbstractMavenReportRenderer(Sink sink)

Method Detail

createLinkPatternedText

protected static String createLinkPatternedText(String text, String href)
Create a link pattern text defined by {text, url}.

This created pattern could be used by the method linkPatternedText(String) to handle a text with link.

Parameters: text href

Returns: a link pattern

See Also: linkPatternedText

endSection

protected void endSection()

endTable

protected void endTable()

getTitle

public abstract String getTitle()

javaScript

protected void javaScript(String jsCode)
Add a Javascript code.

Parameters: jsCode a string of Javascript

link

protected void link(String href, String name)

linkPatternedText

public void linkPatternedText(String text)
Add a text with links inside.

The text variable should contained this given pattern {text, url} to handle the link creation.

Parameters: text a text with link pattern defined.

See Also: text applyPattern

paragraph

protected void paragraph(String paragraph)

propertiesToString

protected static String propertiesToString(Properties props)
Convenience method to display a Properties object comma separated.

Parameters: props

Returns: the properties object as comma separated String

render

public void render()

renderBody

protected abstract void renderBody()

startSection

protected void startSection(String name)

startTable

protected void startTable()

tableCaption

protected void tableCaption(String caption)

tableCell

protected void tableCell(String text)
Add a cell in a table.

The text could be a link patterned text defined by {text, url}

Parameters: text

See Also: linkPatternedText

tableCell

protected void tableCell(String text, boolean asHtml)
Add a cell in a table.

If asHtml is true, add the text as Html

Parameters: text asHtml

tableHeader

protected void tableHeader(String[] content)

tableHeaderCell

protected void tableHeaderCell(String text)

tableRow

protected void tableRow(String[] content)

text

protected void text(String text)
Add a new text.

If text is empty of has a null value, add the "-" charater

Parameters: text a string

verbatimLink

protected void verbatimLink(String text, String href)
Add a verbatim text with a specific link.

Parameters: text a string href an href could be null

See Also: AbstractMavenReportRenderer

verbatimText

protected void verbatimText(String text)
Add a verbatim text.

Parameters: text a string

See Also: text

Copyright © 2001-2009 Apache Software Foundation. All Rights Reserved.