Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
ProposalService |
|
| 1.0;1 |
1 | /** | |
2 | * Copyright 2010 The Kuali Foundation Licensed under the Educational Community | |
3 | * License, Version 2.0 (the "License"); you may not use this file except in | |
4 | * compliance with the License. You may obtain a copy of the License at | |
5 | * http://www.osedu.org/licenses/ECL-2.0 Unless required by applicable law or | |
6 | * agreed to in writing, software distributed under the License is distributed | |
7 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | |
8 | * express or implied. See the License for the specific language governing | |
9 | * permissions and limitations under the License. | |
10 | */ | |
11 | ||
12 | package org.kuali.student.r2.core.proposal.service; | |
13 | ||
14 | import java.util.List; | |
15 | ||
16 | import javax.jws.WebParam; | |
17 | import javax.jws.WebService; | |
18 | import javax.jws.soap.SOAPBinding; | |
19 | ||
20 | import org.kuali.student.r2.common.dto.ContextInfo; | |
21 | import org.kuali.student.r2.common.dto.StatusInfo; | |
22 | import org.kuali.student.r2.common.dto.ValidationResultInfo; | |
23 | import org.kuali.student.r2.common.exceptions.AlreadyExistsException; | |
24 | import org.kuali.student.r2.common.exceptions.DataValidationErrorException; | |
25 | import org.kuali.student.r2.common.exceptions.DependentObjectsExistException; | |
26 | import org.kuali.student.r2.common.exceptions.DoesNotExistException; | |
27 | import org.kuali.student.r2.common.exceptions.InvalidParameterException; | |
28 | import org.kuali.student.r2.common.exceptions.MissingParameterException; | |
29 | import org.kuali.student.r2.common.exceptions.OperationFailedException; | |
30 | import org.kuali.student.r2.common.exceptions.PermissionDeniedException; | |
31 | import org.kuali.student.r2.common.exceptions.ReadOnlyException; | |
32 | import org.kuali.student.r2.common.exceptions.VersionMismatchException; | |
33 | import org.kuali.student.r2.core.proposal.dto.ProposalInfo; | |
34 | ||
35 | /** | |
36 | * This is a description of what this class does - sambit don't forget to fill | |
37 | * this in. | |
38 | * | |
39 | * @author Sambit (sambitpa@kuali.org) | |
40 | */ | |
41 | @WebService(name = "ProposalService", targetNamespace = "http://student.kuali.org/wsdl/proposal") | |
42 | @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) | |
43 | public interface ProposalService { | |
44 | ||
45 | /** | |
46 | * Retrieves the details of a single Proposal by proposalId | |
47 | * | |
48 | * @param proposalId Id of the proposal | |
49 | * @param contextInfo | |
50 | * @return | |
51 | * @throws DoesNotExistException Proposal doesnt not exist | |
52 | * @throws InvalidParameterException Invalid proposal id in the parameter | |
53 | * @throws MissingParameterException Missing proposal id | |
54 | * @throws OperationFailedException unable to complete request | |
55 | * @throws PermissionDeniedException authorization failure | |
56 | */ | |
57 | public ProposalInfo getProposal(@WebParam(name = "proposalId") String proposalId, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, | |
58 | MissingParameterException, OperationFailedException, PermissionDeniedException; | |
59 | ||
60 | /** | |
61 | * Retrieves the list of Proposals for the supplied list of proposalIds | |
62 | * | |
63 | * @param proposalIds list of proposal identifiers | |
64 | * @return List of proposals that match the supplied proposalId list | |
65 | * @throws DoesNotExistException One or more proposalIds not found | |
66 | * @throws InvalidParameterException One or more invalid proposalId | |
67 | * @throws MissingParameterException missing proposalIds | |
68 | * @throws OperationFailedException unable to complete request | |
69 | */ | |
70 | public List<ProposalInfo> getProposalsByIds(@WebParam(name = "proposalIds") List<String> proposalIds, @WebParam(name = "contextInfo") ContextInfo contextInfo) | |
71 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
72 | ||
73 | /** | |
74 | * Retrieves the list of Proposals for the supplied Proposal Type | |
75 | * | |
76 | * @param proposalTypeKey key of the proposal type | |
77 | * @return List of proposal information | |
78 | * @throws DoesNotExistException proposalTypeKey not found | |
79 | * @throws InvalidParameterException invalid proposalTypeKey | |
80 | * @throws MissingParameterException missing proposalTypeKey | |
81 | * @throws OperationFailedException unable to complete request | |
82 | */ | |
83 | public List<ProposalInfo> getProposalsByProposalType(@WebParam(name = "proposalTypeKey") String proposalTypeKey, @WebParam(name = "contextInfo") ContextInfo contextInfo) | |
84 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
85 | ||
86 | /** | |
87 | * Retrieves the list of Proposals for the specified Reference Type and | |
88 | * Reference Id | |
89 | * | |
90 | * @param referenceTypeKey Key of the Reference Type | |
91 | * @param referenceId Identifier of the reference | |
92 | * @return list of Proposal information | |
93 | * @throws DoesNotExistException referenceTypeKey or referenceId not found | |
94 | * @throws InvalidParameterException invalid referenceTypeKey or referenceId | |
95 | * @throws MissingParameterException missing referenceTypeKey or referenceId | |
96 | * @throws OperationFailedException unable to complete request | |
97 | */ | |
98 | public List<ProposalInfo> getProposalsByReference(@WebParam(name = "referenceTypeKey") String referenceTypeKey, @WebParam(name = "referenceId") String referenceId, | |
99 | @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, | |
100 | PermissionDeniedException; | |
101 | ||
102 | /** | |
103 | * Retrieves the list of Proposals for the specified proposal type and state | |
104 | * | |
105 | * @param proposalState Proposal State | |
106 | * @param proposalTypeKey Proposal Type. | |
107 | * @return list of Proposal information | |
108 | * @throws DoesNotExistException proposalTypeKey not found | |
109 | * @throws InvalidParameterException invalid proposalState or | |
110 | * proposalTypeKey | |
111 | * @throws MissingParameterException missing proposalState or | |
112 | * proposalTypeKey | |
113 | * @throws OperationFailedException unable to complete request | |
114 | */ | |
115 | public List<ProposalInfo> getProposalsByState(@WebParam(name = "proposalState") String proposalState, @WebParam(name = "proposalTypeKey") String proposalTypeKey, | |
116 | @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, | |
117 | PermissionDeniedException; | |
118 | ||
119 | /** | |
120 | * @param workflowId Workflow id | |
121 | * @return Proposal Information | |
122 | * @throws DoesNotExistException workflowId not found | |
123 | * @throws InvalidParameterException invalid workflowId | |
124 | * @throws MissingParameterException missing workflowId | |
125 | * @throws OperationFailedException unable to complete request | |
126 | */ | |
127 | public ProposalInfo getProposalByWorkflowId(@WebParam(name = "workflowId") String workflowId, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, | |
128 | InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
129 | ||
130 | /** | |
131 | * Validates a proposal. Depending on the value of validationType, this | |
132 | * validation could be limited to tests on just the current object and its | |
133 | * directly contained subobjects or expanded to perform all tests related to | |
134 | * this object. If an identifier is present for the proposal and a record is | |
135 | * found for that identifier, the validation checks if the proposal can be | |
136 | * shifted to the new values. If a record cannot be found for the | |
137 | * identifier, it is assumed that the record does not exist and as such, the | |
138 | * checks performed will be much shallower, typically mimicking those | |
139 | * performed by setting the validationType to the current object. This is a | |
140 | * slightly different pattern from the standard validation as the caller | |
141 | * provides the identifier in the create statement instead of the server | |
142 | * assigning an identifier. | |
143 | * | |
144 | * @param validationTypeKey Identifier of the extent of validation | |
145 | * @param proposalInfo The proposal information to be tested. | |
146 | * @return Results from performing the validation | |
147 | * @throws DoesNotExistException validationTypeKey not found | |
148 | * @throws InvalidParameterException invalid validationTypeKey, proposalInfo | |
149 | * @throws MissingParameterException missing validationTypeKey, proposalInfo | |
150 | * @throws OperationFailedException unable to complete request | |
151 | */ | |
152 | public List<ValidationResultInfo> validateProposal(@WebParam(name = "validationTypeKey") String validationTypeKey, @WebParam(name = "proposalInfo") ProposalInfo proposalInfo, | |
153 | @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
154 | ||
155 | /** | |
156 | * Creates a new Proposal | |
157 | * | |
158 | * @param proposalTypeKey identifier of the Proposal Type for the Proposal | |
159 | * being created | |
160 | * @param proposalInfo information about the Proposal being created | |
161 | * @return the created Proposal information | |
162 | * @throws AlreadyExistsException Proposal already exists | |
163 | * @throws DataValidationErrorException One or more values invalid for this | |
164 | * operation | |
165 | * @throws DoesNotExistException proposalTypeKey not found | |
166 | * @throws InvalidParameterException invalid proposalTypeKey, proposalInfo | |
167 | * @throws MissingParameterException missing proposalTypeKey, proposalInfo | |
168 | * @throws OperationFailedException unable to complete request | |
169 | * @throws PermissionDeniedException authorization failure | |
170 | */ | |
171 | public ProposalInfo createProposal(@WebParam(name = "proposalTypeKey") String proposalTypeKey, @WebParam(name = "proposalInfo") ProposalInfo proposalInfo, | |
172 | @WebParam(name = "contextInfo") ContextInfo contextInfo) throws AlreadyExistsException, DataValidationErrorException, DoesNotExistException, InvalidParameterException, | |
173 | MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException; | |
174 | ||
175 | /** | |
176 | * Updates an existing CLU | |
177 | * | |
178 | * @param proposalId identifier for the Proposal to be updated | |
179 | * @param proposalInfo updated information about the Proposal | |
180 | * @return the updated Proposal information | |
181 | * @throws DataValidationErrorException One or more values invalid for this | |
182 | * operation | |
183 | * @throws DoesNotExistException proposalId not found | |
184 | * @throws InvalidParameterException invalid proposalId, proposalInfo | |
185 | * @throws MissingParameterException missing proposalId, proposalInfo | |
186 | * @throws OperationFailedException unable to complete request | |
187 | * @throws PermissionDeniedException authorization failure | |
188 | * @throws VersionMismatchException The action was attempted on an out of | |
189 | * date version. | |
190 | */ | |
191 | public ProposalInfo updateProposal(@WebParam(name = "proposalId") String proposalId, @WebParam(name = "proposalInfo") ProposalInfo proposalInfo, | |
192 | @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, | |
193 | OperationFailedException, PermissionDeniedException, VersionMismatchException; | |
194 | ||
195 | /** | |
196 | * Deletes an existing Proposal | |
197 | * | |
198 | * @param proposalId identifier for the Proposal to be deleted | |
199 | * @return status of the operation | |
200 | * @throws DoesNotExistException proposalId not found | |
201 | * @throws InvalidParameterException invalid proposalId | |
202 | * @throws MissingParameterException missing proposalId | |
203 | * @throws DependentObjectsExistException delete would leave orphaned | |
204 | * objects or violate integrity constraints | |
205 | * @throws OperationFailedException unable to complete request | |
206 | * @throws PermissionDeniedException authorization failure | |
207 | */ | |
208 | public StatusInfo deleteProposal(@WebParam(name = "proposalId") String proposalId, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, | |
209 | InvalidParameterException, MissingParameterException, DependentObjectsExistException, OperationFailedException, PermissionDeniedException; | |
210 | ||
211 | } |