Java Doc for EventCartridge.java in  » Template-Engine » Velocity » org » apache » velocity » app » event » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Template Engine » Velocity » org.apache.velocity.app.event 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.velocity.app.event.EventCartridge

EventCartridge
public class EventCartridge (Code)
Stores the event handlers. Event handlers can be assigned on a per VelocityEngine instance basis by specifying the class names in the velocity.properties file. Event handlers may also be assigned on a per-page basis by creating a new instance of EventCartridge, adding the event handlers, and then calling attachToContext. For clarity, it's recommended that one approach or the other be followed, as the second method is primarily presented for backwards compatibility.

Note that Event Handlers follow a filter pattern, with multiple event handlers allowed for each event. When the appropriate event occurs, all the appropriate event handlers are called in the sequence they were added to the Event Cartridge. See the javadocs of the specific event handler interfaces for more details.
author:
   Will Glass-Husain
author:
   Geir Magnusson Jr.
author:
   Jose Alberto Fernandez
version:
   $Id: EventCartridge.java 470256 2006-11-02 07:20:36Z wglass $



Field Summary
 SetinitializedHandlers
     Ensure that handlers are not initialized more than once.


Method Summary
public  booleanaddEventHandler(EventHandler ev)
     Adds an event handler(s) to the Cartridge.
public  voidaddIncludeEventHandler(IncludeEventHandler ev)
     Add an include event handler to the Cartridge.
public  voidaddInvalidReferenceEventHandler(InvalidReferenceEventHandler ev)
     Add an invalid reference event handler to the Cartridge.
public  voidaddMethodExceptionHandler(MethodExceptionEventHandler ev)
     Add a method exception event handler to the Cartridge.
public  voidaddNullSetEventHandler(NullSetEventHandler ev)
     Add a null set event handler to the Cartridge.
public  voidaddReferenceInsertionEventHandler(ReferenceInsertionEventHandler ev)
     Add a reference insertion event handler to the Cartridge.
final public  booleanattachToContext(Context context)
    
public  IteratorgetIncludeEventHandlers()
    
public  IteratorgetInvalidReferenceEventHandlers()
    
public  IteratorgetMethodExceptionEventHandlers()
    
public  IteratorgetNullSetEventHandlers()
    
public  IteratorgetReferenceInsertionEventHandlers()
    
public  voidinitialize(RuntimeServices rs)
     Initialize the handlers.
public  booleanremoveEventHandler(EventHandler ev)
     Removes an event handler(s) from the Cartridge.

Field Detail
initializedHandlers
Set initializedHandlers(Code)
Ensure that handlers are not initialized more than once.





Method Detail
addEventHandler
public boolean addEventHandler(EventHandler ev)(Code)
Adds an event handler(s) to the Cartridge. This method will find all possible event handler interfaces supported by the passed in object.
Parameters:
  ev - object impementing a valid EventHandler-derived interface true if a supported interface, false otherwise or if null



addIncludeEventHandler
public void addIncludeEventHandler(IncludeEventHandler ev)(Code)
Add an include event handler to the Cartridge.
Parameters:
  ev - IncludeEventHandler



addInvalidReferenceEventHandler
public void addInvalidReferenceEventHandler(InvalidReferenceEventHandler ev)(Code)
Add an invalid reference event handler to the Cartridge.
Parameters:
  ev - InvalidReferenceEventHandler



addMethodExceptionHandler
public void addMethodExceptionHandler(MethodExceptionEventHandler ev)(Code)
Add a method exception event handler to the Cartridge.
Parameters:
  ev - MethodExceptionEventHandler



addNullSetEventHandler
public void addNullSetEventHandler(NullSetEventHandler ev)(Code)
Add a null set event handler to the Cartridge.
Parameters:
  ev - NullSetEventHandler



addReferenceInsertionEventHandler
public void addReferenceInsertionEventHandler(ReferenceInsertionEventHandler ev)(Code)
Add a reference insertion event handler to the Cartridge.
Parameters:
  ev - ReferenceInsertionEventHandler



attachToContext
final public boolean attachToContext(Context context)(Code)
Attached the EventCartridge to the context Final because not something one should mess with lightly :)
Parameters:
  context - context to attach to true if successful, false otherwise



getIncludeEventHandlers
public Iterator getIncludeEventHandlers()(Code)
Iterate through all the stored IncludeEventHandlers objects iterator of handler objects



getInvalidReferenceEventHandlers
public Iterator getInvalidReferenceEventHandlers()(Code)
Iterate through all the stored InvalidReferenceEventHandlers objects iterator of handler objects



getMethodExceptionEventHandlers
public Iterator getMethodExceptionEventHandlers()(Code)
Iterate through all the stored MethodExceptionEventHandler objects iterator of handler objects



getNullSetEventHandlers
public Iterator getNullSetEventHandlers()(Code)
Iterate through all the stored NullSetEventHandler objects iterator of handler objects



getReferenceInsertionEventHandlers
public Iterator getReferenceInsertionEventHandlers()(Code)
Iterate through all the stored ReferenceInsertionEventHandler objects iterator of handler objects



initialize
public void initialize(RuntimeServices rs) throws Exception(Code)
Initialize the handlers. For global handlers this is called when Velocity is initialized. For local handlers this is called when the first handler is executed. Handlers will not be initialized more than once.
Parameters:
  rs -
throws:
  Exception -



removeEventHandler
public boolean removeEventHandler(EventHandler ev)(Code)
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.
Parameters:
  ev - object impementing a valid EventHandler-derived interface true if event handler was previously registered, false if notfound



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.