Home » sitemesh-2.4.1 » com.opensymphony.module » sitemesh » parser » [javadoc | source]
com.opensymphony.module.sitemesh.parser
abstract public class: AbstractPage [javadoc | source]
java.lang.Object
   com.opensymphony.module.sitemesh.parser.AbstractPage

All Implemented Interfaces:
    Page

Direct Known Subclasses:
    AbstractHTMLPage, TokenizedHTMLPage, FastPage

Abstract implementation of com.opensymphony.module.sitemesh.Page .

Contains base methods for storing and accessing page properties. Also stores #pageData as byte[] and implements write???() methods.

Concrete implementations need only set the #pageData and call #addProperty(java.lang.String,java.lang.String) to add all the required information.

Field Summary
protected  char[] pageData    Date of page contents. 
Method from com.opensymphony.module.sitemesh.parser.AbstractPage Summary:
addProperty,   getBody,   getBooleanProperty,   getContentLength,   getIntProperty,   getLongProperty,   getPage,   getProperties,   getProperty,   getPropertyKeys,   getRequest,   getTitle,   isPropertySet,   noNull,   setRequest,   writeBody,   writePage
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.opensymphony.module.sitemesh.parser.AbstractPage Detail:
 public  void addProperty(String name,
    String value) 
    Add a property to the properties list.
 public String getBody() 
 public boolean getBooleanProperty(String name) 
 public int getContentLength() 
 public int getIntProperty(String name) 
 public long getLongProperty(String name) 
 public String getPage() 
 public Map getProperties() 
 public String getProperty(String name) 
 public String[] getPropertyKeys() 
 public HttpServletRequest getRequest() 
 public String getTitle() 
    Return title of from "title" property. Never returns null.
 public boolean isPropertySet(String name) 
 protected static String noNull(String in) 
    Return String as is, or "" if null. (Prevents NullPointerExceptions)
 public  void setRequest(HttpServletRequest request) 
    Create snapshot of Request.
 abstract public  void writeBody(Writer out) throws IOException
    Write data of html <body> tag.

    Must be implemented. Data written should not actually contain the body tags, but all the data in between.

 public  void writePage(Writer out) throws IOException