| Line 3... |
Line 3... |
| 3 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
3 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
| 4 |
import org.tela_botanica.client.modeles.objets.Configuration;
|
4 |
import org.tela_botanica.client.modeles.objets.Configuration;
|
| 5 |
import org.tela_botanica.client.observation.ObservationModele;
|
5 |
import org.tela_botanica.client.observation.ObservationModele;
|
| Line 6... |
Line 6... |
| 6 |
|
6 |
|
| 7 |
import com.google.gwt.http.client.Request;
|
7 |
import com.google.gwt.http.client.Request;
|
| 8 |
import com.google.gwt.http.client.RequestBuilder;
|
8 |
import org.tela_botanica.client.util.RequestBuilderWithCredentials;
|
| 9 |
import com.google.gwt.http.client.RequestCallback;
|
9 |
import com.google.gwt.http.client.RequestCallback;
|
| 10 |
import com.google.gwt.http.client.RequestException;
|
10 |
import com.google.gwt.http.client.RequestException;
|
| 11 |
import com.google.gwt.http.client.Response;
|
11 |
import com.google.gwt.http.client.Response;
|
| 12 |
import com.google.gwt.json.client.JSONArray;
|
12 |
import com.google.gwt.json.client.JSONArray;
|
| Line 43... |
Line 43... |
| 43 |
public void obtenirURLImage(final Rafraichissable r, String referentielTaxo, String numeroNomenclaturalSaisiObservation) {
|
43 |
public void obtenirURLImage(final Rafraichissable r, String referentielTaxo, String numeroNomenclaturalSaisiObservation) {
|
| 44 |
String referentielDefaut = Configuration.getReferentielsDispos().get(0).getCode();
|
44 |
String referentielDefaut = Configuration.getReferentielsDispos().get(0).getCode();
|
| 45 |
referentielTaxo = (referentielTaxo != null && !referentielTaxo.isEmpty()) ? referentielTaxo : referentielDefaut;
|
45 |
referentielTaxo = (referentielTaxo != null && !referentielTaxo.isEmpty()) ? referentielTaxo : referentielDefaut;
|
| Line 46... |
Line 46... |
| 46 |
|
46 |
|
| 47 |
// on envoie le get asynchrone
|
47 |
// on envoie le get asynchrone
|
| 48 |
RequestBuilder rb = new RequestBuilder(RequestBuilder.GET,Configuration.getServiceBaseUrl()
|
48 |
RequestBuilderWithCredentials rb = new RequestBuilderWithCredentials(RequestBuilderWithCredentials.GET,Configuration.getServiceBaseUrl()
|
| Line 49... |
Line 49... |
| 49 |
+"/NameImage/"+referentielTaxo+"/"+numeroNomenclaturalSaisiObservation) ;
|
49 |
+"/NameImage/"+referentielTaxo+"/"+numeroNomenclaturalSaisiObservation) ;
|
| 50 |
|
50 |
|