Skip to content

Creating a TBO

Below are the steps to create a TBO for a Type. Go through the prerequisite link for creating the workspace and a simple document type.

Below are the steps for creating the TBO.

  1. Create the Implementation and Interface class for TBO
  2. Create the Jar definition for Implementation and Interface
  3. Create TBO module
  4. Install the Documentum project

Create the Implementation and Interface class for TBO

1. TBO Project Structure

As shown below create two source folders one for Implementation class and one for Interface class. It is not mandatory but is just a good practice.

tbo14

2. Source Code

IDCTMGurusDoc.java

package com.dctmgurus.modules.tbo;

import com.documentum.fc.client.IDfBusinessObject;
import com.documentum.fc.client.IDfSysObject;
import com.documentum.fc.common.DfException;

public interface IDCTMGurusDoc extends IDfSysObject,IDfBusinessObject{
	public void setDemoAttr(String demoAttr) throws DfException;
	public String getDemoAttr() throws DfException;
}

DCTMGurusDoc.java

package com.dctmgurus.modules.tbo;

import com.documentum.fc.client.DfSysObject;
import com.documentum.fc.common.DfException;
import com.documentum.fc.common.IDfDynamicInheritance;

public class DCTMGurusDoc extends DfSysObject implements IDCTMGurusDoc,IDfDynamicInheritance{

	@Override
	public String getVendorString() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getVersion() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public boolean isCompatible(String arg0) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean supportsFeature(String arg0) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public String getDemoAttr() throws DfException {
		System.out.println("[DCTMGurusDoc] Getting the value of the dg_demo_attr attribute");
		return getString("dg_demo_attr");
	}

	@Override
	public void setDemoAttr(String demoAttr) throws DfException {
		System.out.println("[DCTMGurusDoc] Setting the value of the dg_demo_attr attribute");
		setString("dg_demo_attr", demoAttr);
	}

	protected synchronized void doSave(boolean keepLock, 
			String versionLabels, Object[] extendedArgs) throws DfException {
		System.out.println("[DCTMGurusDoc] Logging from DCTMGurusDoc TBO");
		super.doSave(keepLock, versionLabels, extendedArgs);
	}
	
}

3. Create Jar Files

Export the implementation class as dctmgurus_tbo_impl.jar
Export the interface class as dctmgurus_tbo_int.jar

Create the Jar definition for Implementation and Interface

1. Right Click the project -> New -> Jar Definition

tbo2

2. Give name for the “Jar Definition”, this will be used as “Jar definition” for Implementation jar.

tbo3

3. Click Browse and select the Jar

tbo5

4. Now the Jar is selected and the “Type” should be selected as “Implementation” as shown below

tbo6

5. Similarly do it for the Interface jar

tbo7

Create TBO module

1. Right Click the project -> New -> Module

tbo8

2. Give the Object Types as the name of the module(It is mandatory). Here in this case we are creating TBO for dctmgurus_doc Object type.

tbo9

3. The below screen appears by default

tbo10

4. Change/Set the values of “Type” , “Implementation Jars” , “Interface Jars” and “Class Name” as below

tbo11

5. Install the Documentum Project

tbo12

Give the credenials and click “Login” and “Finish”

newtype11

6. You can verify whether the TBO is created or not by checking the “/System/Modules/TBO” folder as shown below

tbo1
Published inMISCTYPES