Search code examples
javadocumentum

Using Documentum DFC method DfSysObject.saveAsNew() on a folder


In a Documentum DFC application I'm working on, I've been asked to do a copy of an object without using the Copy operation. So I've been trying to use the DfSysObject saveAsNew() method, which seems to works fine for documents but throws errors if the object in question is a folder. First, it complained that the folder already existed, then when I try to unlink the current folder path and save the object, it says it can't do that because the object has no link. I assume that if it's possible to use the saveAsNew() method to copy a folder, there's a certain sequence of steps involved that I'm just not doing, so if anyone can point me in the right direction, I'd really appreciate it...


Solution

  • Based on responses I received on the EMC Community Network, there doesn't appear to be a straightforward way to use the saveAsNew() method to copy folders, i.e., the folder in question would have to be renamed to avoid having the same folder path as the original. That's the kind of housekeeping detail that the copy operations handle automatically. It also appears that copy operations execute faster than saveAsNew(), based on the timestamps for my log statements. So my plan is to stick with the copy operations, after all...