1 / 54

Introduction to DFC

Introduction to DFC. Module Objectives. After completing this module, you will be able to: define what the Documentum Foundation Class is understand what the DFC is used for see the benefits of developing using the DFC instead of the traditional API methods

sera
Télécharger la présentation

Introduction to DFC

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to DFC

  2. Module Objectives • After completing this module, you will be able to: • define what the Documentum Foundation Class is • understand what the DFC is used for • see the benefits of developing using the DFC instead of the traditional API methods • comprehend the basic concepts of Object-Oriented programming and how it relates to DFC and Documentum

  3. Topics • Introduction to DFC • What is the DFC • Why should you develop using the DFC • Overview of object-oriented programming concepts in Documentum

  4. What is the Documentum Foundation Classes? • A new programming interface introduced in Documentum 4i to provide a higher-level, object-oriented interface to the Documentum server • Implemented as a set of Java classes and interfaces • some interfaces simply wrap DMCL objects • client, session, persistent object, query collection • some provide high-level logic • data validation, workflow management, version policy • Provided as a wrapper around DMCL • simplifies programming and application development

  5. Application DFC DMCL Docbase DFC is a Wrapper Around DMCL

  6. DesktopClient SmartSpaceIntranet DFC Custom Client/Server App Custom Web App CLIENT DMCL SERVER DMCL Docbase How Applications Use DFC

  7. Why Develop Using DFC? • Reduces coding efforts due to higher-level methods that perform the same operations as several DMCL API calls that were needed in previous development environments • Provides business logic not available through the DMCL • Promotes code/module reuse • DFC is the new standard development language for Documentum applications

  8. The Key Interface ActiveX Dialogs and Controls Architecture - the Developer’s View Documentum Administrator Developer Studio Desktop Client RightSite Server Documentum Foundation Class (DFC) Documentum Client Library (DMCL) Lifecycle Data Dictionary E-Content Server Docbase

  9. DocApp Data Validation Workflow Runtime Version Policy VDM Operations DFC Object-Oriented Access to Server API DMCL Server API Relationship of DFC to DMCL • The DMCL is a library of procedures and functions that implement the e-Content server API • The DFC implements the API and an additional level of business logic • The DFC implements interfaces that clients can access through Java or COM

  10. The Role of DFC Desktop Client RightSite Developer Studio VDM Editor Application Components Workflow Editor Lifecycle Editor Search Component Widgets Common Widgets Validation Widgets DART VDM Library Services Query Builder Validation Core Services Documentum Foundation Class Data Access DMCL Data Server e-Content Server

  11. The DFC • Is a set of Java classes • Classes begin with a Df prefix • Interfaces begin with a IDf prefix • Provides an object oriented interface to the e-Content Server • Can be thought of as DMCL++; a wrapper around DMCL that makes programming simpler and provides additional capabilities such as • Validation • Version Policy • Workflow Runtime

  12. More About DFC • Is installed on each client machine as part of Desktop Client and Developer Studio installation process • Called by the client which makes calls to components which in turn make calls to the DFC which then calls DMCL4.0. • Interfaces into DMCL4.0 • Is packaged in a JAR file and usually installed in c:\program files\documentum\dfcre40\lib\dfc.jar

  13. DFC Interface Hierarchy (Partial) IDfClient IDfLoginInfo IDfSession IDfQuery IDfTypedObject Interfaces that only VB, Docbasic and C++ programmers will use IDfPersistentObject IDfClientX (COM) IDfACL IDfEnumeration (COM) IDfFormat IDfGroup IDfUser IDfType IDfAttr IDfPackage IDfId IDfWorkItem IDfTime IDfSysObject IDfException IDfDocument IDfList IDfDocbaseMap IDfFolder IDfProcessRuntime IDfCollection IDfRouter

  14. DFC Interface Interaction getLocalClient() IDfClient getSharedSession( docbase, IDfLoginInfo, key) newSession( docbase, IDfLoginInfo ) findSession( sessionId ) getClient() IDfSession getObject( objectId ) getSession() newObject( typeName ) getObjectByQualification( qual) getObjectByPath( path ) DFC 4.1 getType(typeName ) getType() IDfPersistentObject IDfType

  15. Visual Basic - access the DFC through COM type libraries supplied with Developer Studio, dfc.tlb Visual J++ - make sure that the DFC class and interface files are located in your CLASSPATH Visual C++ without MFC - include dfc.h and dfc_i.c with MFC - include DfClientX.h, DfClientX.cpp, dfc.h, and dfc_i.c Linking to the DFC

  16. Establishing DFC Clients • Before you call DFC methods, you must create a DFC client object as an interface to DFC • Java Example • IDfClient myclient = DfClient.getLocalClient(); • VB Example • Dim myclient As IDfClient • Dim myclientX As DfClientX • Set myclientX = CreateObject(“Documentum.Dfc”) • Set myclient = myclientX.getLocalClient

  17. Introduction to Object Oriented Programming Concepts and Documentum • Classes • Objects • Properties and Methods • Inheritance • Packages and interfaces

  18. Inheritance • Inheritance allows you to extend and add to the definition of an existing class to reuse some properties and methods, and add or override others.

  19. Object Hierarchy

  20. Interface Hierarchy

  21. Packages • A package is a collection of related classes and interfaces. • The DFC classes are organized into the following packages:

  22. Packages, Classes and Interfaces • DFC is presented as a set of packages • Packages are composed of classes and interfaces • Classes contain methods and constants • names begin with Df • Interfaces define a set of methods that objects of a particular class can implement • names begin with IDf Packages contain Classes Interfaces implemented by define Methods

  23. DFC Packages

  24. The Hierarchy Package Class Interface Method

  25. Why is this important? Package • Developers typically operate on objects through interfaces that represent the object • Each interface typically has set and get methods for most of the represented system types' attributes • Programmers only use a very small number of actual classes directly • DfClient, DfLoginInformation are two examples Class Interface Method

  26. DFC Interface Hierarchy and the Object Hierarchy IDfClient IDfSession IDfLoginInfo IDfEnumeration (COM) IDfClientX (COM) IDfQuery

  27. Interface Inheritance in Java • Each interface inherits methods and constants from interfaces above it Save() try { IDfDocument docobj = session.newObject("dm_document") docobj.setContentType("msw8"); docobj.setFile("c:\temp\chap1.doc"); docobj.save(); } catch(DfException dfe) { //report error }

  28. Interface Inheritance in the COM Environment • Interface inheritance is not supported • DFC is viewed as a flat type library • contains all of the interfaces but none of the inheritance • to call a method contained in a parent interface, you must convert the object to the appropriate super object before calling the method • this is called "casting" Dim docobj As IDfSysobject Dim pobj As IDfPersistentObject Set docobj = session.newObject("dm_document") docobj.setContentType ("msw8")docobj.setFile ("c:\temp\chap1.doc") set pobj = docobj pobj.save

  29. Interface Definitions • IDfClient • IDfSession • IDfLoginInfo • IDfTypedObject • IDfPersistentObject • IDfObjectType • IDfCollection

  30. IDfClient • Description: • provides functionality to establish and manage sessions • provides information about the server before a session is established • Purpose: • serves as the entry point to DFC code and a "factory" for IDfSession objects • Sample Methods: • getDocbaseMap() • newSession(docbaseName, loginInfo)

  31. IDfSession • Description: • encapsulates a session with a Docbase and all related interaction • Purpose: • used to query Docbase information • create new persistent objects and obtain access to existing objects stored in the Docbase • Sample Methods: • disconnect() • getDocbaseName() • newObject(typename)

  32. IDfLoginInfo • Description: • provides functionality for validating and logging a user onto a Docbase • Purpose: • to obtain and set identification information to be used for login and user authentication • Sample Methods: • setUser(username) • setPassword(password) • getDomain()

  33. IDfTypedObject • Description: • provides the basic functionality for persistent and non-persistent objects • contains methods that act upon any type of ID, such as an object ID, query collection ID or alias set • Purpose: • to provide basic methods to get and set object attributes, and provide object level operations • Sample Methods: • dump() • appendString(attrName, value) • getObjectId()

  34. "Get" Methods

  35. "Set" Methods

  36. IDfPersistentObject • Description: • provides basic functionality needed to interact with persistent objects • Purpose: • provide generic methods to view and manipulate typed objects stored in the Docbase • Sample Methods: • getVStamp • fetch() • dump() • save()

  37. IDfObjectType • Description: • individual interfaces designed to work only for system objects with a specific type • i.e. IDfSysObject, IDfFolder etc. • Purpose: • provide methods to interact with the objects of that type and their specific attributes • Sample methods • getContentType() • setObjectName() • getFolderPath(index)

  38. IDfSysObject • Sysobjects can: • own content • be checked in and checked out of a Docbase • be versioned • have permissions • reside in a folder • be part of virtual doc • have attached business policy • Each feature is represented as a category of methods in the IDfSysobject interface

  39. Sysobject Subtypes • some types have their own type-specific interface • not all sub-types have their own interface • custom interfaces can be created to extend existing interfaces

  40. IDfCollection • Description: • provides access to collection objects • Purpose: • allows access to rows returned in a collection object and the data values in those rows • Sample Methods: • next() • close()

  41. Selecting the appropriate Interface

  42. The DFC JavaDocs • Documentation for DFC packages, classes, interfaces and methods is provided in JavaDoc format

  43. JavaDoc Organization • Overview • front page of JavaDocs • lists all packages with a description • Package • each package has a page listing all interfaces, classes, exceptions and errors

  44. JavaDoc Organization (continued) • Classes and Interfaces • each class and interface is described, along with the methods defined within that class or exposed by the interface

  45. JavaDoc Organization (continued) • Tree • The tree view shows a class hierarchy page for all packages, or for the currently selected package

  46. Listing Packages, Classes and Interfaces

  47. Interfaces and Methods

  48. Method Detail • Syntax shows any arguments, return value, and exceptions

  49. Navigating the Interface Hierarchy

  50. DFC Documentation in Visual Basic • Choose View>Object Browser or hit F2

More Related