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

Part No. B16232-01


oracle.discussions.sdk
Interface TdSubscriptionManager


public interface TdSubscriptionManager

Represents a class which manages user subscriptions.

A subscription can be set and unset on a discussions element using subscription manager.

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 snippet illustrating the usage of TdSubscriptionManager

 //Retrieve the TdSubscriptionManager from TdStore
  TdSubscriptionManager tdSbtMgr = tdStore.getSubscriptionManager();
 //brdPath is the path from which board is being extrated.
  TdBoard tdb = tdStore.getBoard(brdPath);
 //Extract a thread from the board.
  TdThread tdt = tdb.getThread(Integer.parseInt(threadId)) ;
 //Remove the thread from favorites.
  tdt.removeFromFavorites();
 //Unsubscribe the thread.
 TdSubscription tdSbt = tdSbtMgr.getSubscription(tdt);
 if (tdSbt != null)
    tdSbtMgr.unsubscribe(tdSbt);
 
Since:
OCS 10.1.1
See Also:
TdSubscription.java

Method Summary
TdSubscription getSubscription(TdContainer tdc)
Returns the subscription of current user on the given container, null if the container is not subscribed.
TdThreadSubscription getSubscription(TdThread tdt)
Returns the subscription of current user on the given thread, null if the container is not subscribed.
boolean isSubscribed(TdContainer tdc)
Returns true if there is any subscription on the given container
boolean isSubscribed(TdThread tdt)
Returns true if there is any subscription on the given thread
java.util.List listSubscriptions()
Returns all subscriptions for the current user
TdSubscription subscribe(TdContainer tdc, int iType)
Creates a subscription of the given email and type on the given container
TdSubscription subscribe(TdThread tdt, int iType)
Creates a subscription of the given email and type on the given thread
void unsubscribe(TdSubscription tds)
Removes the given subscription
void updateSubscription(TdSubscription tds)
Updates the given subscription

Method Detail

getSubscription

public TdSubscription getSubscription(TdContainer tdc)
                               throws TdException
Returns the subscription of current user on the given container, null if the container is not subscribed.
Returns:
subscription on the given container for current user
Throws:
TdException

getSubscription

public TdThreadSubscription getSubscription(TdThread tdt)
                                     throws TdException
Returns the subscription of current user on the given thread, null if the container is not subscribed.
Returns:
subscription on the given thread for current user
Throws:
TdException

isSubscribed

public boolean isSubscribed(TdContainer tdc)
                     throws TdException
Returns true if there is any subscription on the given container
Returns:
true if the given container is subscribed
Throws:
TdException

isSubscribed

public boolean isSubscribed(TdThread tdt)
                     throws TdException
Returns true if there is any subscription on the given thread
Returns:
true if the given thread is subscribed
Throws:
TdException

subscribe

public TdSubscription subscribe(TdContainer tdc,
                                int iType)
                         throws TdException
Creates a subscription of the given email and type on the given container
Returns:
TdSubscription
Throws:
TdException

subscribe

public TdSubscription subscribe(TdThread tdt,
                                int iType)
                         throws TdException
Creates a subscription of the given email and type on the given thread
Returns:
TdSubscription
Throws:
TdException

unsubscribe

public void unsubscribe(TdSubscription tds)
                 throws TdException
Removes the given subscription
Throws:
TdException

updateSubscription

public void updateSubscription(TdSubscription tds)
                        throws TdException
Updates the given subscription
Throws:
TdException

listSubscriptions

public java.util.List listSubscriptions()
                                 throws TdException
Returns all subscriptions for the current user
Returns:
all subscriptions belonging to the current user
Throws:
TdException

Copyright © 2005, Oracle. All rights reserved.