| Line 2... |
Line 2... |
| 2 |
|
2 |
|
| Line 3... |
Line 3... |
| 3 |
import java.util.List;
|
3 |
import java.util.List;
|
| 4 |
|
4 |
|
| - |
|
5 |
import org.tela_botanica.del.client.cache.CacheClient;
|
| 5 |
import org.tela_botanica.del.client.cache.CacheClient;
|
6 |
import org.tela_botanica.del.client.modeles.Image;
|
| 6 |
import org.tela_botanica.del.client.modeles.Image;
|
7 |
import org.tela_botanica.del.client.modeles.ImageServiceResultat;
|
| 7 |
import org.tela_botanica.del.client.modeles.VoteProtocole;
|
8 |
import org.tela_botanica.del.client.modeles.VoteProtocole;
|
| - |
|
9 |
import org.tela_botanica.del.client.services.rest.ImageService;
|
| 8 |
import org.tela_botanica.del.client.services.rest.ImageService;
|
10 |
import org.tela_botanica.del.client.services.rest.VoteProtocoleService;
|
| Line 9... |
Line 11... |
| 9 |
import org.tela_botanica.del.client.services.rest.VoteProtocoleService;
|
11 |
import org.tela_botanica.del.client.services.rest.async.ImagesParTaxonCallback;
|
| 10 |
import org.tela_botanica.del.client.utils.MockDatasource;
|
12 |
import org.tela_botanica.del.client.utils.MockDatasource;
|
| 11 |
|
13 |
|
| Line 35... |
Line 37... |
| 35 |
|
37 |
|
| 36 |
private Image imagePrincipale;
|
38 |
private Image imagePrincipale;
|
| 37 |
private String nomTaxonComparaison;
|
39 |
private String nomTaxonComparaison;
|
| Line 38... |
Line 40... |
| 38 |
private List<org.tela_botanica.del.client.modeles.Image> imagesEflore;
|
40 |
private List<org.tela_botanica.del.client.modeles.Image> imagesEflore;
|
| 39 |
|
41 |
|
| 40 |
public ComparaisonEflorePresenteur(Vue vue) {
|
42 |
public ComparaisonEflorePresenteur(Vue vue, VoteProtocoleService voteProtocoleService, ImageService imageService) {
|
| 41 |
this.vue = vue;
|
43 |
this.vue = vue;
|
| 42 |
this.imagePrincipale = CacheClient.getInstance().getImageCourante();
|
44 |
this.imagePrincipale = CacheClient.getInstance().getImageCourante();
|
| Line 55... |
Line 57... |
| 55 |
List<VoteProtocole> observationValidations = validationService.getVote(imagePrincipale.getIdImage());
|
57 |
List<VoteProtocole> observationValidations = validationService.getVote(imagePrincipale.getIdImage());
|
| 56 |
imagePrincipale.setVoteProtocoles(observationValidations);
|
58 |
imagePrincipale.setVoteProtocoles(observationValidations);
|
| 57 |
}
|
59 |
}
|
| Line 58... |
Line 60... |
| 58 |
|
60 |
|
| - |
|
61 |
public void chargerObservationsEflore() {
|
| 59 |
public void chargerObservationsEflore() {
|
62 |
|
| - |
|
63 |
ImagesParTaxonCallback callback = new ImagesParTaxonCallback() {
|
| - |
|
64 |
|
| - |
|
65 |
@Override
|
| - |
|
66 |
public void surImagesRecues(ImageServiceResultat imagesRecues) {
|
| 60 |
imagesEflore = imageService.getImagesEfloreParTaxon(nomTaxonComparaison);
|
67 |
//CacheClient.getInstance().setImages(imagesRecues.getImages());
|
| - |
|
68 |
vue.chargerImagesEflore(imagesRecues.getImages(), 0);
|
| - |
|
69 |
}
|
| - |
|
70 |
};
|
| - |
|
71 |
|
| - |
|
72 |
imageService.getImagesEfloreParTaxon(nomTaxonComparaison, callback);
|
| 61 |
vue.chargerImagesEflore(imagesEflore, 0);
|
73 |
|
| Line 62... |
Line 74... |
| 62 |
}
|
74 |
}
|
| 63 |
|
75 |
|