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

Examples of org.apache.directory.shared.ldap.model.entry.DefaultEntry.removeAttributes()


        assertTrue( entry.containsAttribute( "objectclass", "userpassword" ) );

        List<Attribute> removed = entry.removeAttributes( ( AttributeType ) null );
        assertNull( removed );

        removed = entry.removeAttributes( atC );
        assertNull( removed );
    }


    /**
 
View Full Code Here


        Attribute attrSN = new DefaultAttribute( atSN, "Test1", "Test2" );
        Attribute attrPWD = new DefaultAttribute( atPwd, BYTES1, BYTES2 );

        entry.put( attrOC, attrCN, attrSN, attrPWD );

        entry.removeAttributes( "CN", "SN" );

        assertFalse( entry.containsAttribute( "cn", "sn" ) );
        assertTrue( entry.containsAttribute( "objectclass", "userpassword" ) );

        List<Attribute> removed = entry.removeAttributes( "badId" );
View Full Code Here

        entry.removeAttributes( "CN", "SN" );

        assertFalse( entry.containsAttribute( "cn", "sn" ) );
        assertTrue( entry.containsAttribute( "objectclass", "userpassword" ) );

        List<Attribute> removed = entry.removeAttributes( "badId" );
        assertNull( removed );

        removed = entry.removeAttributes( "l" );
        assertNull( removed );
View Full Code Here

        assertTrue( entry.containsAttribute( "objectclass", "userpassword" ) );

        List<Attribute> removed = entry.removeAttributes( "badId" );
        assertNull( removed );

        removed = entry.removeAttributes( "l" );
        assertNull( removed );

        removed = entry.removeAttributes( ( String ) null );
        assertNull( removed );
    }
View Full Code Here

        assertNull( removed );

        removed = entry.removeAttributes( "l" );
        assertNull( removed );

        removed = entry.removeAttributes( ( String ) null );
        assertNull( removed );
    }


    /**
 
View Full Code Here

        Value<byte[]> testB1 = new BinaryValue( atPassword, b1 );
        Value<byte[]> testB2 = new BinaryValue( atPassword, b2 );

        // test a removal of an non existing attribute
        List<Attribute> removed = entry.removeAttributes( atCN );
        assertNull( removed );

        // Test a simple removal
        entry.add( "cN", atCN, test1 );
        assertEquals( 1, entry.size() );
View Full Code Here

        // Test a simple removal
        entry.add( "cN", atCN, test1 );
        assertEquals( 1, entry.size() );
        assertNotNull( entry.get( atCN ) );
        entry.removeAttributes( "CN" );
        assertEquals( 0, entry.size() );
        assertNull( entry.get( atCN ) );

        // Test a removal of many elements
        entry.put( "CN", test1, test2 );
View Full Code Here

        assertNotNull( entry.get( atCN ) );
        assertNotNull( entry.get( atPassword ) );

        AttributeType OBJECT_CLASS_AT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.OBJECT_CLASS_AT );

        entry.removeAttributes( "cN", "UsErPaSsWoRd" );
        assertEquals( 0, entry.size() );
        assertNull( entry.get( atCN ) );
        assertNull( entry.get( atPassword ) );
        assertFalse( entry.contains( OBJECT_CLASS_AT, "top" ) );
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.