This project has retired. For details please refer to its Attic page.
WebappClassTemplateLoader (Tiles 2 2.2.2 API)

org.apache.tiles.freemarker.servlet
Class WebappClassTemplateLoader

Package class diagram package WebappClassTemplateLoader
java.lang.Object
  extended by org.apache.tiles.freemarker.servlet.WebappClassTemplateLoader
All Implemented Interfaces:
freemarker.cache.TemplateLoader

public class WebappClassTemplateLoader
extends Object
implements freemarker.cache.TemplateLoader

Delegates loading templates using a WebappTemplateLoader and, if not found, a ClassTemplateLoader. The resources are loaded from the webapp root and from the classpath root.

Since:
2.2.1
Version:
$Rev: 821407 $ $Date: 2009-10-03 22:12:01 +0200 (sab, 03 ott 2009) $

Constructor Summary
WebappClassTemplateLoader(ServletContext servletContext)
          Constructor.
 
Method Summary
 void closeTemplateSource(Object templateSource)
          
 Object findTemplateSource(String name)
          
 long getLastModified(Object templateSource)
          
 Reader getReader(Object templateSource, String encoding)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebappClassTemplateLoader

public WebappClassTemplateLoader(ServletContext servletContext)
Constructor.

Parameters:
servletContext - The servlet context.
Method Detail

findTemplateSource

public Object findTemplateSource(String name)
                          throws IOException

Specified by:
findTemplateSource in interface freemarker.cache.TemplateLoader
Throws:
IOException

closeTemplateSource

public void closeTemplateSource(Object templateSource)
                         throws IOException

Specified by:
closeTemplateSource in interface freemarker.cache.TemplateLoader
Throws:
IOException

getLastModified

public long getLastModified(Object templateSource)

Specified by:
getLastModified in interface freemarker.cache.TemplateLoader

getReader

public Reader getReader(Object templateSource,
                        String encoding)
                 throws IOException

Specified by:
getReader in interface freemarker.cache.TemplateLoader
Throws:
IOException


Copyright © 2001-2010 Apache Software Foundation. All Rights Reserved.