Clearspace API (2.0.15) Web Services Client Javadocs

com.jivesoftware.community.webservices
Class WSForumThread

java.lang.Object
  extended by com.jivesoftware.community.webservices.WSJiveObject
      extended by com.jivesoftware.community.webservices.WSForumThread

public class WSForumThread
extends WSJiveObject

A ForumThread is a container for a hierarchy of ForumMessages.


Field Summary
 
Fields inherited from class com.jivesoftware.community.webservices.WSJiveObject
id, objectType
 
Constructor Summary
WSForumThread()
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 long getCommunityID()
          Returns the ID of the community this thread belongs to.
 java.util.Date getCreationDate()
          Returns the date that this thread was created.
 long getLatestMessageID()
          Returns the ID of 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.
 WSForumMessage getRootMessage()
          Returns the root message this thread.
 int hashCode()
           
 void setCommunityID(long communityID)
          Called by the ForumThreadService to set the ID of the thread this community belongs too.
 void setCreationDate(java.util.Date creationDate)
          Sets the creation date of this thread.
 void setLatestMessageID(long latestMessageID)
          Called by the ForumThreadService to set the appropriate latestMessageID 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 community.
 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(WSForumMessage rootMessage)
          Called by the ForumThreadService to set the appropriate rootMessageID into the thread.
 java.lang.String toString()
           
 
Methods inherited from class com.jivesoftware.community.webservices.WSJiveObject
getID, getObjectType, setID, setObjectType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WSForumThread

public WSForumThread()
Method Detail

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.

If the moderation value is less than JiveConstants.MESSAGE_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 community.

Parameters:
moderationValue - The moderation value of this community

getCommunityID

public long getCommunityID()
Returns the ID of the community this thread belongs to.

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

setCommunityID

public void setCommunityID(long communityID)
Called by the ForumThreadService to set the ID of the thread this community belongs too.

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

Parameters:
communityID - The ID of the thread that this community belongs too.

getRootMessage

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

Returns:
The root message of this thread.

setLatestMessageID

public void setLatestMessageID(long latestMessageID)
Called by the ForumThreadService to set the appropriate latestMessageID into the thread.

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

Parameters:
latestMessageID - The ID of the lastest message in the thread.

setRootMessage

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

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

Parameters:
rootMessage - The root message of the thread.

getLatestMessageID

public long getLatestMessageID()
Returns the ID of the most recently created messages in this thread.

Returns:
The ID of 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 messages in the thread.

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class WSJiveObject

toString

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

Clearspace Project Page

Copyright © 1999-2007 Jive Software.