Friday, August 31, 2012

E20-405 Exam : Important Notes

E20-405 Content Management Server Programming Exam


DFC General Overview
  • Webtop components can make DFC calls as modern clients include DFC calls.
  • IDfClient is one DFC Interface
  • The DFC PIA is NOT automatically installed during DFC installation, The DFC installler has an option for installing the DFC PIA installer. The option is unchecked by default.
  • DCTM.jar contains a manifest that includes references to several JAR files, that also includes dfc.jar
  • A Connection Broker is NOT required in order to establish a session between DFC application and content server.
Clients and Sessions
  • DFClientX objects should be instantiated with new operator.This is one of the rare cases where you need to use the new keyword rather than a factory method.
DFC Type and Related Interfaces
  • IDfPersistetObject interface provides the ability to save() objects to the repository.
  • IDfPersistetObject can be used when creating repository objects that have content.
  • IDfFolder interface is used when working with both cabinets and folders.(i.e. there is no separate interface for cabinet)
  • IDfTypedObject provides basic functionality for both persistent and non-persistent objects.
  • Hierarchy in the DFC object model (Interface) is
    • IDfDocument >>>IDfSysObject>>> IDfPersistetObject>>>IDfTypedObject
Retrieving Objects

  • Hierarchy in the document object model
    • dm_category inherits from dm_folder, which in turns inherits from dm_sys_objects
Virtual Documents
Search
Security
Operations
Exceptions and Error
Logging and Tracing
Working with Business Processes
Server Methods
BOF (Business Object Framework)
TBOs

  • To provide an interface for a custom type that gets instantiated using DFC methods such as getObject(), This can be accomplished by creating a TBO with an interface for the custom object type.
Aspects
SBOs
Modules
Lifecycles
Webservices

Sunday, August 26, 2012

EMC Certifications: Useful Links

EMC Proven Professional Certification Framework


Foundation

Content Management Foundations EMCPA Exam (E20-120)
http://mylearn.emc.com/portals/home/ml.cfm?actionID=372

 

Application Developer

Application Developer (EMCApD) Track

Content Management Server Programming Exam (E20-405 )
http://mylearn.emc.com/portals/home/ml.cfm?actionID=376
OR
Content Management Web Application Programming Exam (E20-455 )
http://mylearn.emc.com/portals/home/ml.cfm?actionID=377
OR
xCelerated Composition Platform (xCP) Application Development Exam (E20-495 )
http://mylearn.emc.com/portals/home/ml.cfm?actionID=475

 

Architect 

Technology Architect (EMCTA) Track Certifications

Content Management Systems Architecture Exam  (E20-475)
http://mylearn.emc.com/portals/home/ml.cfm?actionID=417&type=sysArch
OR
Content Management Application Architecture exam (E20-485)
http://mylearn.emc.com/portals/home/ml.cfm?actionID=417&type=appArch

Friday, August 24, 2012

DFC Code: Print names objects in a Cabinet

Loop through the cabinet content print all the names of sub folders and files in cabinet

import com.documentum.fc.client.IDfCollection;
import com.documentum.fc.client.IDfFolder;
import com.documentum.fc.client.IDfSession;
public class LoopThroughDocumentumFolder {
 private static final String STATE_PROBLEM_CABINET = "/CabinetName";
 public static void main(String[] args){
  IDfSession session = session = getSessionByIdentity("dmadmin", "password","repositoryName", "server", "port");
  loopThroughFolder(session, STATE_PROBLEM_CABINET);
 }

 public static void loopThroughFolder(IDfSession session, String path) { {
  try
        {  
   IDfFolder folder = session.getFolderByPath(path);
   if (folder == null) {
    System.out.println("Folder or cabinet does not exist in the Repository!");
   } else
   {
    IDfCollection collection = folder.getContents(null);
    while (collection.next()) {
     if (collection.getString("r_object_type").equalsIgnoreCase("dm_folder"))
     {
      System.out.println("Folder :"+ collection.getString("object_name"));
      loopThroughFolder(session, path+"/"+ collection.getString("object_name"));
     } else
     {
      System.out.println("       File: " + collection.getString("object_name"));
     }
    }
   }
            //Set the result to 0 - indicates success
        }
        catch( Exception e )
        {
         System.out.println( e.getMessage() );
        }
 }
 }
public static IDfSession getSessionByIdentity(String username,
   String password, String repoName, String primary_host,
   String primary_port) {
  IDfSession sess = null;
  try {
   IDfClientX clientX = new DfClientX();
   IDfClient localClient = clientX.getLocalClient();
   IDfSessionManager sessMgr = localClient.newSessionManager();
   localClient.getClientConfig().setString("primary_host", primary_host);
   localClient.getClientConfig().setString("primary_port", primary_port);
   IDfLoginInfo li = clientX.getLoginInfo();
   li.setUser(username);
   li.setPassword(password);
   if (sessMgr.hasIdentity(repoName)) {
    sessMgr.clearIdentity(repoName);
   }
   sessMgr.setIdentity(repoName, li);
   sess = sessMgr.getSession(repoName);
  } catch (Exception ex) {
   ex.printStackTrace();
  }
  return sess;
 }
 
}


Thursday, August 23, 2012

DFC Code : To export query result into CSV

DFC Code to export query result into CSV

import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import com.documentum.com.DfClientX;
import com.documentum.com.IDfClientX;
import com.documentum.fc.client.IDfClient;
import com.documentum.fc.client.IDfCollection;
import com.documentum.fc.client.IDfQuery;
import com.documentum.fc.client.IDfSession;
import com.documentum.fc.client.IDfSessionManager;
import com.documentum.fc.common.DfException;
import com.documentum.fc.common.IDfAttr;
import com.documentum.fc.common.IDfLoginInfo;
public class PrintQueryResult {
 public static void main(String[] args) {
  // ********************CHECK THE DFC PROPERTY*********************//
  IDfSession session = null;
  // ***********************CHANGE THE LOGING INFO**********************//
  session = getSessionByIdentity("dmadmin", "password","repositoryName", "server", "port");
  // ***********************CHANGE THE QUERY**********************//
  String sQuery = "select * from dm_document";
  // **CHANGE THE LOCATION OF QUERY RESULTS*****************//
  String fileLocation = "C:\\Log\\Test\\";
  String fileName =  "dm_document";
  performQuery(sQuery, fileLocation+ fileName, session);
 }
 private static void performQuery(String sQuery, String fileName,
   IDfSession session) {
  IDfCollection recordCollection;
  try {
   System.out.println("Started");
   IDfClientX myClientx = new DfClientX();
   IDfQuery q = myClientx.getQuery(); // Create query object
   q.setDQL(sQuery); // Give it the query
   recordCollection = q.execute(session, IDfQuery.DF_READ_QUERY); // execute
                   // the
                   // query
   displayResultsInCsv(recordCollection, fileName + ".csv");
   recordCollection.close();
   System.out.println("Finished");
  } catch (Throwable e) {
   if (e instanceof DfException) {
    System.out.println("DFC Exception:");
    String s = ((DfException) e).getStackTraceAsString();
    System.out.println(s);
   } else {
    System.out.println("Non-DFC Exception ");
    e.printStackTrace();
   }
  } // end: catch()
  finally {
   if (session != null)
    session.getSessionManager().release(session);
  }
 }
 // Step through a collection and display results
 public static void displayResultsInCsv(IDfCollection col, String fileName)
   throws DfException, IOException {
  FileWriter fileWriter = new FileWriter(fileName);
  PrintWriter printWriter = new PrintWriter(fileWriter);
  boolean isHeaderPrinted = false;
  while (col.next()) {
   StringBuffer resultLine = new StringBuffer();
   StringBuffer headerCsv = new StringBuffer();// row num
   for (int i = 0; i < col.getAttrCount(); i++) { // For attribute
    IDfAttr attrib = col.getAttr(i); // factory method for
    // Once Header is Printed, No need to append as header is
    // printed once
    if (!isHeaderPrinted) {
     headerCsv.append(attrib.getName());
     headerCsv.append(",");
    }
    // System.out.print( "\t" + attr.getName() + ": " ); // Display
    if (attrib.getDataType() == IDfAttr.DM_BOOLEAN) { // Display
                 // value
     resultLine.append(col.getBoolean(attrib.getName()));
     resultLine.append(",");
    } else if (attrib.getDataType() == IDfAttr.DM_DOUBLE) {
     resultLine.append(col.getDouble(attrib.getName()));
     resultLine.append(",");
    } else if (attrib.getDataType() == IDfAttr.DM_ID) {
     resultLine.append(col.getId(attrib.getName()));
     resultLine.append(",");
    } else if (attrib.getDataType() == IDfAttr.DM_INTEGER) {
     resultLine.append(col.getInt(attrib.getName()));
     resultLine.append(",");
    } else if (attrib.getDataType() == IDfAttr.DM_STRING) {
     String str = col.getString(attrib.getName());
     resultLine.append(str.replaceAll(",", " "));
     resultLine.append(",");
    } else if (attrib.getDataType() == IDfAttr.DM_TIME) {
     resultLine.append(col.getTime(attrib.getName()));
     resultLine.append(",");
    } else { // Unknown type
     System.out.println("Unknown type:" + attrib.getDataType());
    }
   }
   // Print the header only for the first Time
   if (!isHeaderPrinted) {
    printWriter.println(headerCsv);
    isHeaderPrinted = true;
   }
   printWriter.println(resultLine);
  }
  // Flush the output to the file
  printWriter.flush();
  // Close the Print Writer
  printWriter.close();
  // Close the File Writer
  fileWriter.close();
 }
 public static IDfSession getSessionByIdentity(String username,
   String password, String repoName, String primary_host,
   String primary_port) {
  IDfSession sess = null;

  try {
   IDfClientX clientX = new DfClientX();
   IDfClient localClient = clientX.getLocalClient();
   IDfSessionManager sessMgr = localClient.newSessionManager();
   localClient.getClientConfig().setString("primary_host", primary_host);
   localClient.getClientConfig().setString("primary_port", primary_port);
   IDfLoginInfo li = clientX.getLoginInfo();
   li.setUser(username);
   li.setPassword(password);
   if (sessMgr.hasIdentity(repoName)) {
    sessMgr.clearIdentity(repoName);
   }
   sessMgr.setIdentity(repoName, li);
   sess = sessMgr.getSession(repoName);
  } catch (Exception ex) {
   ex.printStackTrace();
  }
  return sess;
 }
}

Wednesday, August 22, 2012

DQL : Important DQL Queries


Important DQL Queries

  • Basic DQL Statement
    • select object_name, title, r_creation_date from dm_document
  • Where clause with
    • Strings in single quotes
      • select * from dm_document where owner_name = 'jdoe'
    • Strings to lower case comparison in where clause
      • select count(*) from dm_document where lower(a_content_type) = 'html'
    • Numbers - no quotes
      • select * from dm_document where owner_permit !=0
    • Date
      • select * from dm_document where r_creation_date > Date('07/01/2012','MM/DD/YYYY')
  • Find blank/ empty folder
SELECT f1.object_name, f1.r_object_id, r_creation_date, f1.r_folder_path, r_modifier, r_creator_name
FROM dm_folder f1
WHERE FOLDER('/CabinetName',descend)AND NOT EXISTS (SELECT f2.object_name FROM dm_sysobject f2 WHERE ANY f2.i_folder_id = f1.r_object_id) ORDER BY r_creation_date

E20-120 Exam : Important Notes

E20-120 Content Management Foundations Exam ( Notes and Tips)

Documentum General

  • The  Document Repository consists of two primary components
    • A file system to store content and
    • A database server to store properties
  • A document can have MULTIPLE renditions
  • The consistency checker job is an out-of-the-box job that detects and reports inconsistencies with regard to workflows among other things.
  • DQL is a strict superset of ANSI SQL. That means an ANSI SQL statement is a valid DQL statement. However, in order for the SQL to execute correctly, the tables would need to exist and be registered and the permissions need to be appropriately set.
  • A federation is set of repositories, created to keep global users, groups, and external ACLs synchronized among member repositories.

Documentum Add on's

  • Object Replication : implementation of distributed content architecture provides for both content and metadata to be synchronized across multiple repositories.
  • Application Integration Services does the Documentum repository use to transfer content from third-party applications that do not have plug-ins or connectors.
  • Content Transformation Services Marketing has created a press release using Microsoft Word ad checked it into the repository. They want to distribute the press release as a PDF.
  • Documentum Content Intelligence Services : Categorizing
  • Content Storage Services enables the automated movement of content between tiers of storage.
  • IRM  product is used to secure and control content once it leaves the content repository
  • Record Manager : government regulation 
  • Federated Repositories: To reduce the administration of managing multiple content repositories spread across geographical areas.
  • Documentum Branch Office Caching Services A solution that was recently deployed for managing office documents was a success and you have now been asked to expand the solution to support remote sites and several of the sites have slow network connections.
  • Netegrity SiteMinder : This is a plug-in module Documentum provides for supporting Web-based single sign-on authentication?
  • Microsoft Office Integration for Documentum adds menus for directly interacting with Documentum repositories from within the Office applications.
  • Collaborative Services provide these features - rooms, discussions, contextual folders, calendars, data tables, and notes.

Custom Type

  • NULL Type is
    • A custom object type without a supertype and
    • You must have SUPER USER privilege to specify a NULL super type
    • They can NOT seen from documentum desktop or webtop
  • To create custom type, you must have either SUPER USER or  SYSADMIN or CREATE TYPE
    • SUPER USER Privilege is only required when installing a custom type definition into a repository from composer
    • SYSADMIN or CREATE TYPE are adequate for defining custom types in DA, TaskSpace OR through DQL
  • A custom type can be dropped (removed) from the repository only if no objects of the type are present and no subtypes of this type are present in the repository.

ALIASES

  • Alias Resolution during Activity and Workflow
    • When an activity starts the alias resolution is performed by Content Server. 
    • When a workflow starts, the user provides the missing values in the alias set.
  • The DFC link/unlink methods have a folderSpec argument which can contain aliases. The algorithm for resolving these aliases is the same as that used for saving a sysobject.
  • When aliases are resolved for an object without a lifecycle, the resolution process stops as soon as an alias name is found, even if no value is present for the alias in that alias set.
  • When a workflow is started it gets its alias set from the workflow template. If it contains aliases without values, the values are provided by the user starting the workflow.
  • Custom attributes can contain alias references but they are not resolved by the content server. It is the responsibility of the application or the customization to resolve these alias references.
  • Even though r_alias_set_id in dm_sysobject is named starting with "r_", it can be set using an UPDATE DQL query.

TYPE

  • Value assistance can be specified for a property of any data type other than boolean. A boolean property can only be true or false.
  • It is possible to change the type of an object. However, the type can only be changed to a supertype or a subtype of the existing object type.
  • Permission Set Templates (ACL templates) are created using Composer (or DAB before version 6.x). They cannot be created using DA or Webtop.
  •  Content server makes no use of data dictionary and it is only for the use of client applications.
  • Events are also inherited from supertypes, just the way properties are.

DOC APP

  • When adding a virtual document to a docapp, its components are not added automatically. If so desired, each component of the virtual document needs to be added explicitly.
  • When an alias is added to a docapp it becomes a part of the default alias set of the docapp.
  • DocApps are stored in the repository as dm_application objects.
  • DocApps are versioned in the repository but the DocApp archive on the filesystem does not contain version info. When the archive is installed, it may increment the version in the target repository.
  • If a docapp contains objects of a custom type, the custom type needs to be  a part of the docapp for installing into another repository.

 GROUPS

  • For creating a group (dm_group object) you must have Create Group privilege and System Administrator client capability when using Webtop.

 LIFCYCLE

  • Entry criteria are not enforced for lifecycle owner and for any user with SUPERUSER privilege.
  • Changing an object's lifecycle state requires at least WRITE permission and CHANGE STATE extended permission. (Contributed by: Praveena Kothakota)
  • In a lifecycle, the entry criteria for all the states use the same language for procedures - Java or Docbasic.
  • When an object is demoted in its lifecycle entry criteria are not checked. Entry criteria are checked for promote, suspend, and resume operations.
  • If a lifecycle handles multiple types, the chosen object types must have the same supertype or one of the chosen types must be the supertype for the other included types.

PERMISSIONS

  • Basic permissions grant the ability to access and manipulate an object's content/metadata and they are hierarchical.
  • Folder security is an additional repository security mode that controls who can create, move, link, or delete objects in folders or cabinets.

OBJECTS

  • Cabinets are top-level folders and cannot be created inside another folder.
  •  Attaching an aspect to a type does not guarantee that all objects of that type will have that aspect attached. Object existing prior to the attachment of aspect to type may not have this aspect. Also, aspects can be detached from objects.
  • dm_cabinet has no repeating properties of its own.
  • dm_document tag is 09 in an object id. This means that all objects of type dm_document or one of its direct or indirect subtypes have object ids starting with 09.
  • The "version numbers" for objects are implicit labels and are assigned by content server.
  • Renditions cannot be edited or versioned.
  • An object ID consists of 16 hex digits. The first two digits specify an object type. The next 6 digits identify the repository ID. The last 8 digits provide a unique identifier within the repository
  • The persistent object type is special and it has three properties:
    • r_object_id - unique object id
    • i_vstamp - number of committed transactions on the object
    • i_is_replica - whether the object is a replica of an object from a remote repository
  • The allowed data types for properties are boolean, integer, string, double, time, and ID.
  • While most of the properties with names starting with r_ are read-only to users and applications, r_version_label is not. It can accept user-defined values which are version labels.
  • Different repeated properties for an object normally don't have any association with each other. Thus different columns in a record for a *_r table may not be related to each other. On the other hand, some properties may correspond within a record but that is not the default case.

SUBSCRIPTION

  • A user can directly access objects through Subscriptions. It is also possible to subscribe to a document while checking it in. 

ANNOTATIONS

  • VERSION permission is minimum permission needed to attach annotations to PDF document in repository.

SECURITY

  • Client Capability determines the functionality available to a user in client application. It is optionally enforced by client applications.
  • By default, the content server authenticates users against an operating system account.
  • Each user's privileges and extended privileges determine the functionality available to the user. Privileges are enforced by the content server.

VIRTUAL DOCUMENTS

  • A virtual document object (root of the hierarchy) can also contain content of its own just like a simple object.
  • The components included in an unfrozen snapshot can be deleted or checked in as the existing versions. Freezing a snapshot prevents these changes.
  •  A virtual document object is of type dm_sysobject or a subtype other than dm_folder and its subtypes. The same type constraints apply to the components of a virtual document.

PRESETS

  • A preset cannot set object_name, a_content_type, or any attribute that is effectively read-only.
  • When multiple presets could apply in a situation, they are follow the following precedence by default - location, user, role, and object type. The default precedence can be altered by customization.
  • When a preset containing an attribute rule is modified, the changes apply only to the newly created objects.
  • When a preset is applicable to a cabinet or a folder, it doesn't apply recursively to subfolders of that location.
  • The preset editor doesn't enable aspect attributes to be set
  • Presets can set the attributes of string, integer, and double types only.
  • A navigation rule selects nodes to show and the default node to open on login. However, nodes tied to client capability and roles cannot be added to a navigation rule.
  • Webtop presets are not used to provide security. They are used to focus user experience.
  • Presets override WDK configuration files in memory. They do not change the configuration files.
  • Administrators or member of dmc_wdk_presets_coordinator can create presets

WORKFLOW and ACTIVITY

  • A workflow activity may specify its performers to be - a specific user, all users in a group, single user from a group, some users from a group. 
  • An activity definition may be used for two or more activities in a workflow template but two activities cannot be placed in parallel if they use the same activity definition.
  • A workflow activity can be triggered by any combination of prior tasks completing or by receiving an event.
  • To view completed workflow reports auditing must be enabled on the corresponding workflow templates.
  • Performers for a workflow activity can be determined at run-time in the following ways - the worflow initiator determines, the performer of the previous activity determines, or alias resolution determines the performer(s).
  • Workflow activities can have these priorities - low, medium, high, and dynamic. Dynamic priority lets an application set the activity priority.
  • In a workflow template, a package must be defined in every flow except the ending flow. Multiple packages can also be specified for one flow.
  • A workflow template must be installed to be available to users to start a workflow instance from it. 
  • Automatic activities are executed through Content Server workflow methods using the identity of the performer.
  • Historical reporting (completed workflows) requires that auditing be turned on for the relevant workflow template.
  • What you design is a workflow template and what you execute is a workflow. A wokflow template defines the process while a workflow instance is that process in action processing some content.

VERSION

  • A version number cannot definitively indicate whether it is on a branch. Major versions are always of the form x.0 and can be on a branch. However, a version number of the form x.y.* is always on a branch.
  • It is possible to check in a document as the same version. In this case the object starts using the new content file without changing the version. Underneath, the save method is used instead of the checkin method.
  • Any version of a document can be the current version. Current version doesn't imply the latest version.
  • A major version format is always of the form X.0 no matter where it occurs in the version tree - on the trunk or on a branch.
  • The only property needed to create a rendition is FORMAT.
  • A rendition is not an object, rather it is associated with an object as its primary format.
  • Documentum supports any document format.  There are a large number of predefined formats and users can define additional formats.

WEBTOP

  • Webtop also provides several user preferences option related to searching
    • Display Columns
    • Favorite repositories
    • Default search location


 

Total Pageviews