You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Jon Stevens <jo...@latchkey.com> on 2001/12/02 21:09:14 UTC
Re: cvs commit:
jakarta-turbine-fulcrum/src/services/java/org/apache/fulcrum/velocity
TurbineVelocityService.java
Because it only needs to be initialized once since it gets all of its data
from the TR.props and would stick around. I guess it doesn't need to be
static since this is a singleton.
-jon
on 11/29/01 2:01 PM, "Daniel Rall" <dl...@finemaltcoding.com> wrote:
> Why is the EventCartridge member static?
>
> jon@apache.org writes:
>
>> jon 01/11/28 16:35:58
>>
>> Modified: src/services/java/org/apache/fulcrum/velocity
>> TurbineVelocityService.java
>> Log:
>> Added support for configuration and initilization of Velocity
>> EventCartridges. It is actually a pretty minor patch which is nice and
>> configuration is quite easy.
>>
>> -jon
>>
>> Revision Changes Path
>> 1.8 +81 -5
>> jakarta-turbine-fulcrum/src/services/java/org/apache/fulcrum/velocity/Turbine
>> VelocityService.java
>>
>> Index: TurbineVelocityService.java
>> ===================================================================
>> RCS file:
>> /home/cvs/jakarta-turbine-fulcrum/src/services/java/org/apache/fulcrum/veloci
>> ty/TurbineVelocityService.java,v
>> retrieving revision 1.7
>> retrieving revision 1.8
>> diff -u -r1.7 -r1.8
>> --- TurbineVelocityService.java 2001/08/16 05:41:42 1.7
>> +++ TurbineVelocityService.java 2001/11/29 00:35:58 1.8
>> @@ -56,6 +56,7 @@
>>
>> import java.util.Vector;
>> import java.util.Iterator;
>> +import java.util.Enumeration;
>> import java.io.IOException;
>> import java.io.OutputStream;
>> import java.io.OutputStreamWriter;
>> @@ -63,6 +64,10 @@
>> import org.apache.velocity.Template;
>> import org.apache.velocity.VelocityContext;
>> import org.apache.velocity.app.Velocity;
>> +import org.apache.velocity.app.event.EventCartridge;
>> +import org.apache.velocity.app.event.ReferenceInsertionEventHandler;
>> +import org.apache.velocity.app.event.NullSetEventHandler;
>> +import org.apache.velocity.app.event.MethodExceptionEventHandler;
>> import org.apache.velocity.context.Context;
>> import org.apache.velocity.exception.MethodInvocationException;
>> import org.apache.fulcrum.ServiceException;
>> @@ -91,7 +96,8 @@
>> * @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
>> * @author <a href="mailto:sean@informage.ent">Sean Legassick</a>
>> * @author <a href="mailto:dlr@finemaltcoding.com">Daniel Rall</a>
>> - * @version $Id: TurbineVelocityService.java,v 1.7 2001/08/16 05:41:42 jon
>> Exp $
>> + * @author <a href="mailto:jon@latchkey.com">Jon S. Stevens</a>
>> + * @version $Id: TurbineVelocityService.java,v 1.8 2001/11/29 00:35:58 jon
>> Exp $
>> */
>> public class TurbineVelocityService
>> extends BaseTemplateEngineService
>> @@ -119,6 +125,11 @@
>> private static final String ABSOLUTE_PREFIX = "file://";
>>
>> /**
>> + * The EventCartridge that is used against all contexts
>> + */
>> + private static EventCartridge eventCartridge;
>> +
>> + /**
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>