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

## org.codehaus.groovy.grails.support
Class ResourceAwareTemplateEngine

    java.lang.Object
      groovy.text.TemplateEngine
          org.codehaus.groovy.grails.support.ResourceAwareTemplateEngine

Direct Known Subclasses:
  GroovyPagesTemplateEngine

    public abstract class ResourceAwareTemplateEngine

extends groovy.text.TemplateEngine

An abstract TemplateEngine that extends the default Groovy TemplateEngine (@see groovy.text.TemplateEngine) and provides the ability to create templates from the Spring Resource API

Since:
  0.4

  Created: Feb 22, 2007 Time: 6:37:08 PM
Author:
  Graeme Rocher

Constructor Summary
`ResourceAwareTemplateEngine()`

Method Summary
`abstract groovy.text.Template` | `createTemplate(InputStream inputStream)` Unlike groovy.text.TemplateEngine, implementors need to provide an implementation that operates with an InputStream
`groovy.text.Template` | `createTemplate(Reader reader)`
`groovy.text.Template` | `createTemplate(Resource resource)` Creates the specified Template using the given Spring Resource

Methods inherited from class groovy.text.TemplateEngine
`createTemplate, createTemplate, createTemplate`

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

Constructor Detail

### ResourceAwareTemplateEngine

    public ResourceAwareTemplateEngine()

Method Detail

### createTemplate

    public groovy.text.Template createTemplate(Resource resource)
                                        throws IOException,
                                               ClassNotFoundException

  Creates the specified Template using the given Spring Resource

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

### createTemplate

    public final groovy.text.Template createTemplate(Reader reader)
                                              throws IOException

  Specified by:
    `createTemplate` in class `groovy.text.TemplateEngine`
  Throws:
    `IOException`

### createTemplate

    public abstract groovy.text.Template createTemplate(InputStream inputStream)
                                                 throws IOException

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

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

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

Copyright (c) 2005-2009 The Grails project