Tech Kraft

Documentum, AWS, Java, Ruby on Rails, Linux, Windows, App Servers


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
                }

 

 



Leave a comment

About Me

Senior Software Engineer professional with over 16 years of success with multiple open source technologies and various Content Management platforms and solutions.

Proven technical abilities through numerous projects involving enterprise web application design and development, application installation, configuration and support, and workflow and collaboration system designs.

  • Ability to learn new technologies and platforms quickly and apply them to the task at hand.
  • Excellent analytical skills, and strong communication and collaboration abilities.
  • Technical emphasis in including but not limited to Java, Ruby on Rails, Documentum and Alfresco
    in both Linux and Windows based environments

Newsletter