org.apache.velocity.test.eventhandler
Class Handler2

java.lang.Object
  extended by org.apache.velocity.test.eventhandler.Handler2
All Implemented Interfaces:
EventHandler, IncludeEventHandler, MethodExceptionEventHandler, NullSetEventHandler, ReferenceInsertionEventHandler

public class Handler2
extends Object
implements NullSetEventHandler, ReferenceInsertionEventHandler, MethodExceptionEventHandler, IncludeEventHandler

This is a test set of event handlers, used to test event handler sequences.

Version:
$Id: Handler2.java 463298 2006-10-12 16:10:32Z henning $
Author:
Will Glass-Husain

Nested Class Summary
 
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.ReferenceInsertionEventHandler
ReferenceInsertionEventHandler.referenceInsertExecutor
 
Nested classes/interfaces inherited from interface org.apache.velocity.app.event.MethodExceptionEventHandler
MethodExceptionEventHandler.MethodExceptionExecutor
 
Nested classes/interfaces inherited from interface org.apache.velocity.app.event.IncludeEventHandler
IncludeEventHandler.IncludeEventExecutor
 
Constructor Summary
Handler2()
           
 
Method Summary
 String includeEvent(String includeResourcePath, String currentResourcePath, String directiveName)
           
 Object methodException(Class claz, String method, Exception e)
          print the exception
 Object referenceInsert(String reference, Object value)
          convert output to upper case
 boolean shouldLogOnNullSet(String lhs, String rhs)
          always log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Handler2

public Handler2()
Method Detail

shouldLogOnNullSet

public boolean shouldLogOnNullSet(String lhs,
                                  String rhs)
always log

Specified by:
shouldLogOnNullSet in interface NullSetEventHandler

referenceInsert

public Object referenceInsert(String reference,
                              Object value)
convert output to upper case

Specified by:
referenceInsert in interface ReferenceInsertionEventHandler

methodException

public Object methodException(Class claz,
                              String method,
                              Exception e)
                       throws Exception
print the exception

Specified by:
methodException in interface MethodExceptionEventHandler
Throws:
Exception

includeEvent

public String includeEvent(String includeResourcePath,
                           String currentResourcePath,
                           String directiveName)
Specified by:
includeEvent in interface IncludeEventHandler


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