001 package org.kuali.student.lum.program.client;
002
003 import com.google.gwt.event.shared.EventHandler;
004 import com.google.gwt.event.shared.GwtEvent;
005 import org.kuali.student.core.assembly.data.Data;
006
007 import java.util.HashMap;
008
009 /**
010 * @author Igor
011 */
012 public class ProgramRegistry {
013
014 private static Data data;
015
016 private static int row;
017
018 private static Enum<?> section;
019
020 private static HashMap<GwtEvent.Type, EventHandler> specializationHandlers = new HashMap<GwtEvent.Type, EventHandler>();
021
022 private static boolean createNew = false;
023
024 public static Data getData() {
025 return data;
026 }
027
028 public static void setData(Data data) {
029 ProgramRegistry.data = data;
030 }
031
032 public static int getRow() {
033 return row;
034 }
035
036 public static void setRow(int row) {
037 ProgramRegistry.row = row;
038 }
039
040 public static Enum<?> getSection() {
041 return section;
042 }
043
044 public static void setSection(Enum<?> section) {
045 ProgramRegistry.section = section;
046 }
047
048 public static void addHandler(GwtEvent.Type<?> type, EventHandler handler) {
049 specializationHandlers.put(type, handler);
050 }
051
052 public static HashMap<GwtEvent.Type, EventHandler> getSpecializationHandlers() {
053 return specializationHandlers;
054 }
055
056 public static boolean isCreateNew() {
057 return createNew;
058 }
059
060 public static void setCreateNew(boolean createNew) {
061 ProgramRegistry.createNew = createNew;
062 }
063 }