Java Doc for ForumMessage.java in  » Forum » yazd » com » Yasna » forum » 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 » Forum » yazd » com.Yasna.forum 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.Yasna.forum.ForumMessage

All known Subclasses:   com.Yasna.forum.ForumMessageFilter,  com.Yasna.forum.database.DbForumMessage,  com.Yasna.forum.ForumMessageProxy,
ForumMessage
public interface ForumMessage (Code)
A ForumMessage encapsulates message data. Each message belongs to a thread, and relates to other messages in a thread in a tree relationship. This system allows messages to represent threaded conversations. For example:
 [thread]
 |- [message]
 |- [message]
 |- [message]
 |- [message]
 |- [message]
 |- [message]
 

Each message has a subject and body. Messages are authored by a user in the system or can be anonymous. An ID is given to each message so that it can be tracked uniquely. Because is possible that one might want to store considerable more information with each message besides a subject and body, each message can have an arbitrary number of properties. For example, a property "IP" could be stored with each message that records the IP address of the person posting the message for security reasons.

The creation date, and the date the message was last modified are maintained for each message.

For added functionality, any number of filters can be applied to a message. Filters dynamically format the subject and body of a message. Methods are also provided to bypass filters.
See Also:   ForumMessageFilter





Method Summary
public  StringgetBody()
     Returns the message body.
public  DategetCreationDate()
     Returns the date the message was created.
public  ForumThreadgetForumThread()
     Returns the thread the message belongs to.
public  intgetID()
     Returns the id of the message.
public  DategetModifiedDate()
     Returns the date the message was last modified.
public  StringgetProperty(String name)
     Returns an extended property of the message.
public  MessageRankinggetRanking()
     this method returns the ranking of the message. If this is the root message then there is no ranking.
public  intgetReplyPrivateUserId()
     Returns the id of the User to which the private message is posted i.e.
public  StringgetSubject()
     Returns the message subject.
public  StringgetUnfilteredBody()
     Returns the message body, bypassing any active filters.
public  StringgetUnfilteredProperty(String name)
     Returns an extended property of the message, bypassing the HTML filter. Each message can have an arbitrary number of extended properties.
public  StringgetUnfilteredSubject()
     Returns the message subject, bypassing any active filters.
public  UsergetUser()
     Returns the User that authored the message.
public  booleanhasPermission(int type)
     Returns true if the handle on the object has the permission specified. A list of possible permissions can be found in the ForumPermissions class.
public  booleanisAnonymous()
     Returns whether the message was posted anonymously.
public  booleanisApproved()
     Returns whether the message was approved.
public  booleanisPrivate()
     Indicates if message is private or not.
public  IteratorpropertyNames()
     Returns an Iterator for all the names of the message properties.
public  voidsetApprovment(boolean approved)
     Used by moderators to approved a message in moderated forum.
public  voidsetBody(String body)
     Sets the body of the message.
public  voidsetCreationDate(Date creationDate)
     Sets the creation date of the message.
public  voidsetModifiedDate(Date modifiedDate)
     Sets the date the message was last modified.
public  voidsetProperty(String name, String value)
     Sets an extended property of the message.
public  voidsetRanking(int para)
     this method sets the ranking of the message.
public  voidsetReplyPrivateUserId(int replyPrivateUserId)
     Used only for private messages.
public  voidsetSubject(String subject)
     Sets the subject of the message.



Method Detail
getBody
public String getBody()(Code)
Returns the message body. If message filters are active, the body returned will be a filtered one. Because filters often provide security functionality, this method is the preferred way to get the body of a message. the body of the message.



getCreationDate
public Date getCreationDate()(Code)
Returns the date the message was created. the date the message was created.



getForumThread
public ForumThread getForumThread()(Code)
Returns the thread the message belongs to. the thread the message belongs to.



getID
public int getID()(Code)
Returns the id of the message. the unique id of the message.



getModifiedDate
public Date getModifiedDate()(Code)
Returns the date the message was last modified. When a message is first created, the date returned by this method is identical to the creation date. The modified date is updated every time a message property is updated, such as the message body. the date the message was last modified.



getProperty
public String getProperty(String name)(Code)
Returns an extended property of the message. Each message can have an arbitrary number of extended properties. This lets particular skins or filters provide enhanced functionality that is not part of the base interface.

For security reasons, all property values are run through an HTML filter before being returned.
Parameters:
  name - the name of the property to get. the value of the property.




getRanking
public MessageRanking getRanking()(Code)
this method returns the ranking of the message. If this is the root message then there is no ranking. It is defaulted to neutral ranking for the message.



getReplyPrivateUserId
public int getReplyPrivateUserId()(Code)
Returns the id of the User to which the private message is posted i.e. userId of the parent message or 0 if the message is not private user id of the of the parent message or 0 if the message is not private.



getSubject
public String getSubject()(Code)
Returns the message subject. If message filters are active, the subject returned will be a filtered one. Because filters often provide security functionality, this method is the preferred way to get the subject of a message. the subject of the message.



getUnfilteredBody
public String getUnfilteredBody()(Code)
Returns the message body, bypassing any active filters. Because filters often provide security, this method should be used with caution. In particular, you should avoid showing unfiltered data in an environment where embedded HTML might be interpreted.

Unfiltered content is necessary for a few reasons. One is when saving Yazd content to another persistence mechanism such as an XML format. Another is when you need to skip filter formatting, such as when a user is responding to another user's message. the body of the message.




getUnfilteredProperty
public String getUnfilteredProperty(String name)(Code)
Returns an extended property of the message, bypassing the HTML filter. Each message can have an arbitrary number of extended properties. This lets particular skins or filters provide enhanced functionality that is not part of the base interface.

Because properties are not filtered before being returned, this method should be used with caution. In particular, you should avoid showing unfiltered data in an environment where embedded HTML might be interpreted.
Parameters:
  name - the name of the property to get. the value of the property.




getUnfilteredSubject
public String getUnfilteredSubject()(Code)
Returns the message subject, bypassing any active filters. Because filters often provide security, this method should be used with caution. In particular, you should avoid showing unfiltered data in an environment where embedded HTML might be interpreted.

Unfiltered content is necessary for a few reasons. One is when saving Yazd content to another persistence mechanism such as an XML format. Another is when you need to skip filter formatting, such as when a user is responding to another user's message. the subject of the message.




getUser
public User getUser()(Code)
Returns the User that authored the message. If the message was created anonymously, the Anonymous User object will be returned. the author of the message.



hasPermission
public boolean hasPermission(int type)(Code)
Returns true if the handle on the object has the permission specified. A list of possible permissions can be found in the ForumPermissions class. Certain methods of this class are restricted to certain permissions as specified in the method comments.
Parameters:
  type - a permission type. true if the specified permission is valid.
See Also:   ForumPermissions



isAnonymous
public boolean isAnonymous()(Code)
Returns whether the message was posted anonymously. This is a convenience method and is equivalent to getUser().isAnonymous(); true if the message was posted anonymously.



isApproved
public boolean isApproved()(Code)
Returns whether the message was approved. When forum is not modereted this method always will return true; true if the message was approved.



isPrivate
public boolean isPrivate()(Code)
Indicates if message is private or not. true if message is private, false otherwise.



propertyNames
public Iterator propertyNames()(Code)
Returns an Iterator for all the names of the message properties. an Iterator for the names of all message properties.



setApprovment
public void setApprovment(boolean approved) throws UnauthorizedException(Code)
Used by moderators to approved a message in moderated forum.
Parameters:
  approved - when true this message will be visible for all.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



setBody
public void setBody(String body) throws UnauthorizedException(Code)
Sets the body of the message.
Parameters:
  body - the body of the message.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



setCreationDate
public void setCreationDate(Date creationDate) throws UnauthorizedException(Code)
Sets the creation date of the message. In most cases, the creation date will default to when the message was entered into the system. However, the creation date needs to be set manually when importing messages. In other words, skin authors should ignore this method since it only intended for system maintenance.
Parameters:
  creationDate - the date the message was created.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



setModifiedDate
public void setModifiedDate(Date modifiedDate) throws UnauthorizedException(Code)
Sets the date the message was last modified. In most cases, last modifed will default to when the message data was last changed. However, the last modified date needs to be set manually when importing messages. In other words, skin authors should ignore this method since it only intended for system maintenance.
Parameters:
  modifiedDate - the date the message was modified.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



setProperty
public void setProperty(String name, String value)(Code)
Sets an extended property of the message. Each message can have an arbitrary number of extended properties. This lets particular skins or filters provide enhanced functionality that is not part of the base interface.
Parameters:
  name - the name of the property to set.
Parameters:
  value - the new value for the property.



setRanking
public void setRanking(int para) throws UnauthorizedException(Code)
this method sets the ranking of the message. Note that the ranking of the message can only be set by the user who created the thread or asked the original question. Also the user can't rank his own posts.
Parameters:
  para -
throws:
  UnauthorizedException -



setReplyPrivateUserId
public void setReplyPrivateUserId(int replyPrivateUserId) throws UnauthorizedException(Code)
Used only for private messages. Sets the userId of the parent message.
Parameters:
  replyPrivateUserId - the userId of the parent message.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



setSubject
public void setSubject(String subject) throws UnauthorizedException(Code)
Sets the subject of the message.
Parameters:
  subject - the subject of the message.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



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