org.wings.template
Class FileTemplateSource
java.lang.Object
org.wings.template.FileTemplateSource
- All Implemented Interfaces:
- Serializable, TemplateSource
- Direct Known Subclasses:
- CachedFileTemplateSource
public class FileTemplateSource
- extends Object
- implements TemplateSource, Serializable
A FileDataSource implements a TemplateSource
for a file.
- Author:
- Henner Zeller
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
canonicalName
protected String canonicalName
FileTemplateSource
public FileTemplateSource(File f)
getCanonicalName
public String getCanonicalName()
- Returns a canonical name of this DataSource.
- Specified by:
getCanonicalName in interface TemplateSource
- Returns:
- the canonical name of the source. like 'file:/web/template.html'
lastModified
public long lastModified()
- Returns the time the content of this File
was last modified.
The return value is used to decide whether to reparse a
Source or not. Reparsing is done if the value returned
here differs from the value returned at the last processing
time.
- Specified by:
lastModified in interface TemplateSource
- Returns:
- long a modification time
getInputStream
public InputStream getInputStream()
throws IOException
- Gets an InputStream of the File.
- Specified by:
getInputStream in interface TemplateSource
- Returns:
- an InputStream the content of the template is read from.
- Throws:
IOException
wingS Swings ;-)