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

Examples of org.apache.directory.shared.ldap.entry.ServerEntry.containsAttribute()


    {
        ServerEntry entry = new DefaultServerEntry( schemaManager, EXAMPLE_DN, "  OBJECTCLASS  ", " Cn " );
        assertNotNull( entry );
        assertEquals( EXAMPLE_DN, entry.getDn() );
        assertEquals( 2, entry.size() );
        assertTrue( entry.containsAttribute( "objectClass" ) );
        assertEquals( "objectclass", entry.get( atOC ).getId() );
        assertEquals( "  OBJECTCLASS  ", entry.get( atOC ).getUpId() );
        assertTrue( entry.containsAttribute( "2.5.4.3" ) );
        assertEquals( "cn", entry.get( atCN ).getId() );
        assertEquals( " Cn ", entry.get( atCN ).getUpId() );
View Full Code Here


        assertEquals( EXAMPLE_DN, entry.getDn() );
        assertEquals( 2, entry.size() );
        assertTrue( entry.containsAttribute( "objectClass" ) );
        assertEquals( "objectclass", entry.get( atOC ).getId() );
        assertEquals( "  OBJECTCLASS  ", entry.get( atOC ).getUpId() );
        assertTrue( entry.containsAttribute( "2.5.4.3" ) );
        assertEquals( "cn", entry.get( atCN ).getId() );
        assertEquals( " Cn ", entry.get( atCN ).getUpId() );
    }
   
   
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 ) );
       
        EntryAttribute replaced = entry.put( atPwd, BYTES1, BYTES2, BYTES1 );
        assertNotNull( replaced );
        assertEquals( atPwd, replaced.getAttributeType() );
View Full Code Here

            assertTrue( true );
        }
       
        entry.put( atCN, (String)null );
        assertEquals( 1, entry.size() );
        assertTrue( entry.containsAttribute( atCN) );
        assertTrue( entry.contains( atCN, (String)null ) );
       
        EntryAttribute replaced = entry.put( atCN, "test1", "test2", "test1" );
        assertNotNull( replaced );
        assertEquals( atCN, replaced.getAttributeType() );
View Full Code Here

            assertTrue( true );
        }
       
        entry.put( atCN, strNullValue );
        assertEquals( 1, entry.size() );
        assertTrue( entry.containsAttribute( atCN) );
        assertTrue( entry.contains( atCN, (String)null ) );
       
        EntryAttribute replaced = entry.put( atCN, strValue1, strValue2, strValue1 );
        assertNotNull( replaced );
        assertEquals( atCN, replaced.getAttributeType() );
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() );
       
        EntryAttribute replaced = entry.put( "USERpassword ", atPwd, BYTES1, BYTES2, BYTES1 );
View Full Code Here

            assertTrue( true );
        }
       
        entry.put( "CN", atCN, (String)null );
        assertEquals( 1, entry.size() );
        assertTrue( entry.containsAttribute( atCN) );
        assertTrue( entry.contains( atCN, (String)null ) );
        assertEquals( "CN", entry.get( atCN ).getUpId() );
       
        EntryAttribute replaced = entry.put( "commonName", atCN, "test1", "test2", "test1" );
        assertNotNull( replaced );
View Full Code Here

            assertTrue( true );
        }
       
        entry.put( "Cn", atCN, strNullValue );
        assertEquals( 1, entry.size() );
        assertTrue( entry.containsAttribute( atCN) );
        assertTrue( entry.contains( atCN, (String)null ) );
        assertEquals( "Cn", entry.get( atCN ).getUpId() );
       
        EntryAttribute replaced = entry.put( "commonName", atCN, strValue1, strValue2, strValue1 );
        assertNotNull( replaced );
View Full Code Here

        EntryAttribute attrPWD = new DefaultServerAttribute( atPwd, BYTES1, (byte[])null, BYTES2 );

        entry.put( attrPWD );
        assertTrue( entry.remove( atPwd, (byte[])null ) );
        assertTrue( entry.remove( atPwd, BYTES1, BYTES2 ) );
        assertFalse( entry.containsAttribute( atPwd ) );
       
        entry.add( atPwd, BYTES1, (byte[])null, BYTES2 );
        assertTrue( entry.remove( atPwd, (byte[])null ) );
        assertEquals( 2, entry.get( atPwd ).size() );
        assertFalse( entry.contains( atPwd, (byte[])null ) );
View Full Code Here

        EntryAttribute attrCN = new DefaultServerAttribute( atCN, "test1", (String)null, "test2" );

        entry.put( attrCN );
        assertTrue( entry.remove( atCN, (String)null ) );
        assertTrue( entry.remove( atCN, "test1", "test2" ) );
        assertFalse( entry.containsAttribute( atCN ) );
       
        entry.add( atCN, "test1", (String)null, "test2" );
        assertTrue( entry.remove( atCN, (String)null ) );
        assertEquals( 2, entry.get( atCN ).size() );
        assertFalse( entry.contains( atCN, (String)null ) );
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.