001package org.kuali.student.enrollment.class2.scheduleofclasses.keyvalue; 002 003import org.kuali.rice.core.api.util.ConcreteKeyValue; 004import org.kuali.rice.core.api.util.KeyValue; 005import org.kuali.rice.krad.keyvalues.KeyValuesBase; 006import org.kuali.student.enrollment.class2.scheduleofclasses.form.ScheduleOfClassesSearchForm; 007 008import java.io.Serializable; 009import java.util.ArrayList; 010import java.util.List; 011 012/** 013 * Used to manage all of the possible values for how the AOs will be grouped on the SchOC view. 014 * (ie: "Flat", "By Cluster", "By Registration Group") 015 */ 016public class ScheduleOfClassesAoDisplayFormatKeyValues extends KeyValuesBase implements Serializable { 017 018 private static final long serialVersionUID = 1L; 019 020 @Override 021 public List<KeyValue> getKeyValues() { 022 023 List<KeyValue> aoDisplayFormats = new ArrayList<KeyValue>(); 024 025 for( ScheduleOfClassesSearchForm.AoDisplayFormat displayFormat : ScheduleOfClassesSearchForm.AoDisplayFormat.values() ) { 026 aoDisplayFormats.add( new ConcreteKeyValue( displayFormat.name(), displayFormat.getText() ) ); 027 } 028 029 return aoDisplayFormats; 030 } 031}