Line 1... |
Line 1... |
1 |
package org.tela_botanica.del.client.vues.plateformedetermination.vote;
|
1 |
package org.tela_botanica.del.client.vues.plateformedetermination.vote;
|
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.Protocole;
|
7 |
import org.tela_botanica.del.client.modeles.Protocole;
|
7 |
import org.tela_botanica.del.client.modeles.VoteProtocole;
|
8 |
import org.tela_botanica.del.client.modeles.VoteProtocole;
|
8 |
import org.tela_botanica.del.client.services.rest.ProtocoleService;
|
9 |
import org.tela_botanica.del.client.services.rest.ProtocoleService;
|
9 |
import org.tela_botanica.del.client.services.rest.VoteProtocoleService;
|
10 |
import org.tela_botanica.del.client.services.rest.VoteProtocoleService;
|
Line -... |
Line 11... |
- |
|
11 |
import org.tela_botanica.del.client.utils.MockDatasource;
|
10 |
import org.tela_botanica.del.client.utils.MockDatasource;
|
12 |
import org.tela_botanica.del.client.vues.plateformedetermination.vote.protocole.moyenne.MoyenneVoteProtocolePresenteur;
|
11 |
import org.tela_botanica.del.client.vues.plateformedetermination.vote.protocole.moyenne.MoyenneVoteProtocolePresenteur;
|
13 |
|
Line 12... |
Line 14... |
12 |
|
14 |
import com.google.gwt.user.client.Window;
|
Line 19... |
Line 21... |
19 |
public HasWidgets getPanneauVotes();
|
21 |
public HasWidgets getPanneauVotes();
|
20 |
}
|
22 |
}
|
Line 21... |
Line 23... |
21 |
|
23 |
|
22 |
private Vue vue;
|
24 |
private Vue vue;
|
23 |
private ProtocoleService protocoleService = MockDatasource.getInstance();
|
- |
|
Line 24... |
Line 25... |
24 |
private VoteProtocoleService voteProtocoleService = MockDatasource.getInstance();
|
25 |
private ProtocoleService protocoleService = MockDatasource.getInstance();
|
25 |
|
26 |
|
26 |
public EnsembleVotesPresenteur(Vue vue) {
|
27 |
public EnsembleVotesPresenteur(Vue vue) {
|
Line 32... |
Line 33... |
32 |
afficherVotes();
|
33 |
afficherVotes();
|
33 |
}
|
34 |
}
|
Line 34... |
Line 35... |
34 |
|
35 |
|
Line 35... |
Line 36... |
35 |
public void afficherVotes() {
|
36 |
public void afficherVotes() {
|
Line 36... |
Line 37... |
36 |
|
37 |
|
37 |
String idImageCourante = CacheClient.getInstance().getImageCourante().getIdImage();
|
38 |
Image imageCourante = CacheClient.getInstance().getImageCourante();
|
38 |
|
39 |
|
Line 39... |
Line 40... |
39 |
Protocole protocoleEsthetisme = protocoleService.getProtocole(Protocole.ESTHETISME);
|
40 |
Protocole protocoleEsthetisme = protocoleService.getProtocole(Protocole.ESTHETISME);
|
40 |
List<VoteProtocole> observationValidationsEsthetisme = voteProtocoleService.getVoteByImageAndProtocol(idImageCourante, Protocole.ESTHETISME);
|
41 |
List<VoteProtocole> observationValidationsEsthetisme = imageCourante.getVotesProtocoles(protocoleEsthetisme.getId());
|
41 |
new MoyenneVoteProtocolePresenteur(protocoleEsthetisme, observationValidationsEsthetisme).go(vue.getPanneauVotes());
|
42 |
new MoyenneVoteProtocolePresenteur(protocoleEsthetisme, observationValidationsEsthetisme).go(vue.getPanneauVotes());
|
42 |
|
43 |
|
43 |
Protocole protocoleIdentification = protocoleService.getProtocole(Protocole.IDENTIFICATION_AUTOMATIQUE);
|
44 |
Protocole protocoleIdentification = protocoleService.getProtocole(Protocole.IDENTIFICATION_AUTOMATIQUE);
|