org.webmacro.resource
Class BrokerTemplateProviderHelper

java.lang.Object
  |
  +--org.webmacro.resource.BrokerTemplateProviderHelper
All Implemented Interfaces:
ResourceLoader

public final class BrokerTemplateProviderHelper
extends java.lang.Object
implements ResourceLoader

This class does the actual work of retrieving templates using the Broker. It is called by both BrokerTemplateProvider and TemplateProvider.

Since:
0.96
Author:
Brian Goetz
See Also:
Provider, TemplateProvider, BrokerTemplateProvider

Constructor Summary
BrokerTemplateProviderHelper()
           
 
Method Summary
 void init(Broker b, Settings config)
          Create a new TemplateProvider that uses the specified directory as the source for Template objects that it will return
 java.lang.Object load(java.lang.Object query, CacheElement ce)
          We don't implement this one
 java.lang.Object load(java.lang.String name, CacheElement ce)
          Grab a template based on its name.
 void setReload(boolean reload)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrokerTemplateProviderHelper

public BrokerTemplateProviderHelper()
Method Detail

init

public void init(Broker b,
                 Settings config)
          throws InitException
Create a new TemplateProvider that uses the specified directory as the source for Template objects that it will return
Specified by:
init in interface ResourceLoader
Throws:
ResourceInitException - provider failed to initialize

load

public final java.lang.Object load(java.lang.String name,
                                   CacheElement ce)
                            throws ResourceException
Grab a template based on its name.
Specified by:
load in interface ResourceLoader

load

public java.lang.Object load(java.lang.Object query,
                             CacheElement ce)
                      throws ResourceException
We don't implement this one
Specified by:
load in interface ResourceLoader

setReload

public void setReload(boolean reload)