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

Part No. B16232-01


oracle.discussions.sdk
Class TdThreadSubscription

java.lang.Object
  extended byoracle.discussions.sdk.TdSubscription
      extended byoracle.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.java

Field Summary

Fields inherited from class oracle.discussions.sdk.TdSubscription
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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

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

Copyright © 2005, Oracle. All rights reserved.