All Downloads are FREE. Search and download functionalities are using the official Maven repository.

panda.tpl.ftl.DelegateTemplateLoader Maven / Gradle / Ivy

Go to download

Panda Core is the core module of Panda Framework, it contains commonly used utility classes similar to apache-commons.

There is a newer version: 1.8.0
Show newest version
package panda.tpl.ftl;

import java.io.IOException;
import java.io.Reader;

import freemarker.cache.TemplateLoader;

/**
 * delegate template loader
 */
public class DelegateTemplateLoader implements TemplateLoader {

	private TemplateLoader delegate;

	/**
	 * @return the delegate
	 */
	public TemplateLoader getDelegate() {
		return delegate;
	}

	/**
	 * @param delegate the delegate to set
	 */
	public void setDelegate(TemplateLoader delegate) {
		this.delegate = delegate;
	}

	/**
	 * Constructor
	 */
	public DelegateTemplateLoader() {
	}

	/**
	 * Constructor
	 * 
	 * @param delegate delegate template loader
	 */
	public DelegateTemplateLoader(TemplateLoader delegate) {
		this.delegate = delegate;
	}

	/**
	 * @see freemarker.cache.TemplateLoader#closeTemplateSource(java.lang.Object)
	 */
	public void closeTemplateSource(Object templateSource) throws IOException {
		delegate.closeTemplateSource(templateSource);
	}

	/**
	 * @see freemarker.cache.TemplateLoader#findTemplateSource(java.lang.String)
	 */
	public Object findTemplateSource(String name) throws IOException {
		return delegate.findTemplateSource(name);
	}

	/**
	 * @see freemarker.cache.TemplateLoader#getLastModified(java.lang.Object)
	 */
	public long getLastModified(Object templateSource) {
		return delegate.getLastModified(templateSource);
	}

	/**
	 * @see freemarker.cache.TemplateLoader#getReader(java.lang.Object, java.lang.String)
	 */
	public Reader getReader(Object templateSource, String encoding) throws IOException {
		return delegate.getReader(templateSource, encoding);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy