Search code examples
javajavafxdocumentumdocumentum-dfs

moving a document or a folder from one repository to another in Documentum


I am doing a JavaFx project connected to Documentum data storage. I have cabinet lets call it CabinetA and inside of it I have few files . Lets say Folder1 and Folder2 . Inside of each one of those there are few documents . I want to move doc1 (which is initially in Folder1 ) to Folder2 . To do that I need to remove all the ACLs and the belonging information and move it to Folder2 and set it up all over again based on the docs that already exist there . Based on my researches , one way is to use dump and upload a file which can be done as follows based on the EMC community .

create,c,dm_dump_record  
set,c,l,file_name  
E:\dumped_data\mydump.dmp  
set,c,l,include_content  
T  
append,c,l,type  
dm_sysobject  
append,c,l,predicate  
r_modify_date > DATE('01/01/2010') and folder('/YOUR_FOLDER',descend)  
save,c,l  
getmessage,c  
disconnect,c  

But I dont really understand how should I use this in my moving function . how does it remove the belonging info and how to add it to the second repository . Any description is extremely appriciated :)


Solution

  • Dump and load operations are intended to copy the docbase or its part, not to move document from one folder to another.
    If you want to move one document with DFC you can either use link() and unlink() methods inside the transaction or use IDFMoveOperation. To change ACLs you might use setAclName() and setAclDomain() methods (not sure about correct spelling - don't have javadocs in hands and did not work with Documentum for 9 month already). And if you want to do this in one go - use Documentum transaction