org.springframework.ui.freemarker
Class SpringTemplateLoader
java.lang.Object
   org.springframework.ui.freemarker.SpringTemplateLoader
org.springframework.ui.freemarker.SpringTemplateLoader
- All Implemented Interfaces: 
- TemplateLoader
- public class SpringTemplateLoader 
- extends Object- implements TemplateLoader
FreeMarker TemplateLoader adapter that loads via a Spring ResourceLoader.
 Used by FreeMarkerConfigurationFactory for any resource loader path that
 cannot be resolved to a java.io.File.
 
Note that this loader does not allow for modification detection:
 Use FreeMarker's default TemplateLoader for java.io.File resources.
- Since:
- 14.03.2004
- Author:
- Juergen Hoeller
- See Also:
- FreeMarkerConfigurationFactory.setTemplateLoaderPath(java.lang.String),- Configuration.setDirectoryForTemplateLoading(java.io.File)
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
logger
protected final Log logger
SpringTemplateLoader
public SpringTemplateLoader(ResourceLoader resourceLoader,
                            String templateLoaderPath)
- Create a new SpringTemplateLoader.
 
- Parameters:
- resourceLoader- the Spring ResourceLoader to use
- templateLoaderPath- the template loader path to use
 
findTemplateSource
public Object findTemplateSource(String name)
                          throws IOException
- 
- Specified by:
- findTemplateSourcein interface- TemplateLoader
 
- 
- Throws:
- IOException
 
getReader
public Reader getReader(Object templateSource,
                        String encoding)
                 throws IOException
- 
- Specified by:
- getReaderin interface- TemplateLoader
 
- 
- Throws:
- IOException
 
getLastModified
public long getLastModified(Object templateSource)
- 
- Specified by:
- getLastModifiedin interface- TemplateLoader
 
- 
 
closeTemplateSource
public void closeTemplateSource(Object templateSource)
                         throws IOException
- 
- Specified by:
- closeTemplateSourcein interface- TemplateLoader
 
- 
- Throws:
- IOException
 
Copyright © 2002-2008 The Spring Framework.