Package org.apache.directory.shared.ldap.entry.client

Examples of org.apache.directory.shared.ldap.entry.client.DefaultClientEntry


    public void testAddEntryWithTwoDescriptions() throws Exception
    {
        LdapConnection con = getClientApiConnection( ldapServer );
       
        String dn = "cn=Kate Bush," + BASE;
        Entry kate = new DefaultClientEntry( new DN( dn ) );

        kate.add( "objectclass", "top", "person" );
        kate.add( "sn", "Bush" );
        kate.add( "cn", "Kate Bush" );

        String descr[] =
            { "a British singer-songwriter with an expressive four-octave voice",
                "one of the most influential female artists of the twentieth century" };

        kate.add( "description", descr );

        con.add( kate );

        // Analyze entry and description attribute
        Entry kateReloaded = ( ( SearchResultEntry ) con.lookup( dn ) ).getEntry();
View Full Code Here


    public void testAddEntryWithTwoDescriptionsVariant() throws Exception
    {
        LdapConnection con = getClientApiConnection( ldapServer );

        String dn = "cn=Kate Bush," + BASE;
        Entry kate = new DefaultClientEntry( new DN( dn ) );
        kate.add( "objectclass", "top", "person" );
        kate.add( "sn", "Bush" );
        kate.add( "cn", "Kate Bush" );

        String descr[] =
            { "a British singer-songwriter with an expressive four-octave voice",
                "one of the most influential female artists of the twentieth century" };

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

        con.add( kate );

        // Analyze entry and description attribute
        Entry kateReloaded = ( (SearchResultEntry ) con.lookup( dn ) ).getEntry();
View Full Code Here

    public void testAddEntryWithTwoDescriptionsSecondVariant() throws Exception
    {
        LdapConnection con = getClientApiConnection( ldapServer );

        String dn = "cn=Kate Bush," + BASE;
        Entry kate = new DefaultClientEntry( new DN( dn ) );
       
        kate.add( "objectclass", "top", "person" );
        kate.add( "sn", "Bush" );

        String descr[] =
            { "a British singer-songwriter with an expressive four-octave voice",
                "one of the most influential female artists of the twentieth century" };

        kate.add( "description", descr[0] );
        kate.add( "cn", "Kate Bush" );
        kate.add( "description", descr[1] );

        con.add( kate );

        // Analyze entry and description attribute
        Entry kateReloaded = ( ( SearchResultEntry ) con.lookup( dn ) ).getEntry();
View Full Code Here

    public void testAddEntryUUIDAndCSNAttributes() throws Exception
    {
        LdapConnection con = getClientApiConnection( ldapServer );
       
        String dn = "cn=Kate Bush," + BASE;
        Entry entry = new DefaultClientEntry( new DN( dn ) );
        entry.add( "objectclass", "top", "person" );
        entry.add( "sn", "Bush" );
        entry.add( "cn", "Kate Bush" );

        String descr = "a British singer-songwriter with an expressive four-octave voice";
        entry.add( "description", descr );

        UUID uuid = UUID.randomUUID();
        entry.add( SchemaConstants.ENTRY_UUID_AT, uuid.toString() );

        CsnFactory csnFac = new CsnFactory( 0 );
        Csn csn = csnFac.newInstance();
        entry.add( SchemaConstants.ENTRY_CSN_AT, csn.toString() );
       
        con.add( entry );

        // Analyze entry and description attribute
        SearchResultEntry resp = ( SearchResultEntry ) con.lookup( dn, "*", "+" );
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.entry.client.DefaultClientEntry

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.