View Javadoc
1   /**
2    * Copyright 2013 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the
5    * "License"); you may not use this file except in compliance with the
6    * License. You may obtain a copy of the License at
7    *
8    * http://www.osedu.org/licenses/ECL-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13   * implied. See the License for the specific language governing
14   * permissions and limitations under the License.
15   */
16  package org.kuali.student.enrollment.coursewaitlist.service;
17  
18  
19  import org.kuali.rice.core.api.criteria.QueryByCriteria;
20  import org.kuali.student.enrollment.courseregistration.dto.ActivityRegistrationInfo;
21  import org.kuali.student.enrollment.courseregistration.dto.CourseRegistrationInfo;
22  import org.kuali.student.enrollment.coursewaitlist.dto.CourseWaitListEntryInfo;
23  import org.kuali.student.enrollment.coursewaitlist.dto.CourseWaitListInfo;
24  import org.kuali.student.enrollment.coursewaitlist.dto.WaitListPositionInfo;
25  import org.kuali.student.r2.common.dto.ContextInfo;
26  import org.kuali.student.r2.common.dto.StatusInfo;
27  import org.kuali.student.r2.common.dto.ValidationResultInfo;
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.PermissionDeniedException;
34  import org.kuali.student.r2.common.exceptions.ReadOnlyException;
35  import org.kuali.student.r2.common.exceptions.VersionMismatchException;
36  import org.kuali.student.r2.common.util.constants.CourseWaitListServiceConstants;
37  
38  import javax.jws.WebParam;
39  import javax.jws.WebService;
40  import javax.jws.soap.SOAPBinding;
41  import java.util.List;
42  
43  /**
44   * Course wait lists provide a mechanism to queue and prioritize students with respect to an activity offering and format offering
45   * For example, students who are unable register for a course due to availability or student based course restrictions.
46   */
47  @WebService(name = "CourseWaitListService", targetNamespace = CourseWaitListServiceConstants.NAMESPACE)
48  @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
49  public interface CourseWaitListService {
50  
51      /**
52       * Retrieves a single CourseWaitList by CourseWaitList Id.
53       *
54       * @param courseWaitListId  the identifier for the CourseWaitList to be
55       *                    retrieved
56       * @param contextInfo information containing the principalId and
57       *                    locale information about the caller of service operation
58       * @return the CourseWaitList requested
59       * @throws DoesNotExistException     courseWaitListId not found
60       * @throws InvalidParameterException contextInfo is not valid
61       * @throws MissingParameterException courseWaitListId or contextInfo is missing or null
62       * @throws OperationFailedException  unable to complete request
63       * @throws PermissionDeniedException an authorization failure occurred
64       */
65      public CourseWaitListInfo getCourseWaitList(@WebParam(name = "courseWaitListId") String courseWaitListId,
66                                      @WebParam(name = "contextInfo") ContextInfo contextInfo)
67              throws DoesNotExistException,
68              InvalidParameterException,
69              MissingParameterException,
70              OperationFailedException,
71              PermissionDeniedException;
72  
73      /**
74       * Retrieves a list of CourseWaitLists from a list of CourseWaitList
75       * Ids. The returned list may be in any order and if duplicate Ids
76       * are supplied, a unique set may or may not be returned.
77       *
78       * @param courseWaitListIds a list of CourseWaitList Ids
79       * @param contextInfo information containing the principalId and
80       *                    locale information about the caller of service operation
81       * @return a list of CourseWaitList
82       * @throws DoesNotExistException     a courseWaitListId in the list not found
83       * @throws InvalidParameterException contextInfo is not valid
84       * @throws MissingParameterException courseWaitListIds, an id in
85       *                                   courseWaitListIds, or contextInfo is missing or null
86       * @throws OperationFailedException  unable to complete request
87       * @throws PermissionDeniedException an authorization failure occurred
88       */
89      public List<CourseWaitListInfo> getCourseWaitListsByIds(@WebParam(name = "courseWaitListIds") List<String> courseWaitListIds,
90                                                  @WebParam(name = "contextInfo") ContextInfo contextInfo)
91              throws DoesNotExistException,
92              InvalidParameterException,
93              MissingParameterException,
94              OperationFailedException,
95              PermissionDeniedException;
96  
97      /**
98       * Retrieves a list of CourseWaitList Ids by CourseWaitList type.
99       *
100      * @param courseWaitListTypeKey an identifier for the CourseWaitList
101      *                        type
102      * @param contextInfo     information containing the principalId and
103      *                        locale information about the caller of service operation
104      * @return a list of CourseWaitList Ids matching courseWaitListTypeKey
105      *         or an empty list if none found
106      * @throws InvalidParameterException contextInfo is invalid
107      * @throws MissingParameterException courseWaitListTypeKey or
108      *                                   contextInfo is missing or null
109      * @throws OperationFailedException  unable to complete request
110      * @throws PermissionDeniedException an authorization failure occurred
111      */
112     public List<String> getCourseWaitListIdsByType(@WebParam(name = "courseWaitListTypeKey") String courseWaitListTypeKey,
113                                              @WebParam(name = "contextInfo") ContextInfo contextInfo)
114             throws InvalidParameterException,
115             MissingParameterException,
116             OperationFailedException,
117             PermissionDeniedException;
118 
119     /**
120      * Retrieves all CourseWaitLists attached to the given activity offering Id.
121      *
122      * @param activityOfferingId the identifier for the attached activity offering
123      * @param contextInfo information containing the principalId and
124      *                    locale information about the caller of service operation
125      * @return a list of CourseWaitLists associated to the given activityOfferingId or an empty list if
126      *         none are found
127      * @throws InvalidParameterException contextInfo is not valid
128      * @throws MissingParameterException courseWaitListId or contextInfo is
129      *                                   missing or null
130      * @throws OperationFailedException  unable to complete request
131      * @throws PermissionDeniedException an authorization failure occurred
132      */
133     public List<CourseWaitListInfo> getCourseWaitListsByActivityOffering(@WebParam(name = "activityOfferingId") String activityOfferingId,
134                                                      @WebParam(name = "contextInfo") ContextInfo contextInfo)
135             throws InvalidParameterException,
136             MissingParameterException,
137             OperationFailedException,
138             PermissionDeniedException;
139 
140     /**
141      * Retrieves all CourseWaitLists directly attached to the given format offering Id.
142      *
143      * @param formatOfferingId the identifier for the attached format offering
144      * @param contextInfo information containing the principalId and
145      *                    locale information about the caller of service operation
146      * @return a list of CourseWaitLists associated to the given formatOfferingId or an empty list if
147      *         none are found
148      * @throws InvalidParameterException contextInfo is not valid
149      * @throws MissingParameterException courseWaitListId or contextInfo is
150      *                                   missing or null
151      * @throws OperationFailedException  unable to complete request
152      * @throws PermissionDeniedException an authorization failure occurred
153      */
154     public List<CourseWaitListInfo> getCourseWaitListsByFormatOffering(@WebParam(name = "formatOfferingId") String formatOfferingId,
155                                                                          @WebParam(name = "contextInfo") ContextInfo contextInfo)
156             throws InvalidParameterException,
157             MissingParameterException,
158             OperationFailedException,
159             PermissionDeniedException;
160 
161     /**
162      * Searches for CourseWaitList Ids that meet the given search criteria.
163      *
164      * @param criteria    the search criteria
165      * @param contextInfo information containing the principalId and
166      *                    locale information about the caller of service operation
167      * @return list of CourseWaitList identifiers matching the criteria
168      * @throws InvalidParameterException criteria or contextInfo is not valid
169      * @throws MissingParameterException criteria or contextInfo is
170      *                                   missing or null
171      * @throws OperationFailedException  unable to complete request
172      * @throws PermissionDeniedException an authorization failure occurred
173      */
174     public List<String> searchForCourseWaitListIds(@WebParam(name = "criteria") QueryByCriteria criteria,
175                                              @WebParam(name = "contextInfo") ContextInfo contextInfo)
176             throws InvalidParameterException,
177             MissingParameterException,
178             OperationFailedException,
179             PermissionDeniedException;
180 
181     /**
182      * Searches for CourseWaitList that meet the given search
183      * criteria.
184      *
185      * @param criteria    the search criteria
186      * @param contextInfo information containing the principalId and
187      *                    locale information about the caller of service operation
188      * @return list of CourseWaitLists matching the criteria
189      * @throws InvalidParameterException criteria or contextInfo is not valid
190      * @throws MissingParameterException criteria or contextInfo is
191      *                                   missing or null
192      * @throws OperationFailedException  unable to complete request
193      * @throws PermissionDeniedException an authorization failure occurred
194      */
195     public List<CourseWaitListInfo> searchForCourseWaitLists(@WebParam(name = "criteria") QueryByCriteria criteria,
196                                                  @WebParam(name = "contextInfo") ContextInfo contextInfo)
197             throws InvalidParameterException,
198             MissingParameterException,
199             OperationFailedException,
200             PermissionDeniedException;
201 
202     /**
203      * Validates a CourseWaitList. Depending on the value of
204      * validationType, this validation could be limited to tests on
205      * just the current object and its directly contained sub-objects
206      * or expanded to perform all tests related to this
207      * CourseWaitList. If an identifier is present for the CourseWaitList
208      * (and/or one of its contained sub-objects) and a record is found
209      * for that identifier, the validation checks if the CourseWaitList
210      * can be shifted to the new values. If a an identifier is not
211      * present or a record does not exist, the validation checks if
212      * the CourseWaitList with the given data can be created.
213      *
214      * @param validationTypeKey the identifier for the validation Type
215      * @param courseWaitListTypeKey   the identifier for the CourseWaitList
216      *                          Type to be validated
217      * @param courseWaitListInfo      the CourseWaitList to be validated
218      * @param contextInfo       information containing the principalId and
219      *                          locale information about the caller of service operation
220      * @return a list of validation results or an empty list if
221      *         validation succeeded
222      * @throws DoesNotExistException     validationTypeKey or
223      *                                   courseWaitListTypeKey is not found
224      * @throws InvalidParameterException courseWaitListInfo or
225      *                                   contextInfo is not valid
226      * @throws MissingParameterException validationTypeKey,
227      *                                   courseWaitListTypeKey, courseWaitListInfo, or contextInfo is
228      *                                   missing or null
229      * @throws OperationFailedException  unable to complete request
230      * @throws PermissionDeniedException an authorization failure occurred
231      */
232     public List<ValidationResultInfo> validateCourseWaitList(@WebParam(name = "validationTypeKey") String validationTypeKey,
233                                                        @WebParam(name = "courseWaitListTypeKey") String courseWaitListTypeKey,
234                                                        @WebParam(name = "courseWaitListInfo") CourseWaitListInfo courseWaitListInfo,
235                                                        @WebParam(name = "contextInfo") ContextInfo contextInfo)
236             throws DoesNotExistException,
237             InvalidParameterException,
238             MissingParameterException,
239             OperationFailedException,
240             PermissionDeniedException;
241 
242     /**
243      * Creates a new CourseWaitList. The CourseWaitList type key and Meta information may not be set
244      * in the supplied data object.
245      *
246      * @param courseWaitListTypeKey a unique identifier for the Type of
247      *                        the new CourseWaitList
248      * @param courseWaitListInfo    the data with which to create the CourseWaitList
249      * @param contextInfo     information containing the principalId and
250      *                        locale information about the caller of service operation
251      * @return the new CourseWaitList
252      * @throws DataValidationErrorException supplied data is invalid
253      * @throws DoesNotExistException        courseWaitListTypeKey does not exist or is
254      *                                      not supported
255      * @throws InvalidParameterException    courseWaitListInfo or
256      *                                      contextInfo is not valid
257      * @throws MissingParameterException    courseWaitListTypeKey,
258      *                                      courseWaitListInfo, or contextInfo is missing or null
259      * @throws OperationFailedException     unable to complete request
260      * @throws PermissionDeniedException    an authorization failure occurred
261      * @throws ReadOnlyException            an attempt at supplying information designated as read only
262      */
263     public CourseWaitListInfo createCourseWaitList(@WebParam(name = "courseWaitListTypeKey") String courseWaitListTypeKey,
264                                        @WebParam(name = "courseWaitListInfo") CourseWaitListInfo courseWaitListInfo,
265                                        @WebParam(name = "contextInfo") ContextInfo contextInfo)
266             throws DataValidationErrorException,
267             DoesNotExistException,
268             InvalidParameterException,
269             MissingParameterException,
270             OperationFailedException,
271             PermissionDeniedException,
272             ReadOnlyException;
273 
274     /**
275      * Updates an existing CourseWaitList. The CourseWaitList id, Type,
276      * and Meta information may not be changed.
277      *
278      * @param courseWaitListId   the identifier for the CourseWaitList to be
279      *                     updated
280      * @param courseWaitListInfo the new data for the CourseWaitList
281      * @param contextInfo  information containing the principalId and
282      *                     locale information about the caller of service operation
283      * @return the updated CourseWaitList
284      * @throws DataValidationErrorException supplied data is invalid
285      * @throws DoesNotExistException        courseWaitListId is not found
286      * @throws InvalidParameterException    courseWaitListInfo or
287      *                                      contextInfo is not valid
288      * @throws MissingParameterException    courseWaitListId,
289      *                                      courseWaitListInfo, or contextInfo is missing or null
290      * @throws OperationFailedException     unable to complete request
291      * @throws PermissionDeniedException    an authorization failure occurred
292      * @throws ReadOnlyException            an attempt at supplying information
293      *                                      designated as read only
294      * @throws VersionMismatchException     an optimistic locking failure or the action was attempted on an out of date version
295      */
296     public CourseWaitListInfo updateCourseWaitList(@WebParam(name = "courseWaitListId") String courseWaitListId,
297                                        @WebParam(name = "courseWaitListInfo") CourseWaitListInfo courseWaitListInfo,
298                                        @WebParam(name = "contextInfo") ContextInfo contextInfo)
299             throws DataValidationErrorException,
300             DoesNotExistException,
301             InvalidParameterException,
302             MissingParameterException,
303             OperationFailedException,
304             PermissionDeniedException,
305             ReadOnlyException,
306             VersionMismatchException;
307 
308     /**
309      * Changes the state of a CourseWaitList.
310      *
311      * @param courseWaitListId the Id of the CourseWaitList
312      * @param stateKey the identifier for the new State
313      * @param contextInfo information containing the principalId and
314      *        locale information about the caller of service operation
315      * @return the status of the change state operation. This must always be
316      *         true.
317      * @throws DoesNotExistException courseWaitListId not found or stateKey
318      *         not found in CourseWaitList Lifecycle
319      * @throws InvalidParameterException contextInfo is not valid
320      * @throws MissingParameterException courseWaitListId, stateKey, or
321      *         contextInfo is missing or null
322      * @throws OperationFailedException unable to complete request
323      * @throws PermissionDeniedException an authorization failure occurred
324      */
325     public StatusInfo changeCourseWaitListState(@WebParam(name = "courseWaitListId") String courseWaitListId,
326                                           @WebParam(name = "stateKey") String stateKey,
327                                           @WebParam(name = "contextInfo") ContextInfo contextInfo)
328             throws DoesNotExistException,
329             InvalidParameterException,
330             MissingParameterException,
331             OperationFailedException,
332             PermissionDeniedException;
333 
334     /**
335      * Deletes an existing CourseWaitList.
336      *
337      * @param courseWaitListId  the identifier for the CourseWaitList to be
338      *                    deleted
339      * @param contextInfo information containing the principalId and
340      *                    locale information about the caller of service operation
341      * @return the status of the operation. This must always be true.
342      * @throws DoesNotExistException     courseWaitListId is not found
343      * @throws InvalidParameterException contextInfo is not valid
344      * @throws MissingParameterException courseWaitListId or contextInfo
345      *                                   is missing or null
346      * @throws OperationFailedException  unable to complete request
347      * @throws PermissionDeniedException an authorization failure occurred
348      */
349     public StatusInfo deleteCourseWaitList(@WebParam(name = "courseWaitListId") String courseWaitListId,
350                                      @WebParam(name = "contextInfo") ContextInfo contextInfo)
351             throws DoesNotExistException,
352             InvalidParameterException,
353             MissingParameterException,
354             OperationFailedException,
355             PermissionDeniedException;
356 
357 
358     /**
359      * Retrieves a single CourseWaitListEntry by CourseWaitListEntry Id.
360      *
361      * @param courseWaitListEntryId the identifier for the CourseWaitListEntry to be
362      *                        retrieved
363      * @param contextInfo     information containing the principalId and
364      *                        locale information about the caller of service operation
365      * @return the CourseWaitListEntry requested
366      * @throws DoesNotExistException     courseWaitListEntryId not found
367      * @throws InvalidParameterException contextInfo is not valid
368      * @throws MissingParameterException courseWaitListEntryId or contextInfo is missing or null
369      * @throws OperationFailedException  unable to complete request
370      * @throws PermissionDeniedException an authorization failure occurred
371      */
372     public CourseWaitListEntryInfo getCourseWaitListEntry(@WebParam(name = "courseWaitListEntryId") String courseWaitListEntryId,
373                                               @WebParam(name = "contextInfo") ContextInfo contextInfo)
374             throws DoesNotExistException,
375             InvalidParameterException,
376             MissingParameterException,
377             OperationFailedException,
378             PermissionDeniedException;
379 
380     /**
381      * Retrieves a list of CourseWaitListEntries from a list of CourseWaitListEntry
382      * Ids. The returned list may be in any order and if duplicate Ids
383      * are supplied, a unique set may or may not be returned.
384      *
385      * @param courseWaitListEntryIds a list of CourseWaitListEntry Ids
386      * @param contextInfo      information containing the principalId and
387      *                         locale information about the caller of service operation
388      * @return a list of CourseWaitListEntries
389      * @throws DoesNotExistException     an courseWaitListEntryId in the list not found
390      * @throws InvalidParameterException contextInfo is not valid
391      * @throws MissingParameterException courseWaitListEntryIds, an id in
392      *                                   courseWaitListEntryIds, or contextInfo is missing or null
393      * @throws OperationFailedException  unable to complete request
394      * @throws PermissionDeniedException an authorization failure occurred
395      */
396     public List<CourseWaitListEntryInfo> getCourseWaitListEntriesByIds(@WebParam(name = "courseWaitListEntryIds") List<String> courseWaitListEntryIds,
397                                                            @WebParam(name = "contextInfo") ContextInfo contextInfo)
398             throws DoesNotExistException,
399             InvalidParameterException,
400             MissingParameterException,
401             OperationFailedException,
402             PermissionDeniedException;
403 
404     /**
405      * Retrieves a list of CourseWaitListEntry Ids by CourseWaitListEntry Type.
406      *
407      * @param courseWaitListEntryTypeKey an identifier for the CourseWaitListEntry
408      *                             type
409      * @param contextInfo          information containing the principalId and
410      *                             locale information about the caller of service operation
411      * @return a list of CourseWaitListEntry Ids matching courseWaitListEntryTypeKey
412      *         or an empty list if none found
413      * @throws InvalidParameterException contextInfo is invalid
414      * @throws MissingParameterException courseWaitListEntryTypeKey or
415      *                                   contextInfo is missing or null
416      * @throws OperationFailedException  unable to complete request
417      * @throws PermissionDeniedException an authorization failure occurred
418      */
419     public List<String> getCourseWaitListEntryIdsByType(@WebParam(name = "courseWaitListEntryTypeKey") String courseWaitListEntryTypeKey,
420                                                   @WebParam(name = "contextInfo") ContextInfo contextInfo)
421             throws InvalidParameterException,
422             MissingParameterException,
423             OperationFailedException,
424             PermissionDeniedException;
425 
426     /**
427      * Retrieves the CourseWaitListEntries associated with the given Student Id.
428      *
429      * @param studentId   the identifier for the Student
430      * @param contextInfo information containing the principalId and
431      *                    locale information about the caller of service operation
432      * @return The CourseWaitListEntry associated with the given Student Id
433      * @throws InvalidParameterException contextInfo is not valid
434      * @throws MissingParameterException studentId or contextInfo is
435      *                                   missing or null
436      * @throws OperationFailedException  unable to complete request
437      * @throws PermissionDeniedException an authorization failure occurred
438      */
439     public List<CourseWaitListEntryInfo> getCourseWaitListEntriesByStudent(@WebParam(name = "studentId") String studentId,
440                                                                @WebParam(name = "contextInfo") ContextInfo contextInfo)
441             throws InvalidParameterException,
442             MissingParameterException,
443             OperationFailedException,
444             PermissionDeniedException;
445 
446     /**
447      * Retrieves the CourseWaitListEntries associated with the given CourseWaitList Id.
448      * The returned list will be ordered by CourseWaitListEntryInfo.order starting with order 1.
449      *
450      * @param courseWaitListId  the identifier for the CourseWaitList
451      * @param contextInfo information containing the principalId and
452      *                    locale information about the caller of service operation
453      * @return The CourseWaitListEntry associated with the given CourseWaitList Id
454      * @throws InvalidParameterException contextInfo is not valid
455      * @throws MissingParameterException courseWaitListId or contextInfo is
456      *                                   missing or null
457      * @throws OperationFailedException  unable to complete request
458      * @throws PermissionDeniedException an authorization failure occurred
459      */
460     public List<CourseWaitListEntryInfo> getCourseWaitListEntriesByCourseWaitList(@WebParam(name = "courseWaitListId") String courseWaitListId,
461                                                                 @WebParam(name = "contextInfo") ContextInfo contextInfo)
462             throws InvalidParameterException,
463             MissingParameterException,
464             OperationFailedException,
465             PermissionDeniedException;
466 
467     /**
468      * Retrieves the CourseWaitListEntries associated with the given CourseWaitList Id and Student Id.
469      *
470      * @param courseWaitListId  the identifier for the CourseWaitList
471      * @param studentId   the identifier for the Student
472      * @param contextInfo information containing the principalId and
473      *                    locale information about the caller of service operation
474      * @return The CourseWaitListEntry associated with the given CourseWaitList Id and Student Id
475      * @throws InvalidParameterException contextInfo is not valid
476      * @throws MissingParameterException courseWaitListId or contextInfo is
477      *                                   missing or null
478      * @throws OperationFailedException  unable to complete request
479      * @throws PermissionDeniedException an authorization failure occurred
480      */
481     public List<CourseWaitListEntryInfo> getCourseWaitListEntriesByCourseWaitListAndStudent(@WebParam(name = "courseWaitListId") String courseWaitListId,
482                                                                           @WebParam(name = "studentId") String studentId,
483                                                                           @WebParam(name = "contextInfo") ContextInfo contextInfo)
484             throws InvalidParameterException,
485             MissingParameterException,
486             OperationFailedException,
487             PermissionDeniedException;
488 
489 
490     /**
491      * Searches for CourseWaitListEntry Ids that meet the given search criteria.
492      *
493      * @param criteria    the search criteria
494      * @param contextInfo information containing the principalId and
495      *                    locale information about the caller of service operation
496      * @return list of CourseWaitListEntry identifiers matching the criteria
497      * @throws InvalidParameterException criteria or contextInfo is not valid
498      * @throws MissingParameterException criteria or contextInfo is
499      *                                   missing or null
500      * @throws OperationFailedException  unable to complete request
501      * @throws PermissionDeniedException an authorization failure occurred
502      */
503     public List<String> searchForCourseWaitListEntryIds(@WebParam(name = "criteria") QueryByCriteria criteria,
504                                                   @WebParam(name = "contextInfo") ContextInfo contextInfo)
505             throws InvalidParameterException,
506             MissingParameterException,
507             OperationFailedException,
508             PermissionDeniedException;
509 
510     /**
511      * Searches for CourseWaitListEntries that meet the given search
512      * criteria.
513      *
514      * @param criteria    the search criteria
515      * @param contextInfo information containing the principalId and
516      *                    locale information about the caller of service operation
517      * @return list of CourseWaitListEntries matching the criteria
518      * @throws InvalidParameterException criteria or contextInfo is not valid
519      * @throws MissingParameterException criteria or contextInfo is
520      *                                   missing or null
521      * @throws OperationFailedException  unable to complete request
522      * @throws PermissionDeniedException an authorization failure occurred
523      */
524     public List<CourseWaitListEntryInfo> searchForCourseWaitListEntries(@WebParam(name = "criteria") QueryByCriteria criteria,
525                                                             @WebParam(name = "contextInfo") ContextInfo contextInfo)
526             throws InvalidParameterException,
527             MissingParameterException,
528             OperationFailedException,
529             PermissionDeniedException;
530 
531     /**
532      * Validates a CourseWaitListEntry. Depending on the value of validationType,
533      * this validation could be limited to tests on just the current Relationship
534      * and its directly contained sub-objects or expanded to perform all tests
535      * related to this Relationship. If an identifier is present for the
536      * Relationship (and/or one of its contained sub-objects) and a record is
537      * found for that identifier, the validation checks if the Relationship
538      * can be updated to the new values. If an identifier is not
539      * present or a record does not exist, the validation checks if the
540      * object with the given data can be created.
541      *
542      * @param validationTypeKey    the identifier for the validation Type
543      * @param courseWaitListId the identifier for the CourseWaitList that this entry is attached to.
544      * @param studentId the identifier for the student that this entry is attached to.
545      * @param courseWaitListEntryTypeKey the identifier for the CourseWaitListEntry
546      *                             Type to be validated
547      * @param courseWaitListEntryInfo    the CourseWaitListEntry to be validated
548      * @param contextInfo          information containing the principalId and
549      *                             locale information about the caller of service operation
550      * @return a list of validation results or an empty list if
551      *         validation succeeded
552      * @throws DoesNotExistException     validationTypeKey, courseWaitListId, studentId, or
553      *                                   courseWaitListEntryTypeKey is not found
554      * @throws InvalidParameterException courseWaitListEntryInfo or
555      *                                   contextInfo is not valid
556      * @throws MissingParameterException validationTypeKey,
557      *                                   courseWaitListEntryTypeKey, courseWaitListEntryInfo, or contextInfo is
558      *                                   missing or null
559      * @throws OperationFailedException  unable to complete request
560      * @throws PermissionDeniedException an authorization failure occurred
561      */
562     public List<ValidationResultInfo> validateCourseWaitListEntry(@WebParam(name = "validationTypeKey") String validationTypeKey,
563                                                             @WebParam(name = "courseWaitListId") String courseWaitListId,
564                                                             @WebParam(name = "studentId") String studentId,
565                                                             @WebParam(name = "courseWaitListEntryTypeKey") String courseWaitListEntryTypeKey,
566                                                             @WebParam(name = "courseWaitListEntryInfo") CourseWaitListEntryInfo courseWaitListEntryInfo,
567                                                             @WebParam(name = "contextInfo") ContextInfo contextInfo)
568             throws DoesNotExistException,
569             InvalidParameterException,
570             MissingParameterException,
571             OperationFailedException,
572             PermissionDeniedException;
573 
574     /**
575      * Creates a new CourseWaitListEntry. The order of any other entries that are affected by this
576      * addition are adjusted. For example, inserting a student at the third
577      * order of a list with more than three entries would cause all
578      * existing entries at order three and greater to have their orders
579      * increased by one.
580      * <p/>
581      * The CourseWaitList Id, student Id, CourseWaitListEntry type key, and Meta information may not be set in the supplied data object.
582      *
583      * @param courseWaitListId The CourseWaitList that this entry belongs to
584      * @param studentId The student that will be on the CourseWaitList.
585      * @param courseWaitListEntryTypeKey a unique identifier for the Type of
586      *                             the new CourseWaitListEntry
587      * @param courseWaitListEntryInfo    the data with which to create the CourseWaitListEntry
588      * @param contextInfo          information containing the principalId and
589      *                             locale information about the caller of service operation
590      * @return the new CourseWaitListEntry
591      * @throws DataValidationErrorException supplied data is invalid
592      * @throws DoesNotExistException        courseWaitListEntryTypeKey does not exist or is
593      *                                      not supported
594      * @throws InvalidParameterException    courseWaitListEntryInfo or
595      *                                      contextInfo is not valid
596      * @throws MissingParameterException    courseWaitListEntryTypeKey,
597      *                                      courseWaitListEntryInfo, or contextInfo is missing or null
598      * @throws OperationFailedException     unable to complete request
599      * @throws PermissionDeniedException    an authorization failure occurred
600      * @throws ReadOnlyException            an attempt at supplying information designated as read only
601      */
602     public CourseWaitListEntryInfo createCourseWaitListEntry(@WebParam(name = "courseWaitListId") String courseWaitListId,
603                                                  @WebParam(name = "studentId") String studentId,
604                                                  @WebParam(name = "courseWaitListEntryTypeKey") String courseWaitListEntryTypeKey,
605                                                  @WebParam(name = "courseWaitListEntryInfo") CourseWaitListEntryInfo courseWaitListEntryInfo,
606                                                  @WebParam(name = "contextInfo") ContextInfo contextInfo)
607             throws DataValidationErrorException,
608             DoesNotExistException,
609             InvalidParameterException,
610             MissingParameterException,
611             OperationFailedException,
612             PermissionDeniedException,
613             ReadOnlyException;
614 
615     /**
616      * Updates an existing CourseWaitListEntry. The CourseWaitListEntry id, Type, CourseWaitList id,
617      * and Meta information may not be changed.
618      *
619      * To update the order please use the operation reorderCourseWaitListEntries
620      *
621      * @param courseWaitListEntryId   the identifier for the CourseWaitListEntry to be
622      *                          updated
623      * @param courseWaitListEntryInfo the new data for the CourseWaitListEntry
624      * @param contextInfo       information containing the principalId and
625      *                          locale information about the caller of service operation
626      * @return the updated CourseWaitListEntry
627      * @throws DataValidationErrorException supplied data is invalid
628      * @throws DoesNotExistException        courseWaitListEntryId is not found
629      * @throws InvalidParameterException    courseWaitListEntryInfo or
630      *                                      contextInfo is not valid
631      * @throws MissingParameterException    courseWaitListEntryId,
632      *                                      courseWaitListEntryInfo, or contextInfo is missing or null
633      * @throws OperationFailedException     unable to complete request
634      * @throws PermissionDeniedException    an authorization failure occurred
635      * @throws ReadOnlyException            an attempt at supplying information
636      *                                      designated as read only
637      * @throws VersionMismatchException     an optimistic locking failure or the action was attempted on an out of date version
638      */
639     public CourseWaitListEntryInfo updateCourseWaitListEntry(@WebParam(name = "courseWaitListEntryId") String courseWaitListEntryId,
640                                                  @WebParam(name = "courseWaitListEntryInfo") CourseWaitListEntryInfo courseWaitListEntryInfo,
641                                                  @WebParam(name = "contextInfo") ContextInfo contextInfo)
642             throws DataValidationErrorException,
643             DoesNotExistException,
644             InvalidParameterException,
645             MissingParameterException,
646             OperationFailedException,
647             PermissionDeniedException,
648             ReadOnlyException,
649             VersionMismatchException;
650 
651 
652     /**
653      * Changes the state of a CourseWaitListEntry.
654      *
655      * @param courseWaitListEntryId the Id of the CourseWaitListEntry
656      * @param stateKey the identifier for the new State
657      * @param contextInfo information containing the principalId and
658      *        locale information about the caller of service operation
659      * @return the status of the change state operation. This must always be
660      *         true.
661      * @throws DoesNotExistException courseWaitListEntryId not found or stateKey
662      *         not found in CourseWaitListEntry Lifecycle
663      * @throws InvalidParameterException contextInfo is not valid
664      * @throws MissingParameterException courseWaitListEntryId, stateKey, or
665      *         contextInfo is missing or null
666      * @throws OperationFailedException unable to complete request
667      * @throws PermissionDeniedException an authorization failure occurred
668      */
669     public StatusInfo changeCourseWaitListEntryState(@WebParam(name = "courseWaitListEntryId") String courseWaitListEntryId,
670                                                @WebParam(name = "stateKey") String stateKey,
671                                                @WebParam(name = "contextInfo") ContextInfo contextInfo)
672             throws DoesNotExistException,
673             InvalidParameterException,
674             MissingParameterException,
675             OperationFailedException,
676             PermissionDeniedException;
677 
678     /**
679      * Deletes an existing CourseWaitListEntry.
680      *
681      * @param courseWaitListEntryId the identifier for the CourseWaitListEntry to be
682      *                        deleted
683      * @param contextInfo     information containing the principalId and
684      *                        locale information about the caller of service operation
685      * @return the status of the operation. This must always be true.
686      * @throws DoesNotExistException     courseWaitListEntryId is not found
687      * @throws InvalidParameterException contextInfo is not valid
688      * @throws MissingParameterException courseWaitListEntryId or contextInfo
689      *                                   is missing or null
690      * @throws OperationFailedException  unable to complete request
691      * @throws PermissionDeniedException an authorization failure occurred
692      */
693     public StatusInfo deleteCourseWaitListEntry(@WebParam(name = "courseWaitListEntryId") String courseWaitListEntryId,
694                                           @WebParam(name = "contextInfo") ContextInfo contextInfo)
695             throws DoesNotExistException,
696             InvalidParameterException,
697             MissingParameterException,
698             OperationFailedException,
699             PermissionDeniedException;
700 
701     /**
702      * Reorders the CourseWaitListEntries contained in a CourseWaitList.
703      * Essentially this just adjusts the order of the entries relative to each other.
704      * Causes the entries not in the list to the have a higher order (lower priority) than all of the entries given.
705      *
706      * It is important to note that this reordering is stable for any entries not given - entries not given will
707      * have the same order relative to each other.
708      *
709      * For example, given a course wait list with five entries (1, 2, 3, 4, 5) a call
710      * to reorderCourseWaitListEntries with (3, 2) would reorder the course wait list as (3, 2, 1, 4, 5).
711      *
712      * @param courseWaitListId the Id of the course wait list that all of the course wait list entries belong to.
713      * @param courseWaitListEntryIds a list of CourseWaitListEntry Ids
714      * @param contextInfo information containing the principalId and
715      * locale information about the caller of service operation
716      * @return the status of the operation. This must always be true.
717      * @throws DoesNotExistException courseWaitListId is not found or one of the courseWaitListEntryIds given is not found
718      * @throws InvalidParameterException One or more of the given courseWaitListEntryIds is not on the given courseWaitList
719      * or the contextInfo is not valid
720      * @throws MissingParameterException Missing waitlistIds, courseWaitListEntryIds, or contextInfo
721      * @throws OperationFailedException Unable to complete request
722      * @throws PermissionDeniedException Not authorized to do this operation
723      */
724     public StatusInfo reorderCourseWaitListEntries(@WebParam(name = "courseWaitListId") String courseWaitListId,
725                                              @WebParam(name = "courseWaitListEntryIds") List<String> courseWaitListEntryIds,
726                                              @WebParam(name = "contextInfo") ContextInfo contextInfo)
727             throws DoesNotExistException,
728             InvalidParameterException,
729             MissingParameterException,
730             OperationFailedException,
731             PermissionDeniedException;
732 
733     /**
734      * Inserts an existing CourseWaitListEntry at a particular order on
735      * the CourseWaitList.
736      *
737      * If another entry already exists at that particular
738      * order within the CourseWaitList then this method "bumps down" the
739      * rest of the entries until there is an open order.
740      *
741      * @param courseWaitListEntryId the id for the CourseWaitListEntry to be moved.
742      * @param order the absolute order in the CourseWaitList
743      * @param contextInfo information containing the principalId and
744      *        locale information about the caller of the service
745      *        operation
746      * @throws DoesNotExistException courseWaitListEntryId is not found
747      * @throws InvalidParameterException contextInfo is not valid
748      * @throws MissingParameterException courseWaitListEntryId or
749      *         contextInfo is missing or null
750      * @throws OperationFailedException unable to complete request
751      * @throws PermissionDeniedException an authorization failure occurred
752      */
753     public StatusInfo moveCourseWaitListEntryToOrder(@WebParam(name = "courseWaitListEntryId") String courseWaitListEntryId,
754                                                      @WebParam(name = "order") Integer order,
755                                                      @WebParam(name = "contextInfo") ContextInfo contextInfo)
756             throws DoesNotExistException,
757             InvalidParameterException,
758             MissingParameterException,
759             OperationFailedException,
760             PermissionDeniedException;
761 
762     /**
763      * Retrieves the position in the CourseWaitList (matching given wait list id) for
764      * a student with given id.
765      *
766      * @param studentId         the identifier for the Student
767      * @param courseWaitListId  the identifier for the CourseWaitList the student is in
768      * @param activityOfferingId the identifier for the activity offering the waitlist is for
769      * @param contextInfo information containing the principalId and
770      *                    locale information about the caller of service operation
771      * @throws DoesNotExistException     courseWaitListId, studentId or activityOfferingId is not found
772      * @throws InvalidParameterException contextInfo is not valid
773      * @throws MissingParameterException courseWaitListId, studentId, activityOfferingId or contextInfo is missing or null
774      * @throws OperationFailedException  unable to complete request
775      * @throws PermissionDeniedException an authorization failure occurred
776      */
777     public WaitListPositionInfo getWaitListPositionForStudent (@WebParam(name = "studentId") String studentId,
778                                                                @WebParam(name = "courseWaitListId") String courseWaitListId,
779                                                                @WebParam(name = "activityOfferingId") String activityOfferingId,
780                                                                @WebParam(name = "contextInfo") ContextInfo contextInfo)
781             throws DoesNotExistException,
782             InvalidParameterException,
783             MissingParameterException,
784             OperationFailedException,
785             PermissionDeniedException;
786 
787     /**
788      * Retrieves the top waitlist entries in the waitlist with the given id.
789      *
790      * @param courseWaitListId  the identifier for the CourseWaitList whose top entries are to be obtained
791      * @param activityOfferingId the identifier for the activity offering the waitlist is for
792      * @param count             the number of entries to get from the top
793      * @param contextInfo information containing the principalId and
794      *                    locale information about the caller of service operation
795      * @throws DoesNotExistException     courseWaitListId is not found or activityOfferingId is not found
796      * @throws InvalidParameterException contextInfo is not valid
797      * @throws MissingParameterException courseWaitListId, count, activityOfferingId or contextInfo is missing or null
798      * @throws OperationFailedException  unable to complete request
799      * @throws PermissionDeniedException an authorization failure occurred
800      */
801     public List<CourseWaitListEntryInfo> getTopCourseWaitListEntries (@WebParam(name = "courseWaitListId") String courseWaitListId,
802                                                                       @WebParam(name = "activityOfferingId") String activityOfferingId,
803                                                                       @WebParam(name = "count") Integer count,
804                                                                       @WebParam(name = "contextInfo") ContextInfo contextInfo)
805             throws DoesNotExistException,
806             InvalidParameterException,
807             MissingParameterException,
808             OperationFailedException,
809             PermissionDeniedException;
810 
811     List<CourseRegistrationInfo> getCourseWaitListRegistrationsByStudentAndTerm(@WebParam(name = "studentId") String studentId,
812                                                                                 @WebParam(name = "termId") String termId,
813                                                                                 @WebParam(name = "contextInfo") ContextInfo contextInfo)
814             throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
815 
816     List<ActivityRegistrationInfo> getActivityWaitListRegistrationsForCourseRegistration(@WebParam(name = "courseRegistrationId") String courseRegistrationId,
817                                                                                          @WebParam(name = "contextInfo") ContextInfo contextInfo)
818             throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
819 }