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 Object
- implements TemplateEngine
Common elements of a TemplateEngine.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
roots
protected Vector<String> roots
AbstractTemplateEngine
public AbstractTemplateEngine()
- Constructor.
getTemplateName
public String getTemplateName(String key,
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 Enumeration<String> 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(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-2010 PanEris. All Rights Reserved.