Jive Forums API (5.5.20.2-oracle) Web Services Client Javadocs

com.jivesoftware.forum.webservices
Class ForumThread

java.lang.Object
  extended by com.jivesoftware.forum.webservices.ForumThread

public class ForumThread
extends java.lang.Object

A ForumThread is a container for a hierarchy of ForumMessages.


Constructor Summary
ForumThread()
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.util.Date getCreationDate()
          Returns the date that this thread was created.
 long getForumID()
          Returns the ID of the forum this thread belongs to.
 long getID()
          Returns the unique ID of this thread.
 ForumMessage getLatestMessage()
          Returns the most recently created messages in this thread.
 int getMessageCount()
          Returns the number of messages in the thread.
 int getModerationValue()
          Returns the number of moderation points this thread has.
 java.util.Date getModificationDate()
          Returns the date that this thread was last modified.
 java.lang.String getName()
          Returns the subject of the root message of this thread.
 ForumMessage getRootMessage()
          Returns the root message this thread.
 int hashCode()
           
 void setCreationDate(java.util.Date creationDate)
          Sets the creation date of this thread.
 void setForumID(long forumID)
          Called by the ForumThreadService to set the ID of the thread this forum belongs too.
 void setID(long id)
          Called by ForumThreadService to set the value of this thread into this object.
 void setLatestMessage(ForumMessage latestMessage)
          Called by the ForumThreadService to set the appropriate latestMessage into the thread.
 void setMessageCount(int messageCount)
          Set the number of messages in this thread.
 void setModerationValue(int moderationValue)
          Used to change the moderation value of the forum.
 void setModificationDate(java.util.Date modificationDate)
          Sets the date this thread was last modified.
 void setName(java.lang.String name)
          Used by ForumThreadService to set the value of this field.
 void setRootMessage(ForumMessage rootMessage)
          Called by the ForumThreadService to set the appropriate rootMessage into the thread.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ForumThread

public ForumThread()
Method Detail

getID

public long getID()
Returns the unique ID of this thread.

Returns:
the unique ID of the thread.

setID

public void setID(long id)
Called by ForumThreadService to set the value of this thread into this object.

ForumThreadService will ignore this value if upon update it has changed.

Parameters:
id - The ID of this thread.

getName

public java.lang.String getName()
Returns the subject of the root message of this thread. This is a convenience method equivalent to getRootMessage().getSubject().

Returns:
the name of this thread, which is the subject of the root message.

setName

public void setName(java.lang.String name)
Used by ForumThreadService to set the value of this field.

ForumThreadService will ignore this value if upon update it has changed.

Parameters:
name - The name of the thread.

getCreationDate

public java.util.Date getCreationDate()
Returns the date that this thread was created.

Returns:
the date this thread was created.

setCreationDate

public void setCreationDate(java.util.Date creationDate)
Sets the creation date of this thread.

ForumThreadService will ignore this value if upon update it has changed.

Parameters:
creationDate - the date this thread was created.

getModificationDate

public java.util.Date getModificationDate()
Returns the date that this thread was last modified. In other words, the date of the most recent message in the thread.

Returns:
the date this thread was last modified.

setModificationDate

public void setModificationDate(java.util.Date modificationDate)
Sets the date this thread was last modified. This is called by ForumThreadService.

ForumThreadService will ignore this value if upon update it has changed.

Parameters:
modificationDate - the date this thread was modified.

getModerationValue

public int getModerationValue()
Returns the number of moderation points this thread has. The default moderation value is determined by the forum this thread belongs to: Forum.getModerationDefaultThreadValue()

If the moderation value is less than JiveConstants.FORUM_MODERATION_VISIBLE then the thread will not be displayed by default. Because a thread and its root message are intrinsically bound together, their moderation values are linked and are always the same. This means that setting the moderation value on the thread or setting the moderation value of a root message will always affect both objects.

Returns:
the number of moderation points the thread has.

setModerationValue

public void setModerationValue(int moderationValue)
Used to change the moderation value of the forum.

Parameters:
moderationValue - The moderation value of this forum

getForumID

public long getForumID()
Returns the ID of the forum this thread belongs to.

Returns:
The ID of the forum this thread belongs to.

setForumID

public void setForumID(long forumID)
Called by the ForumThreadService to set the ID of the thread this forum belongs too.

ForumThreadService will ignore this value if upon update it has changed.

Parameters:
forumID - The ID of the thread that this forum belongs too.

getRootMessage

public ForumMessage getRootMessage()
Returns the root message this thread. The root message is a special first message that is intimately tied to the thread for most forumViews. All other messages in the thread are children of the root message.

Returns:
The root message of this thread.

setLatestMessage

public void setLatestMessage(ForumMessage latestMessage)
Called by the ForumThreadService to set the appropriate latestMessage into the thread.

ForumThreadService will ignore this value if upon update it has changed.

Parameters:
latestMessage - The the lastest message in the thread.

setRootMessage

public void setRootMessage(ForumMessage rootMessage)
Called by the ForumThreadService to set the appropriate rootMessage into the thread.

ForumThreadService will ignore this value if upon update it has changed.

Parameters:
rootMessage - The root message of the thread.

getLatestMessage

public ForumMessage getLatestMessage()
Returns the most recently created messages in this thread.

Returns:
The most recently created message in this thread.

getMessageCount

public int getMessageCount()
Returns the number of messages in the thread. This includes the root message. So, to find the number of replies to the root message, subtract one from the answer of this method.

Returns:
the number of messages in this thread.

setMessageCount

public void setMessageCount(int messageCount)
Set the number of messages in this thread. This method should only be used by the ForumThreadService itself

ForumThreadService will ignore this value if upon update it has changed.

Parameters:
messageCount - The number of message in this thread

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.