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
192193194195196197198199200201202
private long getEntryLdifLen( Entry entry ) throws LdapException { // Remove the entryDn attribute Entry copy = entry.clone(); copy.removeAttributes( "entryDn" ); // while writing to the file 1 extra newline char will be added String ldif = LdifUtils.convertToLdif( copy ) + "\n"; byte[] data = Strings.getBytesUtf8( ldif );
768769770771772773774775776777778
{ updateRdnIdx( parentId, ADD_CHILD, 0 ); } // Remove the EntryDN attribute entry.removeAttributes( ENTRY_DN_AT ); // And finally add the entry into the master table master.put( id, entry ); } finally
11131114111511161117111811191120112111221123
if ( entry != null ) { // Replace the entry's DN with the provided one if ( entry.containsAttribute( ENTRY_DN_AT ) ) { entry.removeAttributes( ENTRY_DN_AT ); } entry.add( ENTRY_DN_AT, dn.getName() ); entry.setDn( dn );
12171218121912201221122212231224122512261227
} updateCsnIndex( entry, id ); // Remove the EntryDN entry.removeAttributes( ENTRY_DN_AT ); master.put( id, entry ); if ( isSyncOnWrite.get() ) {
789790791792793794795796797798799
// We may have to remove the attribute or only some values if ( attribute.size() == 0 ) { // No value : we have to remove the entire attribute tempEntry.removeAttributes( attributeType ); } else { currentAttribute = tempEntry.get( attributeType );
815816817818819820821822823824825
// If the current attribute is empty, we have to remove // it from the entry if ( currentAttribute.size() == 0 ) { tempEntry.removeAttributes( attributeType ); } } break;
845846847848849850851852853854855
else { if ( attribute.size() == 0 ) { // Remove the attribute from the entry tempEntry.removeAttributes( attributeType ); } else { // Replace the existing values with the new values // This is done by removing the Attribute
851852853854855856857858859860861
} else { // Replace the existing values with the new values // This is done by removing the Attribute tempEntry.removeAttributes( attributeType ); // Create the new Attribute Attribute newAttribute = createNewAttribute( attribute ); tempEntry.put( newAttribute );
764765766767768769770771772773774
12071208120912101211121212131214121512161217