Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
LRCService |
|
| 1.0;1 |
1 | /** | |
2 | * Copyright 2010 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 | * http://www.osedu.org/licenses/ECL-2.0 Unless required by applicable | |
8 | * law or agreed to in writing, software distributed under the License | |
9 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR | |
10 | * CONDITIONS OF ANY KIND, either express or implied. See the License | |
11 | * for the specific language governing permissions and limitations | |
12 | * under the License. | |
13 | */ | |
14 | ||
15 | package org.kuali.student.r2.lum.lrc.service; | |
16 | ||
17 | import java.util.List; | |
18 | ||
19 | import javax.jws.WebParam; | |
20 | import javax.jws.WebService; | |
21 | import javax.jws.soap.SOAPBinding; | |
22 | ||
23 | import org.kuali.student.r2.common.dto.StatusInfo; | |
24 | import org.kuali.student.r2.common.exceptions.PermissionDeniedException; | |
25 | import org.kuali.student.r2.common.dto.ContextInfo; | |
26 | import org.kuali.student.r2.common.dto.ValidationResultInfo; | |
27 | import org.kuali.student.r2.common.exceptions.AlreadyExistsException; | |
28 | import org.kuali.student.r2.common.exceptions.DataValidationErrorException; | |
29 | import org.kuali.student.r2.common.exceptions.DoesNotExistException; | |
30 | import org.kuali.student.r2.common.exceptions.InvalidParameterException; | |
31 | import org.kuali.student.r2.common.exceptions.MissingParameterException; | |
32 | import org.kuali.student.r2.common.exceptions.OperationFailedException; | |
33 | import org.kuali.student.r2.common.exceptions.VersionMismatchException; | |
34 | import org.kuali.student.r2.common.util.constants.LrcServiceConstants; | |
35 | import org.kuali.student.r2.lum.lrc.dto.ResultValuesGroupInfo; | |
36 | import org.kuali.student.r2.lum.lrc.dto.ResultScaleInfo; | |
37 | import org.kuali.student.r2.lum.lrc.dto.ResultValueInfo; | |
38 | ||
39 | /** | |
40 | * The Learning Result Catalog Service is a Class I service which | |
41 | * gives a set of operations to manage a learning result. A learning | |
42 | * result can be of various types e.g grades, credits etc. This | |
43 | * service has basic CRUD operations to touch various concepts that | |
44 | * exist to model learning results e.g Result Value, Result Value | |
45 | * Group, and Result Value Range. | |
46 | * | |
47 | * @Author sambit | |
48 | * @Since Tue May 10 14:09:46 PDT 2011 | |
49 | */ | |
50 | @WebService(name = "LrcService", targetNamespace = LrcServiceConstants.NAMESPACE) | |
51 | @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) | |
52 | ||
53 | public interface LRCService { | |
54 | ||
55 | /** | |
56 | * Retrieves existing result component by an identifier. | |
57 | * | |
58 | * @param resultValuesGroupId identifiers for resultValuesGroup to be retrieved | |
59 | * @param context Context information containing the principalId | |
60 | * and locale information about the caller of service | |
61 | * operation | |
62 | * @return details of the results for these Ids | |
63 | * @throws DoesNotExistException resultValuesGroupId not found | |
64 | * @throws InvalidParameterException invalid resultValuesGroupId | |
65 | * @throws MissingParameterException invalid resultValuesGroupId | |
66 | * @throws OperationFailedException unable to complete request | |
67 | * @throws PermissionDeniedException authorization failure | |
68 | */ | |
69 | public ResultValuesGroupInfo getResultValuesGroup(@WebParam(name = "resultValuesGroupId") String resultValuesGroupId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
70 | ||
71 | /** | |
72 | * Retrieves result components by a list of identifiers. | |
73 | * | |
74 | * @param resultValuesGroupIds identifiers for result component | |
75 | * @param context Context information containing the principalId | |
76 | * and locale information about the caller of service | |
77 | * operation | |
78 | * @return result component list | |
79 | * @throws DoesNotExistException resultValuesGroup not found | |
80 | * @throws InvalidParameterException invalid resultValuesGroupIds | |
81 | * @throws MissingParameterException invalid resultValuesGroupIds | |
82 | * @throws OperationFailedException unable to complete request | |
83 | * @throws PermissionDeniedException authorization failure | |
84 | */ | |
85 | public List<ResultValuesGroupInfo> getResultValuesGroupsByIds(@WebParam(name = "resultValuesGroupIds") List<String> resultValuesGroupIds, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
86 | ||
87 | /** | |
88 | * Retrieves a list of existing result components that a result value is tied to. | |
89 | * | |
90 | * @param resultValueId identifier for result value | |
91 | * @param context Context information containing the principalId | |
92 | * and locale information about the caller of service | |
93 | * operation | |
94 | * @return details of the results for these Ids | |
95 | * @throws DoesNotExistException resultValue not found | |
96 | * @throws InvalidParameterException invalid resultValueId | |
97 | * @throws MissingParameterException invalid resultValueId | |
98 | * @throws OperationFailedException unable to complete request | |
99 | * @throws PermissionDeniedException authorization failure | |
100 | */ | |
101 | public List<ResultValuesGroupInfo> getResultValuesGroupsByResultValue(@WebParam(name = "resultValueId") String resultValueId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
102 | ||
103 | /** | |
104 | * Retrieves a list of result group identifiers for a specified | |
105 | * result component type. | |
106 | * | |
107 | * @param resultValueGroupTypeKey identifier for the result group type | |
108 | * @param context Context information containing the principalId | |
109 | * and locale information about the caller of service | |
110 | * operation | |
111 | * @return list of result group identifiers | |
112 | * @throws DoesNotExistException resultValuesGroupTypeKey not found | |
113 | * @throws InvalidParameterException invalid resultValuesGroupTypeKey | |
114 | * @throws MissingParameterException missing resultValuesGroupTypeKey | |
115 | * @throws OperationFailedException unable to complete request | |
116 | * @throws PermissionDeniedException authorization failure | |
117 | */ | |
118 | public List<String> getResultValuesGroupIdsByType(@WebParam(name = "resultValuesGroupTypeKey") String resultValuesGroupTypeKey, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
119 | ||
120 | /** | |
121 | * Creates a new result Component. | |
122 | * | |
123 | * @param gradeValuesGroupInfo information about the result component | |
124 | * being created | |
125 | * @param context Context information containing the principalId | |
126 | * and locale information about the caller of service | |
127 | * operation | |
128 | * @return create result component information | |
129 | * @throws AlreadyExistsException result component already exists | |
130 | * @throws DataValidationErrorException one or more values invalid for | |
131 | * this operation | |
132 | * @throws InvalidParameterException invalid resultValuesGroupInfo | |
133 | * @throws MissingParameterException missing resultValuesGroupInfo | |
134 | * @throws OperationFailedException unable to complete request | |
135 | * @throws PermissionDeniedException authorization failure | |
136 | */ | |
137 | public ResultValuesGroupInfo createResultValuesGroup(@WebParam(name = "resultGroupInfo") ResultValuesGroupInfo gradeValuesGroupInfo, @WebParam(name = "context") ContextInfo context) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
138 | ||
139 | /** | |
140 | * Updates an existing result component. | |
141 | * | |
142 | * @param resultValuesGroupId identifier of the result component to update | |
143 | * @param resultGroupInfo updated information about the result component | |
144 | * @param context Context information containing the principalId | |
145 | * and locale information about the caller of service | |
146 | * operation | |
147 | * @return updated result component information | |
148 | * @throws DataValidationErrorException one or more values invalid for | |
149 | * this operation | |
150 | * @throws DoesNotExistException resultValuesGroupKey not found | |
151 | * @throws InvalidParameterExceptioninvalid resultValuesGroupId or | |
152 | * resultValuesGroupInfo | |
153 | * @throws MissingParameterException missing resultValuesGroupId or | |
154 | * resultValuesGroupInfo | |
155 | * @throws OperationFailedException unable to complete request | |
156 | * @throws PermissionDeniedException authorization failure | |
157 | * @throws VersionMismatchException action was attempted on an out of | |
158 | * date version | |
159 | */ | |
160 | public ResultValuesGroupInfo updateResultValuesGroup(@WebParam(name = "resultValuesGroupId") String resultValuesGroupId, @WebParam(name = "resultValuesGroupInfo") ResultValuesGroupInfo gradeValuesGroupInfo, @WebParam(name = "context") ContextInfo context) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException; | |
161 | ||
162 | /** | |
163 | * Deletes an existing result component. | |
164 | * | |
165 | * @param resultValuesGroupId identifier of the result component to update | |
166 | * @param context Context information containing the principalId | |
167 | * and locale information about the caller of service | |
168 | * operation | |
169 | * @return status of the operation | |
170 | * @throws DoesNotExistException resultValuesGroupId not found | |
171 | * @throws InvalidParameterException invalid resultValuesGroupId | |
172 | * @throws MissingParameterException missing resultValuesGroupId | |
173 | * @throws OperationFailedException unable to complete request | |
174 | * @throws PermissionDeniedException authorization failure | |
175 | */ | |
176 | public StatusInfo deleteResultValuesGroup(@WebParam(name = "resultValuesGroupId") String resultValuesGroupId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
177 | ||
178 | /** | |
179 | * Validates a result component. Depending on the value of | |
180 | * validationType, this validation could be limited to tests on | |
181 | * just the current object and its directly contained sub-objects | |
182 | * or expanded to perform all tests related to this object. | |
183 | * | |
184 | * @param validationType Identifier of the extent of validation | |
185 | * @param gradeValuesGroupInfo Result component to be validated | |
186 | * @param context Context information containing the principalId | |
187 | * and locale information about the caller of service | |
188 | * operation | |
189 | * @return | |
190 | * @throws DoesNotExistException resultValuesGroupInfo does not exist | |
191 | * @throws InvalidParameterException validationType or | |
192 | * resultValuesGroupInfo does not exist | |
193 | * @throws MissingParameterException missing validationType, resultValuesGroupInfo | |
194 | * @throws OperationFailedException unable to complete request | |
195 | */ | |
196 | public List<ValidationResultInfo> validateResultValuesGroup(@WebParam(name = "validationType") String validationType, @WebParam(name = "resultGroupInfo") ResultValuesGroupInfo gradeValuesGroupInfo, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
197 | ||
198 | /** | |
199 | * Retrieves result value by its id. | |
200 | * | |
201 | * @param resultValueId identifier for the result | |
202 | * @param context Context information containing the principalId | |
203 | * and locale information about the caller of service | |
204 | * operation | |
205 | * @return details about a result value | |
206 | * @throws DoesNotExistException the resultValueId is not found | |
207 | * @throws InvalidParameterException invalid resultValueId | |
208 | * @throws MissingParameterException missing parameter | |
209 | * @throws OperationFailedException unable to complete request | |
210 | * @throws PermissionDeniedException authorization failure | |
211 | */ | |
212 | public ResultValueInfo getResultValue(@WebParam(name = "resultValueId") String resultValueId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
213 | ||
214 | /** | |
215 | * Retrieves a list of result value objects for a list of identifiers. | |
216 | * | |
217 | * @param resultValueIds identifier for the result | |
218 | * @param context Context information containing the principalId | |
219 | * and locale information about the caller of service | |
220 | * operation | |
221 | * @return list of result group identifiers | |
222 | * @throws DoesNotExistException a resultValueId from the list is not found | |
223 | * @throws InvalidParameterException invalid resultValueIds | |
224 | * @throws MissingParameterException missing resultValueIds | |
225 | * @throws OperationFailedException unable to complete request | |
226 | * @throws PermissionDeniedException authorization failure | |
227 | */ | |
228 | public List<ResultValueInfo> getResultValuesByIds(@WebParam(name = "resultValueIds") List<String> resultValueIds, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
229 | ||
230 | /** | |
231 | * Retrieves a list of result value objects for a specified result | |
232 | * component. It is sorted by the scale inside the component. | |
233 | * | |
234 | * @param resultValuesGroupId identifier for the result component | |
235 | * @param context Context information containing the principalId | |
236 | * and locale information about the caller of service | |
237 | * operation | |
238 | * @return list of result group identifiers | |
239 | * @throws DoesNotExistException resultValueId not found | |
240 | * @throws InvalidParameterException invalid resultValuesGroupId | |
241 | * @throws MissingParameterException missing resultValuesGroupId | |
242 | * @throws OperationFailedException unable to complete request | |
243 | * @throws PermissionDeniedException authorization failure | |
244 | */ | |
245 | public List<ResultValueInfo> getResultValuesForResultValuesGroup(@WebParam(name = "resultValuesGroupId") String resultValuesGroupId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
246 | ||
247 | /** | |
248 | * Create a new result value | |
249 | * @param resultValueInfo | |
250 | * @param context Context information containing the principalId | |
251 | * and locale information about the caller of service | |
252 | * operation | |
253 | * @return newly created resultValue | |
254 | * @throws AlreadyExistsException resultValue already exists | |
255 | * @throws DataValidationErrorException one or more values invalid for | |
256 | * this operation | |
257 | * @throws InvalidParameterException invalid resultValueInfo | |
258 | * @throws MissingParameterException missing resultValueInfo | |
259 | * @throws OperationFailedException unable to complete request | |
260 | * @throws PermissionDeniedException authorization failure | |
261 | */ | |
262 | public ResultValueInfo createResultValue(@WebParam(name = "resultValueInfo") ResultValueInfo resultValueInfo, @WebParam(name = "context") ContextInfo context) throws AlreadyExistsException, DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
263 | ||
264 | /** | |
265 | * Update a result value | |
266 | * @param resultValueId resultValueId to be updated | |
267 | * @param resultValueInfo update information for the result value | |
268 | * @param context Context information containing the principalId | |
269 | * and locale information about the caller of service | |
270 | * operation | |
271 | * @return updated information about the result value | |
272 | * @throws DataValidationErrorException one or more values invalid for | |
273 | * this operation | |
274 | * @throws DoesNotExistException resultValueId does not exist | |
275 | * @throws InvalidParameterException invalid resultValueId, resultValueInfo | |
276 | * @throws MissingParameterException missing resultValueId, resultValueInfo | |
277 | * @throws OperationFailedException unable to complete request | |
278 | * @throws PermissionDeniedException authorization failure | |
279 | * @throws VersionMismatchException action was attempted on an out of | |
280 | * date version | |
281 | */ | |
282 | public ResultValueInfo updateResultValue(@WebParam(name = "resultValueId") String resultValueId, @WebParam(name = "resultValueInfo") ResultValueInfo resultValueInfo, @WebParam(name = "context") ContextInfo context) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException; | |
283 | ||
284 | /** | |
285 | * Delete a result value. This should not be allowed if any result component is still referencing the result value. | |
286 | * @param resultValueId result value to be deleted | |
287 | * @param context Context information containing the principalId | |
288 | * and locale information about the caller of service | |
289 | * operation | |
290 | * @return status of the delete operation | |
291 | * @throws DoesNotExistException resultValueId does not exist | |
292 | * @throws InvalidParameterException invalid resultValueId | |
293 | * @throws MissingParameterException missing resultValueId | |
294 | * @throws OperationFailedException unable to complete request | |
295 | * @throws PermissionDeniedException authorization failure | |
296 | */ | |
297 | public StatusInfo deleteResultValue(@WebParam(name = "resultValueId") String resultValueId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
298 | ||
299 | /** | |
300 | * Validates a Result Value. Depending on the value of | |
301 | * validationType, this validation could be limited to tests on | |
302 | * just the current object and its directly contained subobjects | |
303 | * or expanded to perform all tests related to this object. If an | |
304 | * identifier is present for the academic calendar and a record | |
305 | * is found for that identifier, the validation checks if the | |
306 | * academic calendar can be shifted to the new values. If a | |
307 | * record cannot be found for the identifier, it is assumed that | |
308 | * the record does not exist and as such, the checks performed | |
309 | * will be much shallower, typically mimicking those performed by | |
310 | * setting the validationType to the current object. This is a | |
311 | * slightly different pattern from the standard validation as the | |
312 | * caller provides the identifier in the create statement instead | |
313 | * of the server assigning an identifier. | |
314 | * | |
315 | * @param validationType Identifier of the extent of validation | |
316 | * @param resultValueInfo Result value to be validated | |
317 | * @param context Context information containing the principalId | |
318 | * and locale information about the caller of service | |
319 | * operation | |
320 | * @return a ValidationResultInfo | |
321 | * @throws DoesNotExistException resultValueInfo does not exist | |
322 | * @throws InvalidParameterException validationType or resultValueInfo | |
323 | * does not exist | |
324 | * @throws MissingParameterException missing validationType or resultValueInfo | |
325 | * @throws OperationFailedException unable to complete request | |
326 | */ | |
327 | public List<ValidationResultInfo> validateResultValue(@WebParam(name = "validationType") String validationType, @WebParam(name = "resultValueInfo") ResultValueInfo resultValueInfo, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
328 | ||
329 | /** | |
330 | * Retrieves result scale by an identifier. | |
331 | * | |
332 | * @param resultScaleId identifiers for result scale to be retrieved | |
333 | * @param context Context information containing the principalId | |
334 | * and locale information about the caller of service | |
335 | * operation | |
336 | * @return details of the result scale for the id | |
337 | * @throws DoesNotExistException resultValuesGroupId not found | |
338 | * @throws InvalidParameterException invalid resultValuesGroupId | |
339 | * @throws MissingParameterException invalid resultValuesGroupId | |
340 | * @throws OperationFailedException unable to complete request | |
341 | * @throws PermissionDeniedException authorization failure | |
342 | */ | |
343 | public ResultScaleInfo getResultScale(@WebParam(name = "resultScaleKey") String resultScaleKey, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
344 | ||
345 | /** | |
346 | * | |
347 | * Retrieves result values by result scale key. | |
348 | * | |
349 | * @param resultScaleKey | |
350 | * @param context Context information containing the principalId | |
351 | * and locale information about the caller of service | |
352 | * operation | |
353 | * @return a list of result values for the scale | |
354 | * @throws DoesNotExistException resultScaleKey is not found | |
355 | * @throws InvalidParameterException invalid resultScaleKey | |
356 | * @throws MissingParameterException null resultScaleKey | |
357 | * @throws OperationFailedException unable to complete request | |
358 | * @throws PermissionDeniedException authorization failure | |
359 | */ | |
360 | public List<ResultValueInfo> getResultValuesForScale(@WebParam(name = "resultScaleKey") String resultScaleKey, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
361 | } |