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   package com.hack23.cia.web.viewfactory.api.common;
6   
7   import java.io.Serializable;
8   
9   import com.hack23.cia.model.application.dto.common.UserSessionDTO;
10  import com.hack23.cia.web.action.common.ControllerAction;
11  
12  /***
13   * The Class AbstractModelAndView.
14   */
15  public abstract class AbstractModelAndView implements ModelAndView,
16          Serializable {
17  
18      /*** The Constant serialVersionUID. */
19      private static final long serialVersionUID = 1L;
20  
21      /*** The controller action. */
22      private final ControllerAction controllerAction;
23  
24      /*** The user session dto. */
25      private final UserSessionDTO userSessionDTO;
26     
27      /***
28       * Instantiates a new abstract model and view.
29       *
30       * @param userSessionDTO the user session dto
31       * @param controllerAction the controller action
32       */
33      public AbstractModelAndView(final UserSessionDTO userSessionDTO,
34              final ControllerAction controllerAction) {
35          super();
36          this.userSessionDTO = userSessionDTO;
37          this.controllerAction = controllerAction;
38      }
39  
40      /*
41       * (non-Javadoc)
42       * 
43       * @see
44       * com.hack23.cia.web.controller.viewFactory.ModelAndView#getControllerAction
45       * ()
46       */
47      @Override
48  	public final ControllerAction getControllerAction() {
49          return controllerAction;
50      }
51  
52      /*
53       * (non-Javadoc)
54       * 
55       * @see com.hack23.cia.web.controller.viewfactory.api.ModelAndView#getUser()
56       */
57      @Override
58  	public final UserSessionDTO getUserSessionDTO() {
59          return userSessionDTO;
60      }
61  
62      /*
63       * (non-Javadoc)
64       * 
65       * @see
66       * com.hack23.cia.web.controller.viewFactory.ModelAndView#getViewSpecification
67       * ()
68       */
69      @Override
70      public abstract String getViewSpecificationDescription();
71  }