01: /**
02: *
03: */package ru.emdev.EmForge.email.velocity;
04:
05: import java.io.IOException;
06:
07: import org.apache.velocity.app.VelocityEngine;
08: import org.apache.velocity.exception.VelocityException;
09:
10: import ru.emdev.EmForge.email.velocity.resourceloaders.ResourceLoader;
11:
12: /**
13: * @author alasarenko
14: *
15: */
16: public class VelocityEngineFactoryBean extends
17: org.springframework.ui.velocity.VelocityEngineFactoryBean {
18:
19: ResourceLoader resourceLoaderImpl;
20:
21: protected void postProcessVelocityEngine(
22: VelocityEngine velocityEngine) throws IOException,
23: VelocityException {
24: velocityEngine.addProperty("resourceLoaderImpl",
25: getResourceLoaderImpl());
26: }
27:
28: /**
29: * @return the resoureLoader
30: */
31: public ResourceLoader getResourceLoaderImpl() {
32: return resourceLoaderImpl;
33: }
34:
35: /**
36: * @param resoureLoader the resoureLoader to set
37: */
38: public void setResourceLoaderImpl(ResourceLoader resoureLoader) {
39: this.resourceLoaderImpl = resoureLoader;
40: }
41: }
|