View Javadoc
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  package org.kuali.student.r2.lum.lrc.service;
15  
16  import java.util.List;
17  
18  import javax.jws.WebParam;
19  import javax.jws.WebService;
20  import javax.jws.soap.SOAPBinding;
21  import org.kuali.rice.core.api.criteria.QueryByCriteria;
22  
23  import org.kuali.student.r2.core.search.service.SearchService;
24  import org.kuali.student.r2.common.dto.StatusInfo;
25  import org.kuali.student.r2.common.exceptions.PermissionDeniedException;
26  import org.kuali.student.r2.common.dto.ContextInfo;
27  import org.kuali.student.r2.common.dto.ValidationResultInfo;
28  import org.kuali.student.r2.common.exceptions.AlreadyExistsException;
29  import org.kuali.student.r2.common.exceptions.DataValidationErrorException;
30  import org.kuali.student.r2.common.exceptions.DependentObjectsExistException;
31  import org.kuali.student.r2.common.exceptions.DoesNotExistException;
32  import org.kuali.student.r2.common.exceptions.InvalidParameterException;
33  import org.kuali.student.r2.common.exceptions.MissingParameterException;
34  import org.kuali.student.r2.common.exceptions.OperationFailedException;
35  import org.kuali.student.r2.common.exceptions.VersionMismatchException;
36  import org.kuali.student.r2.lum.util.constants.LrcServiceConstants;
37  import org.kuali.student.r2.lum.lrc.dto.ResultValuesGroupInfo;
38  import org.kuali.student.r2.lum.lrc.dto.ResultScaleInfo;
39  import org.kuali.student.r2.lum.lrc.dto.ResultValueInfo;
40  
41  /**
42   * The Learning Result Catalog Service is a Class I service which
43   * gives a set of operations to manage a learning result. A learning
44   * result can be of various types e.g grades, credits etc. This
45   * service has basic CRUD operations to touch various concepts that
46   * exist to model learning results e.g Result Value, Result Value
47   * Group, and Result Value Range.
48   *
49   * @Author sambit
50   * @version 2.0 
51   * @Since Tue May 10 14:09:46 PDT 2011
52   */
53  @WebService(name = "LrcService", targetNamespace = LrcServiceConstants.NAMESPACE)
54  @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
55  public interface LRCService extends LrcServiceBusinessLogic, SearchService {
56  
57      /**
58       * Retrieves existing result values group by an identifier.
59       *
60       * @param resultValuesGroupKey identifiers for resultValuesGroup to be retrieved
61       * @param contextInfo Context information containing the principalId
62       *                and locale information about the caller of service
63       *                operation     
64       * @return details of the results for these Ids
65       * @throws DoesNotExistException  resultValuesGroupKey not found
66       * @throws InvalidParameterException invalid resultValuesGroupKey
67       * @throws MissingParameterException invalid resultValuesGroupKey
68       * @throws OperationFailedException  unable to complete request
69       * @throws PermissionDeniedException authorization failure
70       */
71      public ResultValuesGroupInfo getResultValuesGroup(@WebParam(name = "resultValuesGroupKey") String resultValuesGroupKey,
72                                                        @WebParam(name = "contextInfo") ContextInfo contextInfo)
73              throws DoesNotExistException,
74              InvalidParameterException,
75              MissingParameterException,
76              OperationFailedException,
77              PermissionDeniedException;
78  
79      /**
80       * Retrieves result values groups by a list of identifiers.
81       *
82       * @param resultValuesGroupKeys  identifiers for result values group
83       * @param contextInfo Context information containing the principalId
84       *                and locale information about the caller of service
85       *                operation     
86       * @return result values group list
87       * @throws DoesNotExistException resultValuesGroup not found
88       * @throws InvalidParameterException invalid resultValuesGroupKeys
89       * @throws MissingParameterException invalid resultValuesGroupKeys
90       * @throws OperationFailedException unable to complete request
91       * @throws PermissionDeniedException authorization failure
92       */
93      public List<ResultValuesGroupInfo> getResultValuesGroupsByKeys(@WebParam(name = "resultValuesGroupKeys") List<String> resultValuesGroupKeys,
94                                                                     @WebParam(name = "contextInfo") ContextInfo contextInfo)
95              throws DoesNotExistException,
96              InvalidParameterException,
97              MissingParameterException,
98              OperationFailedException,
99              PermissionDeniedException;
100 
101     /**
102      * Retrieves a list of existing result values groups that a result value is tied to.
103      *
104      * @param resultValueKey identifier for result value
105      * @param contextInfo Context information containing the principalId
106      *                and locale information about the caller of service
107      *                operation
108      * @return details of the results for these keys
109      * @throws DoesNotExistException resultValue not found
110      * @throws InvalidParameterException invalid resultValueKey
111      * @throws MissingParameterException invalid resultValueKey
112      * @throws OperationFailedException unable to complete request
113      * @throws PermissionDeniedException authorization failure
114      */
115     public List<ResultValuesGroupInfo> getResultValuesGroupsByResultValue(@WebParam(name = "resultValueKey") String resultValueKey,
116                                                                           @WebParam(name = "contextInfo") ContextInfo contextInfo)
117             throws DoesNotExistException,
118             InvalidParameterException,
119             MissingParameterException,
120             OperationFailedException,
121             PermissionDeniedException;
122 
123     /**
124      * Retrieves a list of existing result values groups that a result scale is tied to.
125      *
126      * @param resultScaleKey identifier for result scale
127      * @param contextInfo Context information containing the principalId
128      *                and locale information about the caller of service
129      *                operation
130      * @return details of the results for these keys
131      * @throws DoesNotExistException resultValue not found
132      * @throws InvalidParameterException invalid resultValueKey
133      * @throws MissingParameterException invalid resultValueKey
134      * @throws OperationFailedException unable to complete request
135      * @throws PermissionDeniedException authorization failure
136      */
137     public List<ResultValuesGroupInfo> getResultValuesGroupsByResultScale(@WebParam(name = "resultScaleKey") String resultScaleKey,
138                                                                           @WebParam(name = "contextInfo") ContextInfo contextInfo)
139             throws DoesNotExistException,
140             InvalidParameterException,
141             MissingParameterException,
142             OperationFailedException,
143             PermissionDeniedException;
144 
145     /**
146      * Retrieves a list of result group identifiers for a specified
147      * result values group type.
148      *
149      * @param resultValuesGroupTypeKey identifier for the result group type
150      * @param contextInfo Context information containing the principalId
151      *                and locale information about the caller of service
152      *                operation     
153      * @return list of result group identifiers
154      * @throws DoesNotExistException resultValuesGroupTypeKey not found
155      * @throws InvalidParameterException invalid resultValuesGroupTypeKey
156      * @throws MissingParameterException missing resultValuesGroupTypeKey
157      * @throws OperationFailedException unable to complete request
158      * @throws PermissionDeniedException authorization failure     
159      */
160     public List<String> getResultValuesGroupKeysByType(@WebParam(name = "resultValuesGroupTypeKey") String resultValuesGroupTypeKey,
161                                                        @WebParam(name = "contextInfo") ContextInfo contextInfo)
162             throws DoesNotExistException,
163             InvalidParameterException,
164             MissingParameterException,
165             OperationFailedException,
166             PermissionDeniedException;
167 
168     /**
169      * Creates a new result Values Group.
170      *
171      * @param resultValuesGroupInfo information about the result values group 
172      *        being created
173      * @param contextInfo Context information containing the principalId
174      *                and locale information about the caller of service
175      *                operation     
176      * @return create result values group information
177      * @throws AlreadyExistsException result values group already exists
178      * @throws DataValidationErrorException one or more values invalid for 
179      *         this operation
180      * @throws InvalidParameterException invalid resultValuesGroupInfo
181      * @throws MissingParameterException missing resultValuesGroupInfo
182      * @throws OperationFailedException unable to complete request
183      * @throws PermissionDeniedException authorization failure
184      */
185     public ResultValuesGroupInfo createResultValuesGroup(
186             @WebParam(name = "resultScaleKey") String resultScaleKey,
187             @WebParam(name = "resultValuesGroupTypeKey") String resultValuesGroupTypeKey,
188             @WebParam(name = "resultGroupInfo") ResultValuesGroupInfo resultValuesGroupInfo,
189             @WebParam(name = "contextInfo") ContextInfo contextInfo)
190             throws AlreadyExistsException,
191             DataValidationErrorException,
192             InvalidParameterException,
193             MissingParameterException,
194             OperationFailedException,
195             PermissionDeniedException;
196 
197     /**
198      * Updates an existing result values group.
199      *
200      * @param resultValuesGroupKey identifier of the result values group to update
201      * @param resultGroupInfo updated information about the result values group
202      * @param contextInfo Context information containing the principalId
203      *                and locale information about the caller of service
204      *                operation     
205      * @return updated result values group information
206      * @throws DataValidationErrorException one or more values invalid for 
207      *                                      this operation
208      * @throws DoesNotExistException resultValuesGroupKey not found
209      * @throws InvalidParameterExceptioninvalid resultValuesGroupKey or 
210      *                                          resultValuesGroupInfo
211      * @throws MissingParameterException missing resultValuesGroupKey or
212      *                                   resultValuesGroupInfo
213      * @throws OperationFailedException unable to complete request
214      * @throws PermissionDeniedException authorization failure
215      * @throws VersionMismatchException action was attempted on an out of 
216      *                                  date version
217      */
218     public ResultValuesGroupInfo updateResultValuesGroup(@WebParam(name = "resultValuesGroupKey") String resultValuesGroupKey,
219                                                          @WebParam(name = "resultValuesGroupInfo") ResultValuesGroupInfo gradeValuesGroupInfo,
220                                                          @WebParam(name = "contextInfo") ContextInfo contextInfo)
221             throws DataValidationErrorException,
222             DoesNotExistException,
223             InvalidParameterException,
224             MissingParameterException,
225             OperationFailedException,
226             PermissionDeniedException,
227             VersionMismatchException;
228 
229     /**
230      * Deletes an existing result values group.
231      *
232      * @param resultValuesGroupKey identifier of the result values group to update
233      * @param contextInfo Context information containing the principalId
234      *                and locale information about the caller of service
235      *                operation     
236      * @return status of the operation
237      * @throws DoesNotExistException resultValuesGroupKey not found
238      * @throws InvalidParameterException invalid resultValuesGroupKey
239      * @throws MissingParameterException missing resultValuesGroupKey
240      * @throws OperationFailedException unable to complete request
241      * @throws PermissionDeniedException authorization failure
242      */
243     public StatusInfo deleteResultValuesGroup(@WebParam(name = "resultValuesGroupKey") String resultValuesGroupKey,
244                                               @WebParam(name = "contextInfo") ContextInfo contextInfo)
245             throws DoesNotExistException,
246             InvalidParameterException,
247             MissingParameterException,
248             OperationFailedException,
249             PermissionDeniedException;
250 
251     /**
252      * Validates a result values group. Depending on the value of
253      * validationType, this validation could be limited to tests on
254      * just the current object and its directly contained sub-objects
255      * or expanded to perform all tests related to this object. 
256      *
257      * @param validationType Identifier of the extent of validation
258      * @param gradeValuesGroupInfo Result values group to be validated
259      * @param contextInfo Context information containing the principalId
260      *                and locale information about the caller of service
261      *                operation
262      * @return
263      * @throws DoesNotExistException resultValuesGroupInfo does not exist
264      * @throws InvalidParameterException validationType or 
265      *                                   resultValuesGroupInfo does not exist
266      * @throws MissingParameterException missing validationType, resultValuesGroupInfo
267      * @throws OperationFailedException unable to complete request
268      */
269     public List<ValidationResultInfo> validateResultValuesGroup(@WebParam(name = "validationType") String validationType,
270                                                                 @WebParam(name = "resultGroupInfo") ResultValuesGroupInfo gradeValuesGroupInfo,
271                                                                 @WebParam(name = "contextInfo") ContextInfo contextInfo)
272             throws DoesNotExistException,
273             InvalidParameterException,
274             MissingParameterException,
275             OperationFailedException;
276 
277     /**
278      * Get or create a new result values group holding the specified number of credits
279      *
280      * The resulting RVG should have a type of FIXED
281      *
282      * May also create the corresponding credit value.
283      *
284      * @param creditValue the credit value to be found/created
285      * @param scaleKey the scale associated with this type of credit (regular or remedial or continuing ed, etc)
286      * @param contextInfo Context information containing the principalId
287      *                and locale information about the caller of service
288      *                operation     
289      * @return create result values group information
290      * @throws AlreadyExistsException result values group already exists
291      * @throws DataValidationErrorException one or more values invalid for 
292      *         this operation
293      * @throws InvalidParameterException invalid resultValuesGroupInfo
294      * @throws MissingParameterException missing resultValuesGroupInfo
295      * @throws OperationFailedException unable to complete request
296      * @throws PermissionDeniedException authorization failure
297      * @impl the parameters hold string representations of floating points to avoid rounding issues
298      */
299     @Override
300     public ResultValuesGroupInfo getCreateFixedCreditResultValuesGroup(@WebParam(name = "creditValue") String creditValue,
301                                                                        @WebParam(name = "scaleKey") String scaleKey,
302                                                                        @WebParam(name = "contextInfo") ContextInfo contextInfo)
303             throws InvalidParameterException,
304             MissingParameterException,
305             OperationFailedException,
306             PermissionDeniedException;
307 
308     /**
309      * Get or create a new result values group holding the specified number of credits
310      *
311      * The resulting RVG will have a type of RANGE
312      *
313      * @param creditValueMin the minimum credit value of the range to be found/created
314      * @param creditValueMax the maximum credit value to be found/created
315      * @param creditValueIncrement the credit value increment of the range to be found/created
316      * @param scaleKey the scale associated with this type of credit (regular or remedial or continuing ed, etc)
317      * @param contextInfo Context information containing the principalId
318      *                and locale information about the caller of service
319      *                operation     
320      * @return create result values group information
321      * @throws AlreadyExistsException result values group already exists
322      * @throws DataValidationErrorException one or more values invalid for 
323      *         this operation
324      * @throws InvalidParameterException invalid resultValuesGroupInfo
325      * @throws MissingParameterException missing resultValuesGroupInfo
326      * @throws OperationFailedException unable to complete request
327      * @throws PermissionDeniedException authorization failure
328      * @impl the parameters hold string representations of floating points to avoid rounding issues
329      */
330     @Override
331     public ResultValuesGroupInfo getCreateRangeCreditResultValuesGroup(@WebParam(name = "creditValueMin") String creditValueMin,
332                                                                        @WebParam(name = "creditValueMax") String creditValueMax,
333                                                                        @WebParam(name = "creditValueIncrement") String creditValueIncrement,
334                                                                        @WebParam(name = "scaleKey") String scaleKey,
335                                                                        @WebParam(name = "contextInfo") ContextInfo contextInfo)
336             throws InvalidParameterException,
337             MissingParameterException,
338             OperationFailedException,
339             PermissionDeniedException;
340 
341     /**
342      * Get or create a new result values group holding the specified number of credits
343      *
344      * The resulting RVG should have the type of MULTIPLE
345      *
346      * @param creditValues the minimum credit value of the range to be found/created
347      * @param scaleKey the scale associated with this type of credit (regular or remedial or continuing ed, etc)
348      * @param contextInfo Context information containing the principalId
349      *                and locale information about the caller of service
350      *                operation     
351      * @return create result values group information
352      * @throws AlreadyExistsException result values group already exists
353      * @throws DataValidationErrorException one or more values invalid for 
354      *         this operation
355      * @throws InvalidParameterException invalid resultValuesGroupInfo
356      * @throws MissingParameterException missing resultValuesGroupInfo
357      * @throws OperationFailedException unable to complete request
358      * @throws PermissionDeniedException authorization failure
359      * @impl the parameters hold string representations of floating points to avoid rounding issues
360      */
361     @Override
362     public ResultValuesGroupInfo getCreateMultipleCreditResultValuesGroup(@WebParam(name = "creditValues") List<String> creditValues,
363                                                                           @WebParam(name = "scaleKey") String scaleKey,
364                                                                           @WebParam(name = "contextInfo") ContextInfo contextInfo)
365             throws InvalidParameterException,
366             MissingParameterException,
367             OperationFailedException,
368             PermissionDeniedException;
369 
370     /**
371      * Retrieves result value by its id.
372      *
373      * @param resultValueKey identifier for the result
374      * @param contextInfo Context information containing the principalId
375      *                and locale information about the caller of service
376      *                operation      
377      * @return details about a result value
378      * @throws DoesNotExistException the resultValueKey is not found
379      * @throws InvalidParameterException invalid resultValueKey
380      * @throws MissingParameterException missing parameter
381      * @throws OperationFailedException unable to complete request
382      * @throws PermissionDeniedException authorization failure 
383      */
384     public ResultValueInfo getResultValue(@WebParam(name = "resultValueKey") String resultValueKey,
385                                           @WebParam(name = "contextInfo") ContextInfo contextInfo)
386             throws DoesNotExistException,
387             InvalidParameterException,
388             MissingParameterException,
389             OperationFailedException,
390             PermissionDeniedException;
391 
392     /**
393      * Retrieves a list of result value objects for a list of identifiers. 
394      *
395      * @param resultValueKeys identifier for the result
396      * @param contextInfo Context information containing the principalId
397      *                and locale information about the caller of service
398      *                operation      
399      * @return list of result group identifiers
400      * @throws DoesNotExistException a resultValueKey from the list is not found
401      * @throws InvalidParameterException invalid resultValueKeys
402      * @throws MissingParameterException missing resultValueKeys
403      * @throws OperationFailedException unable to complete request
404      * @throws PermissionDeniedException authorization failure 
405      */
406     public List<ResultValueInfo> getResultValuesByKeys(@WebParam(name = "resultValueKeys") List<String> resultValueKeys,
407                                                        @WebParam(name = "contextInfo") ContextInfo contextInfo)
408             throws DoesNotExistException,
409             InvalidParameterException,
410             MissingParameterException,
411             OperationFailedException,
412             PermissionDeniedException;
413 
414     /**
415      * Retrieves a list of result values by type.
416      *
417      * @param resultValueTypeKey identifier for the result group type
418      * @param contextInfo Context information containing the principalId
419      *                and locale information about the caller of service
420      *                operation     
421      * @return list of result group identifiers
422      * @throws DoesNotExistException resultValueTypeKey not found
423      * @throws InvalidParameterException invalid resultValueTypeKey
424      * @throws MissingParameterException missing resultValueTypeKey
425      * @throws OperationFailedException unable to complete request
426      * @throws PermissionDeniedException authorization failure     
427      */
428     public List<String> getResultValueKeysByType(@WebParam(name = "resultValueTypeKey") String resultValueTypeKey,
429                                                  @WebParam(name = "contextInfo") ContextInfo contextInfo)
430             throws DoesNotExistException,
431             InvalidParameterException,
432             MissingParameterException,
433             OperationFailedException,
434             PermissionDeniedException;
435 
436     /**
437      * Retrieves a list of result value objects for a specified result
438      * values group. It is sorted by the scale inside the values group.
439      *
440      * @param resultValuesGroupKey identifier for the result values group
441      * @param contextInfo Context information containing the principalId
442      *                and locale information about the caller of service
443      *                operation     
444      * @return list of result group identifiers
445      * @throws DoesNotExistException resultValueKey not found
446      * @throws InvalidParameterException invalid resultValuesGroupKey
447      * @throws MissingParameterException missing resultValuesGroupKey
448      * @throws OperationFailedException unable to complete request
449      * @throws PermissionDeniedException authorization failure     
450      */
451     public List<ResultValueInfo> getResultValuesForResultValuesGroup(@WebParam(name = "resultValuesGroupKey") String resultValuesGroupKey,
452                                                                      @WebParam(name = "contextInfo") ContextInfo contextInfo)
453             throws DoesNotExistException,
454             InvalidParameterException,
455             MissingParameterException,
456             OperationFailedException,
457             PermissionDeniedException;
458 
459     /**
460      * Create a new result value 
461      * @param resultScaleKey scale to which this value is attached
462      * @param resultValueTypeKey type of the result value to be created
463      * @param resultValueInfo  info about the result value
464      * @param contextInfo Context information containing the principalId
465      *                and locale information about the caller of service
466      *                operation     
467      * @return newly created resultValue
468      * @throws AlreadyExistsException resultValue already exists
469      * @throws DataValidationErrorException one or more values invalid for 
470      *                                      this operation 
471      * @throws InvalidParameterException invalid resultValueInfo
472      * @throws MissingParameterException missing resultValueInfo
473      * @throws OperationFailedException unable to complete request
474      * @throws PermissionDeniedException authorization failure
475      */
476     public ResultValueInfo createResultValue(
477             @WebParam(name = "resultScaleKey") String resultScaleKey,
478             @WebParam(name = "resultValueTypeKey") String resultValueTypeKey,
479             @WebParam(name = "resultValueInfo") ResultValueInfo resultValueInfo,
480             @WebParam(name = "contextInfo") ContextInfo contextInfo)
481             throws AlreadyExistsException,
482             DataValidationErrorException,
483             DoesNotExistException,
484             InvalidParameterException,
485             MissingParameterException,
486             OperationFailedException,
487             PermissionDeniedException;
488 
489     /**
490      * Update a result value
491      * @param resultValueKey resultValueKey to be updated
492      * @param resultValueInfo update information for the result value
493      * @param contextInfo Context information containing the principalId
494      *                and locale information about the caller of service
495      *                operation     
496      * @return updated information about the result value
497      * @throws DataValidationErrorException one or more values invalid for 
498      *                                      this operation
499      * @throws DoesNotExistException resultValueKey does not exist
500      * @throws InvalidParameterException invalid resultValueKey, resultValueInfo
501      * @throws MissingParameterException missing resultValueKey, resultValueInfo
502      * @throws OperationFailedException unable to complete request
503      * @throws PermissionDeniedException authorization failure
504      * @throws VersionMismatchException action was attempted on an out of 
505      *                                  date version
506      */
507     public ResultValueInfo updateResultValue(@WebParam(name = "resultValueKey") String resultValueKey,
508                                              @WebParam(name = "resultValueInfo") ResultValueInfo resultValueInfo,
509                                              @WebParam(name = "contextInfo") ContextInfo contextInfo)
510             throws DataValidationErrorException,
511             DoesNotExistException,
512             InvalidParameterException,
513             MissingParameterException,
514             OperationFailedException,
515             PermissionDeniedException,
516             VersionMismatchException;
517 
518     /**
519      * Delete a result value. This should not be allowed if any result values group is still referencing the result value.
520      * @param resultValueKey result value to be deleted
521      * @param contextInfo Context information containing the principalId
522      *                and locale information about the caller of service
523      *                operation
524      * @return status of the delete operation
525      * @throws DoesNotExistException resultValueKey does not exist
526      * @throws DependentObjectsExistException if a group is tied to this value
527      * @throws InvalidParameterException  invalid resultValueKey
528      * @throws MissingParameterException missing resultValueKey
529      * @throws OperationFailedException unable to complete request
530      * @throws PermissionDeniedException authorization failure
531      */
532     public StatusInfo deleteResultValue(@WebParam(name = "resultValueKey") String resultValueKey,
533                                         @WebParam(name = "contextInfo") ContextInfo contextInfo)
534             throws DoesNotExistException,
535             DependentObjectsExistException,
536             InvalidParameterException,
537             MissingParameterException,
538             OperationFailedException,
539             PermissionDeniedException;
540 
541     /**
542      * Validates a Result Value. Depending on the value of
543      * validationType, this validation could be limited to tests on
544      * just the current object and its directly contained subobjects
545      * or expanded to perform all tests related to this object. If an
546      * identifier is present for the academic calendar and a record
547      * is found for that identifier, the validation checks if the
548      * academic calendar can be shifted to the new values. If a
549      * record cannot be found for the identifier, it is assumed that
550      * the record does not exist and as such, the checks performed
551      * will be much shallower, typically mimicking those performed by
552      * setting the validationType to the current object. This is a
553      * slightly different pattern from the standard validation as the
554      * caller provides the identifier in the create statement instead
555      * of the server assigning an identifier.
556      *
557      * @param validationType  Identifier of the extent of validation
558      * @param resultValueInfo Result value to be validated
559      * @param contextInfo Context information containing the principalId
560      *                and locale information about the caller of service
561      *                operation
562      * @return a ValidationResultInfo
563      * @throws DoesNotExistException resultValueInfo does not exist
564      * @throws InvalidParameterException validationType or resultValueInfo 
565      *                                   does not exist
566      * @throws MissingParameterException missing validationType or resultValueInfo
567      * @throws OperationFailedException unable to complete request
568      */
569     public List<ValidationResultInfo> validateResultValue(@WebParam(name = "validationType") String validationType,
570                                                           @WebParam(name = "resultValueInfo") ResultValueInfo resultValueInfo,
571                                                           @WebParam(name = "contextInfo") ContextInfo contextInfo)
572             throws DoesNotExistException,
573             InvalidParameterException,
574             MissingParameterException,
575             OperationFailedException;
576 
577     /**
578      * Get or create a new result value holding the specified numeric value within the range
579      *
580      * The resulting result value should be attached to the specified group and must be within 
581      * the range of the group
582      *
583      * @param resultValue the result value within the specified group range to be found/created
584      * @param scaleKey the with associated with this value
585      * @param contextInfo Context information containing the principalId
586      *                and locale information about the caller of service
587      *                operation     
588      * @return the result value group information
589      * @throws InvalidParameterException invalid scaleKey or scaleKey is not a range
590      * @throws MissingParameterException missing resultValuesGroupInfo
591      * @throws OperationFailedException unable to complete request
592      * @throws PermissionDeniedException authorization failure
593      * @impl the parameters hold string representations of floating points to avoid rounding issues
594      */
595     @Override
596     public ResultValueInfo getCreateResultValueForScale(@WebParam(name = "resultValue") String resultValue,
597                                                         @WebParam(name = "scaleKey") String scaleKey,
598                                                         @WebParam(name = "contextInfo") ContextInfo contextInfo)
599             throws InvalidParameterException,
600             MissingParameterException,
601             OperationFailedException,
602             PermissionDeniedException;
603 
604     /**
605      * Retrieves result scale by an identifier.
606      *
607      * @param resultScaleKey identifiers for result scale to be retrieved
608      * @param contextInfo Context information containing the principalId
609      *                and locale information about the caller of service
610      *                operation     
611      * @return details of the result scale for the id
612      * @throws DoesNotExistException  resultValuesGroupKey not found
613      * @throws InvalidParameterException invalid resultValuesGroupKey
614      * @throws MissingParameterException invalid resultValuesGroupKey
615      * @throws OperationFailedException unable to complete request
616      * @throws PermissionDeniedException authorization failure
617      */
618     public ResultScaleInfo getResultScale(@WebParam(name = "resultScaleKey") String resultScaleKey,
619                                           @WebParam(name = "contextInfo") ContextInfo contextInfo)
620             throws DoesNotExistException,
621             InvalidParameterException,
622             MissingParameterException,
623             OperationFailedException,
624             PermissionDeniedException;
625 
626     /**
627      * Retrieves result scales by a list of identifiers.
628      *
629      * @param resultScaleKeys  identifiers for result scale
630      * @param contextInfo Context information containing the principalId
631      *                and locale information about the caller of service
632      *                operation     
633      * @return result scale list
634      * @throws DoesNotExistException resultScale not found
635      * @throws InvalidParameterException invalid resultScaleKeys
636      * @throws MissingParameterException invalid resultScaleKeys
637      * @throws OperationFailedException unable to complete request
638      * @throws PermissionDeniedException authorization failure
639      */
640     public List<ResultScaleInfo> getResultScalesByKeys(@WebParam(name = "resultScaleKeys") List<String> resultScaleKeys,
641                                                        @WebParam(name = "contextInfo") ContextInfo contextInfo)
642             throws DoesNotExistException,
643             InvalidParameterException,
644             MissingParameterException,
645             OperationFailedException,
646             PermissionDeniedException;
647 
648     /**
649      * Retrieves a list of result group identifiers for a specified
650      * result scale type.
651      *
652      * @param resultScaleTypeKey identifier for the result group type
653      * @param contextInfo Context information containing the principalId
654      *                and locale information about the caller of service
655      *                operation     
656      * @return list of result group identifiers
657      * @throws DoesNotExistException resultScaleTypeKey not found
658      * @throws InvalidParameterException invalid resultScaleTypeKey
659      * @throws MissingParameterException missing resultScaleTypeKey
660      * @throws OperationFailedException unable to complete request
661      * @throws PermissionDeniedException authorization failure     
662      */
663     public List<String> getResultScaleKeysByType(@WebParam(name = "resultScaleTypeKey") String resultScaleTypeKey,
664                                                  @WebParam(name = "contextInfo") ContextInfo contextInfo)
665             throws DoesNotExistException,
666             InvalidParameterException,
667             MissingParameterException,
668             OperationFailedException,
669             PermissionDeniedException;
670 
671     /**
672      * Creates a new result scale.
673      *
674      * @param resultScaleTypeKey type key of the result scale
675      * @param resultScaleInfo information about the result scale 
676      *        being created
677      * @param contextInfo Context information containing the principalId
678      *                and locale information about the caller of service
679      *                operation     
680      * @return create result scale information
681      * @throws AlreadyExistsException result scale already exists
682      * @throws DataValidationErrorException one or more values invalid for 
683      *         this operation
684      * @throws InvalidParameterException invalid resultScaleInfo
685      * @throws MissingParameterException missing resultScaleInfo
686      * @throws OperationFailedException unable to complete request
687      * @throws PermissionDeniedException authorization failure
688      */
689     public ResultScaleInfo createResultScale(@WebParam(name = "resultScaleTypeKey") String resultScaleTypeKey,
690                                              @WebParam(name = "resultGroupInfo") ResultScaleInfo resultScaleInfo,
691                                              @WebParam(name = "contextInfo") ContextInfo contextInfo)
692             throws AlreadyExistsException,
693             DataValidationErrorException,
694             InvalidParameterException,
695             MissingParameterException,
696             OperationFailedException,
697             PermissionDeniedException;
698 
699     /**
700      * Updates an existing result scale.
701      *
702      * @param resultScaleKey identifier of the result scale to update
703      * @param resultGroupInfo updated information about the result scale
704      * @param contextInfo Context information containing the principalId
705      *                and locale information about the caller of service
706      *                operation     
707      * @return updated result scale information
708      * @throws DataValidationErrorException one or more values invalid for 
709      *                                      this operation
710      * @throws DoesNotExistException resultScaleKey not found
711      * @throws InvalidParameterExceptioninvalid resultScaleKey or 
712      *                                          resultScaleInfo
713      * @throws MissingParameterException missing resultScaleKey or
714      *                                   resultScaleInfo
715      * @throws OperationFailedException unable to complete request
716      * @throws PermissionDeniedException authorization failure
717      * @throws VersionMismatchException action was attempted on an out of 
718      *                                  date version
719      */
720     public ResultScaleInfo updateResultScale(@WebParam(name = "resultScaleKey") String resultScaleKey,
721                                              @WebParam(name = "resultScaleInfo") ResultScaleInfo resultScaleInfo,
722                                              @WebParam(name = "contextInfo") ContextInfo contextInfo)
723             throws DataValidationErrorException,
724             DoesNotExistException,
725             InvalidParameterException,
726             MissingParameterException,
727             OperationFailedException,
728             PermissionDeniedException,
729             VersionMismatchException;
730 
731     /**
732      * Deletes an existing result scale.
733      *
734      * @param resultScaleKey identifier of the result scale to update
735      * @param contextInfo Context information containing the principalId
736      *                and locale information about the caller of service
737      *                operation     
738      * @return status of the operation
739      * @throws DoesNotExistException resultScaleKey not found
740      * @throws DependentObjectsExistException if a group or value exists for this scale
741      * @throws InvalidParameterException invalid resultScaleKey
742      * @throws MissingParameterException missing resultScaleKey
743      * @throws OperationFailedException unable to complete request
744      * @throws PermissionDeniedException authorization failure
745      */
746     public StatusInfo deleteResultScale(@WebParam(name = "resultScaleKey") String resultScaleKey,
747                                         @WebParam(name = "contextInfo") ContextInfo contextInfo)
748             throws DoesNotExistException,
749             DependentObjectsExistException,
750             InvalidParameterException,
751             MissingParameterException,
752             OperationFailedException,
753             PermissionDeniedException;
754 
755     /**
756      * Validates a result scale. Depending on the value of
757      * validationType, this validation could be limited to tests on
758      * just the current object and its directly contained sub-objects
759      * or expanded to perform all tests related to this object. 
760      *
761      * @param validationType Identifier of the extent of validation
762      * @param gradeScaleInfo Result scale to be validated
763      * @param contextInfo Context information containing the principalId
764      *                and locale information about the caller of service
765      *                operation
766      * @return
767      * @throws DoesNotExistException resultScaleInfo does not exist
768      * @throws InvalidParameterException validationType or 
769      *                                   resultScaleInfo does not exist
770      * @throws MissingParameterException missing validationType, resultScaleInfo
771      * @throws OperationFailedException unable to complete request
772      */
773     public List<ValidationResultInfo> validateResultScale(@WebParam(name = "validationType") String validationType,
774                                                           @WebParam(name = "gradeScaleInfo") ResultScaleInfo gradeScaleInfo,
775                                                           @WebParam(name = "contextInfo") ContextInfo contextInfo)
776             throws DoesNotExistException,
777             InvalidParameterException,
778             MissingParameterException,
779             OperationFailedException;
780 
781     /**
782      * Retrieves result values by result scale key.
783      *
784      * @param resultScaleKey key to the scale 
785      * @param contextInfo Context information containing the principalId
786      *                and locale information about the caller of service
787      *                operation
788      * @return a list of result values for the scale
789      * @throws DoesNotExistException resultScaleKey is not found
790      * @throws InvalidParameterException invalid resultScaleKey
791      * @throws MissingParameterException null resultScaleKey
792      * @throws OperationFailedException unable to complete request
793      * @throws PermissionDeniedException authorization failure
794      */
795     public List<ResultValueInfo> getResultValuesForScale(@WebParam(name = "resultScaleKey") String resultScaleKey,
796                                                          @WebParam(name = "contextInfo") ContextInfo contextInfo)
797             throws DoesNotExistException,
798             InvalidParameterException,
799             MissingParameterException,
800             OperationFailedException,
801             PermissionDeniedException;
802 
803     /**
804      * Retrieves a result value by result scale key and value
805      *
806      * @param resultScaleKey key to the scale
807      * @param value the specific value
808      * @param contextInfo Context information containing the principalId
809      *                and locale information about the caller of service
810      *                operation
811      * @return the matching Result Value
812      * @throws DoesNotExistException resultScaleKey is not found
813      * @throws InvalidParameterException invalid resultScaleKey
814      * @throws MissingParameterException null resultScaleKey
815      * @throws OperationFailedException unable to complete request
816      * @throws PermissionDeniedException authorization failure
817      */
818     public ResultValueInfo getResultValueForScaleAndValue(@WebParam(name = "resultScaleKey") String resultScaleKey,
819                                                           @WebParam(name = "value") String value,
820                                                           @WebParam(name = "contextInfo") ContextInfo contextInfo)
821             throws DoesNotExistException,
822             InvalidParameterException,
823             MissingParameterException,
824             OperationFailedException,
825             PermissionDeniedException;
826 
827     /**
828      * Retrieves result values for the list of Result values groups.
829      *
830      * No values are selected for groups that are RANGES.
831      *
832      * @param resultValuesGroupKeys list of result value groups for which to return values
833      * @param contextInfo Context information containing the principalId
834      *                and locale information about the caller of service
835      *                operation
836      * @return a list of unique result values for that set of groups
837      * @throws DoesNotExistException resultScaleKey is not found
838      * @throws InvalidParameterException invalid resultScaleKey
839      * @throws MissingParameterException null resultScaleKey
840      * @throws OperationFailedException unable to complete request
841      * @throws PermissionDeniedException authorization failure
842      */
843     public List<ResultValueInfo> getResultValuesForResultValuesGroups(@WebParam(name = "resultValuesGroupKeys") List<String> resultValuesGroupKeys,
844                                                                       @WebParam(name = "contextInfo") ContextInfo contextInfo)
845             throws DoesNotExistException,
846             InvalidParameterException,
847             MissingParameterException,
848             OperationFailedException,
849             PermissionDeniedException;
850 
851     /**
852      * Retrieves a list of existing result values groups that have a scale
853      * of the specified type.
854      *
855      * @param resultScaleTypeKey identifier for result scale type key
856      * @param contextInfo Context information containing the principalId
857      *                and locale information about the caller of service
858      *                operation
859      * @return details of the results for these keys
860      * @throws DoesNotExistException resultValue not found
861      * @throws InvalidParameterException invalid resultValueKey
862      * @throws MissingParameterException invalid resultValueKey
863      * @throws OperationFailedException unable to complete request
864      * @throws PermissionDeniedException authorization failure
865      */
866     public List<ResultValuesGroupInfo> getResultValuesGroupsByResultScaleType(@WebParam(name = "resultScaleTypeKey") String resultScaleTypeKey,
867                                                                               @WebParam(name = "contextInfo") ContextInfo contextInfo)
868             throws DoesNotExistException,
869             InvalidParameterException,
870             MissingParameterException,
871             OperationFailedException,
872             PermissionDeniedException;
873     
874      
875     /**
876      * Searches for result scale ids using a free form search criteria.
877      *
878      * @param criteria
879      * @param context
880      * @return
881      * @throws InvalidParameterException
882      * @throws MissingParameterException
883      * @throws OperationFailedException
884      * @throws PermissionDeniedException
885      */
886     public List<String> searchForResultScaleIds(@WebParam(name = "criteria") QueryByCriteria criteria,
887             @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException,
888             OperationFailedException, PermissionDeniedException;
889 
890     /**
891      * Searches for result scales using a free form search criteria
892      *
893      * @param criteria
894      * @param context
895      * @throws InvalidParameterException
896      * @throws MissingParameterException
897      * @throws OperationFailedException
898      * @throws PermissionDeniedException
899      */
900     public List<ResultScaleInfo> searchForResultScales(@WebParam(name = "criteria") QueryByCriteria criteria,
901             @WebParam(name = "context") ContextInfo context)  throws InvalidParameterException, MissingParameterException,
902             OperationFailedException,PermissionDeniedException;
903     
904     
905      
906     /**
907      * Searches for result value ids using a free form search criteria.
908      *
909      * @param criteria
910      * @param context
911      * @return
912      * @throws InvalidParameterException
913      * @throws MissingParameterException
914      * @throws OperationFailedException
915      * @throws PermissionDeniedException
916      */
917     public List<String> searchForResultValueIds(@WebParam(name = "criteria") QueryByCriteria criteria,
918             @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException,
919             OperationFailedException, PermissionDeniedException;
920 
921     /**
922      * Searches for result values using a free form search criteria
923      *
924      * @param criteria
925      * @param context
926      * @throws InvalidParameterException
927      * @throws MissingParameterException
928      * @throws OperationFailedException
929      * @throws PermissionDeniedException
930      */
931     public List<ResultValueInfo> searchForResultValues(@WebParam(name = "criteria") QueryByCriteria criteria,
932             @WebParam(name = "context") ContextInfo context)  throws InvalidParameterException, MissingParameterException,
933             OperationFailedException,PermissionDeniedException;
934     
935     
936      
937     /**
938      * Searches for result value group ids using a free form search criteria.
939      *
940      * @param criteria
941      * @param context
942      * @return
943      * @throws InvalidParameterException
944      * @throws MissingParameterException
945      * @throws OperationFailedException
946      * @throws PermissionDeniedException
947      */
948     public List<String> searchForResultValuesGroupIds(@WebParam(name = "criteria") QueryByCriteria criteria,
949             @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException,
950             OperationFailedException, PermissionDeniedException;
951 
952     /**
953      * Searches for result value groups using a free form search criteria
954      *
955      * @param criteria
956      * @param context
957      * @throws InvalidParameterException
958      * @throws MissingParameterException
959      * @throws OperationFailedException
960      * @throws PermissionDeniedException
961      */
962     public List<ResultValuesGroupInfo> searchForResultValuesGroups(@WebParam(name = "criteria") QueryByCriteria criteria,
963             @WebParam(name = "context") ContextInfo context)  throws InvalidParameterException, MissingParameterException,
964             OperationFailedException,PermissionDeniedException;
965     
966 }