|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface TemplateDataSource
TemplateDataSource is used to return template source
data and encoding information for this data.
A single TemplateDataSource can be used as the source
for multiple TemplatePanels. This helps reduce the memory footprint
of the template data. An implementation of this interface
must keep the requirement in mind.
| Method Summary | |
|---|---|
TemplateCachingHints |
getCachingHints()
This returns a hint to the template rendering mechanism as to whether this template data can be cached. |
java.lang.String |
getCanonicalName()
Returns a canonical name of this TemplateDataSource. |
java.lang.String |
getCharacterEncoding()
This returns the character encoding of the TemplateDataSource. |
java.lang.String |
getContentType()
This content type of the template data is used by the rendering framework to find an appropriate template compiler. |
java.io.InputStream |
getInputStream()
Gets an InputStream of this TemplateDataSource. |
| Method Detail |
|---|
java.lang.String getCanonicalName()
TemplateDataSource.
The name returned here is used to look up the parsing
result of the internal caching, so it should differ
for all different TemplateDataSource objects :-)
May return null if this TemplateDataSource is supposed
to be parsed each time. The canonical name would be something
like a filename or an URL.
TemplateDataSourcejava.lang.String getContentType()
An example content type is text/xhtml and cause a template compiler to be found for XHTML template data.
java.lang.String getCharacterEncoding()
TemplateDataSource.
This will be used to create a new InputStreamReader(stream,characterEncoding)
from the InputStream return by getInputStream().
TemplateDataSource as defined
by the java.io.InputStreamReader() specification.InputStreamReader.InputStreamReader(java.io.InputStream, java.lang.String)
java.io.InputStream getInputStream()
throws java.io.IOException
InputStream of this TemplateDataSource.
Note that this method may be called multiple times
in the life of the TemplateDataSource. So you probably have to implement a
buffer if your underlying data source is transient ..
java.io.IOExceptionTemplateCachingHints getCachingHints()
null is returned
then the template data will never be cached.
However the inverse is not necessarily the case. You may return
a TemplateCachingHints, however this does not mean
the rendering mechanism will cache the template data.
You might return null if the template data is especially
large and you dont want it retained in cache memory.
TemplateCachingHints to say how it might
be cached.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||