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.admin;
7   
8   import com.hack23.cia.web.viewfactory.api.admin.AgencyModelAndView;
9   import com.hack23.cia.web.views.admin.ConfigureAgencyPanel;
10  import com.hack23.cia.web.views.common.ActiveUserView;
11  
12  /***
13   * The Class AgencyViewFactoryImpl.
14   */
15  public class AgencyViewFactoryImpl extends
16          AbstractConfigurationViewFactoryImpl<AgencyModelAndView> {
17  
18      /***
19       * Instantiates a new agency view factory impl.
20       */
21      public AgencyViewFactoryImpl() {
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 AgencyModelAndView.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(final AgencyModelAndView modelAndView) {
46          ActiveUserView.changeContentView(new ConfigureAgencyPanel(modelAndView.getUserSessionDTO(),modelAndView
47                  .getAgency()));
48      }
49  }