| Line 1... |
Line 1... |
| 1 |
package org.tela_botanica.del.client.services.rest;
|
1 |
package org.tela_botanica.del.client.services.rest;
|
| Line 2... |
Line 2... |
| 2 |
|
2 |
|
| - |
|
3 |
import org.tela_botanica.del.client.config.Config;
|
| 3 |
import org.tela_botanica.del.client.config.Config;
|
4 |
import org.tela_botanica.del.client.modeles.Image;
|
| 4 |
import org.tela_botanica.del.client.modeles.InformationsRecherche;
|
5 |
import org.tela_botanica.del.client.modeles.InformationsRecherche;
|
| - |
|
6 |
import org.tela_botanica.del.client.services.rest.async.ImagesParTaxonCallback;
|
| 5 |
import org.tela_botanica.del.client.services.rest.async.ImagesParTaxonCallback;
|
7 |
import org.tela_botanica.del.client.services.rest.async.SuppressionImageCallback;
|
| 6 |
import org.tela_botanica.del.client.services.rest.async.PHPCallback.ModeRequete;
|
- |
|
| 7 |
|
8 |
import org.tela_botanica.del.client.services.rest.async.PHPCallback.ModeRequete;
|
| Line 8... |
Line 9... |
| 8 |
import org.tela_botanica.del.client.services.RequestBuilderWithCredentials;
|
9 |
import org.tela_botanica.del.client.services.RequestBuilderWithCredentials;
|
| Line 9... |
Line 10... |
| 9 |
|
10 |
|
| Line 63... |
Line 64... |
| 63 |
String chaineRequete = "?navigation.depart=" + debut + "&navigation.limite=" + (fin - debut);
|
64 |
String chaineRequete = "?navigation.depart=" + debut + "&navigation.limite=" + (fin - debut);
|
| 64 |
chaineRequete+= infos.versChaineRequete();
|
65 |
chaineRequete+= infos.versChaineRequete();
|
| Line 65... |
Line 66... |
| 65 |
|
66 |
|
| 66 |
return chaineRequete;
|
67 |
return chaineRequete;
|
| - |
|
68 |
}
|
| - |
|
69 |
|
| - |
|
70 |
public void supprimer(Image image, SuppressionImageCallback callback) {
|
| - |
|
71 |
String urlService = baseUrl+"images/"+image.getIdImage();
|
| - |
|
72 |
RequestBuilderWithCredentials rb = new RequestBuilderWithCredentials(RequestBuilderWithCredentials.DELETE, urlService);
|
| - |
|
73 |
|
| - |
|
74 |
callback.setMode(ModeRequete.SUPPRESSION);
|
| - |
|
75 |
try {
|
| - |
|
76 |
rb.sendRequest(null, callback);
|
| - |
|
77 |
} catch (Exception e) {
|
| - |
|
78 |
//TODO: quoi faire si la requete est mal formée coté client avant d'être envoyée ?
|
| - |
|
79 |
}
|
| 67 |
}
|
80 |
}
|