com.niggle.templates
Interface PageFactory
- All Known Implementing Classes:
- FreemarkerPageFactory
- public interface PageFactory
An abstract base class for an object that vends Page instances
- Author:
- Jonathan Revusky
Method Summary |
Page |
getPage(java.lang.String name,
ServletInteraction interaction)
Returns a Page. |
void |
setClassLoader(java.lang.ClassLoader cl)
set the ClassLoader relative to which to look for
page template files. |
void |
setDefaultPath(java.lang.String path)
Sets the location from which pages based on files
will be found. |
getPage
public Page getPage(java.lang.String name,
ServletInteraction interaction)
throws java.io.IOException
- Returns a Page.
- 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.interaction
- an object that provides some session context info
This may be null in some implementations.- Returns:
- a Page
- Throws:
java.io.IOException
- thrown if a necessary underlying resource is
unavailable.
setDefaultPath
public void setDefaultPath(java.lang.String path)
- Sets the location from which pages based on files
will be found.
- Parameters:
the
- location where we expect to find our templates.
This could be relative to the ClassLoader if the path
is not absolute.
setClassLoader
public void setClassLoader(java.lang.ClassLoader cl)
- set the ClassLoader relative to which to look for
page template files.