Insert file into foldre
Options
Hello
I am starting developping with DFC.
I have developped a simple code which inserts a file into Documentum Content Server. The code is above:
public static IDfDocument store(IDfSession session, String sName, String title, String subject) throws Exception {
IDfDocument document = null;
if(session != null) {
document = (IDfDocument) session.newObject("dm_document");
document.setObjectName("This is the first a test (" + sName + ")");
document.setTitle(title);
document.setSubject(subject);
document.setContentType("crtext");
document.setFile(sName);
document.save();
}
return document;
}
This method works fine, it inserts the given file into Content Server, more precisely on the "My Files" folder.
I would like to be able to insert the file into another folder (for exemple My Files/documents, supposing that this folder exists).
Is it possible? how can I do this?
Thanks
Regards
0
Comments
-
see link method from IDfSysObject...
0 -
As Brian said, use the link() method.
...document.link("/Temp/folder1/folder2");document.save();
Make sure the provided folderpath refers to an existing folder, and make sure it starts with '/'.
0
Categories
- All Categories
- 109 Developer Announcements
- 49 Articles
- 100 General Questions
- 122 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 122 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management