Oracle Discussions Java API Reference
10g Release 1 (10.1.2)

B25496-01

oracle.discussions.sdk
Class TdThread

oracle.discussions.sdk.TdMessage
  |
  +--oracle.discussions.sdk.TdThread

public class TdThread
extends TdMessage
implements TdFavorite

TdThread is a TdMessage with additional accessors for thread specific information. In addition to the pre-fecthed values of TdMessage, TdThread also has pre-fetched the following fields:

Oracle discussions elements names have been changed in the webui compared to that of sdk portion. The existing names to the new names mapping is as shown.

Since:
OCS 10.1.1
See Also:
TdMessage, TdBoard

Field Summary
protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsAddToFavorites
           
protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsGetMessage
           
protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsGetMessages
           
protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsLock
           
protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsMove
           
protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsRemoveFromFavorites
           
protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsUnlock
           
protected static oracle.dms.instrument.Noun s_nThread
           

 

Fields inherited from class oracle.discussions.sdk.TdMessage
_evtfac, _evtpub, _flags, _htRb, _logger, _msgInfo, _tdb, _tdBodyInfo, _tdbs, _tdr, _tdsession, s_dmsDelete, s_dmsGetBodyPlainText, s_dmsGetBodyRichText, s_dmsGetContent, s_dmsGetNumberOfReplies, s_dmsGetParent, s_dmsUndelete, s_nMessage

 

Method Summary
 void addToFavorites()
          Adds this thread to the list of favorite threads for this user.
 oracle.discussions.sdk.impl.data.TdLastPostInfo getLastPost()
          Returns information on the last post to the thread The Last post thread is the one which is posted latest in time.
 TdMessage getMessage(int iMsgId)
          Returns a message of the thread given its msgId.
 int getMessageCount()
          Returns the number of messages in the thread A thread can have many messages as long as they stem from the thread's root.
 TdIterator getMessages()
          Returns the messages of the Thread.
 TdIterator getMessages(boolean bSortByPostDate)
          Returns the messages of the Thread.
 int getNumberOfReplies()
          Returns the number of replies for this message A single message can have many replies, each of which is stemming from the source message root.
 TdMessagePermissions getPermissions()
          Returns permissions on this Thread for the currently connected user.
 boolean isFavorite()
          Returns true if this thread is currently marked as a favorite thread for this user.
 boolean isLocked()
          Returns a boolean status indicating if the thread is locked
 boolean isLocked(boolean bReload)
          Returns true if the thread is locked
 void lock()
          Sets the status of a thread to locked.
 TdThread move(TdBoard tdbTo)
          Moves this thread and all its replies to the supplied Board.
 void removeFromFavorites()
          Remove this thread from the list of favorite threads for this user.
 void unlock()
          Sets the status of a thread to unlocked.
protected  void updateUserFlags(javax.mail.Flags flags)
          Sets the thread user's flags marking new message since last visit/session

 

Methods inherited from class oracle.discussions.sdk.TdMessage
clip, delete, erase, getAnnotations, getAttachmentBodyParts, getAttachmentById, getAttachments, getBoard, getBoardSettings, getBodyPlainText, getBodyRichText, getContent, getFlags, getFrom, getLastAnnotation, getLevel, getOracleMessageId, getOracleMessageUid, getOracleThreadId, getParent, getParentMessageId, getResourceBundle, getResourceBundleName, getRfc822MessageId, getRfc822References, getRole, getSentDate, getSize, getSubject, getThread, getXPriority, hasAttachments, invalidateCache, isByModerator, isDeleted, isNew, isNewSinceLastVisit, isNewSinceSession, refreshRole, setFlag, setFlags, setParent, toString, toString, undelete

 

Field Detail

s_nThread

protected static oracle.dms.instrument.Noun s_nThread

s_dmsAddToFavorites

protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsAddToFavorites

s_dmsGetMessage

protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsGetMessage

s_dmsGetMessages

protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsGetMessages

s_dmsUnlock

protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsUnlock

s_dmsLock

protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsLock

s_dmsMove

protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsMove

s_dmsRemoveFromFavorites

protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsRemoveFromFavorites

Method Detail

getMessageCount

public int getMessageCount()
                    throws TdException,
                           javax.mail.MessagingException
Returns the number of messages in the thread A thread can have many messages as long as they stem from the thread's root.
Returns:
int
Throws:
TdException - a generic oracle discussions exception thrown when performing lazyloading.
MessagingException - a oracle email related exception thrown when performing lazy loading.

getNumberOfReplies

public int getNumberOfReplies()
                       throws TdException,
                              javax.mail.MessagingException
Returns the number of replies for this message A single message can have many replies, each of which is stemming from the source message root.
Overrides:
getNumberOfReplies in class TdMessage
Returns:
int
Throws:
TdException - a generic oracle discussions exception thrown when performing lazyloading.
MessagingException - a oracle email related exception thrown when performing lazy loading.

getLastPost

public oracle.discussions.sdk.impl.data.TdLastPostInfo getLastPost()
                                                            throws TdException,
                                                                   javax.mail.MessagingException
Returns information on the last post to the thread The Last post thread is the one which is posted latest in time.
Throws:
TdException - a generic oracle discussions exception thrown when performing lazyloading.
MessagingException - a oracle email related exception thrown when performing lazy loading.

getMessage

public TdMessage getMessage(int iMsgId)
                     throws TdException,
                            javax.mail.MessagingException
Returns a message of the thread given its msgId. The returned messages all have the set of pre-fetched headerd described in TdMessage.
Parameters:
iMsgId -  
Returns:
TdMessage The messages will be returned in thread order.
Throws:
TdException - oracle discussions generic exception may be thrown when retrieving message information from the cache.
MessagingException - oracle email related exception may be thrown when retrieving message information from the cache.

getMessages

public TdIterator getMessages()
                       throws TdException,
                              javax.mail.MessagingException
Returns the messages of the Thread. The returned messages all have the set of pre-fetched header described in TdMessage. The messages will be returned in thread order. All the messages inside a thread are returned in an iterator which can be traversed to extract individual message object.
Throws:
TdException - a generic oracle discussions exception may be thrown when extracting the messages.
MessagingException - , an oracle email related exception which may be thrown when extracting the messages.

getMessages

public TdIterator getMessages(boolean bSortByPostDate)
                       throws TdException,
                              javax.mail.MessagingException
Returns the messages of the Thread. The returned messages all have the set of pre-fetched headerd described in TdMessage. The messages will be returned in thread order if bSortByPostDate is false, by post date otherwise. All the messages inside a thread are returned in an iterator which can be traversed to extract individual message object.
Throws:
TdException - a generic oracle discussions exception may be thrown when extracting the messages.
MessagingException - , an oracle email related exception which may be thrown when extracting the messages.

isFavorite

public boolean isFavorite()
                   throws TdException
Returns true if this thread is currently marked as a favorite thread for this user.
Specified by:
isFavorite in interface TdFavorite
Returns:
boolean

addToFavorites

public void addToFavorites()
                    throws TdException
Adds this thread to the list of favorite threads for this user.
Specified by:
addToFavorites in interface TdFavorite
Throws:
tdException - A generic oracle discussions exception which may be thrown when the thread is being added to favorites.

removeFromFavorites

public void removeFromFavorites()
                         throws TdException
Remove this thread from the list of favorite threads for this user.
Specified by:
removeFromFavorites in interface TdFavorite
Throws:
tdException - A generic oracle discussions exception which may be thrown when the thread is being removed from the favorites.

move

public TdThread move(TdBoard tdbTo)
              throws TdException,
                     javax.mail.MessagingException
Moves this thread and all its replies to the supplied Board. After tis API is called this TdThread instance should not be used anymore. Instead the returned TdThread instance should be used. To move a thread from one board to another, the user should have board moderator role in the source board and board writer role in the destination board.
Parameters:
tdbTo - the destination board.
Returns:
the new TdThread object for the moved thread
Throws:
TdException - may be thrown when the thread is being moved
MessagingException - may eb thrown when the thread is being moved.

lock

public void lock()
          throws TdException,
                 javax.mail.MessagingException
Sets the status of a thread to locked. A thread which is locked cannot be edited. Only board writer who is the owner of the thread and higher role will have permissions to lock a thread.
Throws:
TdException - may eb thrown when the thread is beig locked.
MessagingException - may be thrown when the thread is being locked.

unlock

public void unlock()
            throws TdException,
                   javax.mail.MessagingException
Sets the status of a thread to unlocked. A thread which is unlocked can be edited. Only board writer who is the owner of the thread and higher role will have permissions to unlock a thread.
Throws:
TdException - may eb thrown when the thread is beig unlocked.
MessagingException - may be thrown when the thread is being unlocked.

isLocked

public boolean isLocked()
                 throws javax.mail.MessagingException
Returns a boolean status indicating if the thread is locked
Returns:
boolean

isLocked

public boolean isLocked(boolean bReload)
                 throws javax.mail.MessagingException
Returns true if the thread is locked
Parameters:
bReload -  
Returns:
boolean

getPermissions

public TdMessagePermissions getPermissions()
                                    throws TdException
Returns permissions on this Thread for the currently connected user.
Overrides:
getPermissions in class TdMessage
Returns:
TdMessagePermissions
Throws:
TdException -  

updateUserFlags

protected void updateUserFlags(javax.mail.Flags flags)
                        throws TdException,
                               javax.mail.MessagingException
Sets the thread user's flags marking new message since last visit/session
Overrides:
updateUserFlags in class TdMessage
Parameters:
Flags -  
Throws:
TdException -  
MessagingException -  

Oracle Discussions Java API Reference
10g Release 1 (10.1.2)

B25496-01

Copyright © 2002, 2005, Oracle. All rights reserved.