org.histpop.server.wrappers
Class PageFactory

java.lang.Object
  extended by org.histpop.server.wrappers.PageFactory

public class PageFactory
extends java.lang.Object


Constructor Summary
PageFactory(java.lang.String ROOT, java.lang.String pages, javax.servlet.ServletContext ctx, boolean cachePages)
           
 
Method Summary
 HTMLTemplate getTemplate(java.lang.String pageName)
          Returns the HTML template corresponding to the given name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageFactory

public PageFactory(java.lang.String ROOT,
                   java.lang.String pages,
                   javax.servlet.ServletContext ctx,
                   boolean cachePages)
            throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getTemplate

public HTMLTemplate getTemplate(java.lang.String pageName)
                         throws ServerException
Returns the HTML template corresponding to the given name. Names are mapped to HTML files in the PageProperties properties file. If the Server Property CACHE_PAGES=Y then pages are cached when first used. Otherwise, pages are read from the HTML file at run time. Note that if pages are cached the server must be restarted before changes to the pages take effect.

Parameters:
pageName - The name of the HTML page required.
Returns:
An HTML template generated from the corresponding HTML file
Throws:
ServerException