com.sap.netweaver.coll.forums.api

Interface IForumThread


public interface IForumThread

A ForumThread is a container for a hierarchy of ForumMessages. Every thread has a root message, which all other messages in the thread are children of. The root message must be supplied when creating a thread.


Method Summary
 IForumMessage createForumMessage(String subject, String message)
          Creates message and attaches it to the thread
 void delete()
          Deletes the thread
 String getBody()
          Returns the body of the thread
 Date getCreationDate()
          Returns the creation date of the thread
 IForum getForum()
          Returns the forum to which the thread is attached to
 long getForumID()
          Returns the forum unique identifier to which this thread is attached
 IForumMessage getForumMessage(long messageID)
          Returns specific message attached to the thread
 long getForumMessageCount()
          Returns the count of messages in the thread
 IForumMessage[] getForumMessages()
          Returns all messages attached to the thread
 long getID()
          Returns the thread unique identifier
 IForumMessage getLatestForumMessage()
          Returns the latest message in the thread
 IForumMessage getLatestMessage()
          Returns the latest message
 int getModerationValue()
          Returns the moderation value of the thread
 Date getModificationDate()
          Returns the modification date of the thread
 String getName()
          Returns the thread name
 Properties getProperties()
          Return all extended properties of the thread
 String getProperty(String name)
          Returns the value of extended property of the thread
 IForumMessage getRootMessage()
          Returns the root message of the thread
 long getRootMessageID()
          Returns the root message unique identifier of the thread
 void refresh()
          Retrieves latest content of thread.
 void setProperty(String name, String value)
          Sets extended property to the thread
 

Method Detail

getID

long getID()
Returns the thread unique identifier

Returns:
thread unique identifier

getName

String getName()
Returns the thread name

Returns:
the name of the thread

getBody

String getBody()
Returns the body of the thread

Returns:
the body of the thread

delete

void delete()
            throws com.sap.netweaver.coll.forums.exceptions.ForumThreadNotFoundException,
                   com.sap.netweaver.coll.forums.exceptions.ForumThreadLockedException
Deletes the thread

Throws:
com.sap.netweaver.coll.forums.exceptions.ForumThreadNotFoundException
com.sap.netweaver.coll.forums.exceptions.ForumThreadLockedException

getRootMessageID

long getRootMessageID()
                      throws com.sap.netweaver.coll.forums.exceptions.ForumMessageNotFoundException
Returns the root message unique identifier of the thread

Returns:
root message unique identifier
Throws:
com.sap.netweaver.coll.forums.exceptions.ForumMessageNotFoundException

getRootMessage

IForumMessage getRootMessage()
                             throws com.sap.netweaver.coll.forums.exceptions.ForumMessageNotFoundException
Returns the root message of the thread

Returns:
the root message
Throws:
com.sap.netweaver.coll.forums.exceptions.ForumMessageNotFoundException

getLatestMessage

IForumMessage getLatestMessage()
                               throws com.sap.netweaver.coll.forums.exceptions.ForumThreadNotFoundException
Returns the latest message

Returns:
latest message
Throws:
com.sap.netweaver.coll.forums.exceptions.ForumThreadNotFoundException

getForumMessages

IForumMessage[] getForumMessages()
                                 throws com.sap.netweaver.coll.forums.exceptions.ForumThreadNotFoundException
Returns all messages attached to the thread

Returns:
array of messages
Throws:
com.sap.netweaver.coll.forums.exceptions.ForumThreadNotFoundException

getForumMessage

IForumMessage getForumMessage(long messageID)
                              throws com.sap.netweaver.coll.forums.exceptions.ForumThreadNotFoundException,
                                     com.sap.netweaver.coll.forums.exceptions.ForumMessageNotFoundException
Returns specific message attached to the thread

Parameters:
messageID - the message unique identifier
Returns:
the message
Throws:
com.sap.netweaver.coll.forums.exceptions.ForumThreadNotFoundException
com.sap.netweaver.coll.forums.exceptions.ForumMessageNotFoundException

setProperty

void setProperty(String name,
                 String value)
                 throws com.sap.netweaver.coll.forums.exceptions.ForumThreadNotFoundException
Sets extended property to the thread

Parameters:
name - the name of the property
value - the value of the property
Throws:
com.sap.netweaver.coll.forums.exceptions.ForumThreadNotFoundException

getProperty

String getProperty(String name)
                   throws com.sap.netweaver.coll.forums.exceptions.ForumThreadNotFoundException
Returns the value of extended property of the thread

Parameters:
name - the name of the property
Returns:
the value of the property
Throws:
com.sap.netweaver.coll.forums.exceptions.ForumThreadNotFoundException

getProperties

Properties getProperties()
                         throws com.sap.netweaver.coll.forums.exceptions.ForumThreadNotFoundException
Return all extended properties of the thread

Returns:
extended properties
Throws:
com.sap.netweaver.coll.forums.exceptions.ForumThreadNotFoundException

getForumID

long getForumID()
Returns the forum unique identifier to which this thread is attached

Returns:
the unique identifier of the forum

createForumMessage

IForumMessage createForumMessage(String subject,
                                 String message)
                                 throws com.sap.netweaver.coll.forums.exceptions.ForumThreadNotFoundException,
                                        com.sap.netweaver.coll.forums.exceptions.ForumMessageNotFoundException,
                                        com.sap.netweaver.coll.forums.exceptions.MessageRejectedException
Creates message and attaches it to the thread

Parameters:
subject - the subject of the message
message - the message body
Returns:
the created message
Throws:
com.sap.netweaver.coll.forums.exceptions.ForumThreadNotFoundException
com.sap.netweaver.coll.forums.exceptions.ForumMessageNotFoundException
com.sap.netweaver.coll.forums.exceptions.MessageRejectedException

getForumMessageCount

long getForumMessageCount()
                          throws com.sap.netweaver.coll.forums.exceptions.ForumThreadNotFoundException
Returns the count of messages in the thread

Returns:
the count of messages
Throws:
com.sap.netweaver.coll.forums.exceptions.ForumThreadNotFoundException

getLatestForumMessage

IForumMessage getLatestForumMessage()
                                    throws com.sap.netweaver.coll.forums.exceptions.ForumThreadNotFoundException
Returns the latest message in the thread

Returns:
the latest message
Throws:
com.sap.netweaver.coll.forums.exceptions.ForumThreadNotFoundException

getForum

IForum getForum()
                throws com.sap.netweaver.coll.forums.exceptions.ForumNotFoundException
Returns the forum to which the thread is attached to

Returns:
parent forum
Throws:
com.sap.netweaver.coll.forums.exceptions.ForumNotFoundException

refresh

void refresh()
             throws com.sap.netweaver.coll.forums.exceptions.ForumThreadNotFoundException
Retrieves latest content of thread.

Throws:
com.sap.netweaver.coll.forums.exceptions.ForumThreadNotFoundException

getCreationDate

Date getCreationDate()
Returns the creation date of the thread

Returns:
the creation date

getModificationDate

Date getModificationDate()
Returns the modification date of the thread

Returns:
the modification date

getModerationValue

int getModerationValue()
Returns the moderation value of the thread

Returns:
the moderation value


Copyright 2011 SAP AG Complete Copyright Notice