View Javadoc

1   /*
2   Copyright 2010 James Pether Sörling Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 
3   	$Id
4   */
5   
6   package com.hack23.cia.service.impl.admin;
7   
8   import java.util.Date;
9   import java.util.List;
10  import java.util.Map;
11  
12  import com.hack23.cia.model.sweden.impl.Ballot;
13  import com.hack23.cia.model.sweden.impl.CommitteeReport;
14  import com.hack23.cia.model.sweden.impl.ParliamentMember;
15  import com.hack23.cia.model.sweden.impl.PoliticalParty;
16  import com.hack23.cia.model.sweden.impl.Vote;
17  
18  /***
19   * The Interface LoaderService.
20   */
21  public interface LoaderService {
22  
23      /***
24       * Adds the ballot information.
25       *
26       * @param ballotId the ballot id
27       * @param list the list
28       */
29      void addBallotInformation(Long ballotId, List<Vote> list);
30  
31      /***
32       * Adds the committee report information.
33       *
34       * @param id the id
35       * @param decidedDateIfAny the decided date if any
36       * @param findVotedballots the find votedballots
37       */
38      void addCommitteeReportInformation(Long id, Date decidedDateIfAny,
39              List<Ballot> findVotedballots);
40  
41      /***
42       * Adds the if not exist.
43       *
44       * @param commiteeReport the commitee report
45       */
46      void addIfNotExist(CommitteeReport commiteeReport);
47  
48      /***
49       * Adds the if not exist.
50       *
51       * @param politcalParty the politcal party
52       */
53  	void addIfNotExist(PoliticalParty politcalParty);
54  
55      /***
56       * Creates the parliament member vote compare results.
57       */
58      void createParliamentMemberVoteCompareResults();
59  
60      /***
61       * Delete parliament member vote compare results.
62       */
63      void deleteParliamentMemberVoteCompareResults();
64  
65      /***
66       * Generate ballot charts.
67       *
68       * @param ballotId the ballot id
69       */
70  	void generateBallotCharts(Long ballotId);
71  
72      /***
73       * Generate committee report charts.
74       */
75  	void generateCommitteeReportCharts();
76  
77      /***
78       * Generate parliament charts.
79       */
80  	void generateParliamentCharts();
81  
82      /***
83       * Generate parliament member charts.
84       *
85       * @param parliamentMemberId the parliament member id
86       */
87  	void generateParliamentMemberCharts(Long parliamentMemberId);
88  
89      /***
90       * Generate political party charts.
91       *
92       * @param politicalPartyId the political party id
93       */
94  	void generatePoliticalPartyCharts(Long politicalPartyId);
95  
96      /***
97       * Gets the all ballots.
98       *
99       * @return the all ballots
100      */
101     List<Ballot> getAllBallots();
102 
103 	/***
104 	 * Gets the all completed ballotar.
105 	 *
106 	 * @return the all completed ballotar
107 	 */
108     List<Ballot> getAllCompletedBallotar();
109 
110 	/***
111 	 * Gets the all created ballotar.
112 	 *
113 	 * @return the all created ballotar
114 	 */
115     List<Ballot> getAllCreatedBallotar();
116 	
117 	/***
118 	 * Gets the all created committee reports.
119 	 *
120 	 * @return the all created committee reports
121 	 */
122     List<CommitteeReport> getAllCreatedCommitteeReports();
123 	
124 	/***
125 	 * Gets the all political parties.
126 	 *
127 	 * @return the all political parties
128 	 */
129 	List<PoliticalParty> getAllPoliticalParties();
130 	
131 	/***
132 	 * Gets the current list.
133 	 *
134 	 * @return the current list
135 	 */
136     List<ParliamentMember> getCurrentList();
137 	
138 	/***
139 	 * Update parliament members english wiki href.
140 	 *
141 	 * @param updates the updates
142 	 */
143     void updateParliamentMembersEnglishWikiHref(Map<Long, String> updates);
144 	
145     /***
146      * Update parliament members href.
147      *
148      * @param updates the updates
149      */
150     void updateParliamentMembersHref(Map<Long, String> updates);
151 	
152 	/***
153 	 * Update parliament members wiki href.
154 	 *
155 	 * @param updates the updates
156 	 */
157     void updateParliamentMembersWikiHref(Map<Long, String> updates);
158 	
159 }