private void setECResponseControl( SearchResultEntry response, ChangeOperationContext opContext, ChangeType type )
{
if ( psearchControl.isReturnECs() )
{
EntryChange ecControl = new EntryChangeImpl();
ecControl.setChangeType( type );
if ( opContext.getChangeLogEvent() != null )
{
ecControl.setChangeNumber( opContext.getChangeLogEvent().getRevision() );
}
if ( opContext instanceof RenameOperationContext || opContext instanceof MoveOperationContext )
{
ecControl.setPreviousDn( opContext.getDn() );
}
response.addControl( ecControl );
}
}