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 package org.kuali.student.enrollment.class2.courseoffering.service;
17
18 import java.util.List;
19 import java.util.Map;
20
21 import org.kuali.student.enrollment.courseoffering.dto.ActivityOfferingInfo;
22 import org.kuali.student.enrollment.courseoffering.infc.FormatOffering;
23 import org.kuali.student.enrollment.courseoffering.service.CourseOfferingService;
24 import org.kuali.student.r2.common.dto.ContextInfo;
25
26 /**
27 *
28 * Defines a way for the particulars of generating a registration group code to be externalized.
29 * The LUI stores the registration group code in the name field. Separately, there is also a
30 * registration code which is unique over all registration groups within a term. That is not yet
31 * implemented for M4.
32 *
33 * @author ocleirig
34 *
35 */
36 public interface RegistrationGroupCodeGenerator {
37 /**
38 * Allows for an initialization phase in the registration group code generation phase to allow for, say,
39 * stateful generation of registration group codes
40 * @param coService Course offering service
41 * @param fo Format offering
42 * @param keyValues Allows for anything to be passed in
43 */
44 public void initializeGenerator(CourseOfferingService coService, FormatOffering fo, ContextInfo context, Map<String, Object> keyValues);
45 /**
46 * Generate a Registration Group Code. This is what the student will see when selecting a Registration Group.
47 *
48 * Note: This was created before M4 and before the exact standard format for this code has been determined by the Analysis Team.
49 * The parameters should be changed as needed to support easily generating that format.
50 *
51 * @param fo the format Offering
52 * @param activities The list of Activities in the registration group
53 * @param keyValues Allows for anything to be passed in by key-values
54 * @return A registration code that is unique for the CourseOffering and is suitable for students to use during the registration process.
55 *
56 */
57 public String generateRegistrationGroupCode(FormatOffering fo, List<ActivityOfferingInfo> activities, Map<String, Object> keyValues);
58
59 }