Show TOC

Using URL Support to Access the UCDLocate this document in the navigation structure

Use

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/Information published on non-SAP site

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.

Example
            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);
}