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

B25496-01

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.

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

Field Summary
protected  TdThread _tdt
           

 

Fields inherited from class oracle.discussions.sdk.TdSubscription
_email, _iType, _tdc, _usrctx, DIGEST, EMAIL

 

Constructor Summary
TdThreadSubscription(TdUser usrctx, TdBoard tdb, TdThread tdt, java.lang.String email, int iType)
          Constructor to create a TdThreadSubscription Object.

 

Method Summary
 TdThread getThread()
          Returns the thread which is being subscribed
 void setTdThread(TdThread tdt)
          Sets the thread object for which the subscription is being made

 

Methods inherited from class oracle.discussions.sdk.TdSubscription
getEmail, getSubscriber, getTdContainer, getType, setEmail, setSubscriber, setTdContainer, setType

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

_tdt

protected TdThread _tdt

Constructor Detail

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.

Method Detail

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
Parameters:
tdt -  

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

B25496-01

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