|
Jive Forums API (5.5.20.2-oracle) Web Services Client Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.forum.webservices.ForumMessage
public class ForumMessage
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.
Constructor Summary | |
---|---|
ForumMessage()
|
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
|
int |
getAttachmentCount()
Returns the number of attachments this message has. |
java.lang.String |
getBody()
Returns the message body. |
int |
getChildCount()
Returns the number of children (replies) to this message. |
java.util.Date |
getCreationDate()
Returns the date this message was created. |
long |
getForumID()
Returns the ID of the forum this message belongs to. |
int |
getForumIndex()
Returns the index of this message in the forum. |
long |
getForumThreadID()
Returns the ID of the thread this message belongs to. |
long |
getID()
Returns the id of this message. |
int |
getMessageDepth()
Returns the current depth of this message. |
int |
getModerationValue()
Returns the number of moderation points this message has. |
java.util.Date |
getModificationDate()
Returns the date this message was last modified. |
long |
getParentMessageID()
Returns the ID of the parent message of this message or 0 if this message is the root message of a thread. |
java.lang.String |
getSubject()
Returns the message subject. |
java.lang.String |
getUnfilteredBody()
Returns the message body, bypassing any active filters. |
java.lang.String |
getUnfilteredSubject()
Returns the message subject, bypassing any active filters. |
User |
getUser()
Returns the ID User that authored this message. |
int |
hashCode()
|
boolean |
isAnonymous()
Returns true if this message was posted anonymously. |
void |
setAnonymous(boolean anonymous)
Sets whether or not this message was created anonymously. |
void |
setAttachmentCount(int attachmentCount)
Sets the number of attachments this message has. |
void |
setBody(java.lang.String body)
Sets the body of this message. |
void |
setChildCount(int childCount)
|
void |
setCreationDate(java.util.Date creationDate)
Sets the creation date of this message. |
void |
setForumID(long forumID)
Sets the ID of the forum that this message belongs too. |
void |
setForumIndex(int forumIndex)
Sets the forum index of this message. |
void |
setForumThreadID(long forumThreadID)
Sets the ID of thread that this message belongs too. |
void |
setHtml(boolean html)
Sets whether or not this message contains html. |
void |
setID(long id)
Sets the id of this message. |
void |
setMessageDepth(int messageDepth)
|
void |
setModerationValue(int value)
Sets the number of moderation points this message has. |
void |
setModificationDate(java.util.Date modificationDate)
Sets the date this message was last modified. |
void |
setParentMessageID(long parentMessageID)
Sets the id of the parent message to this message. |
void |
setSubject(java.lang.String subject)
Sets the subject of this message. |
void |
setUnfilteredBody(java.lang.String unfilteredBody)
Sets the unfiltered body of the message |
void |
setUnfilteredSubject(java.lang.String unfilteredSubject)
Sets the unfiltered version of the subject. |
void |
setUser(User user)
Sets the id of the user. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ForumMessage()
Method Detail |
---|
public long getID()
public void setID(long id)
id
- the id of this message.public int getForumIndex()
Once a forum index is assigned to a message, that value is never re-used. Therefore, there will be gaps in the forum index values as messages are deleted, archived, or moved.
Forum index values are primarily provided to support an NNTP-centric view of forums, since the NNTP protocol requires article numbers (forum indexes) inside a newsgroup (forum).
public void setForumIndex(int forumIndex)
forumIndex
- the forum index of this message.public java.util.Date getCreationDate()
public void setCreationDate(java.util.Date creationDate)
creationDate
- the date this message was created.
UnauthorizedException
- if does not have ADMIN permissions.public java.util.Date getModificationDate()
public void setModificationDate(java.util.Date modificationDate)
modificationDate
- the date this message was modified.
UnauthorizedException
- if not allowed to edit the message.public java.lang.String getSubject()
public java.lang.String getUnfilteredSubject()
Unfiltered content is necessary for a few reasons. One is when saving Jive 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.
public void setUnfilteredSubject(java.lang.String unfilteredSubject)
unfilteredSubject
- the unfiltered version of the subject.public void setSubject(java.lang.String subject)
subject
- the subject of this message.
UnauthorizedException
- if not allowed to edit this message.public java.lang.String getBody()
public java.lang.String getUnfilteredBody()
Unfiltered content is necessary for a few reasons. One is when saving Jive 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.
public void setBody(java.lang.String body) throws UnauthorizedException
body
- the body of this message.
UnauthorizedException
- if does not allowed to edit this message.public void setUnfilteredBody(java.lang.String unfilteredBody)
unfilteredBody
- the unfiltered body of the messagepublic User getUser()
public void setUser(User user)
user
- the id of the user.public long getParentMessageID()
public void setParentMessageID(long parentMessageID)
parentMessageID
- the id of the parent message to this message.public int getAttachmentCount()
public void setAttachmentCount(int attachmentCount)
attachmentCount
- the number of attachments this message has.public int getModerationValue()
Forum.getModerationDefaultMessageValue()
If the moderation value is less than
JiveConstants.FORUM_MODERATION_VISIBLE
then the message will not be displayed by default.
public void setModerationValue(int value) throws UnauthorizedException
JiveConstants.FORUM_MODERATION_VISIBLE
, then
a number of things will happen:When calling this method results in a message to go from below the minimum visible threshold to above, then the actions listed above will all be executed. Any change of the moderation value also results in the modified date of the message being updated.
Only administrators and moderators can call this method.
The authToken token of the user must be passed into this method as a paramater for moderation auditing purposes.
value
- the number of moderation points for the message.
UnauthorizedException
- if does not have ADMIN, MODERATE_MESSAGES
or MODERATE_THREADS permissions.com.jivesoftware.forum.gateway.Gateway
,
WatchManager
public boolean isAnonymous()
public void setAnonymous(boolean anonymous)
anonymous
- whether or not this message was created anonymously.public long getForumThreadID()
public void setForumThreadID(long forumThreadID)
forumThreadID
- The ID of thread that this message belongs too.public long getForumID()
public void setForumID(long forumID)
forumID
- The ID of the forum that this message belongs too.public void setHtml(boolean html)
html
- whether or not this message contains html.public int getChildCount()
public void setChildCount(int childCount)
public int getMessageDepth()
public void setMessageDepth(int messageDepth)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |