org.niggle.templates.freemarkerimpl
Class FreemarkerPageFactory

java.lang.Object
  |
  +--freemarker.template.Configuration
        |
        +--org.niggle.templates.freemarkerimpl.FreemarkerPageFactory
All Implemented Interfaces:
PageFactory

public class FreemarkerPageFactory
extends freemarker.template.Configuration
implements PageFactory

A concrete PageFactory type that vends Page objects that represent Freemarker templates.

Author:
Jonathan Revusky

Field Summary
protected  java.io.File defaultDirectory
           
 
Constructor Summary
FreemarkerPageFactory()
           
 
Method Summary
 Page getPage(java.lang.String name, java.util.Locale locale)
          Returns a Page.
 void setConfig(NiggleConfig config)
          pass a copy of the NiggleConfig object for setup info.
 void setDefaultPath(java.lang.String path)
           
 
Methods inherited from class freemarker.template.Configuration
get, getClassicCompatibility, getDecimalSeparator, getDefaultConfig, getDefaultEncoding, getEncoding, getLocale, getStrictSyntaxMode, getTemplate, getTemplate, getTemplate, getTemplate, getTemplate, LoadBuiltInEncodingMap, put, put, putAll, setClassForTemplateLoading, setClassicCompatibility, setDefaultConfig, setDefaultEncoding, setDirectoryForTemplateLoading, setEncoding, setLocale, setServletContextForTemplateLoading, setStrictSyntaxMode, setTemplateExceptionHandler, setTemplateLoader, setTemplateUpdateDelay
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultDirectory

protected java.io.File defaultDirectory
Constructor Detail

FreemarkerPageFactory

public FreemarkerPageFactory()
Method Detail

setDefaultPath

public void setDefaultPath(java.lang.String path)
                    throws java.io.IOException
Specified by:
setDefaultPath in interface PageFactory
java.io.IOException

getPage

public Page getPage(java.lang.String name,
                    java.util.Locale locale)
             throws java.io.IOException
Description copied from interface: PageFactory
Returns a Page.

Specified by:
getPage in interface PageFactory
Parameters:
name - a string that somehow identifies the page. May or may not be related to a file system name.
locale - the place for which the page is intended.
Returns:
a Page
Throws:
java.io.IOException - thrown if a necessary underlying resource is unavailable.

setConfig

public void setConfig(NiggleConfig config)
               throws javax.servlet.ServletException
Description copied from interface: PageFactory
pass a copy of the NiggleConfig object for setup info.

Specified by:
setConfig in interface PageFactory
javax.servlet.ServletException