1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.common.ui.client.event; |
17 | |
|
18 | |
import org.kuali.student.common.ui.client.mvc.HasActionState; |
19 | |
|
20 | 0 | public class NavigationActionEvent extends ActionEvent<NavigationActionHandler> implements HasActionState{ |
21 | 0 | public static final Type<NavigationActionHandler> TYPE = new Type<NavigationActionHandler>(); |
22 | |
|
23 | |
private ActionState actionState; |
24 | |
private String navKey; |
25 | |
private Enum<?> navEnum; |
26 | |
|
27 | 0 | public NavigationActionEvent(String navKey){ |
28 | 0 | this.navKey = navKey; |
29 | 0 | } |
30 | |
|
31 | 0 | public NavigationActionEvent(Enum<?> navEnum){ |
32 | 0 | this.navKey = navEnum.toString(); |
33 | 0 | this.setNavEnum(navEnum); |
34 | 0 | } |
35 | |
|
36 | |
@Override |
37 | |
protected void dispatch(NavigationActionHandler handler) { |
38 | 0 | handler.processNavigation(this); |
39 | 0 | } |
40 | |
|
41 | |
@Override |
42 | |
public Type<NavigationActionHandler> getAssociatedType() { |
43 | 0 | return TYPE; |
44 | |
} |
45 | |
|
46 | |
|
47 | |
public void setActionState(ActionState state){ |
48 | 0 | this.actionState = state; |
49 | 0 | } |
50 | |
|
51 | |
|
52 | |
|
53 | |
|
54 | |
@Override |
55 | |
public ActionState getActionState() { |
56 | 0 | return this.actionState; |
57 | |
} |
58 | |
|
59 | |
public String getNavKey() { |
60 | 0 | return navKey; |
61 | |
} |
62 | |
|
63 | |
public void setNavEnum(Enum<?> navEnum) { |
64 | 0 | this.navEnum = navEnum; |
65 | 0 | } |
66 | |
|
67 | |
public Enum<?> getNavEnum() { |
68 | 0 | return navEnum; |
69 | |
} |
70 | |
|
71 | |
} |