com.opensymphony.sitemesh.compatability
Class HTMLPage2Content

java.lang.Object
  extended by com.opensymphony.sitemesh.compatability.HTMLPage2Content
All Implemented Interfaces:
Content

public class HTMLPage2Content
extends Object
implements Content

Adapts a SiteMesh 2 HTMLPage to a SiteMesh 3 Content.

Since:
SiteMesh 3
Author:
Joe Walnes

Field Summary
private  HTMLPage page
           
 
Constructor Summary
HTMLPage2Content(HTMLPage page)
           
 
Method Summary
 void addProperty(String name, String value)
          Manually add a property to page.
 String getProperty(String name)
          Get a property embedded into the Page as a String.
 String[] getPropertyKeys()
          Get all available property keys for the Page.
 String getTitle()
          Get the Title of the document
 int originalLength()
          Length of the original unprocessed content.
 void writeBody(Writer out)
          Write the contents of the <body> tag.
 void writeHead(Writer out)
          Write the contents of the <head> tag.
 void writeOriginal(Writer out)
          Write out the original unprocessed content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

page

private final HTMLPage page
Constructor Detail

HTMLPage2Content

public HTMLPage2Content(HTMLPage page)
Method Detail

writeOriginal

public void writeOriginal(Writer out)
                   throws IOException
Description copied from interface: Content
Write out the original unprocessed content.

Specified by:
writeOriginal in interface Content
Throws:
IOException

originalLength

public int originalLength()
Description copied from interface: Content
Length of the original unprocessed content.

Specified by:
originalLength in interface Content

writeBody

public void writeBody(Writer out)
               throws IOException
Description copied from interface: Content
Write the contents of the <body> tag.

Specified by:
writeBody in interface Content
Throws:
IOException

writeHead

public void writeHead(Writer out)
               throws IOException
Description copied from interface: Content
Write the contents of the <head> tag.

Specified by:
writeHead in interface Content
Throws:
IOException

getTitle

public String getTitle()
Description copied from interface: Content
Get the Title of the document

Specified by:
getTitle in interface Content

getProperty

public String getProperty(String name)
Description copied from interface: Content
Get a property embedded into the Page as a String.

Specified by:
getProperty in interface Content
Parameters:
name - Name of property
Returns:
Property value

getPropertyKeys

public String[] getPropertyKeys()
Description copied from interface: Content
Get all available property keys for the Page.

Specified by:
getPropertyKeys in interface Content
Returns:
Property keys

addProperty

public void addProperty(String name,
                        String value)
Description copied from interface: Content
Manually add a property to page.

Specified by:
addProperty in interface Content

www.opensymphony.com/sitemesh/