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.web.viewfactory.impl.user;
7   
8   import com.hack23.cia.web.viewfactory.api.user.ParliamentMemberSummaryModelAndView;
9   import com.hack23.cia.web.views.common.ActiveUserView;
10  import com.hack23.cia.web.views.user.ParliamentMemberSummaryPanel;
11  
12  /***
13   * The Class ParliamentMemberSummaryViewFactoryImpl.
14   */
15  public class ParliamentMemberSummaryViewFactoryImpl
16          extends
17          AbstractParliamentMemberViewFactoryImpl<ParliamentMemberSummaryModelAndView> {
18  
19      /***
20       * Instantiates a new parliament member summary view factory impl.
21       */
22      public ParliamentMemberSummaryViewFactoryImpl() {
23          super();
24      }
25  
26      /*
27       * (non-Javadoc)
28       * 
29       * @seecom.hack23.cia.web.viewfactory.impl.common.ViewFactory#
30       * getSupportedModelAndView()
31       */
32      @SuppressWarnings("unchecked")
33      @Override
34      public final Class getSupportedModelAndView() {
35          return ParliamentMemberSummaryModelAndView.class;
36      }
37  
38      /*
39       * (non-Javadoc)
40       * 
41       * @seecom.hack23.cia.web.viewfactory.impl.common.AbstractViewFactoryImpl#
42       * processSpecificView
43       * (com.hack23.cia.web.viewfactory.api.common.AbstractModelAndView)
44       */
45      @Override
46      public final void processSpecificView(
47              final ParliamentMemberSummaryModelAndView modelAndView) {
48          ActiveUserView.changeContentView(new ParliamentMemberSummaryPanel(
49                  modelAndView.getUserSessionDTO(), modelAndView
50                          .getParliamentMember(), modelAndView.getVotes(),
51                  modelAndView.getFriendList(), modelAndView.getEnemyList(),
52                  modelAndView.getFriendPartyList(), modelAndView
53                          .getEnemyPartyList(), modelAndView
54                          .getRegisterInformation()));
55      }
56  }