View Javadoc

1   /*
2    * Copyright 2012 The Kuali Foundation
3    *
4    * Licensed under the the Educational Community License, Version 1.0
5    * (the "License"); you may not use this file except in compliance
6    * with the License.  You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl1.php
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 implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.kuali.student.enrollment.courseoffering.service;
18  
19  import java.util.List;
20  import org.kuali.student.enrollment.courseoffering.dto.CourseOfferingInfo;
21  import org.kuali.student.enrollment.courseoffering.dto.RegistrationGroupInfo;
22  import org.kuali.student.r2.common.dto.ContextInfo;
23  import org.kuali.student.r2.common.dto.ValidationResultInfo;
24  import org.kuali.student.r2.common.exceptions.AlreadyExistsException;
25  import org.kuali.student.r2.common.exceptions.DataValidationErrorException;
26  import org.kuali.student.r2.common.exceptions.DoesNotExistException;
27  import org.kuali.student.r2.common.exceptions.InvalidParameterException;
28  import org.kuali.student.r2.common.exceptions.MissingParameterException;
29  import org.kuali.student.r2.common.exceptions.OperationFailedException;
30  import org.kuali.student.r2.common.exceptions.PermissionDeniedException;
31  import org.kuali.student.r2.common.exceptions.ReadOnlyException;
32  import org.kuali.student.r2.common.exceptions.VersionMismatchException;
33  
34  /**
35   * Service Logic that is common regardless of how the implementation is realized. 
36   * <p/>
37   * i.e. this functionality can be used in both the mock and real implementations.
38   * 
39   * @author nwright
40   */
41  public interface CourseOfferingServiceBusinessLogic {
42  
43      public CourseOfferingInfo rolloverCourseOffering(String sourceCoId, String targetTermId, List<String> optionKeys, ContextInfo context)
44              throws AlreadyExistsException,
45              DataValidationErrorException, DoesNotExistException, DataValidationErrorException, InvalidParameterException,
46              MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException;
47  
48      public CourseOfferingInfo updateCourseOfferingFromCanonical(String courseOfferingId, List<String> optionKeys, ContextInfo context)
49              throws DataValidationErrorException,
50              DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException,
51              PermissionDeniedException, VersionMismatchException;
52  
53      public List<ValidationResultInfo> validateCourseOfferingFromCanonical(CourseOfferingInfo courseOfferingInfo, List<String> optionKeys, ContextInfo context)
54              throws DoesNotExistException,
55              InvalidParameterException, MissingParameterException, OperationFailedException;
56  
57      /**
58       * Generate a list of unconstrained registration groups for the formatOffering given.
59       * 
60       * Pre conditions are that there are no existing generated registration groups (i.e. that the 
61       * 
62       * @param formatOfferingId The format offering identifier to generate registration groups for.
63       * @param context Context information containing the principalId and locale information about the caller of service operation 
64       * @return The list of all generated registration groups for the format offering given. 
65       * 
66       * @throws DoesNotExistException The formatOfferingId does not refer to an existing FormatOffering.
67       * @throws InvalidParameterException The formatOfferingId or context is invalid.
68       * @throws MissingParameterException the formatOfferingId or context is missing.
69       * @throws OperationFailedException unable to complete request
70       * @throws PermissionDeniedException authorization failure
71       * @throws AlreadyExistsException Registration Groups exist for the formatOfferingId 
72       */
73  	public List<RegistrationGroupInfo> generateRegistrationGroupsForFormatOffering(
74  			String formatOfferingId, ContextInfo context)
75  			throws DoesNotExistException, InvalidParameterException,
76  			MissingParameterException, OperationFailedException,
77  			PermissionDeniedException, AlreadyExistsException;
78  }