org.apache.velocity.runtime
Interface RuntimeServices

Interface for internal runtime services that are needed by the
various components w/in Velocity. This was taken from the old
Runtime singleton, and anything not necessary was removed.
Currently implemented by RuntimeInstance.

setConfiguration

Allow an external system to set an ExtendedProperties
object to use. This is useful where the external
system also uses the ExtendedProperties class and
the velocity configuration is a subset of
parent application's configuration. This is
the case with Turbine.

Parameters:

configuration -

addProperty

Add a property to the configuration. If it already
exists then the value stated here will be added
to the configuration entry. For example, if
resource.loader = file
is already present in the configuration and you
addProperty("resource.loader", "classpath")
Then you will end up with a Vector like the
following:
["file", "classpath"]

parse

In the event that it runs out of parsers in the
pool, it will create and let them be GC'd
dynamically, logging that it has to do that. This
is considered an exceptional condition. It is
expected that the user will set the
PARSER_POOL_SIZE property appropriately for their
application. We will revisit this.

getLoaderNameForResource

Determines is a template exists, and returns name of the loader that
provides it. This is a slightly less hokey way to support
the Velocity.templateExists() utility method, which was broken
when per-template encoding was introduced. We can revisit this.

getVelocimacro

Returns the appropriate VelocimacroProxy object if strVMname
is a valid current Velocimacro.

Parameters:

vmName - Name of velocimacro requested

templateName - Name of the namespace.

renderingTemplate - Name of the template we are currently rendering. This
information is needed when VM_PERM_ALLOW_INLINE_REPLACE_GLOBAL setting is true
and template contains a macro with the same name as the global macro library.