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

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


        assertNotNull( "a collective c-st attribute should be present", c_st );
        assertTrue( c_st.contains( "FL" ) );

        // in node without exclusions both values of c-ou should appear with c-st value
        entry = connection.lookup( "ou=interceptors,ou=configuration,ou=system" );
        c_ou = entry.get( "c-ou" );

        assertNotNull( "a collective c-ou attribute should be present", c_ou );
        assertTrue( c_ou.contains( "configuration" ) );
        assertTrue( c_ou.contains( "configuration2" ) );
View Full Code Here


        modification = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, new DefaultAttribute(
            "collectiveExclusions", "excludeAllCollectiveAttributes" ) );
        connection.modify( "ou=interceptors,ou=configuration, ou=system", modification );

        // none of the attributes should appear any longer
        entry = connection.lookup( "ou=interceptors,ou=configuration,ou=system" );
        c_ou = entry.get( "c-ou" );

        if ( c_ou != null )
        {
            assertEquals( "the c-ou collective attribute should not be present", 0, c_ou.size() );
View Full Code Here

            "cn:  User",
            "sn:  Name " );

        connection.add( entry );

        Entry addedEntry = connection.lookup( "cn=\\ User, ou=system" );

        assertNotNull( addedEntry );

        assertEquals( "Name", addedEntry.get( "sn" ).getString() );
        assertEquals( "User", addedEntry.get( "cn" ).getString() );
View Full Code Here

        addAdministrativeRole( connection, "collectiveAttributeSpecificArea" );
        Entry subentry = getTestSubentry( "cn=testsubentry,ou=system" );
        connection.add( subentry );

        // request the collective attribute's super type specifically
        Entry entry = connection.lookup( "ou=interceptors,ou=configuration,ou=system", "ou" );

        Attribute c_ou = entry.get( "c-ou" );
        assertNotNull( "a collective c-ou attribute should be present", c_ou );
        assertTrue( c_ou.contains( "configuration" ) );
View Full Code Here

            "sn:  TEST    ",
            "cn: test" );

        connection.add( entry );
       
        entry = connection.lookup( entry.getDn(), SchemaConstants.ALL_ATTRIBUTES_ARRAY );
        Entry contextEntry = connection.lookup( "ou=system", SchemaConstants.ALL_ATTRIBUTES_ARRAY );
       
        String expectedCsn = entry.get( SchemaConstants.ENTRY_CSN_AT ).getString();
        String contextCsn = contextEntry.get( SchemaConstants.CONTEXT_CSN_AT ).getString();
        assertEquals( expectedCsn, contextCsn );
View Full Code Here

            "cn: test" );

        connection.add( entry );
       
        entry = connection.lookup( entry.getDn(), SchemaConstants.ALL_ATTRIBUTES_ARRAY );
        Entry contextEntry = connection.lookup( "ou=system", SchemaConstants.ALL_ATTRIBUTES_ARRAY );
       
        String expectedCsn = entry.get( SchemaConstants.ENTRY_CSN_AT ).getString();
        String contextCsn = contextEntry.get( SchemaConstants.CONTEXT_CSN_AT ).getString();
        assertEquals( expectedCsn, contextCsn );
    }
View Full Code Here

            "ads-dsSyncPeriodMillis: 2147483648"
            );

        connection.add( entry );

        entry = connection.lookup( dn );

        assertEquals( "2147483648", entry.get( "ads-dsSyncPeriodMillis" ).getString() );

        getService().shutdown();
View Full Code Here

        assertEquals( "2147483648", entry.get( "ads-dsSyncPeriodMillis" ).getString() );

        getService().shutdown();

        entry = connection.lookup( dn );

        assertNull( entry );

        getService().startup();
View Full Code Here

            "sn: Amos",
            "description", oldCn + " is a person." );

        connection.add( entry );

        Entry tori = connection.lookup( oldDn );

        assertNotNull( tori );
        assertTrue( tori.contains( "cn", "Myra Ellen Amos" ) );

        // modify Rdn
View Full Code Here

        assertNull( entry );

        getService().startup();

        entry = connection.lookup( dn );

        assertEquals( "2147483648", entry.get( "ads-dsSyncPeriodMillis" ).getString() );
    }
}
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.