Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
GradingService |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 2007 The Kuali Foundation Licensed under the Educational Community | |
3 | * License, Version 1.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.opensource.org/licenses/ecl1.php Unless required by applicable law | |
6 | * or agreed to in writing, software distributed under the License is | |
7 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
8 | * KIND, either express or implied. See the License for the specific language | |
9 | * governing permissions and limitations under the License. | |
10 | */ | |
11 | package org.kuali.student.enrollment.grading.service; | |
12 | ||
13 | import java.util.List; | |
14 | ||
15 | import javax.jws.WebParam; | |
16 | import javax.jws.WebService; | |
17 | import javax.jws.soap.SOAPBinding; | |
18 | ||
19 | import org.kuali.student.enrollment.grading.dto.GradeRosterEntryInfo; | |
20 | import org.kuali.student.enrollment.grading.dto.GradeRosterInfo; | |
21 | import org.kuali.student.enrollment.grading.dto.GradeValuesGroupInfo; | |
22 | import org.kuali.student.r2.common.dto.ContextInfo; | |
23 | import org.kuali.student.r2.common.dto.StatusInfo; | |
24 | import org.kuali.student.r2.common.dto.ValidationResultInfo; | |
25 | import org.kuali.student.r2.common.exceptions.*; | |
26 | import org.kuali.student.r2.common.util.constants.GradingServiceConstants; | |
27 | import org.kuali.student.r2.core.type.dto.TypeInfo; | |
28 | import org.kuali.student.r2.lum.lrc.dto.ResultValueInfo; | |
29 | ||
30 | /** | |
31 | * Version: DRAFT - NOT READY FOR RELEASE. This service manages grade and credit | |
32 | * submission for activity/course offerings. The service can be used for | |
33 | * capturing final grades and any number of interim grades. The service provides | |
34 | * the following primary functions: | |
35 | * <ol> | |
36 | * <li>Build Grade Rosters | |
37 | * <li>Capture Assigned Grades for students in various rosters | |
38 | * <li>Provides valid grading options for a student in an activity | |
39 | * <li>Calculate grade translation for the grades within that offering (for e.g | |
40 | * A-F grades to Pass/No-pass) | |
41 | * <li>Calculate credits earned within that offering | |
42 | * <li>Submission of final grades for the offering | |
43 | * <li>Students are clubbed together into grade rosters for the purpose of | |
44 | * grading. For any assessment event, one or more grade rosters of a certain | |
45 | * type is created. Instructors (and/or delegates) are then allowed to enter | |
46 | * grades for students on the roster. Only the final grade roster is submittable | |
47 | * and the submission is tracked using the state of the grade roster. | |
48 | * </ol> | |
49 | * The service automatically creates the grade roster for the final grades. This | |
50 | * roster(s) is created only for the offerings of the primary activity type. The | |
51 | * structure and breakdown of the students in the final grade roster can be | |
52 | * configured and student can exist only once in the final grade roster(s). | |
53 | * Interim rosters can be created for activity offerings based on a assessment | |
54 | * event like mid term, weekly quiz etc. Version: 1.0 (Dev) | |
55 | * | |
56 | * @author Kuali Student Team (Kamal) | |
57 | */ | |
58 | @WebService(name = "GradingService", serviceName = "GradingService", portName = "GradingService", targetNamespace = GradingServiceConstants.NAMESPACE) | |
59 | @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) | |
60 | public interface GradingService { | |
61 | ||
62 | /** | |
63 | * This method returns the TypeInfo for a given grade roster type key. | |
64 | * | |
65 | * @param gradeRosterTypeKey Key of the type | |
66 | * @param context Context information containing the principalId and locale | |
67 | * information about the caller of service operation | |
68 | * @return Information about the Type | |
69 | * @throws DoesNotExistException gradeRosterTypeKey not found | |
70 | * @throws InvalidParameterException invalid gradeRosterTypeKey | |
71 | * @throws MissingParameterException missing gradeRosterTypeKey | |
72 | * @throws OperationFailedException unable to complete request | |
73 | */ | |
74 | public TypeInfo getGradeRosterType(@WebParam(name = "gradeRosterTypeKey") String gradeRosterTypeKey, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, | |
75 | InvalidParameterException, MissingParameterException, OperationFailedException; | |
76 | ||
77 | /** | |
78 | * Retrieve information about a grade roster | |
79 | * | |
80 | * @param gradeRosterId | |
81 | * @param context Context information containing the principalId and locale | |
82 | * information about the caller of service operation | |
83 | * @return | |
84 | * @throws DoesNotExistException | |
85 | * @throws InvalidParameterException | |
86 | * @throws MissingParameterException | |
87 | * @throws OperationFailedException | |
88 | * @throws PermissionDeniedException authorization failure | |
89 | */ | |
90 | public GradeRosterInfo getGradeRoster(@WebParam(name = "gradeRosterId") String gradeRosterId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, | |
91 | InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
92 | ||
93 | /** | |
94 | * Retrieve information about grade rosters by grader and term | |
95 | * | |
96 | * @param graderId | |
97 | * @param termId | |
98 | * @param context Context information containing the principalId and locale | |
99 | * information about the caller of service operation | |
100 | * @return | |
101 | * @throws DoesNotExistException | |
102 | * @throws InvalidParameterException | |
103 | * @throws MissingParameterException | |
104 | * @throws OperationFailedException | |
105 | * @throws PermissionDeniedException authorization failure | |
106 | */ | |
107 | public List<GradeRosterInfo> getGradeRostersByGraderAndTerm(@WebParam(name = "graderId") String graderId, @WebParam(name = "termId") String termId, | |
108 | @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
109 | ||
110 | /** | |
111 | * Retrieves rosters of final grades for a course offering | |
112 | * | |
113 | * @param courseOfferingId | |
114 | * @param context Context information containing the principalId and locale | |
115 | * information about the caller of service operation | |
116 | * @return | |
117 | * @throws DoesNotExistException | |
118 | * @throws InvalidParameterException | |
119 | * @throws MissingParameterException | |
120 | * @throws OperationFailedException | |
121 | * @throws PermissionDeniedException authorization failure | |
122 | */ | |
123 | public List<GradeRosterInfo> getFinalGradeRostersForCourseOffering(@WebParam(name = "courseOfferingId") String courseOfferingId, @WebParam(name = "context") ContextInfo context) | |
124 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
125 | ||
126 | /** | |
127 | * Retrieves rosters of final grade by actvity offerings | |
128 | * | |
129 | * @param activityOfferingId | |
130 | * @param context Context information containing the principalId and locale | |
131 | * information about the caller of service operation | |
132 | * @return | |
133 | * @throws DoesNotExistException | |
134 | * @throws InvalidParameterException | |
135 | * @throws MissingParameterException | |
136 | * @throws OperationFailedException | |
137 | * @throws PermissionDeniedException authorization failure | |
138 | */ | |
139 | public List<GradeRosterInfo> getFinalGradeRostersForActivityOffering(@WebParam(name = "activityOfferingId") String activityOfferingId, @WebParam(name = "context") ContextInfo context) | |
140 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
141 | ||
142 | /** | |
143 | * Retrieves all rosters for an activity offering | |
144 | * | |
145 | * @param activityOfferingId | |
146 | * @param context Context information containing the principalId and locale | |
147 | * information about the caller of service operation | |
148 | * @return | |
149 | * @throws DoesNotExistException | |
150 | * @throws InvalidParameterException | |
151 | * @throws MissingParameterException | |
152 | * @throws OperationFailedException | |
153 | * @throws PermissionDeniedException authorization failure | |
154 | */ | |
155 | public List<GradeRosterInfo> getGradeRostersForActivityOffering(@WebParam(name = "activityOfferingId") String activityOfferingId, @WebParam(name = "context") ContextInfo context) | |
156 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
157 | ||
158 | /** | |
159 | * Build an interim roster of given type. Roster type should be used to | |
160 | * figure out which students from the activity offerings will be in the | |
161 | * roster | |
162 | * | |
163 | * @param activityOfferingIds | |
164 | * @param rosterTypeKey | |
165 | * @param context Context information containing the principalId and locale | |
166 | * information about the caller of service operation | |
167 | * @return | |
168 | * @throws AlreadyExistsException | |
169 | * @throws InvalidParameterException | |
170 | * @throws MissingParameterException | |
171 | * @throws OperationFailedException | |
172 | * @throws PermissionDeniedException authorization failure | |
173 | */ | |
174 | public GradeRosterInfo buildInterimGradeRosterByType(@WebParam(name = "activityOfferingIds") String courseOfferingId, | |
175 | @WebParam(name = "activityOfferingIds") List<String> activityOfferingIds, @WebParam(name = "rosterTypeKey") String rosterTypeKey, @WebParam(name = "context") ContextInfo context) | |
176 | throws AlreadyExistsException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
177 | ||
178 | /** | |
179 | * Update interim grade roster information | |
180 | * | |
181 | * @param gradeRoster | |
182 | * @param context Context information containing the principalId and locale | |
183 | * information about the caller of service operation | |
184 | * @return | |
185 | * @throws DataValidationErrorException One or more values invalid for this | |
186 | * operation | |
187 | * @throws DoesNotExistException | |
188 | * @throws InvalidParameterException | |
189 | * @throws MissingParameterException | |
190 | * @throws OperationFailedException | |
191 | * @throws PermissionDeniedException authorization failure | |
192 | * @throws VersionMismatchException | |
193 | */ | |
194 | public GradeRosterInfo updateInterimGradeRoster(@WebParam(name = "gradeRoster") GradeRosterInfo gradeRoster, @WebParam(name = "context") ContextInfo context) throws DataValidationErrorException, | |
195 | DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException; | |
196 | ||
197 | /** | |
198 | * Delete an interim grade roster | |
199 | * | |
200 | * @param gradeRosterId | |
201 | * @param context Context information containing the principalId and locale | |
202 | * information about the caller of service operation | |
203 | * @return | |
204 | * @throws DoesNotExistException | |
205 | * @throws InvalidParameterException | |
206 | * @throws MissingParameterException | |
207 | * @throws OperationFailedException | |
208 | * @throws PermissionDeniedException authorization failure | |
209 | */ | |
210 | public StatusInfo deleteInterimGradeRoster(@WebParam(name = "gradeRosterId") String gradeRosterId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, | |
211 | InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
212 | ||
213 | /** | |
214 | * Update state of final grade roster. Only state can be changed for the | |
215 | * final grade roster. Final grade submission is tracked through state | |
216 | * change on the roster. | |
217 | * | |
218 | * @param gradeRosterId | |
219 | * @param stateKey | |
220 | * @param context Context information containing the principalId and locale | |
221 | * information about the caller of service operation | |
222 | * @return | |
223 | * @throws DataValidationErrorException One or more values invalid for this | |
224 | * operation | |
225 | * @throws DoesNotExistException | |
226 | * @throws InvalidParameterException | |
227 | * @throws MissingParameterException | |
228 | * @throws OperationFailedException | |
229 | * @throws PermissionDeniedException authorization failure | |
230 | * @throws VersionMismatchException | |
231 | */ | |
232 | public GradeRosterInfo updateFinalGradeRosterState(@WebParam(name = "gradeRosterId") String gradeRosterId, @WebParam(name = "newStateKey") String stateKey, | |
233 | @WebParam(name = "context") ContextInfo context) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, | |
234 | OperationFailedException, PermissionDeniedException, VersionMismatchException; | |
235 | ||
236 | /** | |
237 | * Validate a grade roster information | |
238 | * | |
239 | * @param gradeRoster | |
240 | * @param context Context information containing the principalId and locale | |
241 | * information about the caller of service operation | |
242 | * @return | |
243 | * @throws DoesNotExistException | |
244 | * @throws InvalidParameterException | |
245 | * @throws MissingParameterException | |
246 | * @throws OperationFailedException | |
247 | */ | |
248 | public List<ValidationResultInfo> validateGradeRoster(@WebParam(name = "gradeRoster") GradeRosterInfo gradeRoster, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, | |
249 | InvalidParameterException, MissingParameterException, OperationFailedException; | |
250 | ||
251 | /** | |
252 | * Retrieve information about a grade roster entry | |
253 | * | |
254 | * @param gradeRosterEntryId | |
255 | * @param context Context information containing the principalId and locale | |
256 | * information about the caller of service operation | |
257 | * @return | |
258 | * @throws DoesNotExistException | |
259 | * @throws InvalidParameterException | |
260 | * @throws MissingParameterException | |
261 | * @throws OperationFailedException | |
262 | * @throws PermissionDeniedException authorization failure | |
263 | */ | |
264 | public GradeRosterEntryInfo getGradeRosterEntry(@WebParam(name = "gradeRosterEntryId") String gradeRosterEntryId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, | |
265 | InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
266 | ||
267 | /** | |
268 | * Retrieve a list of grade roster entries based on their Ids. The method | |
269 | * should fail if there is an error in retrieving any id from the list. | |
270 | * | |
271 | * @param gradeRosterEntryIds list of grade roster entry Ids | |
272 | * @param context Context information containing the principalId and locale | |
273 | * information about the caller of service operation | |
274 | * @return | |
275 | * @throws DoesNotExistException | |
276 | * @throws InvalidParameterException | |
277 | * @throws MissingParameterException | |
278 | * @throws OperationFailedException | |
279 | * @throws PermissionDeniedException authorization failure | |
280 | */ | |
281 | public List<GradeRosterEntryInfo> getGradeRosterEntriesByIds(@WebParam(name = "gradeRosterEntryIds") List<String> gradeRosterEntryIds, @WebParam(name = "context") ContextInfo context) | |
282 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
283 | ||
284 | /** | |
285 | * Retrieve grade roster entries by roster. | |
286 | * | |
287 | * @param gradeRosterId | |
288 | * @param context Context information containing the principalId and locale | |
289 | * information about the caller of service operation | |
290 | * @return | |
291 | * @throws DoesNotExistException | |
292 | * @throws InvalidParameterException | |
293 | * @throws MissingParameterException | |
294 | * @throws OperationFailedException | |
295 | * @throws PermissionDeniedException authorization failure | |
296 | */ | |
297 | public List<GradeRosterEntryInfo> getGradeRosterEntriesByRosterId(@WebParam(name = "gradeRosterId") String gradeRosterId, @WebParam(name = "context") ContextInfo context) | |
298 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
299 | ||
300 | ||
301 | /** | |
302 | * Based on the id list, return {@link GradeValuesGroupInfo}. | |
303 | * | |
304 | * @param gradeRosterEntryIds | |
305 | * @param rosterId | |
306 | * @param context | |
307 | * @return | |
308 | * @throws DoesNotExistException | |
309 | * @throws InvalidParameterException | |
310 | * @throws MissingParameterException | |
311 | * @throws OperationFailedException | |
312 | * @throws PermissionDeniedException | |
313 | */ | |
314 | public List<GradeValuesGroupInfo> getGradeGroupsByKeyList(@WebParam(name = "gradeGroupKeyList") List<String> gradeGroupKeyList, @WebParam(name = "context") ContextInfo context) | |
315 | throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
316 | ||
317 | /** | |
318 | * | |
319 | * Get the final grades for a student in a particular course offering. | |
320 | * | |
321 | * @param studentId | |
322 | * @param courseOfferingId | |
323 | * @param context Context information containing the principalId and locale | |
324 | * information about the caller of service operation | |
325 | * @return | |
326 | * @throws DoesNotExistException | |
327 | * @throws InvalidParameterException | |
328 | * @throws MissingParameterException | |
329 | * @throws OperationFailedException | |
330 | * @throws PermissionDeniedException authorization failure | |
331 | */ | |
332 | ||
333 | @Deprecated | |
334 | public GradeRosterEntryInfo getFinalGradeForStudentInCourseOffering(@WebParam(name = "studentId") String studentId, @WebParam(name = "courseOfferingId") String courseOfferingId, | |
335 | @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, DisabledIdentifierException; | |
336 | ||
337 | /** | |
338 | * This method ... | |
339 | * | |
340 | * @param gradeRosterEntry | |
341 | * @param gradeRosterId | |
342 | * @param context Context information containing the principalId and locale | |
343 | * information about the caller of service operation | |
344 | * @return | |
345 | * @throws AlreadyExistsException | |
346 | * @throws InvalidParameterException | |
347 | * @throws MissingParameterException | |
348 | * @throws OperationFailedException | |
349 | * @throws PermissionDeniedException authorization failure | |
350 | */ | |
351 | public GradeRosterEntryInfo addEntrytoInterimRoster(@WebParam(name = "gradeRosterEntry") GradeRosterEntryInfo gradeRosterEntry, @WebParam(name = "gradeRosterId") String gradeRosterId, | |
352 | @WebParam(name = "context") ContextInfo context) throws AlreadyExistsException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
353 | ||
354 | /** | |
355 | * This method ... | |
356 | * | |
357 | * @param gradeRosterEntryId | |
358 | * @param gradeRosterId | |
359 | * @param context Context information containing the principalId and locale | |
360 | * information about the caller of service operation | |
361 | * @return | |
362 | * @throws DoesNotExistException | |
363 | * @throws InvalidParameterException | |
364 | * @throws MissingParameterException | |
365 | * @throws OperationFailedException | |
366 | * @throws PermissionDeniedException authorization failure | |
367 | */ | |
368 | public StatusInfo removeEntryFromInterimRoster(@WebParam(name = "gradeRosterEntryId") String gradeRosterEntryId, @WebParam(name = "gradeRosterId") String gradeRosterId, | |
369 | @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; | |
370 | ||
371 | /** | |
372 | * Assign any admin or letter grades which have a distinct value using this | |
373 | * method. The keys of those grades is the key of {@link ResultValueInfo} in | |
374 | * the {@link GradeValuesGroupInfo}. TODO - do we need to change the output | |
375 | * to an object instead of boolean? | |
376 | * | |
377 | * @param gradeRosterEntryId | |
378 | * @param assignedGradeKey the result value key | |
379 | * @param context Context information containing the principalId and locale | |
380 | * information about the caller of service operation | |
381 | * @return | |
382 | * @throws DataValidationErrorException One or more values invalid for this | |
383 | * operation | |
384 | * @throws DoesNotExistException | |
385 | * @throws InvalidParameterException | |
386 | * @throws MissingParameterException | |
387 | * @throws OperationFailedException | |
388 | * @throws PermissionDeniedException authorization failure | |
389 | * @throws VersionMismatchException | |
390 | */ | |
391 | public boolean updateGrade(@WebParam(name = "gradeRosterEntryId") String gradeRosterEntryId, @WebParam(name = "assignedGradeKey") String assignedGradeKey, | |
392 | @WebParam(name = "context") ContextInfo context) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, | |
393 | OperationFailedException, PermissionDeniedException, VersionMismatchException; | |
394 | ||
395 | /** | |
396 | * Assign any number grade that are in a range since those don't have any | |
397 | * unique key to begin with. Put in the value of the number grade - the | |
398 | * system generates a unique key and persists the grade. | |
399 | * | |
400 | * @param gradeRosterEntryId | |
401 | * @param numberGradeValue | |
402 | * @param context | |
403 | * @return | |
404 | * @throws DataValidationErrorException | |
405 | * @throws DoesNotExistException | |
406 | * @throws InvalidParameterException | |
407 | * @throws MissingParameterException | |
408 | * @throws OperationFailedException | |
409 | * @throws PermissionDeniedException | |
410 | * @throws VersionMismatchException | |
411 | */ | |
412 | public boolean updateNumberGrade(@WebParam(name = "gradeRosterEntryId") String gradeRosterEntryId, @WebParam(name = "numberGradeValue") String numberGradeValue, | |
413 | @WebParam(name = "context") ContextInfo context) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, | |
414 | OperationFailedException, PermissionDeniedException, VersionMismatchException; | |
415 | ||
416 | /** | |
417 | * TODO - do we need to change the output to an object instead of boolean? | |
418 | * | |
419 | * @param gradeRosterEntryId | |
420 | * @param assignedGrade | |
421 | * @param context Context information containing the principalId and locale | |
422 | * information about the caller of service operation | |
423 | * @return | |
424 | * @throws DataValidationErrorException One or more values invalid for this | |
425 | * operation | |
426 | * @throws DoesNotExistException | |
427 | * @throws InvalidParameterException | |
428 | * @throws MissingParameterException | |
429 | * @throws OperationFailedException | |
430 | * @throws PermissionDeniedException authorization failure | |
431 | * @throws VersionMismatchException | |
432 | */ | |
433 | public boolean updateCredit(@WebParam(name = "gradeRosterEntryId") String gradeRosterEntryId, @WebParam(name = "creditsEarned") String assignedGrade, | |
434 | @WebParam(name = "context") ContextInfo context) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, | |
435 | OperationFailedException, PermissionDeniedException, VersionMismatchException; | |
436 | } |