| org.wings.template.TemplateSource
All known Subclasses: org.wings.template.FileTemplateSource, org.wings.template.StringTemplateSource, org.wings.template.StreamTemplateSource,
TemplateSource | public interface TemplateSource (Code) | | A TemplateSource for a Template. This encapsulates what is the notion
of a template from the parsers point of view: some named entity, that
might change over time and thus has a modification time; an input stream
to access the contents.
So TemplateSource is a general source where templates can come
from. You can think of Files, URLs, Database-BLOBS ..
author: Henner Zeller |
Method Summary | |
String | getCanonicalName() Returns a canonical name of this TemplateSource.
The name returned here is used to look up the parsing
result of the internal caching, so it should differ
for all different Sources :-)
May return null if this Source is supposed
to be parsed each time. | InputStream | getInputStream() Gets an InputStream of this TemplateSource.
Note
that this method may be called twice if the page has to
be parsed first. | long | lastModified() Returns the time the content of this TemplateSource
was last modified.
The return value is used to decide whether to reparse a
Source or not. |
getCanonicalName | String getCanonicalName()(Code) | | Returns a canonical name of this TemplateSource.
The name returned here is used to look up the parsing
result of the internal caching, so it should differ
for all different Sources :-)
May return null if this Source is supposed
to be parsed each time. The canonical name would be something
like a filename or an URL.
the canonical name of the source. like 'file:/web/template.html' |
getInputStream | InputStream getInputStream() throws IOException(Code) | | Gets an InputStream of this TemplateSource.
Note
that this method may be called twice if the page has to
be parsed first. So you probably have to implement a
buffer if your underlying source is transient ..
an InputStream the content of the template is read from. |
lastModified | long lastModified()(Code) | | Returns the time the content of this TemplateSource
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. This may not return a 'real' time, it needs just
to be comparable to itself; so some sort of version counter instead
of time would be perfect as well.
long a modification time |
|
|