|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.velocity.app.event.EventCartridge
'Package' of event handlers...
Field Summary | |
---|---|
private MethodExceptionEventHandler |
meeh
|
private NullSetEventHandler |
nseh
|
private ReferenceInsertionEventHandler |
rieh
|
Constructor Summary | |
---|---|
EventCartridge()
|
Method Summary | |
---|---|
boolean |
addEventHandler(EventHandler ev)
Adds an event handler(s) to the Cartridge. |
boolean |
attachToContext(Context context)
Attached the EventCartridge to the context Final because not something one should mess with lightly :) |
java.lang.Object |
methodException(java.lang.Class claz,
java.lang.String method,
java.lang.Exception e)
Implementation of MethodExceptionEventHandler method methodException() . |
java.lang.Object |
referenceInsert(java.lang.String reference,
java.lang.Object value)
Implementation of ReferenceInsertionEventHandler method referenceInsert() . |
boolean |
removeEventHandler(EventHandler ev)
Removes an event handler(s) from the Cartridge. |
boolean |
shouldLogOnNullSet(java.lang.String lhs,
java.lang.String rhs)
Implementation of NullSetEventHandler method shouldLogOnNullSet() . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private ReferenceInsertionEventHandler rieh
private NullSetEventHandler nseh
private MethodExceptionEventHandler meeh
Constructor Detail |
public EventCartridge()
Method Detail |
public boolean addEventHandler(EventHandler ev)
ev
- object impementing a valid EventHandler-derived interface
public boolean removeEventHandler(EventHandler ev)
ev
- object impementing a valid EventHandler-derived interface
public java.lang.Object referenceInsert(java.lang.String reference, java.lang.Object value)
referenceInsert()
.
Called during Velocity merge before a reference value will
be inserted into the output stream.
referenceInsert
in interface ReferenceInsertionEventHandler
reference
- reference from template about to be insertedvalue
- value about to be inserted (after toString() )
public boolean shouldLogOnNullSet(java.lang.String lhs, java.lang.String rhs)
shouldLogOnNullSet()
.
Called during Velocity merge to determine if when
a #set() results in a null assignment, a warning
is logged.
shouldLogOnNullSet
in interface NullSetEventHandler
lhs
- reference literal of left-hand-side of set statementrhs
- reference literal of right-hand-side of set statement
public java.lang.Object methodException(java.lang.Class claz, java.lang.String method, java.lang.Exception e) throws java.lang.Exception
methodException()
.
Called during Velocity merge if a reference is null
methodException
in interface MethodExceptionEventHandler
claz
- Class that is causing the exceptionmethod
- method called that causes the exceptione
- Exception thrown by the method
exception
- to be wrapped and propogated to app
java.lang.Exception
public final boolean attachToContext(Context context)
context
- context to attach to
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |