Oracle© Collaboration Suite Workspaces Web Services API Reference
10g Release 1 (10.1.2.2)

Part No. B28209-01


oracle.workspaces.ws
Interface WorkspacesService


public interface WorkspacesService

WorkspaceService provides methods to perform operations on a workspace.

Broadly, the operations fall under the following categories:

Resource operations: Resources represent the subsystems of a workspace viz. Library, Email, Discussion and Calendar. They can be created, updated or removed from the workspace. The Axis specific code snippet given below, illustrates how to create a Calendar resource within a workspace.

   // Invoke an instance of workspace service locator and get a handle to workspace service.
   WorkspacesServiceServiceLocator wss = new WorkspacesServiceServiceLocator();
   WorkspacesService workspaceService = wss.getWorkspacesService();
   // Create a Calendar resource definition object.
   CalendarResourceDefinition rDef = new CalendarResourceDefinition();
   rDef.setDescription("Cal desc");
   rDef.setName("Cal name");
   // Invoke method to create the resource.
   workspaceService.createCalendarResource(wspcId,rDef); 
   // wspcId is the Uid of the workspace where the resource is being added. 
 

Member operations: Members represent the user/group belonging to a workspace. Members can be added or removed from the workspace. Their roles can also be updated. The Axis specific code snippet given below, illustrates how a member role cab be updated.

  // List all members in workspace with UID wspcId.
  Member[] members = workspaceService.listMembers(wspcId);
  User usr = null;
  // Loop through the list and update the member role.
  for(int i = 0 ; i < members.length ; i++)
  {
    usr = members[i].getUser();
    String[] roles = members[i].getMemberRoleType();
    String[] roleType1 = {"ADMIN"};
    members[i].setMemberRoleType(roleType1);

   }
  // Invoke method to update the member role.
  workspaceService.updateMemberRole(wspcId,members);
 

Search functionality is also available to search for text within a workspace. While searching within a workspace, the workspace content in Library, meetings, discussions , inbox or all can be searched.


Method Summary
 MembersResponseBean addMembers(java.lang.String wspcUid, Member[] members)
          Add the collection of users as the members of the workspace with their roles assigned.
 CalendarResource createCalendarResource(java.lang.String wspcUid, CalendarResourceDefinition cDefDisc)
          Creates and adds the calendar resource to the workspace.
 DiscussionResource createDiscussionResource(java.lang.String wspcUid, DiscussionResourceDefinition rDefDisc)
          Creates and adds the discussion resource to the workspace.
 InboxResource createEmailResource(java.lang.String wspcUid, InboxResourceDefinition rDefEmail)
          Creates and adds the email resource to the workspace.
 LibraryResource createLibraryResource(java.lang.String wspcUid, LibraryResourceDefinition lDefDisc)
          Creates and adds the library resource to the workspace.
 void deleteResource(java.lang.String wspcUid, java.lang.String rsrcType, boolean ignoreErrors)
          Delete the specified resource from the current workspace
 CalendarResource getCalendarResource(java.lang.String wspcUid)
          Get Calendar resource
 DiscussionResource getDiscussionResource(java.lang.String wspcUid)
          Get Discussion resource
 InboxResource getEmailResource(java.lang.String wspcUid)
          Get Inbox resource
 LibraryResource getLibraryResource(java.lang.String wspcUid)
          Get library resource
 Member[] listMembers(java.lang.String wspcUid)
          List all members of a workspace
 ListResourceItem[] listResources(java.lang.String wspcUid)
          Get the collection of resources directly contained by this workspace Note: To access all the properties, use the individual getResource methods.
 MembersResponseBean removeMembers(java.lang.String wspcUid, Member[] members)
          Delete the collection of users/groups from the workspace
 SearchResult search(java.lang.String searchString, java.lang.String wspcUid, java.lang.String options, int startRange, int endRange)
          Search within a workspace
 void updateCalendarResource(java.lang.String wspcUid, CalendarResource rsrc)
          Update the calendar resource.
 void updateDiscussionResource(java.lang.String wspcUid, DiscussionResource rsrc)
          Update the discussion resource.
 void updateEmailResource(java.lang.String wspcUid, InboxResource rsrc)
          Update the email resource.
 void updateLibraryResource(java.lang.String wspcUid, LibraryResource rsrc)
          Update the library resource.
 MembersResponseBean updateMemberRole(java.lang.String wspcUid, Member[] members)
          Update roles of users in workspace.
 void updateWorkspace(java.lang.String wspcUid, WorkspaceItem workspaceItem)
          Update workspace.

 

Method Detail

search

public SearchResult search(java.lang.String searchString,
                           java.lang.String wspcUid,
                           java.lang.String options,
                           int startRange,
                           int endRange)
                    throws CwWSException
Search within a workspace
Parameters:
searchString - - The pattern to be searched
wspcUid - - The ID of the workspace to be searched. If null, will carry out a inter-workspace search
options - - This is the filter/context in which search should be carried out. Valid options are: ALL, FILES, MEETINGS, DISCUSSIONS, INBOX for within a workspace search
startRange - - The start range of the objects from the result set that should be returned
endRange - - The end range of the objects from the result set that should be returned
Returns:
SearchResult - Results of the search
Throws:
CwWSException - - If invalid option or invalid range is specified.

updateWorkspace

public void updateWorkspace(java.lang.String wspcUid,
                            WorkspaceItem workspaceItem)
                     throws CwWSException
Update workspace.
Parameters:
wspcUid - The Uid of the workspace that needs to be updated.
workspaceItem - The workspace properties that need to be updated are contained in WorkspaceItem
Throws:
CwWSException- - If the user does not have the privilege to update the workspace or if the properties to be updated does not pass the validation rules, e.g., the restriction on name.
CwWSException

addMembers

public MembersResponseBean addMembers(java.lang.String wspcUid,
                                      Member[] members)
                               throws CwWSException
Add the collection of users as the members of the workspace with their roles assigned.
Parameters:
wspcUid - - The Uid of the workspace to which the users need to be added.
members - - This is an abstraction of a user/group and its role. Represents the user/group to be added, and the role to be assigned.The nickname must be set to identify the member and the role must be indicated.
Returns:
MembersResponseBean - Response indicating the success/failure for each user
Throws:
CwWSException - - If the user does not have the privilege to change the membership of the workspace or if any of the user/group specified does not exist

removeMembers

public MembersResponseBean removeMembers(java.lang.String wspcUid,
                                         Member[] members)
                                  throws CwWSException
Delete the collection of users/groups from the workspace
Parameters:
wspcUid - - The Uid of the workspace from which the members are to be removed.
members - - This is an abstraction of a user/group and its role. Represents the user/group to be added, and the role to be assigned Note: The nickname of the user must be set.
Returns:
MembersResponseBean - Response indicating the success/failure for each user
Throws:
CwWSException

listMembers

public Member[] listMembers(java.lang.String wspcUid)
                     throws CwWSException
List all members of a workspace
Parameters:
wspcUid - - Uid of the workspace
Returns:
Member[] - Abstraction of members/role in a workspace
Throws:
CwWSException - - If the user does not have the privilege to get the membership of the workspace.

updateMemberRole

public MembersResponseBean updateMemberRole(java.lang.String wspcUid,
                                            Member[] members)
                                     throws CwWSException
Update roles of users in workspace.
Parameters:
wspcUid - - Id of the workspace in which the users' roles need to be updated
members - - This is an abstraction of a user/group and its role. Represents the user/group to be reassigned and the role to be assigned. Note: The nickname of the user must be set. The new role(s) must also be set in in the members bean.
Returns:
MembersResponseBean - Response indicating the success/failure for each user
Throws:
CwWSException - - If the member is workspace owner and try to assign to a non-admin role or if member does not belong to the workspace.

listResources

public ListResourceItem[] listResources(java.lang.String wspcUid)
                                 throws CwWSException
Get the collection of resources directly contained by this workspace Note: To access all the properties, use the individual getResource methods.
Parameters:
wspcUid - - Uid of the workspace whose resources need to be listed
Returns:
ListResourceItem[] - All the resources of the workspace
Throws:
CwWSException - - If the user does not have the access privilege to the workspace

deleteResource

public void deleteResource(java.lang.String wspcUid,
                           java.lang.String rsrcType,
                           boolean ignoreErrors)
                    throws CwWSException
Delete the specified resource from the current workspace
Parameters:
wspcUid - - Uid of the workspace whose resource should be deleted
rsrcType - - Resource type to be deleted - possible values are CW_CALENDAR_RESOURCE_TYPE, CW_DISCUSSION_RESOURCE_TYPE, CW_EMAIL_RESOURCE_TYPE, CW_FILES_RESOURCE_TYPE
ignoreErrors - - Indicates if errors are to be ignored.
Throws:
CwWSException - - If the user does not have the privlege to delete the workspace resource

createEmailResource

public InboxResource createEmailResource(java.lang.String wspcUid,
                                         InboxResourceDefinition rDefEmail)
                                  throws CwWSException
Creates and adds the email resource to the workspace.
Parameters:
wspcUid - - Uid of the workspace where the resource should be created.
rDefEmail - - The properties of the definition to create the resource.
Returns:
InboxResource - Represents the email resource created.
Throws:
CwWSException - - If the user does not have the privilege to create the resource or if the resource to be created does not pass the validation rules.

createDiscussionResource

public DiscussionResource createDiscussionResource(java.lang.String wspcUid,
                                                   DiscussionResourceDefinition rDefDisc)
                                            throws CwWSException
Creates and adds the discussion resource to the workspace.
Parameters:
wspcUid - - Uid of the workspace where the resource should be created.
rDefDisc - - The properties of the definition to create the resource.
Returns:
DiscussionResource - Represents the discussion resource created.
Throws:
CwWSException - - If the user does not have the privilege to create the resource or if the resource to be created does not pass the validation rules.

createLibraryResource

public LibraryResource createLibraryResource(java.lang.String wspcUid,
                                             LibraryResourceDefinition lDefDisc)
                                      throws CwWSException
Creates and adds the library resource to the workspace.
Parameters:
wspcUid - - Uid of the workspace where the resource should be created.
lDefDisc - - The properties of the definition to create the resource.
Returns:
LibraryResource - Represents the library resource created.
Throws:
CwWSException - - If the user does not have the privilege to create the resource or if the resource to be created does not pass the validation rules.

createCalendarResource

public CalendarResource createCalendarResource(java.lang.String wspcUid,
                                               CalendarResourceDefinition cDefDisc)
                                        throws CwWSException
Creates and adds the calendar resource to the workspace.
Parameters:
wspcUid - - Uid of the workspace where the resource should be created.
cDefDisc - - The properties of the definition to create the resource.
Returns:
CalendarResource - Represents the calendar resource created.
Throws:
CwWSException - - If the user does not have the privilege to create the resource or if the resource to be created does not pass the validation rules.

updateEmailResource

public void updateEmailResource(java.lang.String wspcUid,
                                InboxResource rsrc)
                         throws CwWSException
Update the email resource.
Parameters:
wspcUid - - The Uid of the workspace whose resource needs to be updated.
rsrc - - Contains the resource properties that need to be updated.
Throws:
CwWSException - - If the user does not have the privilege to update the workspace or if the properties to be updated does not pass the validation rules.

updateDiscussionResource

public void updateDiscussionResource(java.lang.String wspcUid,
                                     DiscussionResource rsrc)
                              throws CwWSException
Update the discussion resource.
Parameters:
wspcUid - - The Uid of the workspace whose resource needs to be updated.
rsrc - - Contains the resource properties that need to be updated.
Throws:
CwWSException - - If the user does not have the privilege to update the workspace or if the properties to be updated does not pass the validation rules.

updateLibraryResource

public void updateLibraryResource(java.lang.String wspcUid,
                                  LibraryResource rsrc)
                           throws CwWSException
Update the library resource.
Parameters:
wspcUid - - The Uid of the workspace whose resource needs to be updated.
rsrc - - Contains the resource properties that need to be updated.
Throws:
CwWSException - - If the user does not have the privilege to update the workspace or if the properties to be updated does not pass the validation rules.

updateCalendarResource

public void updateCalendarResource(java.lang.String wspcUid,
                                   CalendarResource rsrc)
                            throws CwWSException
Update the calendar resource.
Parameters:
wspcUid - - The Uid of the workspace that needs to be updated.
rsrc - - Contains the resource properties that need to be updated.
Throws:
CwWSException - - If the user does not have the privilege to update the workspace or if the properties to be updated does not pass the validation rules.

getEmailResource

public InboxResource getEmailResource(java.lang.String wspcUid)
                               throws CwWSException
Get Inbox resource
Parameters:
wspcUid - - ID of the workspace whose inbox's property needs to be got.
Returns:
InboxResource - Contains the properties of the inbox resource.
Throws:
CwWSException - - If the user does not have the access privilege to the workspace or if the resource does not exist.

getLibraryResource

public LibraryResource getLibraryResource(java.lang.String wspcUid)
                                   throws CwWSException
Get library resource
Parameters:
wspcUid - - ID of the workspace whose library's property needs to be got.
Returns:
LibraryResource - Contains the properties of the library resource.
Throws:
CwWSException - - If the user does not have the access privilege to the workspace or if the resource does not exist.

getCalendarResource

public CalendarResource getCalendarResource(java.lang.String wspcUid)
                                     throws CwWSException
Get Calendar resource
Parameters:
wspcUid - - ID of the workspace whose Calendar's property needs to be got.
Returns:
CalendarResource - Contains the properties of the Calendar resource.
Throws:
CwWSException - - If the user does not have the access privilege to the workspace or if the resource does not exist.

getDiscussionResource

public DiscussionResource getDiscussionResource(java.lang.String wspcUid)
                                         throws CwWSException
Get Discussion resource
Parameters:
wspcUid - - ID of the workspace whose Discussion's property needs to be got.
Returns:
DiscussionResource - Contains the properties of the Discussion resource.
Throws:
CwWSException - - If the user does not have the access privilege to the workspace or if the resource does not exist.

Copyright © 2001, 2006, Oracle. All rights reserved.