Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## echopointng.template
Class AbstractTemplateDataSource

    java.lang.Object
      echopointng.template.AbstractTemplateDataSource

All Implemented Interfaces:
  TemplateDataSource, java.io.Serializable

Direct Known Subclasses:
  FileTemplateDataSource, JspTemplateDataSource, ResourceTemplateDataSource, StringTemplateDataSource

    public abstract class AbstractTemplateDataSource

extends java.lang.Object
implements TemplateDataSource, java.io.Serializable

A base class for `TemplateDataSource` implementations

See Also:
  Serialized Form

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

### DEFAULT_ENCODING

    public static java.lang.String DEFAULT_ENCODING

  the default encoding is iso-8859-1

### DEFAULT_CONTENT_TYPE

    public static java.lang.String DEFAULT_CONTENT_TYPE

  the default encoding is text/xhtml

### DEFAULT_TIME_TO_LIVE

    public static final long DEFAULT_TIME_TO_LIVE

  the default cache time-to-live is 10 minutes

  See Also:
    Constant Field Values

### DEFAULT_ACCESS_TIMEOUT

    public static final long DEFAULT_ACCESS_TIMEOUT

  the default cache access time out 5 minutes

  See Also:
    Constant Field Values

Constructor Detail

### AbstractTemplateDataSource

    public AbstractTemplateDataSource()

  AbstractTemplateDataSource constructor with default encoding.

### AbstractTemplateDataSource

    public AbstractTemplateDataSource(java.lang.String encoding)

  AbstractTemplateDataSource constructor with encoding.

Method Detail

### getCharacterEncoding

    public java.lang.String getCharacterEncoding()

  Description copied from interface: `TemplateDataSource`
  This returns the character encoding of the `TemplateDataSource`.

  This will be used to create a `new InputStreamReader(stream,characterEncoding)` from the `InputStream` return by `getInputStream()`.

  Specified by:
    `getCharacterEncoding` in interface `TemplateDataSource`
  Returns:
    the character encoding of the `TemplateDataSource` as defined by the `java.io.InputStreamReader()` specification.
  See Also:
    `TemplateDataSource.getCharacterEncoding()`

### setCharacterEncoding

    public void setCharacterEncoding(java.lang.String newEncoding)

  Sets the character encoding to be used with this TemplateDataSource

  Parameters:
    `newEncoding` - - the new encoding to use
  See Also:
    `TemplateDataSource.getCharacterEncoding()`

### getCachingHints

    public TemplateCachingHints getCachingHints()

  Description copied from interface: `TemplateDataSource`
  This returns a hint to the template rendering mechanism as to whether this template data can be cached. If `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.

  Specified by:
    `getCachingHints` in interface `TemplateDataSource`
  Returns:
    null if the template data should not be cached or a `TemplateCachingHints` to say how it might be cached.
  See Also:
    `TemplateDataSource.getCachingHints()`

### setCachingHints

    public void setCachingHints(TemplateCachingHints newValue)

  Sets the caching hints to use for this template data source

  Parameters:
    `newValue` - - the new hints

### getContentType

    public java.lang.String getContentType()

  Description copied from interface: `TemplateDataSource`
  This content type of the template data is used by the rendering framework to find an appropriate template compiler.

  An example content type is text/xhtml and cause a template compiler to be found for XHTML template data.

  Specified by:
    `getContentType` in interface `TemplateDataSource`
  Returns:
    the content type of the template data
  See Also:
    `TemplateDataSource.getContentType()`

### setContentType

    public void setContentType(java.lang.String contentType)

  Sets the content type of the template data

  Parameters:
    `contentType` - The contentType to set.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD