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.user;
6   
7   import com.hack23.cia.model.application.dto.common.UserSessionDTO;
8   import com.hack23.cia.model.sweden.impl.CommitteeReport;
9   import com.hack23.cia.web.action.common.ControllerAction;
10  
11  /***
12   * The Class CommitteeReportModelAndView.
13   */
14  public class CommitteeReportModelAndView extends AbstractParliamentModelAndView {
15  
16      /***
17       * The Enum CommitteeReportViewSpecification.
18       */
19      public enum CommitteeReportViewSpecification {
20  
21          /*** The Committee report view. */
22          CommitteeReportView
23      }
24  
25      /*** The Constant serialVersionUID. */
26      private static final long serialVersionUID = 1L;
27  
28      /*** The committee report. */
29      private final CommitteeReport committeeReport;
30  
31      /*** The committee report view specification. */
32      private final CommitteeReportViewSpecification committeeReportViewSpecification;
33  
34      /***
35       * Instantiates a new committee report model and view.
36       *
37       * @param userSessionDTO the user session dto
38       * @param controllerAction the controller action
39       * @param committeeReportViewSpecification the committee report view specification
40       * @param committeeReport the committee report
41       */
42      public CommitteeReportModelAndView(
43              final UserSessionDTO userSessionDTO,
44              final ControllerAction controllerAction,
45              final CommitteeReportViewSpecification committeeReportViewSpecification,
46              final CommitteeReport committeeReport) {
47          super(userSessionDTO, controllerAction);
48          this.committeeReportViewSpecification = committeeReportViewSpecification;
49          this.committeeReport = committeeReport;
50      }
51  
52      /***
53       * Gets the committee report.
54       *
55       * @return the committee report
56       */
57      public final CommitteeReport getCommitteeReport() {
58          return committeeReport;
59      }
60  
61      /***
62       * Gets the committee report view specification.
63       *
64       * @return the committee report view specification
65       */
66      public final CommitteeReportViewSpecification getCommitteeReportViewSpecification() {
67          return committeeReportViewSpecification;
68      }
69  
70      /*
71       * (non-Javadoc)
72       * 
73       * @seecom.hack23.cia.web.viewfactory.api.common.AbstractModelAndView#
74       * getViewSpecificationDescription()
75       */
76      @Override
77      public final String getViewSpecificationDescription() {
78          return committeeReportViewSpecification.toString();
79      }
80  
81  }