1
2
3
4
5 package com.hack23.cia.web.viewfactory.api.user;
6
7 import java.util.List;
8
9 import com.hack23.cia.model.application.dto.common.UserSessionDTO;
10 import com.hack23.cia.model.sweden.impl.Vote;
11 import com.hack23.cia.web.action.common.ControllerAction;
12
13 /***
14 * The Class VotesModelAndView.
15 */
16 public class VotesModelAndView extends AbstractParliamentModelAndView {
17
18 /***
19 * The Enum VotesViewSpecification.
20 */
21 public enum VotesViewSpecification {
22
23 /*** The Ballot view. */
24 BallotView
25 }
26
27 /*** The Constant serialVersionUID. */
28 private static final long serialVersionUID = 1L;
29
30 /*** The votes. */
31 private final List<Vote> votes;
32
33 /*** The votes view specification. */
34 private final VotesViewSpecification votesViewSpecification;
35
36 /***
37 * Instantiates a new votes model and view.
38 *
39 * @param userSessionDTO the user session dto
40 * @param controllerAction the controller action
41 * @param votesViewSpecification the votes view specification
42 * @param votes the votes
43 */
44 public VotesModelAndView(final UserSessionDTO userSessionDTO,
45 final ControllerAction controllerAction,
46 final VotesViewSpecification votesViewSpecification,
47 final List<Vote> votes) {
48 super(userSessionDTO, controllerAction);
49 this.votesViewSpecification = votesViewSpecification;
50 this.votes = votes;
51 }
52
53
54
55
56
57
58
59 @Override
60 public final String getViewSpecificationDescription() {
61 return votesViewSpecification.toString();
62 }
63
64 /***
65 * Gets the votes.
66 *
67 * @return the votes
68 */
69 public final List<Vote> getVotes() {
70 return votes;
71 }
72
73 /***
74 * Gets the votes view specification.
75 *
76 * @return the votes view specification
77 */
78 public final VotesViewSpecification getVotesViewSpecification() {
79 return votesViewSpecification;
80 }
81 }