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 ResourceTemplateDataSource

    java.lang.Object
      echopointng.template.AbstractTemplateDataSource
          echopointng.template.ResourceTemplateDataSource

All Implemented Interfaces:
  TemplateDataSource, java.io.Serializable

    public class ResourceTemplateDataSource

extends AbstractTemplateDataSource

`ResourceTemplateDataSource` takes it template data from a Class Resource

See Also:
  Serialized Form

Field Summary

Fields inherited from class echopointng.template.AbstractTemplateDataSource
`DEFAULT_ACCESS_TIMEOUT, DEFAULT_CONTENT_TYPE, DEFAULT_ENCODING, DEFAULT_TIME_TO_LIVE`

Constructor Summary
`ResourceTemplateDataSource()` Constructs a `ResourceTemplateDataSource` with no template resousrce.
`ResourceTemplateDataSource(java.lang.String resource)` Constructs a `ResourceTemplateDataSource` using the named class resource as template data.
`ResourceTemplateDataSource(java.lang.String resource, java.lang.ClassLoader classLoader)` Constructs a `ResourceTemplateDataSource` with the specified class resource as template data.

Method Summary
`java.lang.String` | `getCanonicalName()` Returns a canonical name of this `TemplateDataSource`.
`java.lang.ClassLoader` | `getClassLoader()`
`java.io.InputStream` | `getInputStream()` Gets an `InputStream` of this `TemplateDataSource`.
`java.lang.String` | `getResource()`
`void` | `setClassLoader(java.lang.ClassLoader classLoader)`
`void` | `setResource(java.lang.String resource)`

Methods inherited from class echopointng.template.AbstractTemplateDataSource
`getCachingHints, getCharacterEncoding, getContentType, setCachingHints, setCharacterEncoding, setContentType`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ResourceTemplateDataSource

    public ResourceTemplateDataSource(java.lang.String resource,
                                      java.lang.ClassLoader classLoader)

  Constructs a `ResourceTemplateDataSource` with the specified class resource as template data.

  Parameters:
    `resource` - - the name of the class resource to load template data from
    `classLoader` - - the class loader to load resources from

### ResourceTemplateDataSource

    public ResourceTemplateDataSource(java.lang.String resource)

  Constructs a `ResourceTemplateDataSource` using the named class resource as template data.

  Parameters:
    `resource` - - the name of the class resource to load template data from

### ResourceTemplateDataSource

    public ResourceTemplateDataSource()

  Constructs a `ResourceTemplateDataSource` with no template resousrce.

Method Detail

### getCanonicalName

    public java.lang.String getCanonicalName()

  Description copied from interface: `TemplateDataSource`
  Returns a canonical name of this `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.

  Returns:
    a unique name of the `TemplateDataSource`
  See Also:
    `TemplateDataSource.getCanonicalName()`

### getInputStream

    public java.io.InputStream getInputStream()
                                       throws java.io.IOException

  Description copied from interface: `TemplateDataSource`
  Gets an `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 ..

  Returns:
    a InputStream containing the template data
  Throws:
    `java.io.IOException`
  See Also:
    `TemplateDataSource.getInputStream()`

### getClassLoader

    public java.lang.ClassLoader getClassLoader()

  Returns:
    Returns the classLoader.

### setClassLoader

    public void setClassLoader(java.lang.ClassLoader classLoader)

  Parameters:
    `classLoader` - The classLoader to set.

### getResource

    public java.lang.String getResource()

  Returns:
    Returns the resource.

### setResource

    public void setResource(java.lang.String resource)

  Parameters:
    `resource` - The resource 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