|
EchoPoint API - 3.0.0b5 App Webcontainer |
|||||||||
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. |
String |
getCanonicalName()
Returns a canonical name of this TemplateDataSource . |
String |
getCharacterEncoding()
This returns the character encoding of the TemplateDataSource . |
TemplateCompilerHints |
getCompilerHints()
This returns a hint to the underlying template compiler mechanism as to how the template data should be compiled into XHTML. |
String |
getContentType()
This content type of the template data is used by the rendering framework to find an appropriate template compiler. |
InputStream |
getInputStream()
Gets an InputStream of this
TemplateDataSource . |
Method Detail |
---|
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.
TemplateDataSource
String getContentType()
An example content type is text/xhtml and cause a template compiler to be found for XHTML template data.
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)
InputStream getInputStream() throws 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 ..
IOException
TemplateCachingHints 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.TemplateCompilerHints getCompilerHints()
Most of the TemplateCompilerHints
properties are really
aimed as JAXP XML parser implementations but you can provide generic
values via the getAttribute() mechanism.
TemplateCompilerHints
implementation or null
if there are no compiler hints
|
EchoPoint API - 3.0.0b5 App Webcontainer |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |