Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
FeeService |
|
| 1.0;1 |
1 | /** | |
2 | * Copyright 2012 The Kuali Foundation | |
3 | * | |
4 | * Licensed under the Educational Community License, Version 2.0 (the | |
5 | * "License"); you may not use this file except in compliance with the | |
6 | * License. You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.osedu.org/licenses/ECL-2.0 | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | |
13 | * implied. See the License for the specific language governing | |
14 | * permissions and limitations under the License. | |
15 | */ | |
16 | ||
17 | package org.kuali.student.r2.core.fee.service; | |
18 | ||
19 | import java.util.List; | |
20 | ||
21 | import javax.jws.WebParam; | |
22 | import javax.jws.WebService; | |
23 | import javax.jws.soap.SOAPBinding; | |
24 | ||
25 | import org.kuali.rice.core.api.criteria.QueryByCriteria; | |
26 | ||
27 | import org.kuali.student.r2.core.fee.dto.EnrollmentFeeInfo; | |
28 | ||
29 | import org.kuali.student.r2.common.dto.ContextInfo; | |
30 | import org.kuali.student.r2.common.dto.StatusInfo; | |
31 | import org.kuali.student.r2.common.dto.ValidationResultInfo; | |
32 | ||
33 | import org.kuali.student.r2.common.exceptions.DataValidationErrorException; | |
34 | import org.kuali.student.r2.common.exceptions.DoesNotExistException; | |
35 | import org.kuali.student.r2.common.exceptions.InvalidParameterException; | |
36 | import org.kuali.student.r2.common.exceptions.MissingParameterException; | |
37 | import org.kuali.student.r2.common.exceptions.OperationFailedException; | |
38 | import org.kuali.student.r2.common.exceptions.PermissionDeniedException; | |
39 | import org.kuali.student.r2.common.exceptions.ReadOnlyException; | |
40 | import org.kuali.student.r2.common.exceptions.VersionMismatchException; | |
41 | ||
42 | import org.kuali.student.r2.common.util.constants.FeeServiceConstants; | |
43 | ||
44 | /** | |
45 | * This service supports the management of fees. | |
46 | * | |
47 | * @author tom | |
48 | */ | |
49 | ||
50 | @WebService(name = "FeeService", serviceName = "FeeService", portName = "FeeService", targetNamespace = FeeServiceConstants.NAMESPACE) | |
51 | @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) | |
52 | ||
53 | public interface FeeService { | |
54 | ||
55 | /** | |
56 | * Retrieves a single Fee by Fee Id. | |
57 | * | |
58 | * @param feeId the identifier for the fee to be retrieved | |
59 | * @param contextInfo information containing the principalId and | |
60 | * locale information about the caller of service operation | |
61 | * @return the Fee requested | |
62 | * @throws DoesNotExistException feeId not found | |
63 | * @throws InvalidParameterException contextInfo is not valid | |
64 | * @throws MissingParameterException feeId or contextInfo is | |
65 | * missing or null | |
66 | * @throws OperationFailedException unable to complete request | |
67 | * @throws PermissionDeniedException an authorization failure occurred | |
68 | */ | |
69 | public EnrollmentFeeInfo getFee(@WebParam(name = "feeId") String feeId, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
70 | ||
71 | /** | |
72 | * Retrieves a list of Fees from a list of Fee Ids. The returned | |
73 | * list may be in any order and if duplicates Ids are supplied, a | |
74 | * unique set may or may not be returned. | |
75 | * | |
76 | * @param feeIds a list of Fee identifiers | |
77 | * @param contextInfo information containing the principalId and | |
78 | * locale information about the caller of service operation | |
79 | * @return a list of Fees | |
80 | * @throws DoesNotExistException a feeId in the list not found | |
81 | * @throws InvalidParameterException contextInfo is invalid | |
82 | * @throws MissingParameterException feeIds, an Id in feeIds, or | |
83 | * contextInfo is missing or null | |
84 | * @throws OperationFailedException unable to complete request | |
85 | * @throws PermissionDeniedException an authorization failure occurred | |
86 | */ | |
87 | public List<EnrollmentFeeInfo> getFeesByIds(@WebParam(name = "feeIds") List<String> feeIds, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
88 | ||
89 | /** | |
90 | * Retrieves a list of Fee Ids by Fee Type. | |
91 | * | |
92 | * @param feeTypeKey an identifier for a Fee Type | |
93 | * @param contextInfo information containing the principalId and | |
94 | * locale information about the caller of service operation | |
95 | * @return a list of Fee identifiers matching feeTypeKey or an | |
96 | * empty list if none found | |
97 | * @throws InvalidParameterException contextInfo is not valid | |
98 | * @throws MissingParameterException feeTypeKey or contextInfo is | |
99 | * missing or null | |
100 | * @throws OperationFailedException unable to complete request | |
101 | * @throws PermissionDeniedException an authorization failure occurred | |
102 | */ | |
103 | public List<String> getFeeIdsByType(@WebParam(name = "feeTypeKey") String feeTypeKey, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
104 | ||
105 | /** | |
106 | * Retrieves a list of Fees by the reference object. | |
107 | * | |
108 | * @param refObjectURI the URI identifying the namespace of the | |
109 | * reference Id | |
110 | * @param refObjectId the Id of the reference | |
111 | * @param contextInfo information containing the principalId and | |
112 | * locale information about the caller of service operation | |
113 | * @return a list of Fees for the reference object or an empty list | |
114 | * is none found | |
115 | * @throws InvalidParameterException contextInfo is not valid | |
116 | * @throws MissingParameterException missing refObjectURI, | |
117 | * refObjectId, or contextInfo | |
118 | * @throws OperationFailedException unable to complete request | |
119 | * @throws PermissionDeniedException an authorization failure occurred | |
120 | */ | |
121 | public List<EnrollmentFeeInfo> getFeesByReference(@WebParam(name = "refObjectURI") String refObjectURI, @WebParam(name = "refObjectId") String refObjectId, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
122 | ||
123 | /** | |
124 | * Searches for Fees based on the criteria and returns a list | |
125 | * of Fee identifiers which match the search criteria. | |
126 | * | |
127 | * @param criteria the search criteria | |
128 | * @param contextInfo information containing the principalId and | |
129 | * locale information about the caller of service operation | |
130 | * @return list of Fee Ids matching the criteria | |
131 | * @throws InvalidParameterException criteria or contextInfo is | |
132 | * not valid | |
133 | * @throws MissingParameterException criteria or contextInfo is | |
134 | * missing or null | |
135 | * @throws OperationFailedException unable to complete request | |
136 | * @throws PermissionDeniedException an authorization failure occurred | |
137 | */ | |
138 | public List<String> searchForFeeIds(@WebParam(name = "criteria") QueryByCriteria criteria, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
139 | ||
140 | /** | |
141 | * Searches for Fees based on the criteria and returns a list of | |
142 | * Fees which match the search criteria. | |
143 | * | |
144 | * @param criteria the search criteria | |
145 | * @param contextInfo information containing the principalId and | |
146 | * locale information about the caller of service operation | |
147 | * @return list of Fees matching the criteria | |
148 | * @throws InvalidParameterException criteria or contextInfo is | |
149 | * not valid | |
150 | * @throws MissingParameterException criteria or contextInfo is | |
151 | * missing or null | |
152 | * @throws OperationFailedException unable to complete request | |
153 | * @throws PermissionDeniedException an authorization failure occurred | |
154 | */ | |
155 | public List<EnrollmentFeeInfo> searchForFees(@WebParam(name = "criteria") QueryByCriteria criteria, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
156 | ||
157 | /** | |
158 | * Validates a Fee. Depending on the value of validationType, this | |
159 | * validation could be limited to tests on just the current Fee | |
160 | * and its directly contained sub-objects or expanded to perform | |
161 | * all tests related to this Fee. If an identifier is present for | |
162 | * the Fee (and/or one of its contained sub-objects) and a record | |
163 | * is found for that identifier, the validation checks if the Fee | |
164 | * can be updated to the new values. If an identifier is not | |
165 | * present or a record does not exist, the validation checks if | |
166 | * the object with the given data can be created. | |
167 | * | |
168 | * @param validationTypeKey the identifier for the validation Type | |
169 | * @param feeTypeKey the identifier for the fee Type | |
170 | * @param feeInfo the Fee information to be validated | |
171 | * @param contextInfo information containing the principalId and | |
172 | * locale information about the caller of service operation | |
173 | * @return a list of validation results or an empty list if | |
174 | * validation succeeded | |
175 | * @throws DoesNotExistException validationTypeKey or feeTypeKey | |
176 | * is not found | |
177 | * @throws InvalidParameterException feeInfo or contextInfo is | |
178 | * not valid | |
179 | * @throws MissingParameterException validationTypeKey, | |
180 | * feeTypeKey, feeInfo, or contextInfo is missing or null | |
181 | * @throws OperationFailedException unable to complete request | |
182 | * @throws PermissionDeniedException an authorization failure occurred | |
183 | */ | |
184 | public List<ValidationResultInfo> validateFee(@WebParam(name = "validationTypeKey") String validationTypeKey, @WebParam(name = "feeTypeKey") String feeTypeKey, @WebParam(name = "feeInfo") EnrollmentFeeInfo feeInfo, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
185 | ||
186 | /** | |
187 | * Creates a new Fee. The Fee Id, Type, and Meta information | |
188 | * may nogt be set in the supplied data. | |
189 | * | |
190 | * @param feeTypeKey the identifier for the Type of the new Fee | |
191 | * @param feeInfo the data with which to create the Fee | |
192 | * @param contextInfo information containing the principalId and | |
193 | * locale information about the caller of service operation | |
194 | * @return the new Fee | |
195 | * @throws DataValidationErrorException supplied data is invalid | |
196 | * @throws InvalidParameterException feeInfo or contextInfo is not | |
197 | * valid | |
198 | * @throws MissingParameterException feeTypeKey, feeInfo or | |
199 | * contextInfo is missing or null | |
200 | * @throws OperationFailedException unable to complete request | |
201 | * @throws PermissionDeniedException an authorization failure occurred | |
202 | * @throws ReadOnlyException an attempt at supplying information | |
203 | * designated as read-only | |
204 | */ | |
205 | public EnrollmentFeeInfo createFee(@WebParam(name = "feeTypeKey") String feeTypeKey, @WebParam(name = "feeInfo") EnrollmentFeeInfo feeInfo, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException; | |
206 | ||
207 | /** | |
208 | * Updates an existing Fee. The Fee Id, Type, and Meta information | |
209 | * may not be changed. | |
210 | * | |
211 | * @param feeId the identifier for the Fee to be updated | |
212 | * @param feeInfo the new data for the Fee | |
213 | * @param contextInfo information containing the principalId and | |
214 | * locale information about the caller of service operation | |
215 | * @return the updated Fee | |
216 | * @throws DataValidationErrorException supplied data is invalid | |
217 | * @throws DoesNotExistException feeId not found | |
218 | * @throws InvalidParameterException feeInfo or contextInfo is not | |
219 | * valid | |
220 | * @throws MissingParameterException feeId, feeInfo, or | |
221 | * contextInfo is missing or null | |
222 | * @throws OperationFailedException unable to complete request | |
223 | * @throws PermissionDeniedException an authorization failure occurred | |
224 | * @throws ReadOnlyException an attempt at changing information | |
225 | * designated as read-only | |
226 | * @throws VersionMismatchException optimistic locking failure or | |
227 | * the action was attempted on an out of date version | |
228 | */ | |
229 | public EnrollmentFeeInfo updateFee(@WebParam(name = "feeId") String feeId, @WebParam(name = "feeInfo") EnrollmentFeeInfo feeInfo, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException; | |
230 | ||
231 | /** | |
232 | * Deletes an existing Fee. | |
233 | * | |
234 | * @param feeId the identifier for the Fee to be deleted | |
235 | * @param contextInfo information containing the principalId and | |
236 | * locale information about the caller of service operation | |
237 | * @return the status of the delete operation. This must always be true. | |
238 | * @throws DoesNotExistException feeId not found | |
239 | * @throws InvalidParameterException contextInfo is not valid | |
240 | * @throws MissingParameterException feeId or contextInfo is missing | |
241 | * or null | |
242 | * @throws OperationFailedException unable to complete request | |
243 | * @throws PermissionDeniedException an authorization failure occurred | |
244 | */ | |
245 | public StatusInfo deleteFee(@WebParam(name = "feeId") String feeId, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
246 | } |