jste.template
Class TemplateCache
java.lang.Object
jste.template.TemplateCache
public class TemplateCache
- extends java.lang.Object
A cache of Template instances for strings drawn from a repository. For example, using the FileRepository,
we can create a TemplateCache that contains files under a particular directory.
Constructor Summary |
TemplateCache(Repository rep)
Create a TemplateCache that contains files from the given repository. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TemplateCache
public TemplateCache(Repository rep)
- Create a TemplateCache that contains files from the given repository.
repository
public Repository repository()
getTemplate
public Template getTemplate(java.lang.String templateName)
throws java.lang.Exception
- Return the template with the given name, if one exists in the cache. This method automatically
refreshes the cache from the repository if the content in the cache is out of date.
- Throws:
java.lang.Exception