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

Part No. B28209-01


oracle.workspaces.ws
Interface ViewsService


public interface ViewsService

Collaborative Workspaces provides views for categorizing and aggregating content across resource types within a workspace - ViewsService provides methods to operate on views within a workspace.

The major operations supported include: creation, updation, retrieval and deletion of views.

The Axis specific code snippet given below, illustrates how a view can be created within a workspace.

   // Invoke an instance of the view service locator and get a handle to view service. 
   ViewsServiceServiceLocator vssl = new ViewsServiceServiceLocator();
   ViewsService vService = vssl.getViewsService();
   // Create a view definition object and set necessary attributes. 
   ViewItemDefinition vDef1 = new ViewItemDefinition();
   vDef1.setName("New View 1");
   vDef1.setDescription("Description of view 1");
   // wspcId is the UID of workspace in which the view is to be created.
   vService.createView(wspcId, vDef1);
   

Method Summary
 int addItems(java.lang.String wspcUid, java.lang.String viewUid, java.lang.String[] itemUids)
          Adds the specified items to the view.
 ViewResourceItem createView(java.lang.String wspcUid, ViewItemDefinition viewDef)
          Creates a view in the workspace specified.
 void deleteViews(java.lang.String wspcUid, java.lang.String[] viewUids)
          Deletes the specified views from the workspace given.
 ViewResourceItem getViewByUid(java.lang.String wspcUid, java.lang.String viewUid)
          Returns the view represented by the uid.
 java.lang.String[] listItems(java.lang.String wspcUid, java.lang.String viewUid)
          Gives the ids of the elements in the view specified.
 ViewResourceItem[] listParentViews(java.lang.String wspcUid, java.lang.String itemUid)
          Lists all the views the specified resource item is a member of
 ViewResourceItem[] listViews(java.lang.String wspcUid)
          Lists all the views in the workspace specified.
 void removeItems(java.lang.String wspcUid, java.lang.String viewUid, java.lang.String[] itemUids)
          Removes the specified items from the view.
 void updateView(java.lang.String wspcUid, ViewResourceItem viewRes)
          Updates the view represented by the uid.

 

Method Detail

createView

public ViewResourceItem createView(java.lang.String wspcUid,
                                   ViewItemDefinition viewDef)
                            throws CwWSException
Creates a view in the workspace specified.
Parameters:
viewDef - - ViewDefinition bean representing the properties of the view to be created.
wspcUid - - workspace in which the view is to be created.
Returns:
- ViewResourceItem bean representing the properties of the view created.
Throws:
CwWSException - - If objects passed are null or invalid

deleteViews

public void deleteViews(java.lang.String wspcUid,
                        java.lang.String[] viewUids)
                 throws CwWSException
Deletes the specified views from the workspace given.
Parameters:
viewUids - - array of the uid's of views to be deleted.
wspcUid - - workspacw from which the views are to be deleted.
Throws:
CwWSException - - If objects passed are null or invalid

getViewByUid

public ViewResourceItem getViewByUid(java.lang.String wspcUid,
                                     java.lang.String viewUid)
                              throws CwWSException
Returns the view represented by the uid.
Parameters:
viewUid - - view id representing the view to be retrieved.
wspcUid - - workspace in which the view is present.
Returns:
- ViewResourceItem - bean representing the view retrieved.
Throws:
CwWSException - - If objects passed are null or invalid

updateView

public void updateView(java.lang.String wspcUid,
                       ViewResourceItem viewRes)
                throws CwWSException
Updates the view represented by the uid.
Parameters:
wspcUid - - uid of the workspace in which the view is present.
viewRes - - The bean representing the view.
Throws:
CwWSException - - If the view uid or name is null.

listParentViews

public ViewResourceItem[] listParentViews(java.lang.String wspcUid,
                                          java.lang.String itemUid)
                                   throws CwWSException
Lists all the views the specified resource item is a member of
Parameters:
itemUid - - uid of the item for which the parent views are to be returned.
wspcUid - - uid of the workspace in which the item is present.
Returns:
ViewResourceItem[] - array representing all the views the specified item belongs to.
Throws:
CwWSException - - If objects passed are null or invalid

listViews

public ViewResourceItem[] listViews(java.lang.String wspcUid)
                             throws CwWSException
Lists all the views in the workspace specified.
Parameters:
wspcUid - - uid of the workspace in which the views are present.
Returns:
- ViewResourceItem[] - array of the beans representing the views listed.
Throws:
CwWSException - - If objects passed are null or invalid

addItems

public int addItems(java.lang.String wspcUid,
                    java.lang.String viewUid,
                    java.lang.String[] itemUids)
             throws CwWSException
Adds the specified items to the view.
Parameters:
itemUids - - uids of the items added to the view.
viewUid - - uid of the view into which the items are added
wspcUid - - workspae in which the view is present
Returns:
- the number of items successfully added to the view.
Throws:
CwWSException

listItems

public java.lang.String[] listItems(java.lang.String wspcUid,
                                    java.lang.String viewUid)
                             throws CwWSException
Gives the ids of the elements in the view specified.
Parameters:
viewUid - - view in which the items are present
wspcUid - - workspace in which the view is present.
Returns:
String[] - representing the ids of the items
Throws:
CwWSException - - If objects passed are null or invalid

removeItems

public void removeItems(java.lang.String wspcUid,
                        java.lang.String viewUid,
                        java.lang.String[] itemUids)
                 throws CwWSException
Removes the specified items from the view.
Parameters:
itemUids - - uids of the items to be removed from the view
viewUid - - view from which the items are to be removed
wspcUid - - workspace in which the view is present.
Throws:
CwWSException - - If objects passed are null or invalid

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