1 / 14

Creating Documentum Objects

Creating Documentum Objects. Module Objectives. After completing this module you will: be able to create an object and set its attributes be familiar with methods from the following interfaces: IDfPersistentObject IDfSysObject IDfDocument IDfFolder. Topics. Creating Cabinet Objects

selia
Download Presentation

Creating Documentum Objects

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. Creating Documentum Objects

  2. Module Objectives • After completing this module you will: • be able to create an object and set its attributes • be familiar with methods from the following interfaces: • IDfPersistentObject • IDfSysObject • IDfDocument • IDfFolder

  3. Topics • Creating Cabinet Objects • Creating Folder Objects • Creating Document Objects

  4. Simplified Object Creation Steps

  5. Object Creation Session, give me an empty object of type X Session Object, set your properties to these values and save yourself

  6. Creating Cabinets, Folders and Documents

  7. Create a Cabinet  Public Sub createCabinet(sess As IDfSession, cabinetName As String) Dim sysObj As IDfSysObject Dim pObj As IDfPersistentObject On Error GoTo ErrorHandler ' Create the dm_cabinet object, set some attributes, then save it. Set sysObj = sess.newObject("dm_cabinet") sysObj.setObjectName cabinetName sysObj.setSubject "DFC Example Cabinet" Set pObj = sysObj pObj.save ' Display details about the new object. displayObjectInfo sysObj ' Free memory. Set sysObj = Nothing Set pObj = Nothing Exit Sub ErrorHandler: debug.Print "createCabinet(): " + Err.Description, False End Sub       

  8. Interfaces and Methods Used: • Interfaces • IDfSession • required to interact with the Docbase and create new objects • newObject(object_type) • IDfSysObject • to assign attributes to the new cabinet object • setObjectName(name) • setSubject(subject) • IDfPersistentObject • to save cabinet object • save()

  9. Create a Folder  Public Sub createFolder(sess As IDfSession, folderName As String, linkName As String) Dim sysObj As IDfSysObject Dim pObj As IDfPersistentObject On Error GoTo ErrorHandler ' Create the dm_folder object, set some attributes, then save it. Set sysObj = sess.newObject("dm_folder") sysObj.setObjectName folderName sysObj.setSubject "DFC Example folder" ' Have the user specify the parent cabinet/folder. sysObj.link linkName Set pObj = sysObj pObj.save ' Display details about the new object. displayObjectInfo sysObj ' Free memory. Set sysObj = Nothing Set pObj = Nothing Exit Sub ErrorHandler: debug.Print "createFolder(): " + Err.Description, False End Sub       

  10. Interfaces and Methods Used: • Interfaces • IDfSession • required to interact with the Docbase and create new objects • newObject(object_type) • IDfSysObject • to assign attributes to the new folder object • setObjectName(name) • setSubject(subject) • link(path) • IDfPersistentObject • to save the folder object • save()

  11. Create a Document  Public Sub createDocument(sess As IDfSession, docName As String, contentFile As String, linkName As String) Dim sysObj As IDfSysObject Dim pObj As IDfPersistentObject ' Create the dm_document object, set some attributes, then save it. Set sysObj = sess.newObject("dm_document") sysObj.setObjectName docName sysObj.setSubject "DFC Example Doc" sysObj.setContentType "crtext" sysObj.setTitle "DFC Example Doc"   

  12. Create a Document, ctd. ' Have the user specify a file on disk. sysObj.setFile contentFile ' Have the user specify the parent cabinet/folder. sysObj.link linkName Set pObj = sysObj pObj.save ' Display details about the new object. displayObjectInfo sysObj ' Free memory. Set sysObj = Nothing Set pObj = Nothing Exit Sub ErrorHandler: debug.Print "createDocument(): " + Err.Description, False End Sub     

  13. Classes and Interfaces Used: • Classes • None • Interfaces • IDfSession • required to interact with the Docbase and create new objects • IDfSysObject • to assign attributes to the new document object • IDfPersistentObject • to save document object

  14. Test Your Knowledge • In each example, the same method was used to create the different object types. What was the method and which interface implements it? • What interface and method would you use to assign the system ACL "public_doc" to the newly created objects?

More Related