public void clear() { clonedEntry.clear(); }
/** * Prepare and send a search result entry response, with the associated * SyncState control. */ private void sendSearchResultEntry( LdapSession session, SearchRequest req, Entry entry, SyncStateTypeEnum syncStateType ) throws Exception { Attribute uuid = entry.get( SchemaConstants.ENTRY_UUID_AT ); // Create the SyncState control SyncStateValue syncStateControl = new SyncStateValueDecorator( ldapServer.getDirectoryService().getLdapCodecService() ); syncStateControl.setSyncStateType( syncStateType ); syncStateControl.setEntryUUID( Strings.uuidToBytes( uuid.getString() ) ); if ( syncStateType == SyncStateTypeEnum.DELETE ) { // clear the entry's all attributes except the Dn and entryUUID entry.clear(); entry.add( uuid ); } Response resp = generateResponse( session, req, entry ); resp.addControl( syncStateControl ); PROVIDER_LOG.debug( "Sending the entry:\n {}", resp ); session.getIoSession().write( resp ); }