Subversion Repositories eFlore/Applications.del

Rev

Rev 521 | Rev 845 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 521 Rev 530
Line 1... Line 1...
1
package org.tela_botanica.del.client.services.rest;
1
package org.tela_botanica.del.client.services.rest;
Line -... Line 2...
-
 
2
 
2
 
3
import org.tela_botanica.del.client.config.Config;
3
import org.tela_botanica.del.client.modeles.InformationsRecherche;
4
import org.tela_botanica.del.client.modeles.InformationsRecherche;
4
import org.tela_botanica.del.client.modeles.ObservationServiceResultat;
5
import org.tela_botanica.del.client.modeles.ObservationServiceResultat;
Line 5... Line 6...
5
import org.tela_botanica.del.client.services.rest.async.ObservationsCallback;
6
import org.tela_botanica.del.client.services.rest.async.ObservationsCallback;
Line 6... Line 7...
6
 
7
 
Line 7... Line 8...
7
import com.google.gwt.http.client.RequestBuilder;
8
import com.google.gwt.http.client.RequestBuilder;
Line -... Line 9...
-
 
9
 
-
 
10
public class ObservationServiceConcret implements ObservationService {
-
 
11
 
-
 
12
	private String baseUrl;
-
 
13
 
-
 
14
	public ObservationServiceConcret() {
-
 
15
		Config config = new Config();
-
 
16
		this.baseUrl = config.getServiceBaseUrl();
-
 
17
	}
8
 
18
	
9
public class ObservationServiceConcret implements ObservationService {
19
	public ObservationServiceConcret(Config config) {
10
 
20
		this.baseUrl = config.getServiceBaseUrl();
11
	private String serverUrl = "/del/jrest/";
21
	}
12
 
22
	
13
	@Override
23
	@Override
14
	public void getObservations(InformationsRecherche infos, int debut, int fin, ObservationsCallback callback) {
24
	public void getObservations(InformationsRecherche infos, int debut, int fin, ObservationsCallback callback) {
15
		RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, serverUrl + "Observations" + assemblerChaineRequete(infos, debut, fin));
25
		RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, baseUrl + "Observations" + assemblerChaineRequete(infos, debut, fin));