oracle.discussions.sdk
Class TdThreadSubscription
java.lang.Object
oracle.discussions.sdk.TdSubscription
oracle.discussions.sdk.TdThreadSubscription
- public class TdThreadSubscription
- extends TdSubscription
Represents user subscriptions on a thread.
A subscription is a watch where in if a user requests a subscription on a particular thread, he is notified of ant changes to that particular thread, until he unsubscribes from that thread or that thread is deleted.
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.
- Facility - Category
- Board - Forum
- Delete - Hide
Sample Code illustrating usage of TdThreadSubecription
//Function call
public TdSubscription subscribe(TdThread tdt, int iType)
throws TdException
{
//Extract the TdBoard in which the threads are to be subscribed for
TdBoard tdb = tdt.getBoard();
//Create a TdSubscriptionInfo object
TdSubscriptionInfo tdSbtInfo = null;
//Get subscription handler from the instance variable _tdsession which represents a oracle
//discussions session.
SubscriptionHandler _sbth = _tdsession.getSubscriptionHandler();
// Extract the subscription information
tdSbtInfo = _sbth.subscribe(tdb, tdt.getOracleThreadId(), _tdsession.getTdUser().getUserPrimaryEmail(), iType);
if (tdSbtInfo != null)
return new TdThreadSubscription(_tdsession.getTdUser(), tdb, tdt, tdSbtInfo.getEmail(), tdSbtInfo.getType());
return null;
}
- Since:
- OCS 10.1.1
- See Also:
TdSubscription.java
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TdThreadSubscription
public TdThreadSubscription(TdUser usrctx,
TdBoard tdb,
TdThread tdt,
java.lang.String email,
int iType)
- Constructor to create a TdThreadSubscription Object. Takes in a oracle discussions user, board in which the thread is present, thread which is being subscription is made, email id to which the notification should be sent.
- Parameters:
usrctx
- oracle discussions user for which subscription is made
tdb
- tdboard in which the thread is being subscribed
tdt
- the thread object which is being subscribed
email
- the email address to which notification is sent.
getThread
public TdThread getThread()
- Returns the thread which is being subscribed
-
- Returns:
- TdThread
setTdThread
public void setTdThread(TdThread tdt)
- Sets the thread object for which the subscription is being made