org.apache.velocity.test
Class EventHandlingTestCase.TestEventCartridge

java.lang.Object
  extended by org.apache.velocity.test.EventHandlingTestCase.TestEventCartridge
All Implemented Interfaces:
EventHandler, MethodExceptionEventHandler, NullSetEventHandler, ReferenceInsertionEventHandler, ContextAware, RuntimeServicesAware
Enclosing class:
EventHandlingTestCase

public static class EventHandlingTestCase.TestEventCartridge
extends Object
implements ReferenceInsertionEventHandler, NullSetEventHandler, MethodExceptionEventHandler, RuntimeServicesAware, ContextAware


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.velocity.app.event.ReferenceInsertionEventHandler
ReferenceInsertionEventHandler.referenceInsertExecutor
 
Nested classes/interfaces inherited from interface org.apache.velocity.app.event.NullSetEventHandler
NullSetEventHandler.ShouldLogOnNullSetExecutor
 
Nested classes/interfaces inherited from interface org.apache.velocity.app.event.MethodExceptionEventHandler
MethodExceptionEventHandler.MethodExceptionExecutor
 
Constructor Summary
EventHandlingTestCase.TestEventCartridge()
           
 
Method Summary
 Object methodException(Class claz, String method, Exception e)
          Handles exceptions thrown during in-template method access
 Object referenceInsert(String reference, Object value)
          Event handler for when a reference is inserted into the output stream.
 void setContext(Context context)
           
 void setRuntimeServices(RuntimeServices rs)
          Required by EventHandler
 boolean shouldLogOnNullSet(String lhs, String rhs)
          Event handler for when the right hand side of a #set() directive is null, which results in a log message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventHandlingTestCase.TestEventCartridge

public EventHandlingTestCase.TestEventCartridge()
Method Detail

setRuntimeServices

public void setRuntimeServices(RuntimeServices rs)
Required by EventHandler

Specified by:
setRuntimeServices in interface RuntimeServicesAware

referenceInsert

public Object referenceInsert(String reference,
                              Object value)
Event handler for when a reference is inserted into the output stream.

Specified by:
referenceInsert in interface ReferenceInsertionEventHandler

shouldLogOnNullSet

public boolean shouldLogOnNullSet(String lhs,
                                  String rhs)
Event handler for when the right hand side of a #set() directive is null, which results in a log message. This method gives the application a chance to 'vote' on msg generation

Specified by:
shouldLogOnNullSet in interface NullSetEventHandler

methodException

public Object methodException(Class claz,
                              String method,
                              Exception e)
                       throws Exception
Handles exceptions thrown during in-template method access

Specified by:
methodException in interface MethodExceptionEventHandler
Throws:
Exception

setContext

public void setContext(Context context)
Specified by:
setContext in interface ContextAware


Copyright © 2000-2008 The Apache Software Foundation. All Rights Reserved.