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  package org.kuali.student.enrollment.class2.courseoffering.service.impl;
17  
18  import java.util.List;
19  import java.util.Map;
20  
21  import org.kuali.student.common.util.UUIDHelper;
22  import org.kuali.student.enrollment.class2.courseoffering.service.RegistrationGroupCodeGenerator;
23  import org.kuali.student.enrollment.courseoffering.dto.ActivityOfferingInfo;
24  import org.kuali.student.enrollment.courseoffering.infc.FormatOffering;
25  import org.kuali.student.enrollment.courseoffering.service.CourseOfferingService;
26  import org.kuali.student.r2.common.dto.ContextInfo;
27  
28  /**
29   * A really simple registration code that is just a UUID.
30   * 
31   * This is a place holder.  Using a UUID is not what is wanted so during M4 this implementation should be thrown away
32   * in favour of something that crafts what the Analysis team determines is the desired format.
33   * 
34   * @author ocleirig
35   *
36   */
37  public class UUIDRegistrationGroupCodeGenerator implements
38  		RegistrationGroupCodeGenerator {
39  
40  	/**
41  	 * 
42  	 */
43  	public UUIDRegistrationGroupCodeGenerator() {
44  		// TODO Auto-generated constructor stub
45  	}
46  
47  
48      @Override
49      public void initializeGenerator(CourseOfferingService coService, FormatOffering fo, ContextInfo context, Map<String, Object> keyValues) {
50          // no initialization
51      }
52  
53      /* (non-Javadoc)
54        * @see org.kuali.student.enrollment.class2.courseoffering.service.strategy.RegistrationGroupCodeGenerationStrategy#generateRegistrationGroupCode(org.kuali.student.enrollment.courseoffering.infc.FormatOffering, java.util.List)
55        */
56  	@Override
57  	public String generateRegistrationGroupCode(FormatOffering fo,
58  			List<ActivityOfferingInfo> activities,
59              Map<String, Object> keyValues) {
60  		
61  		// something easy
62  		return UUIDHelper.genStringUUID();
63  	}
64  
65  }