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