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.admin;
6   
7   import com.hack23.cia.model.application.dto.common.UserSessionDTO;
8   import com.hack23.cia.web.action.common.ControllerAction;
9   
10  /***
11   * The Class TaskModelAndView.
12   */
13  public class TaskModelAndView extends AbstractAdminModelAndView {
14  
15      /***
16       * The Enum TaskViewSpecification.
17       */
18      public enum TaskViewSpecification {
19  
20          /*** The Task view. */
21          TaskView
22      }
23  
24      /*** The Constant serialVersionUID. */
25      private static final long serialVersionUID = 1L;
26  
27      /*** The task view specification. */
28      private final TaskViewSpecification taskViewSpecification;
29  
30      /***
31       * Instantiates a new task model and view.
32       *
33       * @param userSessionDTO the user session dto
34       * @param controllerAction the controller action
35       * @param taskViewSpecification the task view specification
36       */
37      public TaskModelAndView(final UserSessionDTO userSessionDTO,
38              final ControllerAction controllerAction,
39              final TaskViewSpecification taskViewSpecification) {
40          super(userSessionDTO, controllerAction);
41          this.taskViewSpecification = taskViewSpecification;
42      }
43  
44      /***
45       * Gets the task view specification.
46       *
47       * @return the task view specification
48       */
49      public final TaskViewSpecification getTaskViewSpecification() {
50          return taskViewSpecification;
51      }
52  
53      /*
54       * (non-Javadoc)
55       * 
56       * @seecom.hack23.cia.web.viewfactory.api.common.AbstractModelAndView#
57       * getViewSpecificationDescription()
58       */
59      @Override
60      public final String getViewSpecificationDescription() {
61          return taskViewSpecification.toString();
62      }
63  
64  }