Directory context lets you access an SmDmsDirectory object within the context of a user directory name or OID that you provide. The directory context class is SmDmsDirectoryContext. To get a directory context, use the method getDirectoryContext() in the class SmDmsApiImpl.
In the following example, an SmDmsDirectoryContext object is returned in dirContext. Call getDmsDirectory() to get the information about the directory object.
// Create a DMS API object from a valid session.
SmDmsApi dmsApi = new SmDmsApiImpl (apiSession);
// Create the directory context object.
SmDmsDirectoryContext dirContext=new SmDmsDirectoryContext();
// Directory object to pass in to getDirectoryContext().
SmUserDirectory userDir = new SmUserDirectory ();
// setOid() method can take the name of the user directory.
userDir.setOid ("smdev");
// This call returns directory information through dirContext.
result=dmsApi.getDirectoryContext(userDir,
new SmDmsConfig(),
dirContext);
| Copyright © 2011 CA. All rights reserved. | Email CA Technologies about this topic |