|
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 |
Web services interface providing methods to access content of user's interest.
The interface exposes methods for users, to
It also provides bulk methods to add/remove containers,topics to favorite listing.Axis specific Sample code illustrating the invocation/usage of MyDiscussionsService.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. MyDiscussionsServiceServiceLocator mdssl = new MyDiscussionsServiceServiceLocator(); //Retrieve a reference to the remote webservices interface. MyDiscussionsService mdsl = mdssl.getMyDiscussionsService(); //Notify the axis server that client is interested in maintaining session. ((MyDiscussionsServiceSoapBindingStub)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[] containers = mdsl.getFavoriteContainers(); AbstractContainer aContainer = null; if(containers != null) { //Process the retrieved container listing. ........ }
Method Summary | |
AddContainersToFavoritesBulkResponse[] |
addContainersToFavorites(long[] lContainerIds) Adds an array of containers, represented by lContainerIds to the user's favorite listing. |
AbstractContainer |
addContainerToFavorites(long containerId) Adds the container specified by containerId, to the user's favorite listing. |
AddTopicsToFavoritesBulkResponse[] |
addTopicsToFavorites(long lForumId, int[] iTopicIds) Adds an array of topics, represented by iTopicIds to the user's favorite listing. |
Topic |
addTopicToFavorites(long lForumId, int iTopicId) Adds the topic specified by iTopicId to user's favorite listing. |
Category[] |
getFavoriteCategories() Returns the user's favorite category listing. |
AbstractContainer[] |
getFavoriteContainers() Returns the user's favorite container listing. |
Forum[] |
getFavoriteForums() Returns the user's favorite forum listing. |
Topic[] |
getFavoritePopularTopics() Returns the most popular topics, in the user's favorite topic listing. |
ForumMessage[] |
getFavoriteRecentPosts() Returns the topics with most recently posted messages, in the user's favorite listing. |
ForumMessage[] |
getMyPosts() Returns all the messages posted by the user. |
ForumMessage[] |
getPopularMyPosts() Returns the most popular messages, among all the messages posted by the user. |
ForumMessage[] |
getPopularRepliesToMyPosts() Returns the most popular messages among the replies to user's posts. |
Topic[] |
getPopularTopics(long lContainerId) Returns the most popular topics, among all the topics in the container represented by lContainerId. |
ForumMessage[] |
getRecentMyPosts() Returns the most recently posted messages, among all messages posted by the user. |
ForumMessage[] |
getRecentPosts(long lContainerId) Returns the most recently posted messages in the container specified by lContainerId. |
ForumMessage[] |
getRecentRepliesToMyPosts() Returns the most recent messages, among the replies to user's posts. |
ForumMessage[] |
getRepliesToMyPosts() Returns the messages posted by the user, to which other users have replied. |
Topic[] |
listAllFavoriteTopics() Returns the listing of user's favorite topics in entire Discussions system. |
Topic[] |
listFavoriteTopics(long lContainerId) Returns the listing of user's favorite topics in the container specified by lContainerId. |
void |
removeContainerFromFavorites(long lContainerId) Removes the container specified by containerId, from the user's favorite listing. |
DeleteElementBulkResponse[] |
removeContainersFromFavorites(long[] lContainerIds) Deletes the containers specified by lContainerIds. |
void |
removeTopicFromFavorites(long lForumId, int iTopicId) Removes the topic specified by iTopicId from user's favorite listing. |
DeleteElementBulkResponse[] |
removeTopicsFromFavorites(long lForumId, int[] iTopicIds) Deletes the topics specified by iTopicIds. |
ForumMessage[] |
search(SearchTerm st) Searches user's favorite containers for the search criterion specified in the search term. |
Method Detail |
public AbstractContainer addContainerToFavorites(long containerId) throws TdWSException
A bean representing the container added to favorites is returned to the user.
If a favorite container is again added to favorites, the method just returns the bean, corresponding to the container. The Discussions root container cannot be added/removed from user's favorites listing.
containerId
- - Id representing the container to be added to favorites.TdWSException
- - Thrown on
public void removeContainerFromFavorites(long lContainerId) throws TdWSException
If a non-favorite container is removed from favorites, the method just returns. The Discussions root container cannot be added/removed from user's favorites listing.
lContainerId
- - Id representing the container to be added to favorites.TdWSException
- - Thrown on
public AbstractContainer[] getFavoriteContainers() throws TdWSException
Returns null, if there are no containers in the user's favorite list. The containers returned can include forums and categories as well.
ContainerType attribute/isCategoryType() method of AbstractContainer bean can be used to distinguish between a category and forum.
TdWSException
- - Thrown on any exception in retrieving the favorite container listing.public Category[] getFavoriteCategories() throws TdWSException
Similar to getFavoriteContainers() method, but this method returns only favorite categories.
Returns null, if there are no categories in the user's favorite list. ContainerType attribute/isCategoryType() method of Category bean can be used to check if the container returned is a category.
TdWSException
- - Thrown on any exception in retrieving the favorite category listing.public Forum[] getFavoriteForums() throws TdWSException
Similar to getFavoriteContainers() method, but this method returns only favorite forums.
Returns null, if there are no forums in the user's favorite list. ContainerType attribute/isCategoryType() method of Forum bean can be used to check if the container returned is a forum.
TdWSException
- - Thrown on any exception in retrieving the favorite forum listing.public Topic addTopicToFavorites(long lForumId, int iTopicId) throws TdWSException
A bean representing the topic, added to favorites is returned to the user.
If a favorite topic is again added to favorites, the method just returns the bean, corresponding to the topic.
lForumId should represent the parent forum of the topic being added to favorites.
lForumId
- - Id representing the parent forum of the topic being added to favorites.iTopicId
- - Id representing the topic being added to favorites.TdWSException
- - Thrown on
public void removeTopicFromFavorites(long lForumId, int iTopicId) throws TdWSException
lForumId
- - Id representing the parent forum of the topic being removed from favorites.iTopicId
- - Id representing the topic being removed from favorites.TdWSException
- - Thrown on
public Topic[] listAllFavoriteTopics() throws TdWSException
Returns null, if the user doesnot have any favorite topics.
TdWSException
- - Thrown on any exception in retrieving favorite topic listing.public Topic[] listFavoriteTopics(long lContainerId) throws TdWSException
Returns null, if the user doesnot have any favorite topics in the container.
lContainerId
- - Id representing the container from which, favorite topics are to be retrieved.TdWSException
- - Thrown on
public Topic[] getFavoritePopularTopics() throws TdWSException
Returns null,if there are no favorite popular topics.
Popular topics are defined as those threads, which receive the highest number of the replies in a given amount of time. Most popular threads assist the user in identifying the threads which recently received the highest number of contributions, which is an indication that their topic of discussion is quite relevant for a given board.
TdWSException
- - Thrown on any exception in retrieving user's favorite popular topic listing.public ForumMessage[] getFavoriteRecentPosts() throws TdWSException
Returns null,if there are no favorite topics, with recently posted messages.
Most Recent Posts is recorded at Facility and Board level. The list of most recently posted messages provides a snapshot of the recent activity in the whole system, a single facility or board.
TdWSException
- - Thrown on any exception in retrieving user's favorite topics, with recently posted messages.public Topic[] getPopularTopics(long lContainerId) throws TdWSException
lContainerId
- - Id representing the container, from which the popular topic listing, is to be returned.TdWSException
- Thrown on
public ForumMessage[] getRecentPosts(long lContainerId) throws TdWSException
Returns null, if there are no recently posted messages in the container. Most Recent Posts is recorded at Facility and Board level. The list of most recently posted messages provides a snapshot of the recent activity in the whole system, a single facility or board.
lContainerId
- - Id specifying the container from which recent posts are to be retrieved.TdWSException
- - Thrown on
public ForumMessage[] getMyPosts() throws TdWSException
Returns null, if the user has not posted any messages so far.
TdWSException
- - Thrown on any exception in retrieving user posted messages.public ForumMessage[] getPopularMyPosts() throws TdWSException
TdWSException
- - Thrown on any exception in retrieving user's popular posts.public ForumMessage[] getRecentMyPosts() throws TdWSException
TdWSException
- - Thrown on any exception in retrieving user's recent posts.public ForumMessage[] getRepliesToMyPosts() throws TdWSException
TdWSException
- - Thrown on any exception in retrieving the messages.public ForumMessage[] getPopularRepliesToMyPosts() throws TdWSException
TdWSException
- - Thrown on any exception in retrieving the popular replies to user's posts.public ForumMessage[] getRecentRepliesToMyPosts() throws TdWSException
TdWSException
- - Thrown on any exception in retrieving the recent replies to user's posts.public ForumMessage[] search(SearchTerm st) throws TdWSException
Returns null, if there are no favorite containers for the user.
The search criterion can be supplied in the searchterm. Wild card searches are also possible.
Search is limited to searching message subject and content as of now.
If the user wants to search on a list of containers of his choice, search service in Container service interface can be made use of.
st
- - Searchterm, specifying search criterion.TdWSException
- - Thrown on any exception in retrieving search results.SearchTerm
, ContainerService.search(long[], oracle.discussions.ws.beans.SearchTerm, boolean)
public AddContainersToFavoritesBulkResponse[] addContainersToFavorites(long[] lContainerIds) throws TdWSException
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 container ids, representing the containers to be added to the user's favorites.TdWSException
- - Thrown on
public DeleteElementBulkResponse[] removeContainersFromFavorites(long[] lContainerIds) throws TdWSException
Returns an array of bulk response beans if there is any error in deleting any of the containers. 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 containers is successful.
lContainerIds
- - An array of ids representing the containers to be deleted.TdWSException
- - Thrown on
public AddTopicsToFavoritesBulkResponse[] addTopicsToFavorites(long lForumId, int[] iTopicIds) throws TdWSException
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
lForumId
- - Id representing the parent forum of the topics being added to favorites.iTopicIds
- - An array of topic ids, representing the topics to be added to the user's favorites.TdWSException
- - Thrown on
public DeleteElementBulkResponse[] removeTopicsFromFavorites(long lForumId, int[] iTopicIds) throws TdWSException
Returns an array of bulk response beans if there is any error in deleting any of the topics. 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 topics is successful.
lForumId should represent the parent forum of the topics to be deleted.
TdWSException
- - Thrown on
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |