Package org.apache.directory.api.ldap.model.entry

Examples of org.apache.directory.api.ldap.model.entry.DefaultEntry.containsAttribute()


        assertEquals( 4, entry.size() );
        assertEquals( 0, removed.size() );
        assertTrue( entry.containsAttribute( "ObjectClass" ) );
        assertTrue( entry.containsAttribute( "CN" ) );
        assertTrue( entry.containsAttribute( "  sn  " ) );
        assertTrue( entry.containsAttribute( " email  " ) );

        Attribute attr = entry.get( "objectclass" );
        assertEquals( 2, attr.size() );

        Attribute c2 = new DefaultAttribute( atEMail, "UK", "DE" );
View Full Code Here


        assertTrue( removed.get( 0 ).contains( "FR" ) );
        assertTrue( removed.get( 0 ).contains( "US" ) );

        assertEquals( 5, entry.size() );

        assertTrue( entry.containsAttribute( "userPassword" ) );
        assertTrue( entry.containsAttribute( " email " ) );

        Attribute attrC = entry.get( "email" );
        assertEquals( 2, attrC.size() );
        assertTrue( attrC.contains( "UK", "DE" ) );
View Full Code Here

        assertTrue( removed.get( 0 ).contains( "US" ) );

        assertEquals( 5, entry.size() );

        assertTrue( entry.containsAttribute( "userPassword" ) );
        assertTrue( entry.containsAttribute( " email " ) );

        Attribute attrC = entry.get( "email" );
        assertEquals( 2, attrC.size() );
        assertTrue( attrC.contains( "UK", "DE" ) );
View Full Code Here

            assertTrue( true );
        }

        entry.put( "UserPassword", atPwd, ( byte[] ) null );
        assertEquals( 1, entry.size() );
        assertTrue( entry.containsAttribute( atPwd ) );
        assertTrue( entry.contains( atPwd, ( byte[] ) null ) );

        assertEquals( "UserPassword", entry.get( atPwd ).getUpId() );

        Attribute replaced = entry.put( "USERpassword ", atPwd, BYTES1, BYTES2, BYTES1 );
View Full Code Here

            assertTrue( true );
        }

        entry.put( "EMail", atEMail, ( String ) null );
        assertEquals( 1, entry.size() );
        assertTrue( entry.containsAttribute( atEMail ) );
        assertTrue( entry.contains( atEMail, ( String ) null ) );
        assertEquals( "EMail", entry.get( atEMail ).getUpId() );

        Attribute replaced = entry.put( "eMail", atEMail, "test1", "test2", "test1" );
        assertNotNull( replaced );
View Full Code Here

            assertTrue( true );
        }

        entry.put( "Dc", atDC, strNullValue );
        assertEquals( 1, entry.size() );
        assertTrue( entry.containsAttribute( atDC ) );
        assertTrue( entry.contains( atDC, ( String ) null ) );
        assertEquals( "Dc", entry.get( atDC ).getUpId() );

        Attribute replaced = entry.put( "domainComponent", atDC, strValue1, strValue2, strValue1 );
        assertNotNull( replaced );
View Full Code Here

    @Test
    public void testHasObjectClassString() throws Exception
    {
        Entry entry = new DefaultEntry( schemaManager, EXAMPLE_DN );

        assertFalse( entry.containsAttribute( "objectClass" ) );
        assertFalse( entry.hasObjectClass( "top" ) );

        entry.add( new DefaultAttribute( atOC, "top", "person" ) );

        assertTrue( entry.hasObjectClass( "top" ) );
View Full Code Here

            assertTrue( true );
        }

        entry.put( atPwd, ( byte[] ) null );
        assertEquals( 1, entry.size() );
        assertTrue( entry.containsAttribute( atPwd ) );
        assertTrue( entry.contains( atPwd, ( byte[] ) null ) );

        Attribute replaced = entry.put( atPwd, BYTES1, BYTES2, BYTES1 );
        assertNotNull( replaced );
        assertEquals( atPwd, replaced.getAttributeType() );
View Full Code Here

            assertTrue( true );
        }

        entry.put( atEMail, ( String ) null );
        assertEquals( 1, entry.size() );
        assertTrue( entry.containsAttribute( atEMail ) );
        assertTrue( entry.contains( atEMail, ( String ) null ) );

        Attribute replaced = entry.put( atEMail, "test1", "test2", "test1" );
        assertNotNull( replaced );
        assertEquals( atEMail, replaced.getAttributeType() );
View Full Code Here

    public void testContainsStringByteArrayArray() throws Exception
    {
        Entry entry = new DefaultEntry( schemaManager, EXAMPLE_DN );

        assertFalse( entry.contains( ( String ) null, BYTES3 ) );
        assertFalse( entry.containsAttribute( "objectClass" ) );

        Attribute attrPWD = new DefaultAttribute( atPwd, BYTES1, ( byte[] ) null, BYTES2 );

        entry.add( attrPWD );
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.