org.homeunix.thecave.buddi.plugin.api.util
Class HtmlPage

java.lang.Object
  extended by org.homeunix.thecave.buddi.plugin.api.util.HtmlPage

public class HtmlPage
extends java.lang.Object

A small class which defines an HTML page. There are two parts to this: the HTML text, and a map of images. The HTML text is constructed manually (optionally using HTMLHelper to create the standard report look and layout). If you are going to add images, include them in the HTML text normally (with no path - just the image name), and map that name to a buffered image. The buffered images will be stored to disk, to the file name given in the map. For an example on how to do this, please refer to some of the built in reports in the Buddi SVN repository.

Author:
wyatt

Constructor Summary
HtmlPage(java.lang.String html, java.util.Map<java.lang.String,java.awt.image.BufferedImage> images)
          Creates a new HtmlPage, with the given text and images.
 
Method Summary
 java.io.File createHTML(java.lang.String name)
          Saves the HTML and associated images to disk.
 java.lang.String getHtml()
           
 java.util.Map<java.lang.String,java.awt.image.BufferedImage> getImages()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlPage

public HtmlPage(java.lang.String html,
                java.util.Map<java.lang.String,java.awt.image.BufferedImage> images)
Creates a new HtmlPage, with the given text and images.

Parameters:
html -
images -
Method Detail

getHtml

public java.lang.String getHtml()

getImages

public java.util.Map<java.lang.String,java.awt.image.BufferedImage> getImages()

createHTML

public java.io.File createHTML(java.lang.String name)
Saves the HTML and associated images to disk. Returns the file object of the associated HTML index on success, or null on failure.