View Javadoc

1   /**
2    */
3   package org.kuali.student.enrollment.coursewaitlist.service;
4   
5   import java.util.List;
6   
7   import javax.jws.WebParam;
8   import javax.jws.WebService;
9   import javax.jws.soap.SOAPBinding;
10  
11  import org.kuali.rice.core.api.criteria.QueryByCriteria;
12  import org.kuali.student.enrollment.courseregistration.dto.RegistrationResponseInfo;
13  import org.kuali.student.enrollment.coursewaitlist.dto.CourseWaitlistEntryInfo;
14  import org.kuali.student.r2.common.dto.ContextInfo;
15  import org.kuali.student.r2.common.dto.StatusInfo;
16  import org.kuali.student.r2.common.exceptions.AlreadyExistsException;
17  import org.kuali.student.r2.common.exceptions.DataValidationErrorException;
18  import org.kuali.student.r2.common.exceptions.DoesNotExistException;
19  import org.kuali.student.r2.common.exceptions.InvalidParameterException;
20  import org.kuali.student.r2.common.exceptions.MissingParameterException;
21  import org.kuali.student.r2.common.exceptions.OperationFailedException;
22  import org.kuali.student.r2.common.exceptions.PermissionDeniedException;
23  import org.kuali.student.r2.common.util.constants.CourseWaitlistServiceConstants;
24  
25  /**
26   * The Course Registration Service is a Class II service supporting the process
27   * of registering a student in course(s) for a term. The service provides
28   * operations for creating and validating registration requests , registering
29   * for a course, waitlist processing, and dropping a course. This service
30   * supports the concept of registration cart in the application and all of the
31   * transactional requests for registration are made through this service. As
32   * part of negotiating the student's registration, operations are provided to
33   * manage related exceptions and holds related to registration.
34   * 
35   * @version 0.0.7
36   * @author Kuali Student Team (sambit)
37   */
38  
39  @WebService(name = "CourseWaitlistService", targetNamespace = CourseWaitlistServiceConstants.NAMESPACE)
40  @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
41  public interface CourseWaitlistService  {
42  
43      /**
44       * Retrieves the open seat count for a particular course offering. It sums
45       * up the open seats for individual registration groups under the same
46       * course offering.
47       * 
48       * @param courseOfferingId
49       * @param context
50       * @return
51       * @throws InvalidParameterException Invalid courseOfferingId in the input
52       * @throws MissingParameterException Missing courseOfferingId in the input
53       * @throws OperationFailedException Unable to complete request
54       * @throws PermissionDeniedException Not authorized to do this operation
55       */
56      public Integer getAvailableSeatsForCourseOffering(@WebParam(name = "courseOfferingId") String courseOfferingId, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException,
57              MissingParameterException, OperationFailedException, PermissionDeniedException;
58  
59      /**
60       * Get available seats for the registration group.
61       * 
62       * @param regGroupId Identifier of the registration group
63       * @param context
64       * @return
65       * @throws InvalidParameterException Invalid regGroupId in the input
66       * @throws MissingParameterException Missing regGroupId in the input
67       * @throws OperationFailedException Unable to complete request
68       * @throws PermissionDeniedException Not authorized to do this operation
69       */
70      public Integer getAvailableSeatsForRegGroup(@WebParam(name = "regGroupId") String regGroupId, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException,
71              MissingParameterException, OperationFailedException, PermissionDeniedException;
72  
73      /**
74       * Gets the number of seats available for a particular student in a
75       * registration group.
76       * <p>
77       * Implementation notes : Seats available for a student taking seat pool (if
78       * any) into consideration.
79       * 
80       * @param studentId Identifier of the student
81       * @param regGroupId Identifier of the registration group
82       * @param context
83       * @return
84       * @throws InvalidParameterException Invalid studentId or regGroupId in the
85       *             input
86       * @throws MissingParameterException Missing studentId or regGroupId in the
87       *             input
88       * @throws OperationFailedException Unable to complete request
89       * @throws PermissionDeniedException Not authorized to do this operation
90       */
91      public Integer getAvailableSeatsForStudentInRegGroup(@WebParam(name = "studentId") String studentId, @WebParam(name = "regGroupId") String regGroupId,
92              @WebParam(name = "context") ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
93  
94      /**
95       * Returns the available seats in a particular seat pool. This is an admin
96       * support function to check the seat pool usage.
97       * 
98       * @param studentId Identifier of the student
99       * @param seatpoolId Identifier of the seatpool
100      * @param context
101      * @return
102      * @throws InvalidParameterException Invalid seatpool in the input
103      * @throws MissingParameterException Missing parameter seatpoolId in the
104      *             input
105      * @throws OperationFailedException Unable to complete request
106      * @throws PermissionDeniedException Not authorized to do this operation
107      */
108     public Integer getAvailableSeatsInSeatpool(@WebParam(name = "seatpoolId") String seatpoolId, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException,
109             MissingParameterException, OperationFailedException, PermissionDeniedException;
110 
111     /**
112      * Gets a course waitlist entry by id.
113      * 
114      * @param courseWaitlistEntryId Id of the course waitlist entry
115      * @param context
116      * @return
117      * @throws DoesNotExistException No courseWaitlistEntryId exists
118      * @throws InvalidParameterException Invalid courseWaitlistEntryId
119      * @throws MissingParameterException Missing courseWaitlistEntryId in the
120      *             input
121      * @throws OperationFailedException Unable to complete request
122      * @throws PermissionDeniedException Not authorized to do this operation
123      */
124     public CourseWaitlistEntryInfo getCourseWaitlistEntry(@WebParam(name = "courseWaitlistEntryId") String courseWaitlistEntryId, @WebParam(name = "context") ContextInfo context)
125             throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
126 
127     /**
128      * Updates a course waitlist entry
129      * 
130      * @param courseWaitlistEntryId Id of the course waitlist entry to be
131      *            updated
132      * @param courseWaitlistEntryInfo The modified
133      *            {@link CourseWaitlistEntryInfo}
134      * @param context
135      * @return
136      * @throws AlreadyExistsException
137      * @throws DataValidationErrorException The courseWaitlistEntryInfo is not
138      *             valid
139      * @throws InvalidParameterException Invalid courseWaitlistEntryId or
140      *             courseWaitlistEntryInfo in the input
141      * @throws MissingParameterException Missing courseWaitlistEntryId or
142      *             courseWaitlistEntryInfo in the input
143      * @throws OperationFailedException Unable to complete request
144      * @throws PermissionDeniedException Not authorized to do this operation
145      */
146     public StatusInfo updateCourseWaitlistEntry(@WebParam(name = "courseWaitlistEntryId") String courseWaitlistEntryId,
147             @WebParam(name = "courseWaitlistEntryInfo") CourseWaitlistEntryInfo courseWaitlistEntryInfo, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException,
148             DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
149 
150     /**
151      * Reorder all the entries that are passed in in the input list, i.e.,
152      * update each of the entries rank to begin from the top and push the
153      * entries not in the list to the ranks after the entries.
154      * 
155      * @param courseWaitlistEntryId
156      * @param position
157      * @param context
158      * @return
159      * @throws DataValidationErrorException
160      * @throws InvalidParameterException Invalid courseWaitlistEntryIds in the
161      *             input
162      * @throws MissingParameterException Missing courseWaitlistEntryIdsin the
163      *             input
164      * @throws OperationFailedException Unable to complete request
165      * @throws PermissionDeniedException Not authorized to do this operation
166      */
167     public StatusInfo reorderCourseWaitlistEntries(@WebParam(name = "courseWaitlistEntryIds") List<String> courseWaitlistEntryIds, @WebParam(name = "context") ContextInfo context)
168             throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
169 
170     /**
171      * Insert a waitlist entry at a particular position in the waitlist. The
172      * courseWaitlistEntryId would be moved to the position and all other
173      * waitlist entries for that reg group would have adjusted rank
174      * 
175      * @param courseWaitlistEntryId The id of the course waitlist entry
176      * @param position The new rank for the waitlist entry
177      * @param context
178      * @return
179      * @throws DoesNotExistException The courseWaitlistEntryId is not found
180      * @throws InvalidParameterException The courseWaitlistEntryId is invalid
181      * @throws MissingParameterException Input courseWaitlistEntryId or position
182      *             is missing
183      * @throws OperationFailedException Unable to complete request
184      * @throws PermissionDeniedException Not authorized to do this operation
185      */
186     public StatusInfo insertCourseWaitlistEntryAtPosition(@WebParam(name = "courseWaitlistEntryId") String courseWaitlistEntryId, @WebParam(name = "position") Integer position,
187             @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
188 
189     /**
190      * Remove the {@link CourseWaitlistEntryInfo}, change its state to CANCELLED
191      * 
192      * @param courseWaitlistEntryId The id of the course waitlist entry
193      * @param context
194      * @return
195      * @throws DoesNotExistException The courseWaitlistEntryId is not found
196      * @throws InvalidParameterException The courseWaitlistEntryId is invalid
197      * @throws MissingParameterException Input courseWaitlistEntryId or position
198      *             is missing
199      * @throws OperationFailedException Unable to complete request
200      * @throws PermissionDeniedException Not authorized to do this operation
201      */
202     public StatusInfo removeCourseWaitlistEntry(@WebParam(name = "courseWaitlistEntryId") String courseWaitlistEntryId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException,
203             InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
204 
205     /**
206      * Deletes a course waitlist entry
207      * 
208      * @param courseWaitlistEntryId
209      * @param context
210      * @return
211      * @throws InvalidParameterException
212      * @throws MissingParameterException
213      * @throws OperationFailedException
214      * @throws PermissionDeniedException
215      */
216     public StatusInfo deleteCourseWaitlistEntry(@WebParam(name = "courseWaitlistEntryId") String courseWaitlistEntryId, @WebParam(name = "context") ContextInfo context)
217             throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
218 
219     /**
220      * Validates a course waitlist entry.
221      * 
222      * @param validateTypeKey
223      * @param courseWaitlistEntryInfo
224      * @param context
225      * @return
226      * @throws DataValidationErrorException
227      * @throws InvalidParameterException
228      * @throws MissingParameterException
229      * @throws OperationFailedException
230      * @throws PermissionDeniedException
231      */
232     public StatusInfo validateCourseWaitlistEntry(@WebParam(name = "validateTypeKey") String validateTypeKey,
233             @WebParam(name = "courseWaitlistEntryInfo") CourseWaitlistEntryInfo courseWaitlistEntryInfo, @WebParam(name = "context") ContextInfo context) throws DataValidationErrorException,
234             InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
235 
236     /**
237      * Register a student to a reg group from a waitlist.
238      * 
239      * @param regRequestInfo
240      * @param context
241      * @return
242      * @throws AlreadyExistsException
243      * @throws DataValidationErrorException
244      * @throws InvalidParameterException
245      * @throws MissingParameterException
246      * @throws OperationFailedException
247      * @throws PermissionDeniedException
248      */
249     public RegistrationResponseInfo registerStudentFromWaitlist(@WebParam(name = "courseWaitlistEntryId") String courseWaitlistEntryId, @WebParam(name = "context") ContextInfo context)
250             throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
251 
252     /**
253      * Gets the course waitlist entries for a course offering. Returns all
254      * students who are on waitlists for that course offering.
255      * 
256      * @param courseOfferingId
257      * @param context
258      * @return
259      * @throws InvalidParameterException
260      * @throws MissingParameterException
261      * @throws OperationFailedException
262      * @throws PermissionDeniedException
263      */
264     public List<CourseWaitlistEntryInfo> getCourseWaitlistEntriesForCourseOffering(@WebParam(name = "courseOfferingId") String courseOfferingId, @WebParam(name = "context") ContextInfo context)
265             throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
266 
267     /**
268      * Gets the course waitlist entries for a reg group.
269      * 
270      * @param courseOfferingId
271      * @param context
272      * @return
273      * @throws InvalidParameterException
274      * @throws MissingParameterException
275      * @throws OperationFailedException
276      * @throws PermissionDeniedException
277      */
278     public List<CourseWaitlistEntryInfo> getCourseWaitlistEntriesForRegGroup(@WebParam(name = "regGroupId") String regGroupId, @WebParam(name = "context") ContextInfo context)
279             throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
280 
281     /**
282      * Gets the waitlist entries for a course offering by student. A student
283      * might be listed in multiple reg group waitlists in the same course.
284      * 
285      * @param courseOfferingId
286      * @param context
287      * @return
288      * @throws InvalidParameterException
289      * @throws MissingParameterException
290      * @throws OperationFailedException
291      * @throws PermissionDeniedException
292      */
293     public List<CourseWaitlistEntryInfo> getCourseWaitlistEntriesForStudentInCourseOffering(@WebParam(name = "courseOfferingId") String courseOfferingId,
294             @WebParam(name = "studentId") String studentId, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException,
295             OperationFailedException, PermissionDeniedException;
296 
297     /**
298      * Gets the waitlist for a reg group and student.
299      * 
300      * @param courseOfferingId
301      * @param context
302      * @return
303      * @throws InvalidParameterException
304      * @throws MissingParameterException
305      * @throws OperationFailedException
306      * @throws PermissionDeniedException
307      */
308     public CourseWaitlistEntryInfo getCourseWaitlistEntryForStudentInRegGroup(@WebParam(name = "regGroupId") String regGroupId, @WebParam(name = "studentId") String studentId,
309             @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
310 
311     /**
312      * Get all the waitlist the student is in for a term. Returns
313      * CourseWaitlistEntryInfo which is the student-waitlist relation.
314      * 
315      * @param studentId
316      * @param termId
317      * @param context
318      * @return
319      * @throws InvalidParameterException
320      * @throws MissingParameterException
321      * @throws OperationFailedException
322      * @throws PermissionDeniedException
323      */
324     public List<CourseWaitlistEntryInfo> getCourseWaitlistEntriesForStudentByTerm(@WebParam(name = "studentId") String studentId, @WebParam(name = "termId") String termId,
325             @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
326 
327     /**
328      * This method ...
329      * 
330      * @param criteria
331      * @return
332      */
333     public List<CourseWaitlistEntryInfo> searchForCourseWaitlistEntries(@WebParam(name = "criteria") QueryByCriteria criteria, @WebParam(name = "context") ContextInfo context)
334             throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;;
335 
336     /**
337      * This method ...
338      * 
339      * @param criteria
340      * @return
341      */
342     public List<String> searchForCourseWaitlistEntryIds(@WebParam(name = "criteria") QueryByCriteria criteria, @WebParam(name = "context") ContextInfo context) throws InvalidParameterException,
343             MissingParameterException, OperationFailedException, PermissionDeniedException;;
344 
345 }