When you have to connect Documentum with a non-supported LDAP, you usually forget about the configuration UI provided by DA as you have to do most of the work by IAPI/DQL.
However, if you want to add your LDAP to the list of supported servers, you can do so quite easily:
1. Create the necessary DirectoryType class with your custom ldap type (openldap in this case):
public enum DirectoryType{
OPENLDAP("openldap"), SUN_ONE("netscape"), ACTIVE_DIRECTORY("microsoft"),
ORACLE_INTERNET_DIRECTORY("oracle"), IBM_TIVOLI("ibm"), NOVELL("novell"),
MICROSOFT_ADAM("microsoftadam");
//some other stuff you can check in com.documentum.ldap.DirectoryType from the dfLdapConfig.jar
}
2. ldapList component:
ldaplist_component.xml:
<pages>
<start>/custom/jsp/customldap/ldaplist.jsp</start>
</pages>
<nlsbundle>somepackage.LdapListNlsProp</nlsbundle>
ldaplist.jsp:
<%@ taglib uri="/WEB-INF/tlds/customldap.tld" prefix="customldap" %>" ... <customldap:customldapdirtypevalueformatter> <dmf:label datafield='<%=LdapList.DIR_TYPE_ATTR%>'/> </customldap:customldapdirtypevalueformatter>
customldap.tld:
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>customldap</shortname>
<tag>
<name>customldapdirtypevalueformatter</name>
<tagclass>somepackage.CustomLdapDirTypeValueFormatterTag</tagclass>
<bodycontent>jsp</bodycontent>
<attribute>
<name>name</name>
<required>false</required>
</attribute>
</tag>
</taglib>
Formatter:
public String format(String strValue){
String strDirType = getForm().getString("MSG_UNKNOWN_DIR_TYPE");
if ((strValue != null) && (strValue.length() != 0)) {
if (strValue.equals("netscape")) {strDirType = getForm().getString("MSG_NETSCAPE");
} else if (strValue.equals("microsoft")) {strDirType = getForm().getString("MSG_MICROSOFT");
} else if (strValue.equals("oracle")) {strDirType = getForm().getString("MSG_ORACLE");
} else if (strValue.equals("microsoftadam")) {strDirType = getForm().getString("MSG_MICROSOFT_ADAM");
} else if (strValue.equals("ibm")) {strDirType = getForm().getString("MSG_IBM");
} else if (strValue.equals("novell")) {strDirType = getForm().getString("MSG_NOVELL");
} else if (strValue.equals("openldap")){strDirType = getForm().getString("MSG_OPENLDAP");
}
}
return strDirType;
}
3. ldapInfo component
ldapInfo_component.xml:
<pages>
<start>/custom/jsp/customldap/ldapinfo.jsp</start>
</pages>
<nlsbundle>somepackage.LdapInfoNlsProp</nlsbundle>
LdapInfo.class:
public class LdapInfo extends com.documentum.webcomponent.admin.ldap.LdapInfo {
public static final String LDAP_DIR_VALUE_OPENLDAP = "openldap";
}
ldapinfo.jsp:
<%@ page import="somepackage.LdapInfo" %>
...
<dmf:option value='<%=LdapInfo.LDAP_DIR_VALUE_OPENLDAP%>' nlsid='MSG_OPENLDAP'/>
4. Final result:

