org.apache.velocity.app.event
クラス EventCartridge

java.lang.Object
  拡張org.apache.velocity.app.event.EventCartridge
すべての実装インタフェース:
EventHandler, MethodExceptionEventHandler, NullSetEventHandler, ReferenceInsertionEventHandler

public class EventCartridge
extends java.lang.Object
implements ReferenceInsertionEventHandler, NullSetEventHandler, MethodExceptionEventHandler

'Package' of event handlers...

バージョン:
$Id: EventCartridge.java,v 1.2 2001/05/20 21:09:04 geirm Exp $
作成者:
Geir Magnusson Jr., Jose Alberto Fernandez

フィールドの概要
private  MethodExceptionEventHandler meeh
           
private  NullSetEventHandler nseh
           
private  ReferenceInsertionEventHandler rieh
           
 
コンストラクタの概要
EventCartridge()
           
 
メソッドの概要
 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().
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

rieh

private ReferenceInsertionEventHandler rieh

nseh

private NullSetEventHandler nseh

meeh

private MethodExceptionEventHandler meeh
コンストラクタの詳細

EventCartridge

public EventCartridge()
メソッドの詳細

addEventHandler

public boolean addEventHandler(EventHandler ev)
Adds an event handler(s) to the Cartridge. This method will find all possible event handler interfaces supported by the passed in object.

パラメータ:
ev - object impementing a valid EventHandler-derived interface
戻り値:
true if a supported interface, false otherwise or if null

removeEventHandler

public boolean removeEventHandler(EventHandler ev)
Removes an event handler(s) from the Cartridge. This method will find all possible event handler interfaces supported by the passed in object and remove them.

パラメータ:
ev - object impementing a valid EventHandler-derived interface
戻り値:
true if a supported interface, false otherwise or if null

referenceInsert

public java.lang.Object referenceInsert(java.lang.String reference,
                                        java.lang.Object value)
Implementation of ReferenceInsertionEventHandler method referenceInsert(). Called during Velocity merge before a reference value will be inserted into the output stream.

定義:
インタフェース ReferenceInsertionEventHandler 内の referenceInsert
パラメータ:
reference - reference from template about to be inserted
value - value about to be inserted (after toString() )
戻り値:
Object on which toString() should be called for output.

shouldLogOnNullSet

public boolean shouldLogOnNullSet(java.lang.String lhs,
                                  java.lang.String rhs)
Implementation of NullSetEventHandler method shouldLogOnNullSet(). Called during Velocity merge to determine if when a #set() results in a null assignment, a warning is logged.

定義:
インタフェース NullSetEventHandler 内の shouldLogOnNullSet
パラメータ:
lhs - reference literal of left-hand-side of set statement
rhs - reference literal of right-hand-side of set statement
戻り値:
true if to be logged, false otherwise

methodException

public java.lang.Object methodException(java.lang.Class claz,
                                        java.lang.String method,
                                        java.lang.Exception e)
                                 throws java.lang.Exception
Implementation of MethodExceptionEventHandler method methodException(). Called during Velocity merge if a reference is null

定義:
インタフェース MethodExceptionEventHandler 内の methodException
パラメータ:
claz - Class that is causing the exception
method - method called that causes the exception
e - Exception thrown by the method
戻り値:
Object to return as method result
例外:
exception - to be wrapped and propogated to app
java.lang.Exception

attachToContext

public final boolean attachToContext(Context context)
Attached the EventCartridge to the context Final because not something one should mess with lightly :)

パラメータ:
context - context to attach to
戻り値:
true if successful, false otherwise


Copyright © 2003 Apache Software Foundation. All Rights Reserved.