@@ -29,10 +29,8 @@ public class CountedEntitiesController {
2929
3030 @ RequestMapping (path ="/tweet/hashtag" )
3131 public String domainCountTweet2hashtag (
32- @ RequestParam (
33- name = "page" ,
34- defaultValue ="" + ControllerHelper .FIRST_PAGE_NUMBER
35- ) int page , Model model
32+ @ RequestParam (name = "page" , defaultValue ="" + ControllerHelper .FIRST_PAGE_NUMBER ) int page ,
33+ Model model
3634 ) {
3735 String title = "Tweet -> HashTag" ;
3836 setUpThisPage (title ,model );
@@ -55,10 +53,8 @@ public String domainCountTweet2hashtag(
5553
5654 @ RequestMapping (path ="/tweet/media" )
5755 public String domainCountTweet2media (
58- @ RequestParam (
59- name = "page" ,
60- defaultValue ="" + ControllerHelper .FIRST_PAGE_NUMBER
61- ) int page , Model model
56+ @ RequestParam (name = "page" , defaultValue ="" + ControllerHelper .FIRST_PAGE_NUMBER ) int page ,
57+ Model model
6258 ) {
6359 String title = "Tweet -> Media" ;
6460 setUpThisPage (title ,model );
@@ -80,7 +76,10 @@ public String domainCountTweet2media(
8076 }
8177
8278 @ RequestMapping (path ="/tweet/mention" )
83- public String domainCountTweet2mention (@ RequestParam (name = "page" ,defaultValue ="" + ControllerHelper .FIRST_PAGE_NUMBER ) int page , Model model ) {
79+ public String domainCountTweet2mention (
80+ @ RequestParam (name = "page" ,defaultValue ="" + ControllerHelper .FIRST_PAGE_NUMBER ) int page ,
81+ Model model
82+ ) {
8483 String title = "Tweet -> Mention" ;
8584 setUpThisPage (title ,model );
8685 Pageable pageRequest = new PageRequest (page , frontendProperties .getPageSize ());
@@ -102,10 +101,8 @@ public String domainCountTweet2mention(@RequestParam(name= "page" ,defaultValue=
102101
103102 @ RequestMapping (path ="/tweet/tickersymbol" )
104103 public String domainCountTweet2tickersymbol (
105- @ RequestParam (
106- name = "page" ,
107- defaultValue ="" + ControllerHelper .FIRST_PAGE_NUMBER
108- ) int page , Model model
104+ @ RequestParam (name = "page" , defaultValue ="" + ControllerHelper .FIRST_PAGE_NUMBER ) int page ,
105+ Model model
109106 ) {
110107 String title = "Tweet -> TickerSymbol" ;
111108 setUpThisPage (title ,model );
@@ -128,10 +125,8 @@ public String domainCountTweet2tickersymbol(
128125
129126 @ RequestMapping (path ="/tweet/url" )
130127 public String domainCountTweet2url (
131- @ RequestParam (
132- name = "page" ,
133- defaultValue ="" + ControllerHelper .FIRST_PAGE_NUMBER
134- ) int page , Model model
128+ @ RequestParam (name = "page" , defaultValue ="" + ControllerHelper .FIRST_PAGE_NUMBER ) int page ,
129+ Model model
135130 ) {
136131 String title = "Tweet -> Url" ;
137132 setUpThisPage (title ,model );
@@ -154,10 +149,8 @@ public String domainCountTweet2url(
154149
155150 @ RequestMapping (path ="/user/hashtag" )
156151 public String domainCountUserprofile2hashtag (
157- @ RequestParam (
158- name = "page" ,
159- defaultValue ="" + ControllerHelper .FIRST_PAGE_NUMBER
160- ) int page , Model model
152+ @ RequestParam (name = "page" , defaultValue ="" + ControllerHelper .FIRST_PAGE_NUMBER ) int page ,
153+ Model model
161154 ) {
162155 String title = "UserProfile -> HashTag" ;
163156 setUpThisPage (title ,model );
@@ -180,10 +173,8 @@ public String domainCountUserprofile2hashtag(
180173
181174 @ RequestMapping (path ="/user/media" )
182175 public String domainCountUserprofile2media (
183- @ RequestParam (
184- name = "page" ,
185- defaultValue ="" + ControllerHelper .FIRST_PAGE_NUMBER
186- ) int page , Model model
176+ @ RequestParam (name = "page" , defaultValue ="" + ControllerHelper .FIRST_PAGE_NUMBER ) int page ,
177+ Model model
187178 ) {
188179 String title = "UserProfile -> Media" ;
189180 setUpThisPage (title ,model );
@@ -206,10 +197,8 @@ public String domainCountUserprofile2media(
206197
207198 @ RequestMapping (path ="/user/mention" )
208199 public String domainCountUserprofile2mention (
209- @ RequestParam (
210- name = "page" ,
211- defaultValue ="" + ControllerHelper .FIRST_PAGE_NUMBER
212- ) int page , Model model
200+ @ RequestParam (name = "page" , defaultValue ="" + ControllerHelper .FIRST_PAGE_NUMBER ) int page ,
201+ Model model
213202 ) {
214203 String title = "UserProfile -> Mention" ;
215204 setUpThisPage (title ,model );
@@ -232,10 +221,8 @@ public String domainCountUserprofile2mention(
232221
233222 @ RequestMapping (path ="/user/tickersymbol" )
234223 public String domainCountUserprofile2Tickersymbol (
235- @ RequestParam (
236- name = "page" ,
237- defaultValue ="" + ControllerHelper .FIRST_PAGE_NUMBER
238- ) int page , Model model
224+ @ RequestParam (name = "page" , defaultValue ="" + ControllerHelper .FIRST_PAGE_NUMBER ) int page ,
225+ Model model
239226 ) {
240227 String title = "UserProfile -> TickerSymbol" ;
241228 setUpThisPage (title ,model );
@@ -258,10 +245,8 @@ public String domainCountUserprofile2Tickersymbol(
258245
259246 @ RequestMapping (path ="/user/url" )
260247 public String domainCountUserprofile2Url (
261- @ RequestParam (
262- name = "page" ,
263- defaultValue ="" + ControllerHelper .FIRST_PAGE_NUMBER
264- ) int page , Model model
248+ @ RequestParam (name = "page" , defaultValue ="" + ControllerHelper .FIRST_PAGE_NUMBER ) int page ,
249+ Model model
265250 ) {
266251 String title = "UserProfile -> Url" ;
267252 setUpThisPage (title ,model );
@@ -289,21 +274,6 @@ private void setUpThisPage(String title,Model model){
289274 }
290275
291276
292- @ Autowired
293- public CountedEntitiesController (FrontendProperties frontendProperties , ControllerHelper controllerHelper , TweetService tweetService , UserService userService , HashTagService hashTagService , MediaService mediaService , MentionService mentionService , TickerSymbolService tickerSymbolService , UrlService urlService ) {
294- this .frontendProperties = frontendProperties ;
295- this .controllerHelper = controllerHelper ;
296- this .tweetService = tweetService ;
297- this .userService = userService ;
298- this .hashTagService = hashTagService ;
299- this .mediaService = mediaService ;
300- this .mentionService = mentionService ;
301- this .tickerSymbolService = tickerSymbolService ;
302- this .urlService = urlService ;
303- }
304-
305-
306-
307277 private final FrontendProperties frontendProperties ;
308278
309279 private final ControllerHelper controllerHelper ;
@@ -321,4 +291,27 @@ public CountedEntitiesController(FrontendProperties frontendProperties, Controll
321291 private final TickerSymbolService tickerSymbolService ;
322292
323293 private final UrlService urlService ;
294+
295+ @ Autowired
296+ public CountedEntitiesController (
297+ FrontendProperties frontendProperties ,
298+ ControllerHelper controllerHelper ,
299+ TweetService tweetService ,
300+ UserService userService ,
301+ HashTagService hashTagService ,
302+ MediaService mediaService ,
303+ MentionService mentionService ,
304+ TickerSymbolService tickerSymbolService ,
305+ UrlService urlService
306+ ) {
307+ this .frontendProperties = frontendProperties ;
308+ this .controllerHelper = controllerHelper ;
309+ this .tweetService = tweetService ;
310+ this .userService = userService ;
311+ this .hashTagService = hashTagService ;
312+ this .mediaService = mediaService ;
313+ this .mentionService = mentionService ;
314+ this .tickerSymbolService = tickerSymbolService ;
315+ this .urlService = urlService ;
316+ }
324317}
0 commit comments