Package com.sun.jndi.ldap

Examples of com.sun.jndi.ldap.LdapURL


        Object referral = referrals.get( 0 );

        try
        {
            assertEquals( new LdapURL( "ldap://www.apache.org/" ).toString(), referral.toString() );
        }
        catch ( NamingException e )
        {
            fail();
        }

        Object referral2 = referrals.get( 1 );

        try
        {
            assertEquals( new LdapURL( "ldap://www.apple.com/" ).toString(), referral2.toString() );
        }
        catch ( NamingException e )
        {
            fail();
        }
View Full Code Here


        Object referral = referrals.get( 0 );

        try
        {
            assertEquals( new LdapURL( "ldap://www.apache.org/" ).toString(), referral.toString() );
        }
        catch ( NamingException e )
        {
            fail();
        }
View Full Code Here

        Object referral = referrals.get( 0 );

        try
        {
            assertEquals( new LdapURL( "ldap://www.apache.org/" ).toString(), referral.toString() );
        }
        catch ( NamingException e )
        {
            fail();
        }
View Full Code Here

        Object referral = referrals.get( 0 );

        try
        {
            assertEquals( new LdapURL( "ldap://www.apache.org/" ).toString(), referral.toString() );
        }
        catch ( NamingException e )
        {
            fail();
        }

        Object referral2 = referrals.get( 1 );

        try
        {
            assertEquals( new LdapURL( "ldap://www.apple.com/" ).toString(), referral2.toString() );
        }
        catch ( NamingException e )
        {
            fail();
        }
View Full Code Here

        Object referral = referrals.get( 0 );

        try
        {
            assertEquals( new LdapURL( "ldap://www.apache.org/" ).toString(), referral.toString() );
        }
        catch ( NamingException e )
        {
            fail();
        }
View Full Code Here

                    if (principal.length() > 0)
                        principal = principal + "," + defaultProperties.getProperty(BASE_DN_PROP)
                } else {
                    // if the item is found following a referral an URL string is
                    // returned which can not be used as principal
                    LdapURL ldapurl = new LdapURL(principal);
                    principal = ldapurl.getDN();
                }
            } else
                // 3. Principal is constructed from properties
                principal = constructPrincipal(getLdapId());
        }
View Full Code Here

        }
    }

    static ResolveResult getUsingURLIgnoreRootDN(String url, Hashtable env)
            throws NamingException {
        LdapURL ldapUrl = new LdapURL(url);
        DirContext ctx = new LdapCtx("", ldapUrl.getHost(), ldapUrl.getPort(),
            env, ldapUrl.useSsl());
        String dn = (ldapUrl.getDN() != null ? ldapUrl.getDN() : "");

        // Represent DN as empty or single-component composite name.
        CompositeName remaining = new CompositeName();
        if (!"".equals(dn)) {
            // if nonempty, add component
View Full Code Here

     * prefix parameter is ignored.
     */
    protected Name getURLSuffix(String prefix, String url)
        throws NamingException {

        LdapURL ldapUrl = new LdapURL(url);
        String dn = (ldapUrl.getDN() != null? ldapUrl.getDN() : "");

        // Represent DN as empty or single-component composite name.
        CompositeName remaining = new CompositeName();
        if (!"".equals(dn)) {
            // if nonempty, add component
View Full Code Here

    // Search using the LDAP URL in name.
    // LDAP URL query components override the search argments.
    private NamingEnumeration searchUsingURL(String name)
        throws NamingException {

        LdapURL url = new LdapURL(name);

        ResolveResult res = getRootURLContext(name, myEnv);
        DirContext ctx = (DirContext)res.getResolvedObj();
        try {
            return ctx.search(res.getRemainingName(),
View Full Code Here

        Object referral = referrals.get( 0 );

        try
        {
            assertEquals( new LdapURL( "ldap://www.apache.org/" ).toString(), referral.toString() );
        }
        catch ( NamingException e )
        {
            fail();
        }
View Full Code Here

TOP

Related Classes of com.sun.jndi.ldap.LdapURL

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.