1 package org.kuali.student.lum.program.client;
2
3 import com.google.gwt.event.shared.EventHandler;
4 import com.google.gwt.event.shared.GwtEvent;
5 import org.kuali.student.core.assembly.data.Data;
6
7 import java.util.HashMap;
8
9
10
11
12 public class ProgramRegistry {
13
14 private static Data data;
15
16 private static int row;
17
18 private static Enum<?> section;
19
20 private static HashMap<GwtEvent.Type, EventHandler> specializationHandlers = new HashMap<GwtEvent.Type, EventHandler>();
21
22 private static boolean createNew = false;
23
24 public static Data getData() {
25 return data;
26 }
27
28 public static void setData(Data data) {
29 ProgramRegistry.data = data;
30 }
31
32 public static int getRow() {
33 return row;
34 }
35
36 public static void setRow(int row) {
37 ProgramRegistry.row = row;
38 }
39
40 public static Enum<?> getSection() {
41 return section;
42 }
43
44 public static void setSection(Enum<?> section) {
45 ProgramRegistry.section = section;
46 }
47
48 public static void addHandler(GwtEvent.Type<?> type, EventHandler handler) {
49 specializationHandlers.put(type, handler);
50 }
51
52 public static HashMap<GwtEvent.Type, EventHandler> getSpecializationHandlers() {
53 return specializationHandlers;
54 }
55
56 public static boolean isCreateNew() {
57 return createNew;
58 }
59
60 public static void setCreateNew(boolean createNew) {
61 ProgramRegistry.createNew = createNew;
62 }
63 }