org.apache.velocity.test
Class EventHandlingTestCase.TestEventCartridge

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

public static class EventHandlingTestCase.TestEventCartridge
extends Object
implements org.apache.velocity.app.event.ReferenceInsertionEventHandler, org.apache.velocity.app.event.NullSetEventHandler, org.apache.velocity.app.event.MethodExceptionEventHandler, org.apache.velocity.util.RuntimeServicesAware, org.apache.velocity.util.ContextAware


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.velocity.app.event.ReferenceInsertionEventHandler
org.apache.velocity.app.event.ReferenceInsertionEventHandler.referenceInsertExecutor
 
Nested classes/interfaces inherited from interface org.apache.velocity.app.event.NullSetEventHandler
org.apache.velocity.app.event.NullSetEventHandler.ShouldLogOnNullSetExecutor
 
Nested classes/interfaces inherited from interface org.apache.velocity.app.event.MethodExceptionEventHandler
org.apache.velocity.app.event.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(org.apache.velocity.context.Context context)
           
 void setRuntimeServices(org.apache.velocity.runtime.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(org.apache.velocity.runtime.RuntimeServices rs)
Required by EventHandler

Specified by:
setRuntimeServices in interface org.apache.velocity.util.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 org.apache.velocity.app.event.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 org.apache.velocity.app.event.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 org.apache.velocity.app.event.MethodExceptionEventHandler
Throws:
Exception

setContext

public void setContext(org.apache.velocity.context.Context context)
Specified by:
setContext in interface org.apache.velocity.util.ContextAware


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