// Attributes
String[] returningAttributes = searchParameter.getReturningAttributes();
for ( int i = 0; i < returningAttributes.length; i++ )
{
searchRequest.addAttribute( returningAttributes[i] );
}
// Controls
List<org.apache.directory.shared.ldap.codec.Control> sharedLdapControls = convertToSharedLdapControls( searchParameter
.getControls() );