Removes the attribute with the specified AttributeTypes.
The removed attribute are returned by this method.
If there is no attribute with the specified AttributeTypes, the return value is null.
null
964965966967968969970971972973974
Attribute attrSN = new DefaultAttribute( "sn", "Test1", "Test2" ); Attribute attrPWD = new DefaultAttribute( "userPassword", BYTES1, BYTES2 ); entry.put( attrOC, attrCN, attrSN, attrPWD ); entry.removeAttributes( "CN", "SN" ); assertFalse( entry.containsAttribute( "cn", "sn" ) ); assertTrue( entry.containsAttribute( "objectclass", "userpassword" ) ); entry.removeAttributes( "badId" );
969970971972973974975976977978979
entry.removeAttributes( "CN", "SN" ); assertFalse( entry.containsAttribute( "cn", "sn" ) ); assertTrue( entry.containsAttribute( "objectclass", "userpassword" ) ); entry.removeAttributes( "badId" ); entry.removeAttributes( ( String ) null ); }
971972973974975976977978979980981
assertFalse( entry.containsAttribute( "cn", "sn" ) ); assertTrue( entry.containsAttribute( "objectclass", "userpassword" ) ); entry.removeAttributes( "badId" ); entry.removeAttributes( ( String ) null ); } /** * Test method for remove( EntryAttribute... )
12551256125712581259126012611262126312641265
entry.add( "userCertificate;binary", Strings.getBytesUtf8( "secret" ) ); assertTrue( entry.containsAttribute( "userCertificate;binary" ) ); assertTrue( entry.containsAttribute( "userCertificate" ) ); entry.removeAttributes( "userCertificate;binary" ); assertFalse( entry.containsAttribute( "userCertificate;binary" ) ); assertFalse( entry.containsAttribute( "userCertificate" ) ); entry.add( "userCertificate", Strings.getBytesUtf8( "secret" ) ); assertTrue( entry.containsAttribute( "userCertificate;binary" ) );
33533354335533563357335833593360336133623363
Attribute attrSN = new DefaultAttribute( atSN, "Test1", "Test2" ); Attribute attrPWD = new DefaultAttribute( atPwd, BYTES1, BYTES2 ); entry.put( attrOC, attrCN, attrSN, attrPWD ); entry.removeAttributes( atCN, atSN ); assertFalse( entry.containsAttribute( "cn", "sn" ) ); assertTrue( entry.containsAttribute( "objectclass", "userpassword" ) ); }
33753376337733783379338033813382338333843385
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" ) ); entry.removeAttributes( "badId" );