@Role public interface VelocityFactory
Modifier and Type | Method and Description |
---|---|
VelocityEngine |
createVelocityEngine(String key,
Properties properties)
Creates a new Velocity engine instance, which will be cached using a specific key for later reuse.
|
VelocityEngine |
getVelocityEngine(String key)
Retrieves from the cache the Velocity engine corresponding to a specific key, if such an engine was already
created.
|
boolean |
hasVelocityEngine(String key)
Check if an engine was already created for a certain key.
|
VelocityEngine |
removeVelocityEngine(String key)
Remove from the cache a Velocity engine corresponding to a specific key, if such an engine was already created.
|
boolean hasVelocityEngine(String key)
key
- the key under which the Velocity engine has been saved in cache. This is the key used when the
Velocity engine was created using createVelocityEngine(String, java.util.Properties)
true
if there is a cached Velocity Engine matching the passed key, false
otherwise.VelocityEngine getVelocityEngine(String key)
key
- the key under which the Velocity engine has been saved in cache. This is the key used when the
Velocity engine was created using createVelocityEngine(String, java.util.Properties)
null
if not foundVelocityEngine createVelocityEngine(String key, Properties properties) throws XWikiVelocityException
key
- 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.XWikiVelocityException
- if the Velocity Engine cannot be initialized for some reasonVelocityEngine removeVelocityEngine(String key)
key
- the key under which the Velocity engine has been saved in cache. This is the key used when the
Velocity engine was created using createVelocityEngine(String, java.util.Properties)
null
if not foundCopyright © 2004–2021 XWiki. All rights reserved.