@Role public interface VelocityEngine
Modifier and Type | Method and Description |
---|---|
void |
clearMacroNamespace(String namespace)
Deprecated.
since 10.5RC1, the macros are now stored in the execution context so this method does not make much
sense anymore
|
boolean |
evaluate(org.apache.velocity.context.Context context,
Writer out,
String namespace,
Reader source)
Renders the input string using the context into the output writer.
|
boolean |
evaluate(org.apache.velocity.context.Context context,
Writer out,
String namespace,
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 namespace, String source) throws XWikiVelocityException
context
- the Velocity context to use in rendering the input string, it's recommended to pass a
XWikiVelocityContext
to have retro compatibility support (like old $velocitycount binding)out
- the writer in which to render the outputnamespace
- the string to be used as the template name for log messages in case of error. Also used as
namespace for the macros. Empty string means global namespace.source
- the input string containing the VTL to be renderedXWikiVelocityException
- in case of errorboolean evaluate(org.apache.velocity.context.Context context, Writer out, String namespace, Reader source) throws XWikiVelocityException
context
- the Velocity context to use in rendering the input stringout
- the writer in which to render the outputnamespace
- the string to be used as the template name for log messages in case of error. Also used as
namespace for the macros. Empty string means global namespace.source
- the input containing the VTL to be rendered, as a ReaderXWikiVelocityException
- in case of error@Deprecated void clearMacroNamespace(String namespace)
namespace
- 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–2021 XWiki. All rights reserved.