Oracle Collaboration Suite Discussions Web Services Java API Reference
10g (10.1.2.2)

Part No. B28210-01


oracle.discussions.ws
Interface ContainerService


public interface ContainerService

Webservices interface providing operations common to both category service and forum service.

Container is an abstraction of both category and forum.
The interface exposes methods for users, to

Axis specific Sample code illustrating the invocation/usage of ContainerService.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. 
 ContainerServiceServiceLocator mdssl = new ContainerServiceServiceLocator();
 //Retrieve a reference to the remote webservices interface.
 ContainerService mdsl = mdssl.getContainerService();
 //Notify the axis server that client is interested in maintaining session.
 ((ContainerServiceSoapBindingStub)mdsl).setMaintainSession(true);
 //Set the cookie, retrieved during login service invocation.
 ((javax.xml.rpc.Stub)mdsl)._setProperty(HTTPConstants.HEADER_COOKIE,cookie);
 //Prepare the input parameters
 long[] lContainerIds = {....};//Valid container ids
 SearchTerm sterm = new SearchTerm();
 sterm.setAuthor("td_superuser");//valid OID user
 boolean bSearchAnnouncements = true;//Indicates that announcements are also to be searched for messages.
 //Invoke the webservices method.
 ForumMessage[] results = mdsl.search(lContainerIds, sterm, bSearchAnnouncements);
 if(results != null)
 {
 //Process the retrieved search results.
 ........
 }
 
See Also:
CategoryService, ForumService

Method Summary
 Forum getAnnouncementsForum(long lContainerId)
          Retrieves announcements forum in the container specified by lContainerId.
 LastPost getLastpost(long lContainerId)
          Returns lastpost information in the container specified by lContainerId.
 AbstractContainer getParent(long lContainerId)
          Returns the parent container of the container specified by lContainerId.
 Role getRole(long lContainerId)
          Returns the role of the currently logged in user on the container specified by lContainerId.
 GranteeRole[] listGranteeRoles(long lContainerId)
          Returns the roles of all the users on the container specified by the lContainerId.
 ForumMessage[] search(long[] lContainerId, SearchTerm st, boolean bSearchAnnouncements)
          Searches the containers specified by lContainerId for the elements matching the search criterion specified by the search term st.
 GranteeRole[] updateGranteeRoles(long lContainerId, GranteeRole[] grRoleArray)
          Edits the roles of users on the container specified by lContainerId.

 

Method Detail

getParent

public AbstractContainer getParent(long lContainerId)
                            throws TdWSException
Returns the parent container of the container specified by lContainerId. A null value is returned, if the id represents a root container,as the parent of any root container would be Discussions root.
Parameters:
lContainerId - - Id representing the container for which, parent is to be retrieved.
Returns:
AbstractContainer - Bean representing the parent container.
Throws:
TdWSException - - Thrown on
  • any exception in retrieving parent container
  • if the user doesnot have access to the container specified.
  • if lContainerId represents Discussions root(-1)
  • if lContainerId doesnot represent a valid container

getLastpost

public LastPost getLastpost(long lContainerId)
                     throws TdWSException
Returns lastpost information in the container specified by lContainerId. Laspost information is computed on all the messages under the container, and hence if the container doesnot have any messages under it, null is returned.
Parameters:
lContainerId - - Id representing container, in which lastpost is to be retrieved.
Returns:
LastPost - Bean representing lastpost information.
Throws:
TdWSException - - Thrown on
  • any exception in retrieving lastpost information
  • if the user doesnot have accesss to the container specified
  • if lContainerId doesnot represent a valid container

listGranteeRoles

public GranteeRole[] listGranteeRoles(long lContainerId)
                               throws TdWSException
Returns the roles of all the users on the container specified by the lContainerId. The roles returned include inherited roles also.
Parameters:
lContainerId - - Id representing container on which, roles are to be returned.
Returns:
GranteeRole] - An array of grantee roles of all users on the container.
Throws:
TdWSException - - Thrown on
  • any exception in retrieving the users' roles
  • if the user invoking the operation doesnot have access to the container
  • if lContainerId doesnot represent a valid container

updateGranteeRoles

public GranteeRole[] updateGranteeRoles(long lContainerId,
                                        GranteeRole[] grRoleArray)
                                 throws TdWSException
Edits the roles of users on the container specified by lContainerId.

It is imperative that the grantee role information of the user invoking the operation is also specified, when invoking the operation. The roles inherited from the parent container cannot be edited at this container level. User cannot edit his own role, an exception is raised otherwise.

Parameters:
lContainerId - - Id specifying container on which the roles are to be edited.
grRoleArray - - An array of beans representing grantee roles.
Returns:
GranteeRole[] - An aray of beans representing updated grantee roles.
Throws:
TdWSException - - Thrown on
  • any exception in updating grantee roles
  • if any of the the supplied paremeters is invalid
  • if the user doesnot have access to the container speified.
  • if the user doesnot have enough permissions to edit the roles
  • if the user edits his own role on the container

getAnnouncementsForum

public Forum getAnnouncementsForum(long lContainerId)
                            throws TdWSException
Retrieves announcements forum in the container specified by lContainerId.

Announcements forum is a hidden forum in a container represented by '.Announcements' name. A null value is returned, if the container does not contain announcements forum.
User can specify if a container can contain announcements forum or not. Exception being root container, where in announcements forum is created by default. So there might be a few containers not having announcements forum.

Parameters:
lContainerId - - Id specifying container from which, announcements forum is to be retrieved.
Returns:
Forum - Forum bean representing announcements forum.
Throws:
TdWSException - - Thrown on
  • any exception in retrieving announcements forum
  • if the user doesnot have access to container specified.

search

public ForumMessage[] search(long[] lContainerId,
                             SearchTerm st,
                             boolean bSearchAnnouncements)
                      throws TdWSException
Searches the containers specified by lContainerId for the elements matching the search criterion specified by the search term st.

If no container ids are specified, whole of Discussions containers for which the user has access to, are searched.If a container id array is supplied, only those containers are searched.
The method also accepts a boolean parameter indicating if the announcements are also to be searched. Wild card searches can aso be performed.

Parameters:
lContainerId - - Array of container ids specifying search scope.
st - - Search term specifying search context
bSearchAnnouncements - - boolean value indicating if announcements are also to be searched.
Returns:
ForumMessage[] - Array of forum message beans representing search results.
Throws:
TdWSException - - Thrown on
  • any exception in searching
  • if the container id array or searchterm is null
  • if the user doesnot have access to any of the specified containers

getRole

public Role getRole(long lContainerId)
             throws TdWSException
Returns the role of the currently logged in user on the container specified by lContainerId.
Parameters:
lContainerId - - Id representing container on which the role is to be retrieved.
Returns:
Role - Role bean representing user's role.
Throws:
TdWSException - - Thrown on
  • any exception in retrueving the user's role
  • if there is no container corresponding to the id specified
  • If the user doesnot have permissions to access the container

Copyright © 2005, Oracle. All rights reserved.