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.CommitteeReportsModelAndView;
9   import com.hack23.cia.web.views.common.ActiveUserView;
10  import com.hack23.cia.web.views.user.CommitteeReportPanel;
11  
12  /***
13   * The Class CommitteeReportsViewFactoryImpl.
14   */
15  public class CommitteeReportsViewFactoryImpl extends
16          AbstractParliamentViewFactoryImpl<CommitteeReportsModelAndView> {
17  
18      /***
19       * Instantiates a new committee reports view factory impl.
20       */
21      public CommitteeReportsViewFactoryImpl() {
22          super();
23      }
24  
25      /*
26       * (non-Javadoc)
27       * 
28       * @seecom.hack23.cia.web.viewfactory.impl.common.ViewFactory#
29       * getSupportedModelAndView()
30       */
31      @SuppressWarnings("unchecked")
32      @Override
33      public final Class getSupportedModelAndView() {
34          return CommitteeReportsModelAndView.class;
35      }
36  
37      /*
38       * (non-Javadoc)
39       * 
40       * @seecom.hack23.cia.web.viewfactory.impl.common.AbstractViewFactoryImpl#
41       * processSpecificView
42       * (com.hack23.cia.web.viewfactory.api.common.AbstractModelAndView)
43       */
44      @Override
45      public final void processSpecificView(
46              final CommitteeReportsModelAndView modelAndView) {
47          ActiveUserView.changeContentView(new CommitteeReportPanel(modelAndView.getUserSessionDTO(),modelAndView
48                  .getCommiteeReports()));
49  
50      }
51  }