|
Oracle Discussions Java API Reference 10g Release 1 (10.1.2) B25496-01 |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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);
TdSubscription
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 |
public TdSubscription getSubscription(TdContainer tdc) throws TdException
tdc
- the container on which subscription is beign requestedpublic TdThreadSubscription getSubscription(TdThread tdt) throws TdException
tdt
- the thread on which subscription is being requestedpublic boolean isSubscribed(TdContainer tdc) throws TdException
tdc
- container which is being queried for subscriptionpublic boolean isSubscribed(TdThread tdt) throws TdException
tdt
- thread which is beign queried fro subscriptionpublic TdSubscription subscribe(TdContainer tdc, int iType) throws TdException
tdc
- container for which subscription is being requestediType
- it can only be TdSubscription.EMAIL or TdSubscription.DIGESTpublic TdSubscription subscribe(TdThread tdt, int iType) throws TdException
tdt
- thread for which subscription is being requestediType
- it can only be TdSubscription.EMAIL or TdSubscription.DIGESTpublic void unsubscribe(TdSubscription tds) throws TdException
tds
- subscription which is being unsubscribedpublic void updateSubscription(TdSubscription tds) throws TdException
tds
- subscription which is being updatedpublic java.util.List listSubscriptions() throws TdException
|
Oracle Discussions Java API Reference 10g Release 1 (10.1.2) B25496-01 |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |