23.6 Creating Users in Docbase with DFC
Users can be created in Docbase via the DFC IDfUser
interface and its associated methods.
Create a Java file with the name CreateUsersDFC.java
as shown below. Go through the DFC Javadocs to understand the various methods of the IDfUser
interface used in this example.
import com.documentum.fc.client.*; import com.documentum.fc.common.*; import java.io.IOException; public class CreateUsersDFC{ //Main method public static void main(String args[]){ IDfSession session = null; IDfSessionManager sMgr = null; try { IDfClient client = new DfClient().getLocalClient(); sMgr = client.newSessionManager(); IDfLoginInfo loginInfo = new DfLoginInfo(); loginInfo.setUser( "documentum" ); loginInfo.setPassword( "solutions" ); sMgr.setIdentity( "dev_doc", loginInfo ); session = sMgr.getSession( "dev_doc" ); System.out.println("Session created !!"); IDfUser userObj = null; userObj = (IDfUser)session.newObject( "dm_user" ); // Seting client capability as 'contributor' userObj...