|
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 |
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 |
public FilesCategories getCategories(java.lang.String wspcId, java.lang.String fileId) throws CwWSException
wspcId
- - Id of the workspacefileId
- - Id of the library item.CwWSException
public CategoryConfiguration getCategoryConfiguration(java.lang.String wspcId, java.lang.String fileId) throws CwWSException
wspcId
- - Id of the workspacefileId
- - Id of the library item.CwWSException
public void updateCategories(java.lang.String wspcId, java.lang.String fileId, FilesCategories newCategories, FilesCategories changedCategories, FilesCategories deletedCategories) throws CwWSException
wspcId
- - Id of the workspacefileId
- - Id of the library item.newCategories
- - the object contains list of new categorieschangedCategories
- - the object contains list of changed categoriesdeletedCategories
- - the object contains list of deleted categoriesCwWSException
public WorkflowConfiguration getWorkflowConfiguration(java.lang.String wspcId, java.lang.String fileId, java.lang.String operation) throws CwWSException
wspcId
- - Id of the workspacefileId
- - Id of the library item.operation
- - name of the operation.CwWSException
public WorkflowConfiguration[] getDirectWorkflowConfigurations(java.lang.String wspcId, java.lang.String fileId) throws CwWSException
wspcId
- - Id of the workspacefileId
- - Id of the library item.CwWSException
public SecurityConfiguration getSecurityConfiguration(java.lang.String wspcId, java.lang.String fileId) throws CwWSException
wspcId
- - Id of the workspacefileId
- - Id of the library item.CwWSException
public void storeSecurityConfiguration(java.lang.String wspcId, java.lang.String fileId, SecurityConfiguration securityConfiguration) throws CwWSException
wspcId
- - Id of the workspacefileId
- - Id of the library item.securityConfiguration
- - the security configuration associated with the library item.CwWSException
public void removeSecurityConfiguration(java.lang.String wspcId, java.lang.String fileId) throws CwWSException
wspcId
- - Id of the workspacefileId
- - Id of the library item.CwWSException
public void checkin(java.lang.String wspcId, java.lang.String fileId, FileCheckinOptions fileCheckinOptions, FilesCategories categories, WorkflowParameter[] params) throws CwWSException
wspcId
- - Id of the workspacefileId
- - Id of the file ResourceItemfileCheckinOptions
- - FileCheckinOptions with options like comments,etccategories
- - list of categories associated with this file.params
- - list of work flow parameters associated with this file and checkin operation.CwWSException
public void checkout(java.lang.String wspcId, java.lang.String fileId, java.lang.String checkoutComment, WorkflowParameter[] params) throws CwWSException
wspcId
- - Id of the workspacefileId
- - Id of the file ResourceItemcheckoutComment
- - comment while checking out fileparams
- - list of work flow parameters associated with this file and checkin operation.CwWSException
public FilesResourceItem[] copy(java.lang.String wspcId, FileTransferItem[] fileTransferItems, FilesCategories[] filesCategories, WorkflowParameter[] params) throws CwWSException
wspcId
- - Id of the workspacefileTransferItems
- - list of FileTransferItemsfilesCategories
- - list of categories associated with this file.params
- - list of work flow parameters associated with this file and checkin operation.CwWSException
public FilesResourceItem[] move(java.lang.String wspcId, FileTransferItem[] fileTransferItems, FilesCategories[] filesCategories, WorkflowParameter[] params) throws CwWSException
wspcId
- - Id of the workspacefileTransferItems
- - list of FileTransferItemsfilesCategories
- - list of categories associated with this file.params
- - list of work flow parameters associated with this file and checkin operation.CwWSException
public void deleteResourceItems(java.lang.String wspcId, java.lang.String parentId, java.lang.String[] ResourceItemsToBeDeleted, WorkflowParameter[] params) throws CwWSException
wspcId
- - Id of the workspaceparentId
- - The id of the parent folder from which the specified resource items needs to be deleted. Can be nullResourceItemsToBeDeleted
- - Ids of the ResourceItems to be deletedparams
- - list of work flow parameters associated with this file and checkin operation.CwWSException
public void deleteFolderContent(java.lang.String wspcId, java.lang.String parentId, WorkflowParameter[] params) throws CwWSException
wspcId
- - Id of the workspaceparentId
- - 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.CwWSException
public FilesResourceItem createFolder(java.lang.String wspcId, java.lang.String parentId, java.lang.String folderName, java.lang.String folderDescription) throws CwWSException
wspcId
- - Id of the workspaceparentId
- - The id of the parent folder under which the folder needs to be created. Can be nullfolderName
- - Name of the new folderfolderDescription
- - Description of the new folderCwWSException
public void updateFilesResourceItem(java.lang.String wspcId, FilesResourceItem filesResourceItem) throws CwWSException
wspcId
- - Id of the workspacefilesResourceItem
- - FilesResourceItem to be updated Cannot set system generated properties like LAST_MODIFIED_DATE, LAST_MODIFIED_BY, CREATE_DATE, CREATED_BYetcCwWSException
public java.lang.String cancelCheckout(java.lang.String wspcId, java.lang.String fileId) throws CwWSException
wspcId
- - Id of the workspacefileId
- - Id of the file ResourceItemCwWSException
public java.lang.String deleteVersions(java.lang.String wspcId, java.lang.String fileId, java.lang.String[] versionsToBeDeleted) throws CwWSException
wspcId
- - Id of the workspacefileId
- - Id of the file ResourceItemversionsToBeDeleted
- - Ids of the versions to be deletedCwWSException
public FilesResourceItem[] getVersionHistory(java.lang.String wspcId, java.lang.String fileId) throws CwWSException
wspcId
- - Id of the workspacefileId
- - Id of the file ResourceItemCwWSException
public void copyToLatestVersion(java.lang.String wspcId, java.lang.String versionId, FileCheckinOptions fileCheckinOptions) throws CwWSException
wspcId
- - Id of the workspaceversionId
- - Id of the version to be copiedfileCheckinOptions
- - FileCheckinOptions with options like comments,etcCwWSException
public void copyToWorkingCopy(java.lang.String wspcId, java.lang.String versionId) throws CwWSException
wspcId
- - Id of the workspaceversionId
- - Id of the version to be copiedCwWSException
public FilesResourceItem[] listContents(java.lang.String wspcId, java.lang.String parentId, java.lang.String filter) throws CwWSException
wspcId
- - Id of the workspaceparentId
- - The id of the folder whose contents need to be listed. Can be nullfilter
- - show only items that match this name filter criteria.CwWSException
public void lockResourceItems(java.lang.String wspcId, java.lang.String parentId, java.lang.String[] resourceItemsToBeLocked) throws CwWSException
wspcId
- - Id of the workspaceparentId
- - 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 lockedCwWSException
public void unlockResourceItems(java.lang.String wspcId, java.lang.String parentId, java.lang.String[] resourceItemsToBeUnLocked) throws CwWSException
wspcId
- - Id of the workspaceparentId
- - 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 unlockedCwWSException
public java.lang.String getLockOwner(java.lang.String wspcId, java.lang.String resourceItemId) throws CwWSException
wspcId
- - Id of the workspaceresourceItemId
- - Id of the ResourceItemCwWSException
public FilesResourceItem getTrashFolder(java.lang.String wspcId) throws CwWSException
wspcId
- - Id of the workspaceCwWSException
public void emptyTrash(java.lang.String wspcId) throws CwWSException
wspcId
- - Id of the workspaceCwWSException
public FilesQuota calculateQuota(java.lang.String wspcId) throws CwWSException
wspcId
- - Id of the workspaceCwWSException
public FilesResourceItem[] getRecentActivities(java.lang.String wspcId) throws CwWSException
wspcId
- - Id of the workspaceCwWSException
public java.lang.String getContentServicesURL() throws CwWSException
CwWSException
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |