Package org.apache.directory.ldap.client.api

Examples of org.apache.directory.ldap.client.api.LdapConnection.lookup()


        kate.add( "description", descr );

        con.add( kate );

        // Analyze entry and description attribute
        Entry kateReloaded = con.lookup( dn );
        assertNotNull( kateReloaded );
        Attribute attr = kateReloaded.get( "description" );
        assertNotNull( attr );
        assertEquals( 2, attr.size() );
View Full Code Here


        kate.add( "description", descr[1] );

        con.add( kate );

        // Analyze entry and description attribute
        Entry kateReloaded = con.lookup( dn );
        assertNotNull( kateReloaded );
        Attribute attr = kateReloaded.get( "description" );
        assertNotNull( attr );
        assertEquals( 2, attr.size() );
View Full Code Here

        kate.add( "description", descr[1] );

        con.add( kate );

        // Analyze entry and description attribute
        Entry kateReloaded = con.lookup( dn );
        assertNotNull( kateReloaded );
        Attribute attr = kateReloaded.get( "description" );
        assertNotNull( attr );
        assertEquals( 2, attr.size() );
View Full Code Here

        entry.add( SchemaConstants.ENTRY_CSN_AT, csn.toString() );

        con.add( entry );

        // Analyze entry and description attribute
        Entry addedEntry = con.lookup( dn, "*", "+" );
        assertNotNull( addedEntry );

        Attribute attr = addedEntry.get( SchemaConstants.ENTRY_UUID_AT );
        assertNotNull( attr );

View Full Code Here

        catch ( LdapNoSuchAttributeException e )
        {
            //expected exception
        }

        Entry entry = connection.lookup( dn );
        assertNull( entry );

        connection.close();
    }
View Full Code Here

   
        // get a context as the user and try a lookup of a non-existant entry under ou=groups,ou=system
        LdapConnection userCtx = getConnectionAs( "uid=billyd,ou=users,ou=system", "billyd" );
   
        // we should not see ou=groups,ou=system for the remaining name
        Entry entry = userCtx.lookup( "cn=blah,ou=groups" );
        assertNull( entry );
   
        // now delete and replace subentry with one that does not excluse ou=groups,ou=system
        deleteAccessControlSubentry( "selectiveDiscloseOnError" );
        createAccessControlSubentry( "selectiveDiscloseOnError",
View Full Code Here

                "    } " +
                "  } " +
                "}" );
   
        // now try a lookup of a non-existant entry under ou=groups,ou=system again
        entry = userCtx.lookup( "cn=blah,ou=groups" );
        assertNull( entry );
    }
   
   
    @Test
View Full Code Here

        count = loader.execute();
   
        // Try to modify the entry with the created user
        LdapConnection cnx = getConnectionAs( "uid=READER ,ou=users,ou=system", "secret" );
   
        Entry res = cnx.lookup( "uid=READER ,ou=users,ou=system" );
   
        assertNotNull( res );
   
        try
        {
View Full Code Here

            "description", data );

        connection.add( personEntry );

        // Check that the entry has been stored
        Entry entry = connection.lookup( dn, "description", "cn", "sn" );

        String description = entry.get( "description" ).getString();

        assertNotNull( description );
        assertTrue( description.startsWith( "AAA" ) );
View Full Code Here

        catch ( LdapNoPermissionException lnpe )
        {
            assertTrue( true );
        }
   
        res = cnx.lookup( "uid=READER ,ou=users,ou=system" );
   
        assertNotNull( res );
   
        cnx.unBind();
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.