|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.velocity.internal.DefaultVelocityFactory
@Component @Singleton public class DefaultVelocityFactory
Default implementation for VelocityFactory.
VelocityFactory| Constructor Summary | |
|---|---|
DefaultVelocityFactory()
|
|
| Method Summary | |
|---|---|
VelocityEngine |
createVelocityEngine(java.lang.String key,
java.util.Properties properties)
Creates a new Velocity engine instance, which will be cached using a specific key for later reuse. |
VelocityEngine |
getVelocityEngine(java.lang.String key)
Retrieves from the cache the Velocity engine corresponding to a specific key, if such an engine was already created. |
boolean |
hasVelocityEngine(java.lang.String key)
Check if an engine was already created for a certain key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultVelocityFactory()
| Method Detail |
|---|
public boolean hasVelocityEngine(java.lang.String key)
hasVelocityEngine in interface VelocityFactorykey - the key under which the Velocity engine has been saved in cache. This is the key used when the
Velocity engine was created using VelocityFactory.createVelocityEngine(String, java.util.Properties)
true if there is a cached Velocity Engine matching the passed key, false
otherwise.VelocityFactory.hasVelocityEngine(String)public VelocityEngine getVelocityEngine(java.lang.String key)
getVelocityEngine in interface VelocityFactorykey - the key under which the Velocity engine has been saved in cache. This is the key used when the
Velocity engine was created using VelocityFactory.createVelocityEngine(String, java.util.Properties)
null if not foundVelocityFactory.getVelocityEngine(String)
public VelocityEngine createVelocityEngine(java.lang.String key,
java.util.Properties properties)
throws XWikiVelocityException
createVelocityEngine in interface VelocityFactorykey - the key used to cache the Velocity engine instance to returnproperties - the list of properties that will override the default properties when creating the engine. For
example it's possible to define a list of global velocimacros by passing the
RuntimeConstants.VM_LIBRARY property key.
XWikiVelocityException - if the Velocity Engine cannot be initialized for some reasonVelocityFactory.createVelocityEngine(String, Properties)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||