| 1 | |
package org.webslinger.template.velocity; |
| 2 | |
|
| 3 | |
import org.apache.bsf.BSFException; |
| 4 | |
|
| 5 | |
import org.webslinger.bsf.CompilingLanguageEngineImpl; |
| 6 | |
import org.webslinger.bsf.LanguageEngineInfo; |
| 7 | |
|
| 8 | 495 | public class VelocityTemplateEngine extends CompilingLanguageEngineImpl<LocalVelocityTemplate, Class<LocalVelocityTemplate>> { |
| 9 | 25 | public VelocityTemplateEngine() throws BSFException { |
| 10 | 25 | compiler = new VelocityCompiler(this); |
| 11 | 25 | } |
| 12 | |
|
| 13 | |
public LanguageEngineInfo getLanguageEngineInfo() { |
| 14 | 0 | return VelocityTemplateInfo.INSTANCE; |
| 15 | |
} |
| 16 | |
|
| 17 | |
protected Object apply(Object body, LocalVelocityTemplate template, Object[] args) throws Throwable { |
| 18 | 495 | template.apply(getManager(), body, args); |
| 19 | 495 | return Boolean.TRUE; |
| 20 | |
} |
| 21 | |
|
| 22 | |
protected Object eval(Object body, LocalVelocityTemplate template) throws Throwable { |
| 23 | 0 | return null; |
| 24 | |
} |
| 25 | |
|
| 26 | |
protected void exec(Object body, LocalVelocityTemplate template) throws Throwable { |
| 27 | 0 | } |
| 28 | |
} |
| 29 | |
|