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.UrlModelAndView;
9   import com.hack23.cia.web.views.common.ActiveUserView;
10  import com.hack23.cia.web.views.components.panels.WebBrowserPanel;
11  
12  /***
13   * The Class UrlViewFactoryImpl.
14   */
15  public class UrlViewFactoryImpl extends
16          AbstractUserViewFactoryImpl<UrlModelAndView> {
17  
18      /***
19       * Instantiates a new url view factory impl.
20       */
21      public UrlViewFactoryImpl() {
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 UrlModelAndView.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 UrlModelAndView modelAndView) {
46          ActiveUserView.changeContentView(new WebBrowserPanel((modelAndView)
47                  .getTitle(), (modelAndView).getUrl()));
48  
49      }
50  }