Line 52... |
Line 52... |
52 |
|
52 |
|
53 |
public void ajouterVoteProtocole(VoteProtocole voteProcotole) {
|
53 |
public void ajouterVoteProtocole(VoteProtocole voteProcotole) {
|
54 |
getVotesProtocoles(voteProcotole.getIdProtocole()).put(voteProcotole.getContributeur(), voteProcotole);
|
54 |
getVotesProtocoles(voteProcotole.getIdProtocole()).put(voteProcotole.getContributeur(), voteProcotole);
|
Line -... |
Line 55... |
- |
|
55 |
}
|
- |
|
56 |
|
- |
|
57 |
public boolean utilisateurAVotePourProtocole(String idProtocole, String idContributeur) {
|
- |
|
58 |
boolean aVote = false;
|
- |
|
59 |
if (votesProtocoles.containsKey(idProtocole) && votesProtocoles.get(idProtocole).containsKey(idContributeur)) {
|
- |
|
60 |
aVote = true;
|
- |
|
61 |
}
|
- |
|
62 |
return aVote;
|
55 |
}
|
63 |
}
|
56 |
|
64 |
|
57 |
public HashMap<String, VoteProtocole> getVotesProtocoles(String id_protocole) {
|
65 |
public HashMap<String, VoteProtocole> getVotesProtocoles(String id_protocole) {
|
58 |
if(!votesProtocoles.containsKey(""+id_protocole) || votesProtocoles.get(""+id_protocole) == null) {
|
66 |
if(!votesProtocoles.containsKey(""+id_protocole) || votesProtocoles.get(""+id_protocole) == null) {
|
59 |
votesProtocoles.put(""+id_protocole, new HashMap<String, VoteProtocole>());
|
67 |
votesProtocoles.put(""+id_protocole, new HashMap<String, VoteProtocole>());
|