|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface VelocityConfigurator
VelocityConfigurator
defines an interface that may be implemented and registered via service loading
to customize the configuration of the velocity template engine and context before the templates are rendered.
package my.package;
public class MyVelocityConfigurator implements VelocityConfigurator {
public void configureEngine(VelocityEngine engine) {
engine.setProperty(VM_PERM_INLINE_LOCAL, true);
...
}
...
}
Register the implementation using service loading:
META-INF/services/
org.tinyjee.maven.dim.spi.VelocityConfigurator
my.package.MyVelocityConfigurator
Field Summary | |
---|---|
static Iterable<VelocityConfigurator> |
CONFIGURATORS
Is an iterable over all configurators within the classpath. |
Method Summary | |
---|---|
void |
configureContext(Map<String,Object> requestParameters,
Context templateContext)
Is called right before a template is executed. |
void |
configureEngine(VelocityEngine engine)
Is called after applying default settings but before the engine is initialized. |
void |
configureTools(EasyFactoryConfiguration toolsConfiguration)
Is called when configuring velocity tools using EasyFactoryConfiguration . |
Field Detail |
---|
static final Iterable<VelocityConfigurator> CONFIGURATORS
Method Detail |
---|
void configureEngine(VelocityEngine engine)
engine
- an uninitialized engine that may be configured.void configureTools(EasyFactoryConfiguration toolsConfiguration)
EasyFactoryConfiguration
.
toolsConfiguration
- the instance to use for configuring tools.void configureContext(Map<String,Object> requestParameters, Context templateContext)
requestParameters
- the macro request parameters as they would also be seen by the template.templateContext
- the pre-configured template context.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |