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.LanguageAgencyModelAndView;
9   import com.hack23.cia.web.views.admin.ConfigureLanguagePanel;
10  import com.hack23.cia.web.views.common.ActiveUserView;
11  
12  /***
13   * The Class LanguageAgencyViewFactoryImpl.
14   */
15  public class LanguageAgencyViewFactoryImpl extends
16          AbstractConfigurationViewFactoryImpl<LanguageAgencyModelAndView> {
17  
18      /***
19       * Instantiates a new language agency view factory impl.
20       */
21      public LanguageAgencyViewFactoryImpl() {
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 LanguageAgencyModelAndView.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 LanguageAgencyModelAndView modelAndView) {
47          ActiveUserView.changeContentView(new ConfigureLanguagePanel(modelAndView.getUserSessionDTO(),modelAndView
48                  .getAgency(), modelAndView.getLanguage()));
49  
50      }
51  }