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

B25496-01

oracle.discussions.sdk
Class TdBoard

oracle.discussions.sdk.TdContainer
  |
  +--oracle.discussions.sdk.TdBoard
Direct Known Subclasses:
TdAnnouncementsBoard

public class TdBoard
extends TdContainer

This class represents a Board for holding messages. Board can only contain messages.

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

Field Summary
protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsAppendMessage
           
protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsDelete
           
protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsEditMessage
           
protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsEraseMessages
           
protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsGetLastPost
           
protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsGetThread
           
protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsGetThreads
           
protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsGrantBoardModerator
           
protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsGrantBoardReader
           
protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsGrantBoardWriter
           
protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsLock
           
protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsMarkPublic
           
protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsRevokeBoardModerator
           
protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsRevokeBoardReader
           
protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsRevokeBoardWriter
           
protected static oracle.discussions.sdk.impl.data.dms.TdPhaseEvent s_dmsUnlock
           
protected static oracle.dms.instrument.Noun s_nBoard
           
protected static java.lang.String s_processRequest
           

 

Fields inherited from class oracle.discussions.sdk.TdContainer
_admstore, _creator, _evtfac, _evtpub, _lastModDate, _lastModifier, _logger, _tdCntSettings, _tdPerms, _tdsession, _usrstore, s_dmsAddToFavorites, s_dmsGetAnnouncementsBoard, s_dmsGetContainer, s_dmsGetContainerSettings, s_dmsGetCreationDate, s_dmsGetCreator, s_dmsGetDescription, s_dmsGetDisplayName, s_dmsGetFavoriteThreads, s_dmsGetFolder, s_dmsGetLastMessagePosts, s_dmsGetLastPost, s_dmsGetParent, s_dmsGetPopularThreads, s_dmsHasAnnouncementsBoard, s_dmsListGranteeRoles, s_dmsListWOPath, s_dmsListWPath, s_dmsRefreshPermissions, s_dmsRemoveFromFavorites, s_dmsSearch, s_dmsSetDescription, s_dmsUpdateContainerSettings, s_dmsUpdateGranteeRoles, s_nContainer, TD_BOARD, TD_FACILITY

 

Constructor Summary
TdBoard(oracle.mail.sdk.esmail.OracleStore admstore, oracle.mail.sdk.esmail.OracleStore usrstore, oracle.discussions.sdk.impl.TdSession tdsession, java.lang.String folderName, long lFolderId, java.lang.String nameSpace)
          Constructor to build a tdboard instance.

 

Method Summary
 TdMessage appendMessage(javax.mail.Message mm)
          Appends the supplied messages to this Board.
 void convertUserFlag(javax.mail.Flags flags, long lUsrFlags)
          Converts user flags as per the long flags number passed.
 javax.mail.internet.MimeMessage createMessageForEdit(TdMessage msgOrig)
          Replicates the original message for editing purpose.
 javax.mail.internet.MimeMessage createMessageReply(TdMessage msgOrig)
          Creates a message for the reply of the supplied one.
 javax.mail.internet.MimeMessage createMessageReply(TdMessage msgOrig, boolean htmlContentType)
          Creates a message for the reply of the supplied one.
 javax.mail.internet.MimeMessage createMessageReply(TdMessage msgOrig, boolean htmlContentType, java.util.Locale loc, java.util.TimeZone tz)
          Creates a message for the reply of the supplied one.
 javax.mail.internet.MimeMessage createMessageTopic()
          Creates a message for a new topic under this board.
 javax.mail.internet.MimeMessage createMessageTopic(java.util.Locale loc)
          Creates a message for a new topic under this board.
 void delete()
          Deletes this TdFacility in this message store - child facilities boards and messages will be deleted too.
 TdMessage editMessage(TdMessage origMsg, javax.mail.Message mm)
          Edits the given message and rturns back the edited message.
 void eraseMessages(TdMessage[] msgs)
          Erases the messages from the current board.
 TdBoardSettings getBoardSettings()
          Returns the settings of the board.
 TdBoardSettings getBoardSettings(boolean bRefresh)
          Returns the settings of the board.
 int getContainerType()
          Returns the container type.
 TdLastPost getLastPost()
          Returns information on the last message posted to this board.
 int getMessageCount()
          Returns the count of messages in the board.
 int getNewMessageCount()
          Returns the count of the new messages in the board.
 TdThread getThread(int iThreadId)
          Returns the Thread from the current board, given its ID.
 int getThreadCount()
          Returns the count of threads in the board.
 TdIterator getThreads()
          Returns the list of message threads available in this board.
 TdIterator getThreads(int iFetchStart, boolean bSortByCreation, boolean bAscending)
          Returns the list of message threads available in this board.
 int getUnreadMessageCount()
          Returns the number of messages which are unread in the board.
 void grantBoardModerator(TdUser tdUser)
          Grants Board Moderator role to the supplied user for this board.
 void grantBoardReader(TdUser tdUser)
          Grants Board Reader role to the supplied user for this board.
 void grantBoardWriter(TdUser tdUser)
          Grants Board Writer role to the supplied user for this board.
 boolean hasNewMessages()
          Returns a boolean value indicating if the board has new messages.
 boolean isLocked()
          Returns the boolean status indicating if the board is locked.
 boolean isPublic()
          Returns a boolean value indicating if the board is public.
 void lock()
          Locks the oracle discussions board.
 void revokeBoardModerator(TdUser tdUser)
          Revokes Board Moderator role to the supplied user for this board.
 void revokeBoardReader(TdUser tdUser)
          Revokes Board Reader role to the supplied user for this board.
 void revokeBoardWriter(TdUser tdUser)
          Revokes Board Writer role to the supplied user for this board.
 void unlock()
          Unlocks the oracle discussions board.

 

Methods inherited from class oracle.discussions.sdk.TdContainer
addACI, addACI, addACI, addACI, addToFavorites, appendMessages, appendMessages, close, copyMessages, create, delete, equals, exists, expunge, fetch, getAnnouncementsBoard, getContainer, getContainerSettings, getContainerSettings, getCreationDate, getCreator, getDescription, getDisplayFullPathUsingDisplayName, getDisplayName, getFavoriteThreads, getFilteredHeaders, getFlags, getFolder, getGranteeACI, getLastMessagePosts, getMessage, getMessageByType, getMessageByUID, getMessages, getMessages, getMessages, getMessagesByUID, getMessagesByUID, getParent, getParentFacility, getPermanentFlags, getPermissions, getPopularThreads, getTdUser, getUID, getUIDValidity, groupACI, groupACIWithList, hasAnnouncementsBoard, hasRead, hasWrite, have_permission, isFavorite, isGuest, isNew, isNewSinceLastVisit, isNewSinceSession, isOpen, isShared, isSubscribed, list, list, list, list, listGranteeRoles, listSubscribed, modifyACI, modifyACI, moveMessages, open, openInternal, refineACI, refreshContainerSettings, removeACI, removeACI, removeFromFavorites, renameTo, search, search, search, search, setFlags, setFlags, setFlags, setSubscribed, sortMessages, updateContainerSettings, updateGranteeRoles

 

Field Detail

s_nBoard

protected static oracle.dms.instrument.Noun s_nBoard

s_dmsDelete

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

s_dmsAppendMessage

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

s_dmsEditMessage

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

s_dmsEraseMessages

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

s_dmsGetLastPost

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

s_dmsGetThread

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

s_dmsGetThreads

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

s_dmsGrantBoardModerator

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

s_dmsGrantBoardWriter

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

s_dmsGrantBoardReader

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

s_dmsRevokeBoardModerator

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

s_dmsRevokeBoardWriter

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

s_dmsRevokeBoardReader

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

s_dmsLock

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

s_dmsUnlock

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

s_dmsMarkPublic

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

s_processRequest

protected static java.lang.String s_processRequest

Constructor Detail

TdBoard

public TdBoard(oracle.mail.sdk.esmail.OracleStore admstore,
               oracle.mail.sdk.esmail.OracleStore usrstore,
               oracle.discussions.sdk.impl.TdSession tdsession,
               java.lang.String folderName,
               long lFolderId,
               java.lang.String nameSpace)
Constructor to build a tdboard instance.
Parameters:
admstore - Oracle email administrator store
usrstore - Oracle email User store
tdsession - oracle discussions session
folderName - name of the board to be created.
lFolderId - long folder identifier indicating the shared folder.
nameSpace - the email store namespace in whic folder is created.

Method Detail

getContainerType

public int getContainerType()
Returns the container type.

Returns TdContainer.TD_BOARD.

Overrides:
getContainerType in class TdContainer
Returns:
int integer representing the container type.

getLastPost

public TdLastPost getLastPost()
                       throws TdException
Returns information on the last message posted to this board.
Overrides:
getLastPost in class TdContainer
Returns:
TdLastPost
Throws:
TdException -  

grantBoardModerator

public void grantBoardModerator(TdUser tdUser)
                         throws TdException
Grants Board Moderator role to the supplied user for this board.
Parameters:
tdUser - oracle discussions user to whom the role is to be granted.
Throws:
TdException -  

isPublic

public boolean isPublic()
                 throws TdException
Returns a boolean value indicating if the board is public.

Returns true if the board is public and false otherwise.

Returns:
boolean value indicating if the board is public
Throws:
TdException -  

grantBoardReader

public void grantBoardReader(TdUser tdUser)
                      throws TdException
Grants Board Reader role to the supplied user for this board.
Parameters:
tdUser - user to whom board reader permissions is to be granted.
Throws:
TdException -  

grantBoardWriter

public void grantBoardWriter(TdUser tdUser)
                      throws TdException
Grants Board Writer role to the supplied user for this board.
Parameters:
tdUser - to whom board writer role to whom board writer role is to be granted.
Throws:
TdException -  

revokeBoardModerator

public void revokeBoardModerator(TdUser tdUser)
                          throws TdException
Revokes Board Moderator role to the supplied user for this board.
Parameters:
tdUser - user from whom board moderator role is being revoked.
Throws:
TdException -  

revokeBoardReader

public void revokeBoardReader(TdUser tdUser)
                       throws TdException
Revokes Board Reader role to the supplied user for this board.
Parameters:
tdUser - user from whom board rader role is being revoked from
Throws:
TdException -  

revokeBoardWriter

public void revokeBoardWriter(TdUser tdUser)
                       throws TdException
Revokes Board Writer role to the supplied user for this board.
Parameters:
tdUser - discussions user from whom board writer role is being revoked
Throws:
TdException -  

createMessageTopic

public javax.mail.internet.MimeMessage createMessageTopic()
                                                   throws TdException
Creates a message for a new topic under this board.

The returned message is NOT appended to the board. The returned message will be initialized according to the board settings and teh connect user:

Returns:
MimeMessage
Throws:
TdException -  

createMessageTopic

public javax.mail.internet.MimeMessage createMessageTopic(java.util.Locale loc)
                                                   throws TdException
Creates a message for a new topic under this board.

The returned message is NOT appended to the board. The returned message will be initialized according to the board settings and teh connect user:

Parameters:
loc - locale information to be used to format the author name
Returns:
MimeMessage
Throws:
TdException -  

createMessageReply

public javax.mail.internet.MimeMessage createMessageReply(TdMessage msgOrig)
                                                   throws TdException,
                                                          javax.mail.MessagingException
Creates a message for the reply of the supplied one.

The returned message is NOT appended to the board. The returned message will be initialized according to the board settings:

.
Furthermore, the content type of the MimeMessage returned will be "text/html.".
Parameters:
msgOrig - original message to which reply is to be created
Returns:
MimeMessage
Throws:
TdException -  
MessagingException -  

createMessageReply

public javax.mail.internet.MimeMessage createMessageReply(TdMessage msgOrig,
                                                          boolean htmlContentType)
                                                   throws TdException,
                                                          javax.mail.MessagingException
Creates a message for the reply of the supplied one.

The returned message is NOT appended to the board. The returned message will be initialized according to the board settings:

.
Furthermore, the content type of the MimeMessage returned will be determined by the @param htmlContentType parameter.
If this parameter is set to true, the content type will be "text/html". Otherwise, it will be set to "text/plain".
Parameters:
msgOrig - original message to which reply is to be created
htmlContentType - content type used in creating the message.
Returns:
MimeMessage
Throws:
TdException -  
MessagingException -  

createMessageReply

public javax.mail.internet.MimeMessage createMessageReply(TdMessage msgOrig,
                                                          boolean htmlContentType,
                                                          java.util.Locale loc,
                                                          java.util.TimeZone tz)
                                                   throws TdException,
                                                          javax.mail.MessagingException
Creates a message for the reply of the supplied one.

The returned message is NOT appended to the board. The returned message will be initialized according to the board settings:


Furthermore, the content type of the MimeMessage returned will be determined by the @param htmlContentType parameter.
If this parameter is set to true, the content type will be "text/html". Otherwise, it will be set to "text/plain".
Parameters:
msgOrig - original message to which reply is to be created
htmlContentType - content type to be used in the reply
loc - locale information to be used to format the reply.
tz - the time zone to be used to format the reply prefix
Returns:
MimeMessage
Throws:
TdException -  
MessagingException -  

createMessageForEdit

public javax.mail.internet.MimeMessage createMessageForEdit(TdMessage msgOrig)
                                                     throws TdException,
                                                            javax.mail.MessagingException
Replicates the original message for editing purpose.
Parameters:
msgOrig - Original message to be edited
Returns:
MimeMessage the message returned
Throws:
TdException -  
MessagingException -  

editMessage

public TdMessage editMessage(TdMessage origMsg,
                             javax.mail.Message mm)
                      throws TdException,
                             javax.mail.MessagingException
Edits the given message and rturns back the edited message.
Parameters:
origMsg - original message to be edited
mm - message to be added to the original msg
Returns:
TdMessage
Throws:
TdException -  
MessagingException -  

appendMessage

public TdMessage appendMessage(javax.mail.Message mm)
                        throws TdException,
                               javax.mail.MessagingException
Appends the supplied messages to this Board.
Parameters:
mm - message to be appended
Returns:
TdMessage, the appended message along with the original message
Throws:
TdException -  
messagingException -  

getBoardSettings

public TdBoardSettings getBoardSettings()
                                 throws TdException
Returns the settings of the board. Board settings include information like:
and other settings.
Returns:
TdBoardSettings
Throws:
TdException -  

getBoardSettings

public TdBoardSettings getBoardSettings(boolean bRefresh)
                                 throws TdException
Returns the settings of the board. Board settings include information like:
and other settings.
Parameters:
bRefresh, - refresh board settings when set to true
Returns:
TdBoardSettings
Throws:
TdException -  

eraseMessages

public void eraseMessages(TdMessage[] msgs)
                   throws javax.mail.MessagingException,
                          TdException
Erases the messages from the current board.
Parameters:
msgs - array of messages to be erased.
Throws:
MessagingException -  
TdException -  

getThreadCount

public int getThreadCount()
                   throws TdException
Returns the count of threads in the board.
Returns:
int integer indicating the thread count
Throws:
MessagingException -  

getMessageCount

public int getMessageCount()
                    throws javax.mail.MessagingException
Returns the count of messages in the board.
Returns:
int integer indicating the message count
Throws:
MessagingException -  

getNewMessageCount

public int getNewMessageCount()
                       throws javax.mail.MessagingException
Returns the count of the new messages in the board.

A message is considered as new if the user hasnot already read the same.

Returns:
int integer indicating the new message count
Throws:
MessagingException -  

hasNewMessages

public boolean hasNewMessages()
                       throws javax.mail.MessagingException
Returns a boolean value indicating if the board has new messages.

A message is considered as new if the user hasnot already read the same.
Returns true is the message is new and false otherwise.

Returns:
boolean condition indicating if the message is new or not
Throws:
MessagingException -  

getThread

public TdThread getThread(int iThreadId)
                   throws TdException,
                          javax.mail.MessagingException
Returns the Thread from the current board, given its ID.
Parameters:
iThreadId - the thread id indicating thread retrieved
Returns:
TdThread
Throws:
TdException -  
MessagingException -  

getThreads

public TdIterator getThreads()
                      throws TdException
Returns the list of message threads available in this board.

TdThread objects are light-weight references to the actual message that started the thread. In addition to the message id of the thread in this call thread information such # of messages in the Thread and last post information (date, author) will be retrieved too. To fill up additional thread details call fetch.
By default threads will be sorted by last post date in descending order.

Returns:
TdIterator
Throws:
TdException -  

getThreads

public TdIterator getThreads(int iFetchStart,
                             boolean bSortByCreation,
                             boolean bAscending)
                      throws TdException
Returns the list of message threads available in this board.

TdThread objects are light-weight references to the actual message that started the thread. In addition to the message id of the thread in this call thread information such # of messages in the Thread and last post information (date, author) will be retrieved too.
To fill up additional thread details call fetch. Limiting Sorting options can be specified too.
By default threads will be sorted by last post date in descending order.

TODO: create or re-use some sorting criteria class.
Parameters:
iFetchStart - number of threads to be fetched.
bSortByCreation - boolean condition indicating if the threads are to be sorted by creation time
bAscending - boolean condition indicating the order in which the threads are sorted.
Returns:
TdIterator
Throws:
TdException -  

getUnreadMessageCount

public int getUnreadMessageCount()
                          throws javax.mail.MessagingException
Returns the number of messages which are unread in the board. A message is considered as unread if it is not opened.
Returns:
count representing the number of unread messages.
Throws:
MessagingException -  

lock

public void lock()
          throws TdException
Locks the oracle discussions board. User invkoing this operation should have a role equivalent to the board moderator or higher to be able to edit the board.
Throws:
TdException -  

unlock

public void unlock()
            throws TdException
Unlocks the oracle discussions board. User invkoing this operation should have a role equivalent to the board moderator or higher to be able to edit the board.
Throws:
TdException -  

isLocked

public boolean isLocked()
                 throws TdException
Returns the boolean status indicating if the board is locked.

Returns true if the board is locked, false otherwise.

Returns:
boolean boolean condition indicating if the board is locked.
Throws:
TdException - generic oracle discussions exception thrown while trying to lock the board.

delete

public void delete()
            throws TdException
Deletes this TdFacility in this message store - child facilities boards and messages will be deleted too. After this method is called the TdFacility instance should be used anymore as it can lead to unpredictable results.
Overrides:
delete in class TdContainer
Throws:
TdException - exception thrown when trying to delete the board.

convertUserFlag

public void convertUserFlag(javax.mail.Flags flags,
                            long lUsrFlags)
                     throws javax.mail.MessagingException
Converts user flags as per the long flags number passed.

Checks in the array of glags if all the flags are set, if not, sets the same.

Parameters:
flags - The flags that are set
lUsrFlags - long value which is used in comparing ans setting the flags.
Throws:
MessagingException -  

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

B25496-01

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