super.modify( modifyContext.getDn(), modifyContext.getModItems().toArray( new Modification[]
{} ) );
}
catch ( Exception e )
{
throw new LdapOperationException( e.getMessage(), e );
}
// Get the modified entry and store it in the context for post usage
Entry modifiedEntry = fetch( id, modifyContext.getDn() );
modifyContext.setAlteredEntry( modifiedEntry );
// Remove the EntryDN
modifiedEntry.removeAttributes( ENTRY_DN_AT );
// just overwrite the existing file
Dn dn = modifyContext.getDn();
// And write it back on disk
try
{
FileWriter fw = new FileWriter( getFile( dn, DELETE ) );
fw.write( LdifUtils.convertToLdif( modifiedEntry, true ) );
fw.close();
}
catch ( IOException ioe )
{
throw new LdapOperationException( ioe.getMessage(), ioe );
}
}