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