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