@Role public interface VelocityEngine
| Modifier and Type | Method and Description |
|---|---|
void |
clearMacroNamespace(String templateName)
Clear the internal Velocity Macro cache for the passed namespace.
|
boolean |
evaluate(org.apache.velocity.context.Context context,
Writer out,
String templateName,
Reader source)
Renders the input string using the context into the output writer.
|
boolean |
evaluate(org.apache.velocity.context.Context context,
Writer out,
String templateName,
String source)
Renders the input string using the context into the output writer.
|
void |
initialize(Properties properties)
Initializes the Velocity engine by setting its configuration both from the component's configuration and from the
passed properties.
|
void |
startedUsingMacroNamespace(String namespace)
Notify that a rendering action is starting in the given namespace.
|
void |
stoppedUsingMacroNamespace(String namespace)
Notify that a rendering action in the given namespace just finished.
|
void initialize(Properties properties) throws XWikiVelocityException
properties - the properties that will override the static properties defined in the component's
configurationXWikiVelocityException - in case of errorboolean evaluate(org.apache.velocity.context.Context context,
Writer out,
String templateName,
String source)
throws XWikiVelocityException
context - the Velocity context to use in rendering the input stringout - the writer in which to render the outputtemplateName - the string to be used as the template name for log messages in case of error. Also used
internally by Velocity as a cache index key for caching macros.source - the input string containing the VTL to be renderedXWikiVelocityException - in case of errorboolean evaluate(org.apache.velocity.context.Context context,
Writer out,
String templateName,
Reader source)
throws XWikiVelocityException
context - the Velocity context to use in rendering the input stringout - the writer in which to render the outputtemplateName - the string to be used as the template name for log messages in case of error. Also used
internally by Velocity as a cache index key for caching macros.source - the input containing the VTL to be rendered, as a ReaderXWikiVelocityException - in case of errorvoid clearMacroNamespace(String templateName)
templateName - the namespace for which to remove all cached Velocity macrosvoid startedUsingMacroNamespace(String namespace)
namespace - the namespace being usedvoid stoppedUsingMacroNamespace(String namespace)
namespace - the namespace which was usedCopyright © 2004–2014 XWiki. All rights reserved.