Subversion Repositories eFlore/Applications.del

Rev

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

Rev 939 Rev 1101
Line 19... Line 19...
19
	public ObservationServiceConcret(Config config) {
19
	public ObservationServiceConcret(Config config) {
20
		this.baseUrl = config.getServiceBaseUrl();
20
		this.baseUrl = config.getServiceBaseUrl();
21
	}
21
	}
Line 22... Line 22...
22
	
22
	
23
	@Override
23
	@Override
24
	public void getObservations(InformationsRecherche infos, int debut, int fin, ObservationsCallback callback) {
24
	public void getObservations(InformationsRecherche infos, int debut, int fin, String statut, ObservationsCallback callback) {
25
		RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, baseUrl + "observations" + assemblerChaineRequete(infos, debut, fin));
25
		RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, baseUrl + "observations" + assemblerChaineRequete(infos, debut, fin, statut));
26
		callback.setMode(ModeRequete.LECTURE);
26
		callback.setMode(ModeRequete.LECTURE);
27
		try {
27
		try {
28
			rb.sendRequest(null, callback);
28
			rb.sendRequest(null, callback);
29
		} catch (Exception e) {
29
		} catch (Exception e) {
30
			// TODO: handle exception
30
			// TODO: handle exception
31
		}
31
		}
Line 32... Line 32...
32
	}
32
	}
Line 33... Line 33...
33
 
33
 
-
 
34
	private String assemblerChaineRequete(InformationsRecherche infos, int debut, int fin, String statut) {
-
 
35
 
-
 
36
		String chaineRequete = "?navigation.depart=" + debut + "&navigation.limite=" + (fin - debut);
34
	private String assemblerChaineRequete(InformationsRecherche infos, int debut, int fin) {
37
		if (statut != null) {
Line 35... Line 38...
35
 
38
			chaineRequete += "&masque.type=" + statut;
36
		String chaineRequete = "?navigation.depart=" + debut + "&navigation.limite=" + (fin - debut);
39
		}