Documentum: Software to Download Documents and Metadata

I have written a software in Java using DFC. This software performs the following tasks:

  1. Performs export or import of documentum data
  2. Download all documents given a folder/cabinet in Documentum
  3. Download all document metadata, including custom metadata without having to specify the specific fields
  4. All the metadata is saved in an xml file
  5. The field metadata, such as the attribute data type, attribute name and value are all saved in the xml to make importing into any other content management system easy.
  6. All the permissions levels for each document are saved to the xml
  7. The complete folder hierarchy under the given root hierarchy is exported
  8. Any custom folder metadata is also saved in the xml
Advertisements

Documentum DFC: How to get custom attributes

Here is a way to get all the custom attributes of an object in DFC without knowing them ahead of time:

                //Custom Attributes
                String allAttributes = dctmFileObject.dump();
                String customAttributes = allAttributes.substring(allAttributes.indexOf("language_code"), allAttributes.indexOf("SYSTEM ATTRIBUTES"));
                
                try (BufferedReader reader = new BufferedReader(new StringReader(customAttributes))) {
                    String line = reader.readLine().trim();
                    while (line != null && !line.isEmpty()) {
                        String attributeName = line.substring(0, line.indexOf(':')).trim();
                        String attributeValue = line.substring(line.indexOf(':')).trim();
                        int attributeDataType = dctmFileObject.getAttr(dctmFileObject.findAttrIndex(attributeName)).getDataType();

                        line = reader.readLine();
                    }
                } catch (IOException exc) {
                    // quit
                }

 

 

Documentum: 3 Ways to Create a User in Documentum

Here are the three ways to create a user in Documentum:

DFC

———————————-

IDfUser dfcUser = (IDfUser) getSession().newObject("dm_user");
dfcUser.setUserName("username");
dfcUser.setUserLoginName("username");

dfcUser.setString("user_source","inline password");
dfcUser.setString("user_password","somepassword");
dfcUser.setString("user_os_name","username");
dfcUser.setString("description","new user description");

dfcUser.setDefaultFolder("/Temp", true);
dfcUser.save();

DQL
—————————-

create “dm_user” object
set client_capability=2,
set default_folder=’’,
set home_docbase=’’,
set mailto:user_address=’a@abc.com’,
set user_os_domain=’’,
set user_name=’’,
set user_os_name=’’,
set user_privileges=0;

API
——————————-

create,c,dm_user
set,c,l,user_name
Admin1
set,c,l,client_capability
8
set,c,l,default_folder
/Temp
set,c,l,user_group_name
???
set,c,l,user_os_name
Admin1
set,c,l,user_privileges
16
set,c,l,user_state
0
set,c,l,acl_name
???
set,c,l,acl_domain
???
save,c,l