Prev | Current Page 415 | Next

Frank Zammetti

"Practical DWR 2 Projects"


CHAPTER 5 n SHARE YOUR KNOWLEDGE: DWIKI, THE DWR-BASED WIKI 232
Article.java
Like the Config class, the Article class is your everyday, run-of-the-mill simple javabean. You
know, if Java just gave us structs like in C, we??™d probably never see another javabean like this!
But I digress. Figure 5-13 is the UML diagram for this class.
Figure 5-13. Article class UML diagram
The title, created, creator, and text fields are the four pieces of information that generically
describe any article. The text field is literally the text of the article.
The articleExists field is a special flag that when true indicates that the article is not
new. This is set to false when the user clicks an article link that leads to an article that does
not yet exist. This is necessary information for the UI to work properly.
The lastEdited and lastEditedBy fields store the date/time the article was last modified
and the username of the user who last modified it.
CHAPTER 5 n SHARE YOUR KNOWLEDGE: DWIKI, THE DWR-BASED WIKI 233
Finally, the lockedBy and lockTime are set when an article is being edited by someone. The
lockTime is the date/time the lock was granted on the article and is used to calculate when a
lock should be released.


Pages:
403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427