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

Part No. B16232-01


oracle.discussions.sdk
Interface TdStoreFactory


public interface TdStoreFactory

TdStoreFactory creates TdStore instances for discussions users.

The TdStoreFactory is configued so that it will connect to a given Discussions Store and therefore a given email domain. Users logging in through this TdStoreFactory should be email provisioned for the same email domain configured for this TdStoreFactory instance.

Sample code snippet illustrating the usage of TdStoreFactory

 //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); 
 
Since:
OCS 10.1.1
See Also:
TdStore.java, TdStoreManager.java

Method Summary
java.lang.String getEmailDomain()
Returns the email domain for which this TdStoreFactory is configured.
TdStore getTdStore(TdUser tdusr)
Returns a TdStore to be used for this mid-tier.
TdStore getTdStore(TdUser tdusr, boolean bUpdateUserLogin)
Returns a TdStore to be used for this mid-tier.

Method Detail

getTdStore

public TdStore getTdStore(TdUser tdusr)
                   throws TdException
Returns a TdStore to be used for this mid-tier. The supplied TdUser willbe authenticated under that store.
Returns:
TdStore the tdstore which is extracted
Throws:
TdException

getTdStore

public TdStore getTdStore(TdUser tdusr,
                          boolean bUpdateUserLogin)
                   throws TdException
Returns a TdStore to be used for this mid-tier. The supplied TdUser willbe authenticated under that store.
Parameters:
tdusr - the user for whom the tdstore is being returned.
bUpdateUserLogin - boolean values indicating whether user logintime is to be updated.
Returns:
TdStore the tdstore just retrieved.
Throws:
TdException

getEmailDomain

public java.lang.String getEmailDomain()
Returns the email domain for which this TdStoreFactory is configured.
Returns:
String

Copyright © 2005, Oracle. All rights reserved.