|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectechopointng.template.AbstractTemplateDataSource
public abstract class AbstractTemplateDataSource
A base class for TemplateDataSource implementations
| Field Summary | |
|---|---|
static long |
DEFAULT_ACCESS_TIMEOUT
the default cache access time out 5 minutes |
static java.lang.String |
DEFAULT_CONTENT_TYPE
the default encoding is text/xhtml |
static java.lang.String |
DEFAULT_ENCODING
the default encoding is iso-8859-1 |
static long |
DEFAULT_TIME_TO_LIVE
the default cache time-to-live is 10 minutes |
| Constructor Summary | |
|---|---|
AbstractTemplateDataSource()
AbstractTemplateDataSource constructor with default encoding. |
|
AbstractTemplateDataSource(java.lang.String encoding)
AbstractTemplateDataSource constructor with encoding. |
|
| 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 |
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. |
void |
setCachingHints(TemplateCachingHints newValue)
Sets the caching hints to use for this template data source |
void |
setCharacterEncoding(java.lang.String newEncoding)
Sets the character encoding to be used with this TemplateDataSource |
void |
setContentType(java.lang.String contentType)
Sets the content type of the template data |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface echopointng.template.TemplateDataSource |
|---|
getCanonicalName, getInputStream |
| Field Detail |
|---|
public static java.lang.String DEFAULT_ENCODING
public static java.lang.String DEFAULT_CONTENT_TYPE
public static final long DEFAULT_TIME_TO_LIVE
public static final long DEFAULT_ACCESS_TIMEOUT
| Constructor Detail |
|---|
public AbstractTemplateDataSource()
public AbstractTemplateDataSource(java.lang.String encoding)
| Method Detail |
|---|
public java.lang.String getCharacterEncoding()
TemplateDataSourceTemplateDataSource.
This will be used to create a new InputStreamReader(stream,characterEncoding)
from the InputStream return by getInputStream().
getCharacterEncoding in interface TemplateDataSourceTemplateDataSource as defined
by the java.io.InputStreamReader() specification.TemplateDataSource.getCharacterEncoding()public void setCharacterEncoding(java.lang.String newEncoding)
newEncoding - - the new encoding to useTemplateDataSource.getCharacterEncoding()public TemplateCachingHints getCachingHints()
TemplateDataSourcenull 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.
getCachingHints in interface TemplateDataSourceTemplateCachingHints to say how it might
be cached.TemplateDataSource.getCachingHints()public void setCachingHints(TemplateCachingHints newValue)
newValue - - the new hintspublic java.lang.String getContentType()
TemplateDataSourceAn example content type is text/xhtml and cause a template compiler to be found for XHTML template data.
getContentType in interface TemplateDataSourceTemplateDataSource.getContentType()public void setContentType(java.lang.String contentType)
contentType - The contentType to set.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||