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.ParliamentMember;
11 import com.hack23.cia.web.action.common.ControllerAction;
12
13 /***
14 * The Class ParliamentMemberListModelAndView.
15 */
16 public class ParliamentMemberListModelAndView extends
17 AbstractParliamentModelAndView {
18
19 /***
20 * The Enum ParliamentMemberListViewSpecification.
21 */
22 public enum ParliamentMemberListViewSpecification {
23
24 /*** The Search result view. */
25 SearchResultView,
26
27 /*** The Top absent in party view. */
28 TopAbsentInPartyView,
29
30 /*** The Top absent view. */
31 TopAbsentView,
32
33 /*** The Top losers in party view. */
34 TopLosersInPartyView,
35
36 /*** The Top losers view. */
37 TopLosersView,
38
39 /*** The Top loyals in party view. */
40 TopLoyalsInPartyView,
41
42 /*** The Top loyals view. */
43 TopLoyalsView,
44
45 /*** The Top present in party view. */
46 TopPresentInPartyView,
47
48 /*** The Top present view. */
49 TopPresentView,
50
51 /*** The Top rebels in party view. */
52 TopRebelsInPartyView,
53
54 /*** The Top rebels view. */
55 TopRebelsView,
56
57 /*** The Top winners in party view. */
58 TopWinnersInPartyView,
59
60 /*** The Top winners view. */
61 TopWinnersView
62 }
63
64 /*** The Constant serialVersionUID. */
65 private static final long serialVersionUID = 1L;
66
67 /*** The parliament member list. */
68 private final List<ParliamentMember> parliamentMemberList;
69
70 /*** The parliament member list view specification. */
71 private final ParliamentMemberListViewSpecification parliamentMemberListViewSpecification;
72
73 /***
74 * Instantiates a new parliament member list model and view.
75 *
76 * @param userSessionDTO the user session dto
77 * @param controllerAction the controller action
78 * @param parliamentMemberListViewSpecification the parliament member list view specification
79 * @param parliamentMemberList the parliament member list
80 */
81 public ParliamentMemberListModelAndView(
82 final UserSessionDTO userSessionDTO,
83 final ControllerAction controllerAction,
84 final ParliamentMemberListViewSpecification parliamentMemberListViewSpecification,
85 final List<ParliamentMember> parliamentMemberList) {
86 super(userSessionDTO, controllerAction);
87 this.parliamentMemberListViewSpecification = parliamentMemberListViewSpecification;
88 this.parliamentMemberList = parliamentMemberList;
89 }
90
91 /***
92 * Gets the parliament member list.
93 *
94 * @return the parliament member list
95 */
96 public final List<ParliamentMember> getParliamentMemberList() {
97 return parliamentMemberList;
98 }
99
100 /***
101 * Gets the parliament member list view specification.
102 *
103 * @return the parliament member list view specification
104 */
105 public final ParliamentMemberListViewSpecification getParliamentMemberListViewSpecification() {
106 return parliamentMemberListViewSpecification;
107 }
108
109
110
111
112
113
114
115 @Override
116 public final String getViewSpecificationDescription() {
117 return parliamentMemberListViewSpecification.toString();
118 }
119
120 }