org.melati.template
Class AbstractTemplateEngine
java.lang.Object
org.melati.template.AbstractTemplateEngine
- All Implemented Interfaces:
- TemplateEngine
- Direct Known Subclasses:
- NoTemplateEngine, VelocityTemplateEngine, WebmacroTemplateEngine
public abstract class AbstractTemplateEngine
- extends java.lang.Object
- implements TemplateEngine
Common elements of a TemplateEngine.
|
Field Summary |
protected java.util.Vector |
roots
|
|
Method Summary |
void |
addRoot(java.lang.String root)
Add root at index 0,
so that the empty string is always returned last by elements. |
java.util.Enumeration |
getRoots()
A root should not end in a slash. |
java.lang.String |
getTemplateName(java.lang.String key,
java.lang.String classifier)
The name of a template which exists. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
roots
protected java.util.Vector roots
AbstractTemplateEngine
public AbstractTemplateEngine()
- Constructor.
getTemplateName
public java.lang.String getTemplateName(java.lang.String key,
java.lang.String classifier)
- The name of a template which exists.
- Specified by:
getTemplateName in interface TemplateEngine
- Parameters:
key - short name, without path or extensionclassifier - a purpose or database name or similar qualifier
- Returns:
- the name of a template, null if none found
- See Also:
TemplateEngine.getTemplateName(java.lang.String, java.lang.String)
getRoots
public java.util.Enumeration getRoots()
- A root should not end in a slash.
- Specified by:
getRoots in interface TemplateEngine
- Returns:
- an Enumeration of string roots, always at least the empty string
- See Also:
TemplateEngine.getRoots()
addRoot
public void addRoot(java.lang.String root)
- Add root at index 0,
so that the empty string is always returned last by
elements.
- Specified by:
addRoot in interface TemplateEngine
- Parameters:
root - the root to add- See Also:
TemplateEngine.addRoot(java.lang.String)
Copyright © 2000-2008 PanEris. All Rights Reserved.