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 | 0 | public class ProgramRegistry { |
13 | |
|
14 | |
private static Data data; |
15 | |
|
16 | |
private static int row; |
17 | |
|
18 | |
private static Enum<?> section; |
19 | |
|
20 | 0 | private static HashMap<GwtEvent.Type, EventHandler> specializationHandlers = new HashMap<GwtEvent.Type, EventHandler>(); |
21 | |
|
22 | 0 | private static boolean createNew = false; |
23 | |
|
24 | |
public static Data getData() { |
25 | 0 | return data; |
26 | |
} |
27 | |
|
28 | |
public static void setData(Data data) { |
29 | 0 | ProgramRegistry.data = data; |
30 | 0 | } |
31 | |
|
32 | |
public static int getRow() { |
33 | 0 | return row; |
34 | |
} |
35 | |
|
36 | |
public static void setRow(int row) { |
37 | 0 | ProgramRegistry.row = row; |
38 | 0 | } |
39 | |
|
40 | |
public static Enum<?> getSection() { |
41 | 0 | return section; |
42 | |
} |
43 | |
|
44 | |
public static void setSection(Enum<?> section) { |
45 | 0 | ProgramRegistry.section = section; |
46 | 0 | } |
47 | |
|
48 | |
public static void addHandler(GwtEvent.Type<?> type, EventHandler handler) { |
49 | 0 | specializationHandlers.put(type, handler); |
50 | 0 | } |
51 | |
|
52 | |
public static HashMap<GwtEvent.Type, EventHandler> getSpecializationHandlers() { |
53 | 0 | return specializationHandlers; |
54 | |
} |
55 | |
|
56 | |
public static boolean isCreateNew() { |
57 | 0 | return createNew; |
58 | |
} |
59 | |
|
60 | |
public static void setCreateNew(boolean createNew) { |
61 | 0 | ProgramRegistry.createNew = createNew; |
62 | 0 | } |
63 | |
} |