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.service.api.application;
7   
8   import java.util.List;
9   
10  import com.hack23.cia.model.application.dto.common.UserSessionDTO;
11  import com.hack23.cia.model.application.impl.common.Agency;
12  import com.hack23.cia.model.sweden.impl.CommitteeReport;
13  import com.hack23.cia.model.sweden.impl.PoliticalParty;
14  import com.hack23.cia.service.api.common.AbstractServiceResponse;
15  
16  /***
17   * The Class ApplicationResponse.
18   */
19  public class ApplicationResponse extends AbstractServiceResponse {
20  
21      /*** The Constant serialVersionUID. */
22      private static final long serialVersionUID = 1L;
23  
24      /*** The agency. */
25      private final Agency agency;
26  
27      /*** The last decided commitee reports. */
28      private final List<CommitteeReport> lastDecidedCommiteeReports;
29  
30  	/*** The political parties. */
31  	private final List<PoliticalParty> politicalParties;
32  
33      /***
34       * Instantiates a new application response.
35       *
36       * @param userSessionDTO the user session dto
37       * @param agency the agency
38       * @param lastDecidedCommiteeReports the last decided commitee reports
39       * @param politicalParties the political parties
40       */
41      public ApplicationResponse(final UserSessionDTO userSessionDTO,
42              final Agency agency,
43              final List<CommitteeReport> lastDecidedCommiteeReports,final List<PoliticalParty> politicalParties) {
44         super(userSessionDTO);
45          this.agency = agency;
46          this.lastDecidedCommiteeReports = lastDecidedCommiteeReports;
47  		this.politicalParties = politicalParties;
48      }
49  
50      /***
51       * Gets the agency.
52       *
53       * @return the agency
54       */
55      public final Agency getAgency() {
56          return this.agency;
57      }
58  
59      /***
60       * Gets the last decided commitee reports.
61       *
62       * @return the last decided commitee reports
63       */
64      public final List<CommitteeReport> getLastDecidedCommiteeReports() {
65          return this.lastDecidedCommiteeReports;
66      }
67  
68      /***
69       * Gets the political parties.
70       *
71       * @return the political parties
72       */
73  	public final List<PoliticalParty> getPoliticalParties() {
74  		return politicalParties;
75  	}
76  
77  	/*
78       * (non-Javadoc)
79       * 
80       * @see com.hack23.cia.service.api.ServiceResponse#getResult()
81       */
82      @Override
83      public final ServiceResult getResult() {
84          return ServiceResult.SUCCESS;
85      }
86  }