1 | |
package org.kuali.student.lum.program.client.events; |
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.ModelDefinition; |
7 | |
import org.kuali.student.lum.program.client.ProgramController; |
8 | |
import org.kuali.student.lum.program.client.major.edit.MajorEditController; |
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | 0 | public class MetadataLoadedEvent extends GwtEvent<MetadataLoadedEvent.Handler> { |
14 | |
|
15 | 0 | public static Type<Handler> TYPE = new Type<Handler>(); |
16 | |
|
17 | |
private ModelDefinition modelDefinition; |
18 | |
|
19 | |
private ProgramController controller; |
20 | |
|
21 | 0 | public MetadataLoadedEvent(ModelDefinition modelDefinition, ProgramController controller) { |
22 | 0 | this.modelDefinition = modelDefinition; |
23 | 0 | this.controller = controller; |
24 | 0 | } |
25 | |
|
26 | |
public ModelDefinition getModelDefinition() { |
27 | 0 | return modelDefinition; |
28 | |
} |
29 | |
|
30 | |
public ProgramController getController() { |
31 | 0 | return controller; |
32 | |
} |
33 | |
|
34 | |
@Override |
35 | |
public Type<Handler> getAssociatedType() { |
36 | 0 | return TYPE; |
37 | |
} |
38 | |
|
39 | |
@Override |
40 | |
protected void dispatch(Handler handler) { |
41 | 0 | handler.onEvent(this); |
42 | 0 | } |
43 | |
|
44 | |
public static interface Handler extends EventHandler { |
45 | |
void onEvent(MetadataLoadedEvent event); |
46 | |
} |
47 | |
} |