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

B25496-01

oracle.discussions.sdk
Interface TdFavoriteManager


public interface TdFavoriteManager

Represents a class which can manage the favorite elements in discussions.

Provides methods to

Sample code snippet illustrating the usage of TdFavoriteManager

  //_tdStore is a TdStore instance.
  //Get the TdFavoriteManager from this tdStore instance.
  TdFavoriteManager tdfm = tdStore.getFavoriteManager();
  //Get the favorite threads out of the favorite manager
  TdIterator tdit = tdfm.getFavoriteThreads();
 
Since:
OCS 10.1.1
See Also:
TdFavorite, TdGlobalAdminManager

Method Summary
 TdContainer[] getFavoriteContainers()
          Returns all favorite containers of the current user within the store that this manager was created
 TdIterator getFavoriteLastMessagePosts()
          Returns the list of favorite last message posts.
 TdIterator getFavoritePopularThreads()
          Returns the list of most popular threads within the favorite containers.
 TdIterator getFavoriteThreads()
          Returns all favorite threads of the current user within the store that this manager was created
 TdIterator getFavoriteThreads(TdContainer tdc)
          Returns the list of favorite threads under a container.
 void removeFromFavorites(long iBoardId, int iThreadId)
          Removes a thread from the list of favorite threads for this user by the thread id.
 TdIterator searchFavorites(TdSearchTerm tdst)
          Searches the messages that are in the favorite containers recursively according to the supplied search term.
 TdIterator searchFavorites(TdSearchTerm tdst, boolean searchAnnouncements)
          Searches the messages that are in the favorite containers recursively according to the supplied search term.

 

Method Detail

getFavoriteContainers

public TdContainer[] getFavoriteContainers()
                                    throws TdException,
                                           javax.mail.MessagingException
Returns all favorite containers of the current user within the store that this manager was created
Returns:
TdContainer[]
Throws:
TdException -  
MessagingException -  

getFavoriteThreads

public TdIterator getFavoriteThreads()
                              throws TdException,
                                     javax.mail.MessagingException
Returns all favorite threads of the current user within the store that this manager was created
Returns:
TdIterator containing favorite containers
Throws:
TdException -  
MessagingException -  

getFavoriteThreads

public TdIterator getFavoriteThreads(TdContainer tdc)
                              throws TdException,
                                     javax.mail.MessagingException
Returns the list of favorite threads under a container. 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.
Parameters:
tdc - a TdContainer from which to get favorite threads
Returns:
TdIterator containing favorite threads
Throws:
TdException -  
MessgingException -  

getFavoritePopularThreads

public TdIterator getFavoritePopularThreads()
                                     throws TdException,
                                            javax.mail.MessagingException
Returns the list of most popular threads within the favorite containers. 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.
Returns:
TdIterator containing popular threads
Throws:
TdException -  
MessgingException -  

getFavoriteLastMessagePosts

public TdIterator getFavoriteLastMessagePosts()
                                       throws TdException,
                                              javax.mail.MessagingException
Returns the list of favorite last message posts. 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.
Throws:
TdException -  
MessagingException -  

searchFavorites

public TdIterator searchFavorites(TdSearchTerm tdst)
                           throws TdException,
                                  javax.mail.MessagingException
Searches the messages that are in the favorite containers recursively according to the supplied search term.
Returns:
TdIterator containing search results
Throws:
TdException -  
MessagingException -  

searchFavorites

public TdIterator searchFavorites(TdSearchTerm tdst,
                                  boolean searchAnnouncements)
                           throws TdException,
                                  javax.mail.MessagingException
Searches the messages that are in the favorite containers recursively according to the supplied search term.
Returns:
TdIterator containing search results
Throws:
TdException -  
MessagingException -  

removeFromFavorites

public void removeFromFavorites(long iBoardId,
                                int iThreadId)
                         throws TdException
Removes a thread from the list of favorite threads for this user by the thread id. The thread will be removed even if you do not have access to it anymore.
Throws:
tdException - A generic oracle discussions exception which may be thrown when the thread is being removed from the favorites.

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

B25496-01

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