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

Part No. B28209-01


oracle.workspaces.ws
Interface LibraryService


public interface LibraryService

LibraryService provides methods to operate on content within a workspace. The operations supported include creation of folders, listing library quota, managing categories and workflow, trash management, version management etc.

The code snippet given below, for an Axis Client, illustrates how a folder can be created within a workspace.

   // Invoke an instance of library service locator and get a handle to library service.
   LibraryServiceServiceLocator lssl = new LibraryServiceServiceLocator();
   LibraryService libService = lssl.getLibraryService();
   // wspcId is the UID of workspace in which the folder is being created.
   libService.createFolder(wspcId,null, "New Folder Name1", "New folder 1 desc");
 

The code snippet given below, for an Axis Client, illustrates how a file can be copied across folders within a workspace.

    // Create a file transfer object and set attributes including the file ID,
    // and IDs of source and destination folders.
    FileTransferItem[] fileTransferItem = new  FileTransferItem[1];
    fileTransferItem[0]= new FileTransferItem();
    fileTransferItem[0].setDestinationFolder(folder1Id);
    fileTransferItem[0].setSourceFolder(folder2Id);
    // fileId is the UID of file being copied
    fileTransferItem[0].setFileId(fileId);
    fileTransferItem[0].setNewName("TestFile2");
    fileTransferItem[0].setOption("ACTION_DEFAULT");

    // Create workflow parameter object associated with file and set attributes.
    WorkflowParameter[] params = new WorkflowParameter[1];
    params[0] = new WorkflowParameter();
    params[0].setName("IFS_ECM_WORKFLOW_JUSTIFICATION");
    params[0].setValue("Param value");
    params[0].set_default("Default value");
    params[0].setDescription("description");
    params[0].setDisplayName("display name");
    params[0].set_final(false);
    params[0].setHidden(false);
    params[0].setPrompted(true);
    params[0].setRequired(false);

   // create Files category object associated with file and set attributes.
   FilesCategories[] newCatsArray = new FilesCategories[1];
   newCatsArray[0] = new FilesCategories();
   FilesCategory[] newCatArray = new FilesCategory[1];
   newCatArray[0] = new FilesCategory();
   long classId  = catInfo.cat1ClassId;
   newCatArray[0].setClassId(classId);
   FilesAttribute[] newCatAttr = new FilesAttribute[1];
   newCatAttr[0] = new FilesAttribute();
   newCatAttr[0].setName("cat1Attr1Name");
   newCatAttr[0].setType(2);
   newCatAttr[0].setValue("ATTR1 Value for newly copied file");
   newCatArray[0].setAttributes(newCatAttr);
   newCatsArray[0].setFilesCategoryArray(newCatArray);

   // Invoke method to copy the file.
   libraryService.copy(wspcId,fileTransferItem,newCatsArray,params); 

   

Method Summary
 FilesQuota calculateQuota(java.lang.String wspcId)
          Return the consumed and allocated quota.
 java.lang.String cancelCheckout(java.lang.String wspcId, java.lang.String fileId)
          Cancel checkout of file
 void checkin(java.lang.String wspcId, java.lang.String fileId, FileCheckinOptions fileCheckinOptions, FilesCategories categories, WorkflowParameter[] params)
          Check in the file
 void checkout(java.lang.String wspcId, java.lang.String fileId, java.lang.String checkoutComment, WorkflowParameter[] params)
          Check out the file
 FilesResourceItem[] copy(java.lang.String wspcId, FileTransferItem[] fileTransferItems, FilesCategories[] filesCategories, WorkflowParameter[] params)
          Method for copying a set of files and/or folders.
 void copyToLatestVersion(java.lang.String wspcId, java.lang.String versionId, FileCheckinOptions fileCheckinOptions)
          Copies a version to working copy and creates a new version
 void copyToWorkingCopy(java.lang.String wspcId, java.lang.String versionId)
          Copies a version to the working copy.
 FilesResourceItem createFolder(java.lang.String wspcId, java.lang.String parentId, java.lang.String folderName, java.lang.String folderDescription)
          Creates a new folder under the current one.
 void deleteFolderContent(java.lang.String wspcId, java.lang.String parentId, WorkflowParameter[] params)
          Deletes all the resourceItems from this folder.
 void deleteResourceItems(java.lang.String wspcId, java.lang.String parentId, java.lang.String[] ResourceItemsToBeDeleted, WorkflowParameter[] params)
          Deletes the specified ResourceItems from this folder.
 java.lang.String deleteVersions(java.lang.String wspcId, java.lang.String fileId, java.lang.String[] versionsToBeDeleted)
          Delete a set of versions from the version history of a file.
 void emptyTrash(java.lang.String wspcId)
          This method empties the trash folder for given workspace.
 FilesCategories getCategories(java.lang.String wspcId, java.lang.String fileId)
          Returns the categories associated with this library item.
 CategoryConfiguration getCategoryConfiguration(java.lang.String wspcId, java.lang.String fileId)
          Returns the Category configuation associated with this library item.
 java.lang.String getContentServicesURL()
          The method returns content service URL for uploading / downloading files.
 WorkflowConfiguration[] getDirectWorkflowConfigurations(java.lang.String wspcId, java.lang.String fileId)
          Returns the workflow configuration
 java.lang.String getLockOwner(java.lang.String wspcId, java.lang.String resourceItemId)
          Determines which user currently has the ResourceItem locked.
 FilesResourceItem[] getRecentActivities(java.lang.String wspcId)
          The method returns all files (no folders) changed since startDate.
 SecurityConfiguration getSecurityConfiguration(java.lang.String wspcId, java.lang.String fileId)
          Returns the Security configuration
 FilesResourceItem getTrashFolder(java.lang.String wspcId)
          Retrieve the trash folder for this workspace.
 FilesResourceItem[] getVersionHistory(java.lang.String wspcId, java.lang.String fileId)
          Get the version history for this ResourceItem.
 WorkflowConfiguration getWorkflowConfiguration(java.lang.String wspcId, java.lang.String fileId, java.lang.String operation)
          Returns the workflow configuration
 FilesResourceItem[] listContents(java.lang.String wspcId, java.lang.String parentId, java.lang.String filter)
          List the contents under parent.
 void lockResourceItems(java.lang.String wspcId, java.lang.String parentId, java.lang.String[] resourceItemsToBeLocked)
          Locks the ResourceItem
 FilesResourceItem[] move(java.lang.String wspcId, FileTransferItem[] fileTransferItems, FilesCategories[] filesCategories, WorkflowParameter[] params)
          Method for moving a set of files and/or folders.
 void removeSecurityConfiguration(java.lang.String wspcId, java.lang.String fileId)
          Removes the Security configuration associated with this library item.
 void storeSecurityConfiguration(java.lang.String wspcId, java.lang.String fileId, SecurityConfiguration securityConfiguration)
          Stores the Security configuration
 void unlockResourceItems(java.lang.String wspcId, java.lang.String parentId, java.lang.String[] resourceItemsToBeUnLocked)
          Unlocks the ResourceItem
 void updateCategories(java.lang.String wspcId, java.lang.String fileId, FilesCategories newCategories, FilesCategories changedCategories, FilesCategories deletedCategories)
           
 void updateFilesResourceItem(java.lang.String wspcId, FilesResourceItem filesResourceItem)
          Update FilesResourceItem

 

Method Detail

getCategories

public FilesCategories getCategories(java.lang.String wspcId,
                                     java.lang.String fileId)
                              throws CwWSException
Returns the categories associated with this library item.
Parameters:
wspcId - - Id of the workspace
fileId - - Id of the library item.
Returns:
FilesCategories - The object contains list of categories associated with this library item.
Throws:
CwWSException

getCategoryConfiguration

public CategoryConfiguration getCategoryConfiguration(java.lang.String wspcId,
                                                      java.lang.String fileId)
                                               throws CwWSException
Returns the Category configuation associated with this library item.
Parameters:
wspcId - - Id of the workspace
fileId - - Id of the library item.
Returns:
CategoryConfiguration - The object contains information about required categories, allowed categories etc.
Throws:
CwWSException

updateCategories

public void updateCategories(java.lang.String wspcId,
                             java.lang.String fileId,
                             FilesCategories newCategories,
                             FilesCategories changedCategories,
                             FilesCategories deletedCategories)
                      throws CwWSException
Parameters:
wspcId - - Id of the workspace
fileId - - Id of the library item.
newCategories - - the object contains list of new categories
changedCategories - - the object contains list of changed categories
deletedCategories - - the object contains list of deleted categories
Returns:
none.
Throws:
CwWSException

getWorkflowConfiguration

public WorkflowConfiguration getWorkflowConfiguration(java.lang.String wspcId,
                                                      java.lang.String fileId,
                                                      java.lang.String operation)
                                               throws CwWSException
Returns the workflow configuration
Parameters:
wspcId - - Id of the workspace
fileId - - Id of the library item.
operation - - name of the operation.
Returns:
WorkflowConfiguration.
Throws:
CwWSException

getDirectWorkflowConfigurations

public WorkflowConfiguration[] getDirectWorkflowConfigurations(java.lang.String wspcId,
                                                               java.lang.String fileId)
                                                        throws CwWSException
Returns the workflow configuration
Parameters:
wspcId - - Id of the workspace
fileId - - Id of the library item.
Returns:
WorkflowConfiguration array.
Throws:
CwWSException

getSecurityConfiguration

public SecurityConfiguration getSecurityConfiguration(java.lang.String wspcId,
                                                      java.lang.String fileId)
                                               throws CwWSException
Returns the Security configuration
Parameters:
wspcId - - Id of the workspace
fileId - - Id of the library item.
Returns:
SecurityConfiguration associated with the library item.
Throws:
CwWSException

storeSecurityConfiguration

public void storeSecurityConfiguration(java.lang.String wspcId,
                                       java.lang.String fileId,
                                       SecurityConfiguration securityConfiguration)
                                throws CwWSException
Stores the Security configuration
Parameters:
wspcId - - Id of the workspace
fileId - - Id of the library item.
securityConfiguration - - the security configuration associated with the library item.
Returns:
none.
Throws:
CwWSException

removeSecurityConfiguration

public void removeSecurityConfiguration(java.lang.String wspcId,
                                        java.lang.String fileId)
                                 throws CwWSException
Removes the Security configuration associated with this library item.
Parameters:
wspcId - - Id of the workspace
fileId - - Id of the library item.
Throws:
CwWSException

checkin

public void checkin(java.lang.String wspcId,
                    java.lang.String fileId,
                    FileCheckinOptions fileCheckinOptions,
                    FilesCategories categories,
                    WorkflowParameter[] params)
             throws CwWSException
Check in the file
Parameters:
wspcId - - Id of the workspace
fileId - - Id of the file ResourceItem
fileCheckinOptions - - FileCheckinOptions with options like comments,etc
categories - - list of categories associated with this file.
params - - list of work flow parameters associated with this file and checkin operation.
Throws:
CwWSException

checkout

public void checkout(java.lang.String wspcId,
                     java.lang.String fileId,
                     java.lang.String checkoutComment,
                     WorkflowParameter[] params)
              throws CwWSException
Check out the file
Parameters:
wspcId - - Id of the workspace
fileId - - Id of the file ResourceItem
checkoutComment - - comment while checking out file
params - - list of work flow parameters associated with this file and checkin operation.
Throws:
CwWSException

copy

public FilesResourceItem[] copy(java.lang.String wspcId,
                                FileTransferItem[] fileTransferItems,
                                FilesCategories[] filesCategories,
                                WorkflowParameter[] params)
                         throws CwWSException
Method for copying a set of files and/or folders.
Parameters:
wspcId - - Id of the workspace
fileTransferItems - - list of FileTransferItems
filesCategories - - list of categories associated with this file.
params - - list of work flow parameters associated with this file and checkin operation.
Returns:
FilesResourceItem - If workflow is not enabled then list of successfully copied resource items otherwise null value. Note: if workflow is enabled and the copy operation is workflow enabled, then a CopyRequest is created.
Throws:
CwWSException

move

public FilesResourceItem[] move(java.lang.String wspcId,
                                FileTransferItem[] fileTransferItems,
                                FilesCategories[] filesCategories,
                                WorkflowParameter[] params)
                         throws CwWSException
Method for moving a set of files and/or folders.
Parameters:
wspcId - - Id of the workspace
fileTransferItems - - list of FileTransferItems
filesCategories - - list of categories associated with this file.
params - - list of work flow parameters associated with this file and checkin operation.
Returns:
FilesResourceItem - If workflow is not enabled then list of successfully copied resource items otherwise null value. Note: if workflow is enabled and the move operation is workflow enabled, then a CopyRequest is created.
Throws:
CwWSException

deleteResourceItems

public void deleteResourceItems(java.lang.String wspcId,
                                java.lang.String parentId,
                                java.lang.String[] ResourceItemsToBeDeleted,
                                WorkflowParameter[] params)
                         throws CwWSException
Deletes the specified ResourceItems from this folder. If parentId is null, root workspace library is assumed
Parameters:
wspcId - - Id of the workspace
parentId - - The id of the parent folder from which the specified resource items needs to be deleted. Can be null
ResourceItemsToBeDeleted - - Ids of the ResourceItems to be deleted
params - - list of work flow parameters associated with this file and checkin operation.
Throws:
CwWSException

deleteFolderContent

public void deleteFolderContent(java.lang.String wspcId,
                                java.lang.String parentId,
                                WorkflowParameter[] params)
                         throws CwWSException
Deletes all the resourceItems from this folder. If parentId is null, root workspace library is assumed
Parameters:
wspcId - - Id of the workspace
parentId - - The id of the parent folder from which all the resource items need to be deleted. Can be null.
params - - list of work flow parameters associated with this file and checkin operation.
Throws:
CwWSException

createFolder

public FilesResourceItem createFolder(java.lang.String wspcId,
                                      java.lang.String parentId,
                                      java.lang.String folderName,
                                      java.lang.String folderDescription)
                               throws CwWSException
Creates a new folder under the current one. If parentId is null, creates under root workspace library.
Parameters:
wspcId - - Id of the workspace
parentId - - The id of the parent folder under which the folder needs to be created. Can be null
folderName - - Name of the new folder
folderDescription - - Description of the new folder
Returns:
FilesResourceItem - The bean contains library item details like name, description etc.
Throws:
CwWSException

updateFilesResourceItem

public void updateFilesResourceItem(java.lang.String wspcId,
                                    FilesResourceItem filesResourceItem)
                             throws CwWSException
Update FilesResourceItem
Parameters:
wspcId - - Id of the workspace
filesResourceItem - - FilesResourceItem to be updated Cannot set system generated properties like LAST_MODIFIED_DATE, LAST_MODIFIED_BY, CREATE_DATE, CREATED_BYetc
Throws:
CwWSException

cancelCheckout

public java.lang.String cancelCheckout(java.lang.String wspcId,
                                       java.lang.String fileId)
                                throws CwWSException
Cancel checkout of file
Parameters:
wspcId - - Id of the workspace
fileId - - Id of the file ResourceItem
Returns:
String - Id of the file
Throws:
CwWSException

deleteVersions

public java.lang.String deleteVersions(java.lang.String wspcId,
                                       java.lang.String fileId,
                                       java.lang.String[] versionsToBeDeleted)
                                throws CwWSException
Delete a set of versions from the version history of a file.
Parameters:
wspcId - - Id of the workspace
fileId - - Id of the file ResourceItem
versionsToBeDeleted - - Ids of the versions to be deleted
Returns:
String - Id of the file
Throws:
CwWSException

getVersionHistory

public FilesResourceItem[] getVersionHistory(java.lang.String wspcId,
                                             java.lang.String fileId)
                                      throws CwWSException
Get the version history for this ResourceItem.
Parameters:
wspcId - - Id of the workspace
fileId - - Id of the file ResourceItem
Returns:
FilesResourceItem - The bean contains library item details like name, description etc.
Throws:
CwWSException

copyToLatestVersion

public void copyToLatestVersion(java.lang.String wspcId,
                                java.lang.String versionId,
                                FileCheckinOptions fileCheckinOptions)
                         throws CwWSException
Copies a version to working copy and creates a new version
Parameters:
wspcId - - Id of the workspace
versionId - - Id of the version to be copied
fileCheckinOptions - - FileCheckinOptions with options like comments,etc
Throws:
CwWSException

copyToWorkingCopy

public void copyToWorkingCopy(java.lang.String wspcId,
                              java.lang.String versionId)
                       throws CwWSException
Copies a version to the working copy.
Parameters:
wspcId - - Id of the workspace
versionId - - Id of the version to be copied
Throws:
CwWSException

listContents

public FilesResourceItem[] listContents(java.lang.String wspcId,
                                        java.lang.String parentId,
                                        java.lang.String filter)
                                 throws CwWSException
List the contents under parent. List under root workspace library if parentId is null.
Parameters:
wspcId - - Id of the workspace
parentId - - The id of the folder whose contents need to be listed. Can be null
filter - - show only items that match this name filter criteria.
Returns:
FilesResourceItem - The bean contains library item details like name, description etc.
Throws:
CwWSException

lockResourceItems

public void lockResourceItems(java.lang.String wspcId,
                              java.lang.String parentId,
                              java.lang.String[] resourceItemsToBeLocked)
                       throws CwWSException
Locks the ResourceItem
Parameters:
wspcId - - Id of the workspace
parentId - - The id of the parent folder under which the items to be locked are present. Root workspace library is assumed if null.
resourceItemsToBeLocked - - Ids of the ResourceItems that need to be locked
Throws:
CwWSException

unlockResourceItems

public void unlockResourceItems(java.lang.String wspcId,
                                java.lang.String parentId,
                                java.lang.String[] resourceItemsToBeUnLocked)
                         throws CwWSException
Unlocks the ResourceItem
Parameters:
wspcId - - Id of the workspace
parentId - - The id of the parent folder under which the items to be unlocked are present. Root workspace library is assumed if null.
resourceItemsToBeUnLocked - - Ids of the ResourceItems that need to be unlocked
Throws:
CwWSException

getLockOwner

public java.lang.String getLockOwner(java.lang.String wspcId,
                                     java.lang.String resourceItemId)
                              throws CwWSException
Determines which user currently has the ResourceItem locked.
Parameters:
wspcId - - Id of the workspace
resourceItemId - - Id of the ResourceItem
Returns:
The user holding the lock
Throws:
CwWSException

getTrashFolder

public FilesResourceItem getTrashFolder(java.lang.String wspcId)
                                 throws CwWSException
Retrieve the trash folder for this workspace.
Parameters:
wspcId - - Id of the workspace
Throws:
CwWSException

emptyTrash

public void emptyTrash(java.lang.String wspcId)
                throws CwWSException
This method empties the trash folder for given workspace.
Parameters:
wspcId - - Id of the workspace
Throws:
CwWSException

calculateQuota

public FilesQuota calculateQuota(java.lang.String wspcId)
                          throws CwWSException
Return the consumed and allocated quota.
Parameters:
wspcId - - Id of the workspace
Returns:
FilesQuota - bean containing the consumed quota and the allocated quota in bytes
Throws:
CwWSException

getRecentActivities

public FilesResourceItem[] getRecentActivities(java.lang.String wspcId)
                                        throws CwWSException
The method returns all files (no folders) changed since startDate.
Parameters:
wspcId - - Id of the workspace
Throws:
CwWSException

getContentServicesURL

public java.lang.String getContentServicesURL()
                                       throws CwWSException
The method returns content service URL for uploading / downloading files.
Returns:
String - content service URL for uploading / downloading files.
Throws:
CwWSException

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