public class ResourceTemplateSource extends Object implements org.jamon.api.TemplateSource
TemplateSource
which retrieves templates from Java resources.Constructor and Description |
---|
ResourceTemplateSource(ClassLoader classLoader,
String templateSourceDir) |
ResourceTemplateSource(ClassLoader classLoader,
String templateSourceDir,
String extension)
Construct a ResourceTemplateSource, specifying a filename extension for templates.
|
Modifier and Type | Method and Description |
---|---|
boolean |
available(String templatePath) |
String |
getExternalIdentifier(String templatePath) |
InputStream |
getStreamFor(String templatePath) |
org.jamon.api.TemplateLocation |
getTemplateLocation(String templatePath) |
long |
lastModified(String templatePath) |
void |
loadProperties(String dirPath,
Properties properties) |
public ResourceTemplateSource(ClassLoader classLoader, String templateSourceDir)
public ResourceTemplateSource(ClassLoader classLoader, String templateSourceDir, String extension)
classLoader
- the classloader to use to load resourcestemplateSourceDir
- the source directoryextension
- the filename extension for templatespublic long lastModified(String templatePath) throws IOException
lastModified
in interface org.jamon.api.TemplateSource
IOException
public boolean available(String templatePath)
available
in interface org.jamon.api.TemplateSource
public InputStream getStreamFor(String templatePath) throws IOException
getStreamFor
in interface org.jamon.api.TemplateSource
IOException
public String getExternalIdentifier(String templatePath)
getExternalIdentifier
in interface org.jamon.api.TemplateSource
public org.jamon.api.TemplateLocation getTemplateLocation(String templatePath)
getTemplateLocation
in interface org.jamon.api.TemplateSource
public void loadProperties(String dirPath, Properties properties) throws IOException
loadProperties
in interface org.jamon.api.TemplateSource
IOException
Copyright © 2003–2014 Jamon developers. All rights reserved.