Prev | Current Page 411 | Next

Frank Zammetti

"Practical DWR 2 Projects"

In fact, Figure 5-11, the UML diagram for
this class, pretty well sums it up.
Figure 5-11. Config class UML diagram
The code itself, which I haven??™t listed here because it??™s rather lengthy, is nothing but the
private members you see in the diagram, each corresponding to an item in the properties file,
and their corresponding getters and setters. The setters are all static so that once the values
are populated, other code can retrieve them quickly and easily. There is also an overloaded
toString() method, my usual reflection-based version, so we can always display the contents
of the object easily.
DWikiContextListener.java
When DWiki starts up, it has some initialization tasks to perform, namely loading the properties
file and verifying that the database exists and is good to go. The DWikiContextListener
class is what accomplishes these goals, and its UML diagram is shown in Figure 5-12.
CHAPTER 5 n SHARE YOUR KNOWLEDGE: DWIKI, THE DWR-BASED WIKI 230
Figure 5-12. DWikiContextListener class UML diagram
In Listing 5-18, you can see that this class is just a normal, everyday context listener, so it
will be executed by the container when the context, that is, the application, starts up.


Pages:
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423