Package: org.codehaus.groovy.grails.support

## [Java] Class ResourceAwareTemplateEngine

- org.codehaus.groovy.grails.support.ResourceAwareTemplateEngine

- An abstract TemplateEngine that extends the default Groovy TemplateEngine (

  Authors:
    Graeme Rocher
  See Also:
    groovy.text.TemplateEngine
  Since:
    0.4

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static java.lang.String` | `BEAN_ID` |

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `groovy.text.Template` | `createTemplate(org.springframework.core.io.Resource resource)` Creates the specified Template using the given Spring Resource
    `groovy.text.Template` | `createTemplate(org.springframework.core.io.Resource resource, boolean cacheable)` Creates the specified Template using the given Spring Resource
    `groovy.text.Template` | `createTemplate(java.io.Reader reader)`
    `groovy.text.Template` | `createTemplate(java.io.InputStream inputStream)` Unlike groovy.text.TemplateEngine, implementors need to provide an implementation that operates with an InputStream
    `groovy.text.Template` | `createTemplate(java.lang.String templateText)`
    `groovy.text.Template` | `createTemplate(java.io.File file)`
    `groovy.text.Template` | `createTemplate(java.net.URL url)`
    `groovy.text.Template` | `createTemplateForUri(java.lang.String[] uris)`
    `int` | `mapStackLineNumber(java.lang.String url, int lineNumber)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class groovy.text.TemplateEngine` | `groovy.text.TemplateEngine#createTemplate(java.net.URL), groovy.text.TemplateEngine#createTemplate(java.io.File), groovy.text.TemplateEngine#createTemplate(java.lang.String), groovy.text.TemplateEngine#createTemplate(java.io.Reader), groovy.text.TemplateEngine#wait(long, int), groovy.text.TemplateEngine#wait(long), groovy.text.TemplateEngine#wait(), groovy.text.TemplateEngine#equals(java.lang.Object), groovy.text.TemplateEngine#toString(), groovy.text.TemplateEngine#hashCode(), groovy.text.TemplateEngine#getClass(), groovy.text.TemplateEngine#notify(), groovy.text.TemplateEngine#notifyAll()`
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Field Detail

    - #### public static final java.lang.String BEAN_ID

  - ### Method Detail

    - #### public groovy.text.Template createTemplate(org.springframework.core.io.Resource resource)

      Creates the specified Template using the given Spring Resource

      throws:
        IOException Thrown when there was an error reading the Template
      throws:
        ClassNotFoundException Thrown when there was a problem loading the Template into a class
      Parameters:
        `resource` - The Spring Resource to create the template for
      Returns:
        A Template instance

    - #### public groovy.text.Template createTemplate(org.springframework.core.io.Resource resource, boolean cacheable)

      Creates the specified Template using the given Spring Resource

      throws:
        IOException Thrown when there was an error reading the Template
      throws:
        ClassNotFoundException Thrown when there was a problem loading the Template into a class
      Parameters:
        `resource` - The Spring Resource to create the template for
        `cacheable` - Whether the resource can be cached
      Returns:
        A Template instance

    - #### @java.lang.Override public final groovy.text.Template createTemplate(java.io.Reader reader)

    - #### public groovy.text.Template createTemplate(java.io.InputStream inputStream)

      Unlike groovy.text.TemplateEngine, implementors need to provide an implementation that operates with an InputStream

      throws:
        IOException Thrown when an IO error occurs reading the stream
      Parameters:
        `inputStream` - The InputStream
      Returns:
        A Template instance

    - #### @java.lang.Override public groovy.text.Template createTemplate(java.lang.String templateText)

    - #### @java.lang.Override public groovy.text.Template createTemplate(java.io.File file)

    - #### @java.lang.Override public groovy.text.Template createTemplate(java.net.URL url)

    - #### public groovy.text.Template createTemplateForUri(java.lang.String[] uris)

    - #### public int mapStackLineNumber(java.lang.String url, int lineNumber)