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 org.apache.commons.logging.Log;
9   import org.apache.commons.logging.LogFactory;
10  
11  import com.hack23.cia.web.viewfactory.api.admin.TaskModelAndView;
12  import com.hack23.cia.web.views.common.ActiveUserView;
13  import com.hack23.cia.web.views.user.WelcomePanel;
14  
15  /***
16   * The Class TaskViewFactoryImpl.
17   */
18  public class TaskViewFactoryImpl extends
19          AbstractAdminViewFactoryImpl<TaskModelAndView> {
20  
21      /*** The Constant LOGGER. */
22      private static final Log LOGGER = LogFactory
23              .getLog(TaskViewFactoryImpl.class);
24  
25      /***
26       * Instantiates a new task view factory impl.
27       */
28      public TaskViewFactoryImpl() {
29          super();
30      }
31  
32      /*
33       * (non-Javadoc)
34       * 
35       * @seecom.hack23.cia.web.viewfactory.impl.common.ViewFactory#
36       * getSupportedModelAndView()
37       */
38      @SuppressWarnings("unchecked")
39      @Override
40      public final Class getSupportedModelAndView() {
41          return TaskModelAndView.class;
42      }
43  
44      /*
45       * (non-Javadoc)
46       * 
47       * @seecom.hack23.cia.web.viewfactory.impl.common.AbstractViewFactoryImpl#
48       * processSpecificView
49       * (com.hack23.cia.web.viewfactory.api.common.AbstractModelAndView)
50       */
51      @Override
52      public final void processSpecificView(final TaskModelAndView modelAndView) {
53          LOGGER
54                  .warn("Fix this"
55                          + modelAndView.getControllerAction().getClass()
56                                  .getSimpleName());
57          ActiveUserView.changeContentView(new WelcomePanel(modelAndView.getUserSessionDTO()));
58      }
59  }