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.common;
7   
8   import com.hack23.cia.web.viewfactory.api.common.AbstractModelAndView;
9   import com.hack23.cia.web.viewfactory.api.common.ModelAndView;
10  
11  /***
12   * The Class AbstractViewFactoryImpl.
13   *
14   * @param <MODELANDVIEW> the generic type
15   */
16  public abstract class AbstractViewFactoryImpl<MODELANDVIEW extends AbstractModelAndView>
17          implements ViewFactory {
18  
19      /***
20       * Process specific view.
21       *
22       * @param modelandview the modelandview
23       */
24      public abstract void processSpecificView(final MODELANDVIEW modelandview);
25  
26      /*
27       * (non-Javadoc)
28       * 
29       * @see
30       * com.hack23.cia.web.viewfactory.impl.common.ViewFactory#processView(com
31       * .hack23.cia.web.viewfactory.api.common.ModelAndView)
32       */
33      @SuppressWarnings("unchecked")
34      @Override
35      public final void processView(final ModelAndView modelAndView) {
36          processSpecificView((MODELANDVIEW) modelAndView);
37      }
38  }