|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.velocity.internal.DefaultVelocityEngine
@Component @InstantiationStrategy(value=PER_LOOKUP) public class DefaultVelocityEngine
Default implementation of the Velocity service which initializes the Velocity system using configuration values
defined in the component's configuration. Note that the initialize(java.util.Properties) method has to be executed before any
other method can be called.
| Field Summary |
|---|
| Fields inherited from interface org.apache.velocity.runtime.log.LogChute |
|---|
DEBUG_ID, DEBUG_PREFIX, ERROR_ID, ERROR_PREFIX, INFO_ID, INFO_PREFIX, TRACE_ID, TRACE_PREFIX, WARN_ID, WARN_PREFIX |
| Constructor Summary | |
|---|---|
DefaultVelocityEngine()
|
|
| Method Summary | |
|---|---|
void |
clearMacroNamespace(java.lang.String templateName)
Clear the internal Velocity Macro cache for the passed namespace. |
boolean |
evaluate(org.apache.velocity.context.Context context,
java.io.Writer out,
java.lang.String templateName,
java.io.Reader source)
Renders the input string using the context into the output writer. |
boolean |
evaluate(org.apache.velocity.context.Context context,
java.io.Writer out,
java.lang.String templateName,
java.lang.String source)
Renders the input string using the context into the output writer. |
void |
init(org.apache.velocity.runtime.RuntimeServices runtimeServices)
|
void |
initialize(java.util.Properties overridingProperties)
Initializes the Velocity engine by setting its configuration both from the component's configuration and from the passed properties. |
boolean |
isLevelEnabled(int level)
|
void |
log(int level,
java.lang.String message)
|
void |
log(int level,
java.lang.String message,
java.lang.Throwable throwable)
|
void |
startedUsingMacroNamespace(java.lang.String namespace)
Notify that a rendering action is starting in the given namespace. |
void |
stoppedUsingMacroNamespace(java.lang.String namespace)
Notify that a rendering action in the given namespace just finished. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultVelocityEngine()
| Method Detail |
|---|
public void initialize(java.util.Properties overridingProperties)
throws XWikiVelocityException
initialize in interface VelocityEngineoverridingProperties - the properties that will override the static properties defined in the component's
configuration
XWikiVelocityException - in case of errorVelocityEngine.initialize(Properties)
public boolean evaluate(org.apache.velocity.context.Context context,
java.io.Writer out,
java.lang.String templateName,
java.lang.String source)
throws XWikiVelocityException
evaluate in interface VelocityEnginecontext - 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 errorsource - the input string containing the VTL to be rendered
XWikiVelocityException - in case of errorVelocityEngine.evaluate(Context, java.io.Writer, String, String)
public boolean evaluate(org.apache.velocity.context.Context context,
java.io.Writer out,
java.lang.String templateName,
java.io.Reader source)
throws XWikiVelocityException
evaluate in interface VelocityEnginecontext - 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 errorsource - the input containing the VTL to be rendered, as a Reader
XWikiVelocityException - in case of errorVelocityEngine.evaluate(Context, java.io.Writer, String, String),
init(RuntimeServices)public void clearMacroNamespace(java.lang.String templateName)
clearMacroNamespace in interface VelocityEnginetemplateName - the namespace for which to remove all cached Velocity macrosVelocityEngine.clearMacroNamespace(String)public void startedUsingMacroNamespace(java.lang.String namespace)
startedUsingMacroNamespace in interface VelocityEnginenamespace - the namespace being usedVelocityEngine.startedUsingMacroNamespace(String)public void stoppedUsingMacroNamespace(java.lang.String namespace)
stoppedUsingMacroNamespace in interface VelocityEnginenamespace - the namespace which was usedVelocityEngine.stoppedUsingMacroNamespace(String)public void init(org.apache.velocity.runtime.RuntimeServices runtimeServices)
init in interface org.apache.velocity.runtime.log.LogChuteLogChute.init(org.apache.velocity.runtime.RuntimeServices)
public void log(int level,
java.lang.String message)
log in interface org.apache.velocity.runtime.log.LogChuteLogChute.log(int, String)
public void log(int level,
java.lang.String message,
java.lang.Throwable throwable)
log in interface org.apache.velocity.runtime.log.LogChuteLogChute.log(int, String, Throwable)public boolean isLevelEnabled(int level)
isLevelEnabled in interface org.apache.velocity.runtime.log.LogChuteLogChute.isLevelEnabled(int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||