[
https://issues.apache.org/jira/browse/VELOCITY-189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Henning Schmiedehausen closed VELOCITY-189.
-------------------------------------------
> Provide access to the underlying RuntimeInstance instance of
> Velocity/VelocityEngine class
> ------------------------------------------------------------------------------------------
>
> Key: VELOCITY-189
> URL: https://issues.apache.org/jira/browse/VELOCITY-189
> Project: Velocity
> Issue Type: Improvement
> Components: Engine
> Affects Versions: 1.3.1
> Environment: Operating System: All
> Platform: All
> Reporter: Dan Kokotov
> Priority: Minor
>
> It would be nice to be able to access the underlying VelocityEngine instance
> to
> which the Velocity facade class delegates. That way i can have logic that
> either
> uses a default application-wide velocity config or a specific one, i.e.
> public class AppConfig {
> public void init (...) {
> // init app-wide velocity
> Velocity.init (..);
> }
> }
> public class Foo {
> private VelocityEngine m_engine;
> public void init (String velConfigFile, ...) {
> ..
> if (velConfigFile != null) {
> m_engine = new VelocityEngine ();
> m_engine.init (velConfigFile);
> } else {
> m_engine = Velocity.getEngine ();
> }
> }
> // other methods use m_engine
> }
> As it is now, to do something like this you'd have to have everywhere you use
> velocity the logic of
> if (haveOwnConfig) {
> my_engine.merge (..);
> } else {
> Velocity.merge (..);
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]