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

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


        assertFalse( entry.remove( "badId", BYTES1 ) );

        entry.put( attrPWD );
        assertTrue( entry.remove( "userPassword", ( byte[] ) null ) );
        assertTrue( entry.remove( "UserPassword", BYTES1, BYTES2 ) );
        assertFalse( entry.containsAttribute( atPwd ) );

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


        assertFalse( entry.remove( "badId", "test1" ) );

        entry.put( attrCN );
        assertTrue( entry.remove( "email", ( String ) null ) );
        assertTrue( entry.remove( "eMail", "test1", "test2" ) );
        assertFalse( entry.containsAttribute( atEMail ) );

        entry.add( atEMail, "test1", ( String ) null, "test2" );
        assertTrue( entry.remove( "1.2.840.113549.1.9.1", ( String ) null ) );
        assertEquals( 2, entry.get( atEMail ).size() );
        assertFalse( entry.contains( atEMail, ( byte[] ) null ) );
View Full Code Here

        Attribute attrPWD = new DefaultAttribute( atEMail, "test1", ( String ) null, "test2" );

        entry.put( attrPWD );
        assertTrue( entry.remove( "EMail", strNullValue ) );
        assertTrue( entry.remove( "eMail", strValue1, strValue2 ) );
        assertFalse( entry.containsAttribute( atEMail ) );

        entry.add( atEMail, strValue1, strNullValue, strValue2 );
        assertTrue( entry.remove( "1.2.840.113549.1.9.1", strNullValue ) );
        assertEquals( 2, entry.get( atEMail ).size() );
        assertFalse( entry.contains( atEMail, strNullValue ) );
View Full Code Here

        // Test an empty AT
        entry.put( "email", atEMail, ( String ) null );
        assertEquals( 1, entry.size() );
        assertEquals( "email", entry.get( atEMail ).getUpId() );
        assertTrue( entry.containsAttribute( "email" ) );
        assertNull( entry.get( atEMail ).get().getValue() );

        // Check that we can use a null AttributeType
        entry.put( "email", ( AttributeType ) null, ( String ) null );
        assertEquals( 1, entry.size() );
View Full Code Here

        // Check that we can use a null AttributeType
        entry.put( "email", ( AttributeType ) null, ( String ) null );
        assertEquals( 1, entry.size() );
        assertEquals( "email", entry.get( atEMail ).getUpId() );
        assertTrue( entry.containsAttribute( "email" ) );
        assertNull( entry.get( atEMail ).get().getValue() );

        // Test that we can use a null upId
        entry.put( null, atEMail, ( String ) null );
        assertEquals( 1, entry.size() );
View Full Code Here

        // Test that we can use a null upId
        entry.put( null, atEMail, ( String ) null );
        assertEquals( 1, entry.size() );
        assertEquals( "email", entry.get( atEMail ).getUpId() );
        assertTrue( entry.containsAttribute( "email" ) );
        assertNull( entry.get( atEMail ).get().getValue() );

        try
        {
            entry.put( "sn", atEMail, ( String ) null );
View Full Code Here

        // Test an empty AT
        entry.put( "userPassword", atPassword, ( byte[] ) null );
        assertEquals( 1, entry.size() );
        assertEquals( "userPassword", entry.get( atPassword ).getUpId() );
        assertTrue( entry.containsAttribute( "userPassword" ) );
        assertNull( entry.get( atPassword ).get().getValue() );

        // Check that we can use a null AttributeType
        entry.put( "userPassword", ( AttributeType ) null, ( byte[] ) null );
        assertEquals( 1, entry.size() );
View Full Code Here

        // Check that we can use a null AttributeType
        entry.put( "userPassword", ( AttributeType ) null, ( byte[] ) null );
        assertEquals( 1, entry.size() );
        assertEquals( "userPassword", entry.get( atPassword ).getUpId() );
        assertTrue( entry.containsAttribute( "userPassword" ) );
        assertNull( entry.get( atPassword ).get().getValue() );

        // Test that we can use a null upId
        entry.put( null, atPassword, ( byte[] ) null );
        assertEquals( 1, entry.size() );
View Full Code Here

        // Test that we can use a null upId
        entry.put( null, atPassword, ( byte[] ) null );
        assertEquals( 1, entry.size() );
        assertEquals( "userPassword", entry.get( atPassword ).getUpId() );
        assertTrue( entry.containsAttribute( "userPassword" ) );
        assertNull( entry.get( atPassword ).get().getValue() );

        // Test that if we use an upId which is not compatible
        // with the AT, it is changed to the AT default name
        try
View Full Code Here

        // Test an empty AT
        entry.put( "domainComponent", atDC, ( Value<?> ) null );
        assertEquals( 1, entry.size() );
        assertEquals( "domainComponent", entry.get( atDC ).getUpId() );
        assertTrue( entry.containsAttribute( "dc" ) );
        assertNull( entry.get( atDC ).get().getValue() );

        // Check that we can use a null AttributeType
        entry.put( "domainComponent", ( AttributeType ) null, ( Value<?> ) 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.