|
Oracle Collaboration Suite Discussions Web Services Java API Reference 10g (10.1.2.2) Part No. B28210-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Webservice interface providing methods related to Subscriptions on Discussions elements.
Any Oracle Discussions element, added as a favorite can be subscribed.The user subscribing to the element, will receive email notifications, if there is any change in the state of the element.Subscriptions are applies in hierarchial fashion.
For example, if an user subscribed to a forum, he receives a notification on any change in any of the topics/messages in the forum.
A subscription is removed when
Axis specific Sample code illustrating the invocation/usage of SubscriptionService.Relevant changes are to be done, if a non-axis web services client is used.
//Initialize the webservice locator.The locator contains information about webservices endpoint. SubscriptionServiceServiceLocator mdssl = new SubscriptionServiceServiceLocator(); //Retrieve a reference to the remote webservices interface. SubscriptionService mdsl = mdssl.getSubscriptionService(); //Notify the axis server that client is interested in maintaining session. ((SubscriptionServiceSoapBindingStub)mdsl).setMaintainSession(true); //Set the cookie, retrieved during login service invocation. ((javax.xml.rpc.Stub)mdsl)._setProperty(HTTPConstants.HEADER_COOKIE,cookie); //Invoke the webservices method. AbstractContainer aContainer = mdsl.subscribeToContainer(8791); if(aContainer != null) { //Process the container ........ }
Subscription
Method Summary | |
Subscription |
getContainerSubscription(long lContainerId) Returns the subscription for the logged in user on the container represented by lContainerId. |
Subscription |
getTopicSubscription(long lForumId, int iTopicId) Returns the subscription for the logged in user on the topic represented by iTopicId. |
Subscription[] |
listSubscriptions() Returns all the subscriptions for the logged in user. |
Subscription |
subscribeToContainer(long lContainerId, int iType) Creates a container subscription for the logged in user, on the container specified by the lContainerId. |
SubscribeToContainersBulkResponse[] |
subscribeToContainers(long[] lContainerIds, int iType) Creates subscriptions for the logged in user, on the containers specified by the lContainerId array. |
Subscription |
subscribeToTopic(long lForumId, int lTopicId, int iType) Creates a topic subscription for the logged in user, on the topic specified by the lTopicId. |
SubscribeToTopicsBulkResponse[] |
subscribeToTopics(long[] lForumIds, int[] iTopicIds, int iType) Creates subscriptions for the logged in user, on the topics specified by the iTopicId array. |
void |
unsubscribe(Subscription subscription) Removes the user's subscription on the subscription element represented by the id fields in the Subscription bean. |
DeleteElementBulkResponse[] |
unsubscribeInBulk(Subscription[] subscription) Removes the user's subscriptions on the subscription elements represented by the id fields in the Subscription bean array. |
Subscription |
updateSubscription(Subscription subscription) Updates the subscription corresponding to the container/topic represented by the id fields in the Subscription bean. |
DeleteElementBulkResponse[] |
updateSubscriptions(Subscription[] subscription) Updates the subscriptions corresponding to the container/topic represented by the id fields in the Subscription bean array. |
Method Detail |
public Subscription subscribeToContainer(long lContainerId, int iType) throws TdWSException
The type of notification sent to the user is represented by iType. Only email notifications are enabled at present.
lContainerId
- - Id representing the container on which subscription is to be created.iType
- - Notification type to be sent to the user.
TdWSException
- - Thrown on
public Subscription subscribeToTopic(long lForumId, int lTopicId, int iType) throws TdWSException
lForumId should represent the parent forum of the topic. The type of notification sent to the user is represented by iType. Only email notifications are enabled at present.
lForumId
- - Id representing the forum in which the topic is present.lTopicId
- - Id representing topic being subscribed.iType
- - Type of te notification to be sent. iType takes only the value 1 at present.TdWSException
- - Thrown on
public Subscription getContainerSubscription(long lContainerId) throws TdWSException
Returns null, if the user doesnot have any subscription on the container.
lContainerId
- - Id representing the container, on which subscription is to be returned.TdWSException
- - Thrown on
public Subscription getTopicSubscription(long lForumId, int iTopicId) throws TdWSException
Returns null, if the user doesnot have any subscription on the topic. lForumId should represent the parent forum of the topic.
lForumId
- - Id representing the parent forum of the topic.iTopicId
- - Id representing the topic on which subscription is to be returned.TdWSException
- - Thrown on
public Subscription[] listSubscriptions() throws TdWSException
TdWSException
- - Thrown on any exception in retrieving subscription listing for the user.public Subscription updateSubscription(Subscription subscription) throws TdWSException
If the topic id is 0, and if container id represents a valid container then the subscription represents a container subscription and is updated. On the other hand, if both topic and container ids are > 0, and if the ids represent a valid topic, then the topic subscription is updated.
Returns a subscription bean, corresponding to the subscription with the updated values.
subscription
- - Subscription bean, representing the values to be updated.TdWSException
- - Thrown on
public void unsubscribe(Subscription subscription) throws TdWSException
If the topic id is 0, and if container id represents a valid container, then the subscription represents a container subscription, and is unsubscribed. On the other hand, if both topic and contaienr ids are > 0, and if the ids represent a valid topic, then the topic subscription is removed.
subscription
- - Subscription bean, representing the subscription to be removed.TdWSException
- - Thrown on
public SubscribeToContainersBulkResponse[] subscribeToContainers(long[] lContainerIds, int iType) throws TdWSException
The type of notification sent to the user is represented by iType. Only email notifications are enabled at present.
An array of beans representing the result of the bulk operation is returned to the user.
Each of the beans in the array wraps around
lContainerIds
- - An array of ids representing the containers on which subscriptions are to be created.iType
- - Notification type to be sent to the user.
TdWSException
- - Thrown on
public SubscribeToTopicsBulkResponse[] subscribeToTopics(long[] lForumIds, int[] iTopicIds, int iType) throws TdWSException
lForumIds should represent parent forums of topics specified by iTopicIds array. The type of notification sent to the user is represented by iType. Only email notifications are enabled at present.
An array of beans representing the result of the bulk operation is returned to the user.
Each of the beans in the array wraps around
lForumIds
- - An array of ids representing parent forums of the topics.iTopicIds
- - An array of ids representing topics being subscribed.iType
- - Type of te notification to be sent. iType takes only the value 1 at present.TdWSException
- - Thrown on
public DeleteElementBulkResponse[] unsubscribeInBulk(Subscription[] subscription) throws TdWSException
If the topic id is 0, and if container id represents a valid container, then the subscription represents a container subscription, and is unsubscribed.
On the other hand, if both topic and contaienr ids are > 0, and if the ids represent a valid topic, then the topic subscription is removed.
Returns an array of bulk response beans if there is any error in removing any of the subscriptions. Each of the beans will have information about the element failed, the error message and the error stacktrace. Nothing is returned if the removal of all subscriptions is successful.
subscription
- - An array of subscription beans, representing the subscriptions to be removed.TdWSException
- - Thrown on
public DeleteElementBulkResponse[] updateSubscriptions(Subscription[] subscription) throws TdWSException
If the topic id is 0, and if container id represents a valid container then the subscription represents a container subscription and is updated.
On the other hand, if both topic and container ids are > 0, and if the ids represent a valid topic, then the topic subscription is updated.
Returns an array of bulk response beans if there is any error in updating any of the subscriptions. Each of the beans will have information about the element failed, the error message and the error stacktrace. Nothing is returned if the deletion of all the categories is successful.
subscription
- - Subscription bean array, representing the subscriptions to be updated.TdWSException
- - Thrown on
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |