Subversion Repositories eFlore/Applications.del

Rev

Rev 1672 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1672 Rev 1862
Line 21... Line 21...
21
		this.baseUrl = config.getServiceBaseUrl();
21
		this.baseUrl = config.getServiceBaseUrl();
22
	}
22
	}
Line 23... Line 23...
23
	
23
	
24
	@Override
24
	@Override
25
	public void getImagesEfloreParTaxon(String taxon, ImagesParTaxonCallback callback) {
-
 
26
 
-
 
27
		// RequestBuilderWithCredentials rb = new RequestBuilderWithCredentials(RequestBuilderWithCredentials.GET,
-
 
28
		// serverUrl+"ImagesEflore");
-
 
29
		// adresse ajoutee temporairement le temps de faire fonctionner le
-
 
30
		// service d'images eflore
25
	public void getImagesEfloreParTaxon(String taxon, ImagesParTaxonCallback callback) {
31
		RequestBuilderWithCredentials rb = new RequestBuilderWithCredentials(RequestBuilderWithCredentials.GET, baseUrl + "images?nom_taxon=" + taxon);
26
		RequestBuilderWithCredentials rb = new RequestBuilderWithCredentials(RequestBuilderWithCredentials.GET, baseUrl + "images?nom_taxon=" + taxon);
32
		callback.setMode(ModeRequete.LECTURE);
27
		callback.setMode(ModeRequete.LECTURE);
33
		try {
28
		try {
34
			rb.sendRequest(null, callback);
29
			rb.sendRequest(null, callback);
Line 58... Line 53...
58
			// TODO: handle exception
53
			// TODO: handle exception
59
		}
54
		}
60
	}
55
	}
Line 61... Line 56...
61
 
56
 
62
	private String assemblerChaineRequete(InformationsRecherche infos, int debut, int fin) {
-
 
63
 
57
	private String assemblerChaineRequete(InformationsRecherche infos, int debut, int fin) {
64
		String chaineRequete = "?navigation.depart=" + debut + "&navigation.limite=" + (fin - debut);
58
		String chaineRequete = "?navigation.depart=" + debut + "&navigation.limite=" + (fin - debut);
Line 65... Line 59...
65
		chaineRequete+= infos.versChaineRequete();
59
		chaineRequete += infos.versChaineRequete();
66
 
60
 
Line 67... Line 61...
67
		return chaineRequete;
61
		return chaineRequete;
Line 76... Line 70...
76
			rb.sendRequest(null, callback);
70
			rb.sendRequest(null, callback);
77
		} catch (Exception e) {
71
		} catch (Exception e) {
78
			//TODO: quoi faire si la requete est mal formée coté client avant d'être envoyée ?
72
			//TODO: quoi faire si la requete est mal formée coté client avant d'être envoyée ?
79
		}
73
		}
80
	}
74
	}
81
}
75
}
82
76