TemplateResolver (Groovy 2.4.12)
Date: 2017-06-21

groovy.text.markup

## Interface TemplateResolver

- All Known Implementing Classes:
    MarkupTemplateEngine.CachingTemplateResolver, MarkupTemplateEngine.DefaultTemplateResolver

      public interface TemplateResolver

  Interface for template resolvers, which, given a template identifier, return an URL where the template can be loaded.
  Author:
    Cédric Champeau

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `configure(ClassLoader templateClassLoader, TemplateConfiguration configuration)` This method is called once the template engine is initialized, providing the resolver with the template engine configuration and its template class loader.
    `URL` | `resolveTemplate(String templatePath)` Resolvers must implement this method in order to resolve a template, given a template path.

- - ### Method Detail

    - #### configure

          void configure(ClassLoader templateClassLoader,
                         TemplateConfiguration configuration)

      This method is called once the template engine is initialized, providing the resolver with the template engine configuration and its template class loader.
      Parameters:
        `templateClassLoader` - the classloader where templates will be searched for
        `configuration` - the configuration of the template engine

    - #### resolveTemplate

          URL resolveTemplate(String templatePath)
                       throws IOException

      Resolvers must implement this method in order to resolve a template, given a template path. They must return a valid URL or an IOException.
      Parameters:
        `templatePath` - path to the template
      Returns:
        the template URL, that will be used to load the template
      Throws:
        `IOException`