Oracle Collaboration Suite Discussions Java API Reference
10g (10.1.1)

Part No. B16232-01


oracle.discussions.sdk
Interface TdStore


public interface TdStore

TdStore represents an abstraction over a message store for facilities and boards.

Provides methods for

Each user logging into oracle discussions will have a tdstore instance associated with him.
The tdstore object is kept in the tdsession object till the user sessions is active.
Once the user logs out, tdstore object is cleaned up and the session is refreshed.

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.

Sample code for illustrating usage of TdStore

 //Create a TdInitialContext Object which represents an extension of a map 
 //holding various key-value pairs.
 TdInitialContext tdic = new TdInitialContext(mEnv);
 //Create an instance of TdStoreManager which initialized various sessions like 
 //Oracle java mail session, javax.mail session, initialized logger etc.
 TdStoreManager s_tdStoreMgr = TdStoreManager.createInstance(tdic);
 //Create an instance of TdStoreFactory, which is a factory class providing methods to
 //create a TdStore instance.
 TdStoreFactory s_tdsf = s_tdStoreMgr.getTdStoreFactory();
 //Create an TdUserFactory, which is a factory class providing methods to create TdUser objects.
 TdUserFactory ouf = TdUserFactory.getInstance();
 //Extract a tduser from the userfactory based on the guid.
 TdUser tduser = null;
 tduser = ouf.getTdUserByGuid(userGuid);
 Create a tdstore for this user.
 tdStore = s_tdsf.getTdStore(tduser,true); 
 //Set the tdStore into session after wrapping it up.
 HttpSessionTdStore hsts = new HttpSessionTdStore(tdStore);
 ses.setAttribute(TD_STORE,    hsts);//ses is a session HttpSession instance
Since:
OCS 10.1.1
See Also:
TdStoreFactory.java, in oracle email package, TdStoreManager.java

Method Summary
void close()
Closes this TdStore and releases all the resources associated with it without updating user logout time
void close(boolean bUpdateUserLogout)
Closes this TdStore and releases all the resources associated with it.
TdBoard createBoard(TdFacility tdfParent, java.lang.String boardName, java.lang.String boardDisplayName, java.lang.String boardDescription, java.lang.String boardEmail, boolean isPublic)
Creates a Board under the root facility
TdBoard createBoard(TdFacility tdfParent, java.lang.String boardName, java.lang.String boardDisplayName, java.lang.String boardDescription, java.lang.String boardEmail, boolean isPublic, boolean bWithAnnouncementsBoard)
Creates a Board under the root facility
TdFacility createFacility(TdFacility tdfParent, java.lang.String facilityName, java.lang.String facilityDisplayName, java.lang.String facilityDescription)
Creates a new TdFacility in this message store.
TdFacility createFacility(TdFacility tdfParent, java.lang.String facilityName, java.lang.String facilityDisplayName, java.lang.String facilityDescription, boolean bWithAnnouncementsBoard)
Creates a new TdFacility in this message store.
TdBoard getAnnouncementsBoard()
Returns the Announcements Board for this store.
TdBoard getBoard(long lBrdId)
Returns a board under this Store give its id.
TdBoard getBoard(java.lang.String path)
Returns a board under this Store give its path.
TdBoard getBoardByEmailAddress(java.lang.String boardEmail)
Returns a board given its email address.
TdContainer getContainer(long lCntId)
Returns a container under this Store give its id.
TdContainer getContainer(java.lang.String path)
Returns a container under this Store give its path.
java.lang.String getDomain()
Returns the domain for this mail store.
TdFacility getFacility(long lFacId)
Returns a facility under this Store give its path.
TdFacility getFacility(java.lang.String path)
Returns a facility under this Store give its path.
TdFavoriteManager getFavoriteManager()
Returns the TdFavoriteManager for this store.
TdGlobalAdminManager getGlobalAdminManager()
Returns the TdGlobalAdminManager for this store.
TdGlobalSettings getGlobalSettings()
Returns the global settings of current installation
TdUser getGuestUser()
Returns guest user within the domain
TdIterator getLastMessagePosts()
Returns the list of most recent posts in the whole message store.
TdLastPost getLastPost()
Returns information on the most recently posted message under this tdstore.
TdMyFollowups getMyFollowups()
Gets all followups to my posts
TdMyPosts getMyPosts()
Gets all my posts
TdIterator getPopularThreads()
Returns the list of most popular threads under this container.
TdRole getRole()
Returns global role for the current user.
TdSubscriptionManager getSubscriptionManager()
Returns the TdSubscriptionManager for this store.
TdUser getTdUser()
Returns the TdUser for this store
TdUserProfile getTdUserProfile()
Returns the TdUser for this store
TdUserProfileManager getUserProfileManager()
Returns the TdUserInfoManager for this store.
boolean hasAnnouncementsBoard()
Returns true if the announcements board has been created
boolean isGlobalAdmin()
Returns true if the current user is a global admin for the system.
boolean isGuest()
Returns true if the current user is a guest for the domain
javax.mail.Folder[] list()
Returns a List of TdFacility objects, one ofr each first level facility under this message store without refreshing the cache.
javax.mail.Folder[] list(boolean bRefresh)
Returns a List of TdFacility objects, one ofr each first level facility under this message store.
javax.mail.Folder[] list(java.lang.String path)
Returns an array of TdContainers (Tdfacility or TdBoard) which are children of this facility without refreshing the cache.
javax.mail.Folder[] list(java.lang.String path, boolean bRefresh)
Returns an array of TdContainers (Tdfacility or TdBoard) which are children of this facility.
TdIterator search(TdSearchTerm tdst)
Searches the message in this container recursively according to the supplied search term.
TdIterator search(TdSearchTerm tdst, boolean searchAnnouncements)
Searches the message in this container recursively according to the supplied search term.
TdIterator search(TdSearchTerm tdst, java.util.List tdContainers)
Searches the messages in the containers passed in recursively according to the supplied search term.
TdIterator search(TdSearchTerm tdst, java.util.List tdContainers, boolean searchAnnouncements)
Searches the messages in the containers passed in recursively according to the supplied search term.
void updateGlobalSettings(TdGlobalSettings tdgs)
Updates global settings of the current oracle discussions

Method Detail

close

public void close()
           throws TdException
Closes this TdStore and releases all the resources associated with it without updating user logout time
Throws:
TdException

close

public void close(boolean bUpdateUserLogout)
           throws TdException
Closes this TdStore and releases all the resources associated with it.
Parameters:
bUpdateUserLogout - boolean value indicating if the user logout time is to be updated.
Throws:
TdException

getGlobalSettings

public TdGlobalSettings getGlobalSettings()
                                   throws TdException
Returns the global settings of current installation
Returns:
TdGlobalSettings
Throws:
TdException

updateGlobalSettings

public void updateGlobalSettings(TdGlobalSettings tdgs)
                          throws TdException
Updates global settings of the current oracle discussions
Parameters:
tdgs - a map representing global settings values
Throws:
TdException

list

public javax.mail.Folder[] list(java.lang.String path)
                         throws javax.mail.MessagingException
Returns an array of TdContainers (Tdfacility or TdBoard) which are children of this facility without refreshing the cache.
Parameters:
path - String representing a path frmo where the folder list is to be extracted.
Returns:
Folder[] folder array
Throws:
javax.mail.MessagingException

list

public javax.mail.Folder[] list(java.lang.String path,
                                boolean bRefresh)
                         throws javax.mail.MessagingException
Returns an array of TdContainers (Tdfacility or TdBoard) which are children of this facility. If bRefresh is true, refresh the cache.
Parameters:
path - string representing a path from which the folder list is to be extracted.
bRefresh - boolean value representing if the cache is to be updated.
Returns:
Folder[]
Throws:
javax.mail.MessagingException

list

public javax.mail.Folder[] list()
                         throws javax.mail.MessagingException
Returns a List of TdFacility objects, one ofr each first level facility under this message store without refreshing the cache.
Returns:
Folder[] the folder list being retrieved
Throws:
javax.mail.MessagingException

list

public javax.mail.Folder[] list(boolean bRefresh)
                         throws javax.mail.MessagingException
Returns a List of TdFacility objects, one ofr each first level facility under this message store. If bRefresh is true, refresh the cache.
Parameters:
bRefresh - boolean flag indicating if the cache is to be refreshed
Returns:
Folder[] the folder list being retrieved
Throws:
Messaging - Exception
javax.mail.MessagingException

getContainer

public TdContainer getContainer(java.lang.String path)
                         throws TdException
Returns a container under this Store give its path.
Returns:
TdContainer if a container with the supplied name is found, null otherwise
Throws:
TdException

getBoard

public TdBoard getBoard(java.lang.String path)
                 throws TdException
Returns a board under this Store give its path.
Returns:
TdBoard if a board with the supplied path is found, null otherwise
Throws:
TdException

getFacility

public TdFacility getFacility(java.lang.String path)
                       throws TdException
Returns a facility under this Store give its path.
Parameters:
path - the path at which facility is to be retrieved from
Returns:
TdFacility if a facility with the supplied path is found, null otherwise
Throws:
TdException

getContainer

public TdContainer getContainer(long lCntId)
                         throws TdException
Returns a container under this Store give its id.
Parameters:
lCntId - container identifier which is being retrieved.
Returns:
TdContainer if a container with the supplied id is found, null otherwise.
Throws:
TdException

getBoard

public TdBoard getBoard(long lBrdId)
                 throws TdException
Returns a board under this Store give its id.
Parameters:
lBrdId - the identifier of the board which is being retrieved
Returns:
TdBoard if a board with the supplied id is found, null otherwise.
Throws:
TdException

getFacility

public TdFacility getFacility(long lFacId)
                       throws TdException
Returns a facility under this Store give its path.
Returns:
TdFacility if a facility with the supplied path is found, null otherwise.
Throws:
TdException

createFacility

public TdFacility createFacility(TdFacility tdfParent,
                                 java.lang.String facilityName,
                                 java.lang.String facilityDisplayName,
                                 java.lang.String facilityDescription)
                          throws TdException
Creates a new TdFacility in this message store. If no parent facility is supplied (tdfParent is null), then the facility will be created as a first level under the store.
Parameters:
tdfParent - the parent facility under which the current facility is being created
facilityName - name of the facility being created.
facilityDisplayName - display name of the facility
facilityDescription - the description for this facility
Returns:
the newly created TdFacility
Throws:
TdException

createFacility

public TdFacility createFacility(TdFacility tdfParent,
                                 java.lang.String facilityName,
                                 java.lang.String facilityDisplayName,
                                 java.lang.String facilityDescription,
                                 boolean bWithAnnouncementsBoard)
                          throws TdException
Creates a new TdFacility in this message store. If no parent facility is supplied (tdfParent is null), then the facility will be created as a first level under the store.
Parameters:
tdfParent - the parent facility under which the current facility is being created
facilityName - name of the facility being created.
facilityDisplayName - display name of the facility
facilityDescription - the description for this facility
bWithAnnouncementsBoard - boolean value indicating if the announcements board will be created automatically.
Returns:
the newly created TdFacility
Throws:
TdException

createBoard

public TdBoard createBoard(TdFacility tdfParent,
                           java.lang.String boardName,
                           java.lang.String boardDisplayName,
                           java.lang.String boardDescription,
                           java.lang.String boardEmail,
                           boolean isPublic)
                    throws TdException
Creates a Board under the root facility
Parameters:
tdfParent - the facility under which the board is being created.
boardName - the name of the board which is being created.
boardDisplayName - the display name for this board.
boardDescription - description for this board.
boardEmail - email id associated with the board.
isPublic - boolean value indicating if the board is publicly accessible.
Returns:
TdBoard the newly created board
Throws:
TdException

createBoard

public TdBoard createBoard(TdFacility tdfParent,
                           java.lang.String boardName,
                           java.lang.String boardDisplayName,
                           java.lang.String boardDescription,
                           java.lang.String boardEmail,
                           boolean isPublic,
                           boolean bWithAnnouncementsBoard)
                    throws TdException
Creates a Board under the root facility
Parameters:
tdfParent - the facility under which the board is being created.
boardName - the name of the board which is being created.
boardDisplayName - the display name for this board.
boardDescription - description for this board.
boardEmail - email id associated with the board.
isPublic - boolean value indicating if the board is publicly accessible.
bWithAnnouncementsBoard - boolean value indicating if the announcements board will be created automatically.
Returns:
TdBoard the newly created board
Throws:
TdException

getTdUser

public TdUser getTdUser()
Returns the TdUser for this store
Returns:
TdUser

getTdUserProfile

public TdUserProfile getTdUserProfile()
                               throws TdException
Returns the TdUser for this store
Returns:
TdUserProfile
Throws:
TdException

getUserProfileManager

public TdUserProfileManager getUserProfileManager()
Returns the TdUserInfoManager for this store. The user profile manager can be used to access user's profiles containing basci user information and statistics.
Returns:
TdUserProfileManager

getFavoriteManager

public TdFavoriteManager getFavoriteManager()
Returns the TdFavoriteManager for this store. The favorite manager can be used to obtain favorite threads and containers, as well as get other information and perform other operations on these favorite threads and containers.
Returns:
TdFavoriteManager

getGlobalAdminManager

public TdGlobalAdminManager getGlobalAdminManager()
                                           throws TdException
Returns the TdGlobalAdminManager for this store. The global admin manager can only be obtained if the user is a global admin. It can be used to list other global admins, add global admins, and revoke global admins.
Returns:
TdGlobalAdminManager
Throws:
TdException

search

public TdIterator search(TdSearchTerm tdst)
                  throws TdException,
                         javax.mail.MessagingException
Searches the message in this container recursively according to the supplied search term.
Parameters:
tdst - the search term which is to be searched
Returns:
TdIterator
Throws:
TdException
javax.mail.MessagingException

search

public TdIterator search(TdSearchTerm tdst,
                         boolean searchAnnouncements)
                  throws TdException,
                         javax.mail.MessagingException
Searches the message in this container recursively according to the supplied search term.
Parameters:
tdst - the search term which is to be searched
searchAnnouncements - whether to search announcements as well
Returns:
TdIterator
Throws:
TdException
javax.mail.MessagingException

search

public TdIterator search(TdSearchTerm tdst,
                         java.util.List tdContainers)
                  throws TdException,
                         javax.mail.MessagingException
Searches the messages in the containers passed in recursively according to the supplied search term.
Parameters:
tdst - the searchterm which is to be searched
tdContainers - the container listing limiting the search
Returns:
TdIterator
Throws:
TdException
javax.mail.MessagingException

search

public TdIterator search(TdSearchTerm tdst,
                         java.util.List tdContainers,
                         boolean searchAnnouncements)
                  throws TdException,
                         javax.mail.MessagingException
Searches the messages in the containers passed in recursively according to the supplied search term.
Parameters:
tdst - the searchterm which is to be searched
tdContainers - the container listing limiting the search
searchAnnouncements - whether to search announcements as well
Returns:
TdIterator
Throws:
TdException
javax.mail.MessagingException

getMyPosts

public TdMyPosts getMyPosts()
                     throws TdException,
                            javax.mail.MessagingException
Gets all my posts
Returns:
TdMyPosts
Throws:
TdException
javax.mail.MessagingException

getMyFollowups

public TdMyFollowups getMyFollowups()
                             throws TdException,
                                    javax.mail.MessagingException
Gets all followups to my posts
Returns:
TdMyFollowups
Throws:
TdException
javax.mail.MessagingException

getLastPost

public TdLastPost getLastPost()
                       throws javax.mail.MessagingException
Returns information on the most recently posted message under this tdstore. All the boards under this tdstore to which the current user has access to, are considered.
Returns:
TdlastPost
Throws:
javax.mail.MessagingException

getPopularThreads

public TdIterator getPopularThreads()
                             throws TdException,
                                    javax.mail.MessagingException
Returns the list of most popular threads under this 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.
Returns:
TdIterator
Throws:
TdException
javax.mail.MessagingException

getLastMessagePosts

public TdIterator getLastMessagePosts()
                               throws TdException,
                                      javax.mail.MessagingException
Returns the list of most recent posts in the whole message store.
Returns:
TdIterator
Throws:
TdException
javax.mail.MessagingException

hasAnnouncementsBoard

public boolean hasAnnouncementsBoard()
                              throws TdException
Returns true if the announcements board has been created
Returns:
boolean
Throws:
TdException

getAnnouncementsBoard

public TdBoard getAnnouncementsBoard()
                              throws TdException
Returns the Announcements Board for this store.
Returns:
TdBoard
Throws:
TdException

getBoardByEmailAddress

public TdBoard getBoardByEmailAddress(java.lang.String boardEmail)
                               throws TdException
Returns a board given its email address. Returns null if no board associated with the supplied email address is found.
Parameters:
boardEmail - board email address
Returns:
TdBoard
Throws:
TdException

getRole

public TdRole getRole()
               throws TdException
Returns global role for the current user.
Returns:
TdRole
Throws:
TdException

isGlobalAdmin

public boolean isGlobalAdmin()
                      throws TdException
Returns true if the current user is a global admin for the system.
Returns:
boolean
Throws:
TdException

isGuest

public boolean isGuest()
Returns true if the current user is a guest for the domain

getGuestUser

public TdUser getGuestUser()
Returns guest user within the domain

getDomain

public java.lang.String getDomain()
Returns the domain for this mail store.
Returns:
String

getSubscriptionManager

public TdSubscriptionManager getSubscriptionManager()
Returns the TdSubscriptionManager for this store. The subscription manager can be used to create/remove/update/retrieve subscriptions.
Returns:
TdSubscriptionManager

Copyright © 2005, Oracle. All rights reserved.