org.apache.maven.reporting
Class AbstractMavenReportRenderer

java.lang.Object
  extended by org.apache.maven.reporting.AbstractMavenReportRenderer
All Implemented Interfaces:
org.apache.maven.reporting.MavenReportRenderer

public abstract class AbstractMavenReportRenderer
extends Object
implements org.apache.maven.reporting.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

Field Summary
protected  org.apache.maven.doxia.sink.Sink sink
           
 
Constructor Summary
AbstractMavenReportRenderer(org.apache.maven.doxia.sink.Sink sink)
           
 
Method Summary
protected static String createLinkPatternedText(String text, String href)
          Create a link pattern text defined by {text, url}.
protected  void endSection()
           
protected  void endTable()
           
abstract  String getTitle()
           
protected  void javaScript(String jsCode)
          Add a Javascript code.
protected  void link(String href, String name)
           
 void linkPatternedText(String text)
          Add a text with links inside.
protected  void paragraph(String paragraph)
           
protected static String propertiesToString(Properties props)
          Convenience method to display a Properties object comma separated.
 void render()
           
protected abstract  void renderBody()
           
protected  void startSection(String name)
           
protected  void startTable()
           
protected  void tableCaption(String caption)
           
protected  void tableCell(String text)
          Add a cell in a table.
protected  void tableCell(String text, boolean asHtml)
          Add a cell in a table.
protected  void tableHeader(String[] content)
           
protected  void tableHeaderCell(String text)
           
protected  void tableRow(String[] content)
           
protected  void text(String text)
          Add a new text.
protected  void verbatimLink(String text, String href)
          Add a verbatim text with a specific link.
protected  void verbatimText(String text)
          Add a verbatim text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sink

protected org.apache.maven.doxia.sink.Sink sink
Constructor Detail

AbstractMavenReportRenderer

public AbstractMavenReportRenderer(org.apache.maven.doxia.sink.Sink sink)
Method Detail

render

public void render()
Specified by:
render in interface org.apache.maven.reporting.MavenReportRenderer

startTable

protected void startTable()

endTable

protected void endTable()

startSection

protected void startSection(String name)

endSection

protected void endSection()

tableHeaderCell

protected void tableHeaderCell(String text)

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(String)

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 -

tableRow

protected void tableRow(String[] content)

tableHeader

protected void tableHeader(String[] content)

tableCaption

protected void tableCaption(String caption)

paragraph

protected void paragraph(String paragraph)

link

protected void link(String href,
                    String name)

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

verbatimText

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

Parameters:
text - a string
See Also:
text(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:
link(String, String)

javaScript

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

Parameters:
jsCode - a string of Javascript

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(String), applyPattern(String)

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(String)

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

getTitle

public abstract String getTitle()
Specified by:
getTitle in interface org.apache.maven.reporting.MavenReportRenderer

renderBody

protected abstract void renderBody()


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