org.peaseplate.resolver
Interface Resolver

All Known Implementing Classes:
AbstractFileBasedResolver, ClassLoaderResolver, FileResolver

public interface Resolver

A resolver works on some specified source, like a file system or a class loader. It looks for the raw template data and messages. If it found some data it creates a TemplateLocator or a MessagesLocator that describes how the data can be loaded.


Method Summary
 MessagesLocator resolveMessages(TemplateEngine engine, ResourceKey key)
          Resolves the specified messages and returns a MessagesLocator if found or null otherwise
 TemplateLocator resolveTemplate(TemplateEngine engine, ResourceKey key)
          Resolves the specified template and returns a TemplateLocator if found or null otherwise.
 

Method Detail

resolveTemplate

TemplateLocator resolveTemplate(TemplateEngine engine,
                                ResourceKey key)
                                throws TemplateException
Resolves the specified template and returns a TemplateLocator if found or null otherwise.

Parameters:
engine - the Pease Plate engine
key - the key
Returns:
the template locator or null if not found
Throws:
TemplateException - on occasion

resolveMessages

MessagesLocator resolveMessages(TemplateEngine engine,
                                ResourceKey key)
                                throws TemplateException
Resolves the specified messages and returns a MessagesLocator if found or null otherwise

Parameters:
engine - the Pease Plate engine
key - the key
Returns:
the messages locator or null if not found
Throws:
TemplateException - on occasion


Copyright © 2008. All Rights Reserved.