|
Oracle© Collaboration Suite Workspaces Web Services API Reference 10g Release 1 (10.1.2.2) Part No. B28209-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
public SearchResult search(java.lang.String searchString, java.lang.String wspcUid, java.lang.String options, int startRange, int endRange) throws CwWSException
searchString
- - The pattern to be searchedwspcUid
- - The ID of the workspace to be searched. If null, will carry out a inter-workspace searchoptions
- - This is the filter/context in which search should be carried out. Valid options are: ALL, FILES, MEETINGS, DISCUSSIONS, INBOX for within a workspace searchstartRange
- - The start range of the objects from the result set that should be returnedendRange
- - The end range of the objects from the result set that should be returnedCwWSException
- - If invalid option or invalid range is specified.public void updateWorkspace(java.lang.String wspcUid, WorkspaceItem workspaceItem) throws CwWSException
wspcUid
- The Uid of the workspace that needs to be updated.workspaceItem
- The workspace properties that need to be updated are contained in WorkspaceItemCwWSException-
- 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
public MembersResponseBean addMembers(java.lang.String wspcUid, Member[] members) throws CwWSException
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.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 existpublic MembersResponseBean removeMembers(java.lang.String wspcUid, Member[] members) throws CwWSException
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.CwWSException
public Member[] listMembers(java.lang.String wspcUid) throws CwWSException
wspcUid
- - Uid of the workspaceCwWSException
- - If the user does not have the privilege to get the membership of the workspace.public MembersResponseBean updateMemberRole(java.lang.String wspcUid, Member[] members) throws CwWSException
wspcUid
- - Id of the workspace in which the users' roles need to be updatedmembers
- - 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.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.public ListResourceItem[] listResources(java.lang.String wspcUid) throws CwWSException
wspcUid
- - Uid of the workspace whose resources need to be listedCwWSException
- - If the user does not have the access privilege to the workspacepublic void deleteResource(java.lang.String wspcUid, java.lang.String rsrcType, boolean ignoreErrors) throws CwWSException
wspcUid
- - Uid of the workspace whose resource should be deletedrsrcType
- - Resource type to be deleted - possible values are CW_CALENDAR_RESOURCE_TYPE, CW_DISCUSSION_RESOURCE_TYPE, CW_EMAIL_RESOURCE_TYPE, CW_FILES_RESOURCE_TYPEignoreErrors
- - Indicates if errors are to be ignored.CwWSException
- - If the user does not have the privlege to delete the workspace resourcepublic InboxResource createEmailResource(java.lang.String wspcUid, InboxResourceDefinition rDefEmail) throws CwWSException
wspcUid
- - Uid of the workspace where the resource should be created.rDefEmail
- - The properties of the definition to create the resource.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.public DiscussionResource createDiscussionResource(java.lang.String wspcUid, DiscussionResourceDefinition rDefDisc) throws CwWSException
wspcUid
- - Uid of the workspace where the resource should be created.rDefDisc
- - The properties of the definition to create the resource.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.public LibraryResource createLibraryResource(java.lang.String wspcUid, LibraryResourceDefinition lDefDisc) throws CwWSException
wspcUid
- - Uid of the workspace where the resource should be created.lDefDisc
- - The properties of the definition to create the resource.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.public CalendarResource createCalendarResource(java.lang.String wspcUid, CalendarResourceDefinition cDefDisc) throws CwWSException
wspcUid
- - Uid of the workspace where the resource should be created.cDefDisc
- - The properties of the definition to create the resource.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.public void updateEmailResource(java.lang.String wspcUid, InboxResource rsrc) throws CwWSException
wspcUid
- - The Uid of the workspace whose resource needs to be updated.rsrc
- - Contains the resource properties that need to be updated.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.public void updateDiscussionResource(java.lang.String wspcUid, DiscussionResource rsrc) throws CwWSException
wspcUid
- - The Uid of the workspace whose resource needs to be updated.rsrc
- - Contains the resource properties that need to be updated.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.public void updateLibraryResource(java.lang.String wspcUid, LibraryResource rsrc) throws CwWSException
wspcUid
- - The Uid of the workspace whose resource needs to be updated.rsrc
- - Contains the resource properties that need to be updated.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.public void updateCalendarResource(java.lang.String wspcUid, CalendarResource rsrc) throws CwWSException
wspcUid
- - The Uid of the workspace that needs to be updated.rsrc
- - Contains the resource properties that need to be updated.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.public InboxResource getEmailResource(java.lang.String wspcUid) throws CwWSException
wspcUid
- - ID of the workspace whose inbox's property needs to be got.CwWSException
- - If the user does not have the access privilege to the workspace or if the resource does not exist.public LibraryResource getLibraryResource(java.lang.String wspcUid) throws CwWSException
wspcUid
- - ID of the workspace whose library's property needs to be got.CwWSException
- - If the user does not have the access privilege to the workspace or if the resource does not exist.public CalendarResource getCalendarResource(java.lang.String wspcUid) throws CwWSException
wspcUid
- - ID of the workspace whose Calendar's property needs to be got.CwWSException
- - If the user does not have the access privilege to the workspace or if the resource does not exist.public DiscussionResource getDiscussionResource(java.lang.String wspcUid) throws CwWSException
wspcUid
- - ID of the workspace whose Discussion's property needs to be got.CwWSException
- - If the user does not have the access privilege to the workspace or if the resource does not exist.
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |