To access the UCD JNDI tree, use a URL with the schema prefix ucd:. When using a URL, the user context in the UCD hierarchy is returned.
More information: http://java.sun.com/products/jndi/
The following constant is defined in the class com.sapportals.portal.pcd.gl.IPcdContext:
public final static String UCD_SCHEMA_PREFIX = "ucd:";
Note
To access the UCD, you must provide the user principal ID as the SECURITY_PRINCIPAL property in the JNDI environment.
Syntax
private IPcdContext getUcdContextByUrl() throws NamingException { Hashtable <Object, Object> env = new Hashtable(); env.put(Context.SECURITY_PRINCIPAL, user); InitialContext ctx = new InitialContext(env); return (IPcdContext) ctx.lookup(IPcdContext.UCD_SCHEMA_PREFIX); }