001 package org.kuali.student.lum.program.client.events; 002 003 import com.google.gwt.event.shared.EventHandler; 004 import com.google.gwt.event.shared.GwtEvent; 005 import org.kuali.student.common.ui.client.mvc.DataModel; 006 import org.kuali.student.lum.program.client.ProgramController; 007 008 /** 009 * @author Igor 010 */ 011 public class AfterSaveEvent extends GwtEvent<AfterSaveEvent.Handler> { 012 013 public static Type<Handler> TYPE = new Type<Handler>(); 014 015 private DataModel model; 016 017 private ProgramController controller; 018 019 public AfterSaveEvent(DataModel model, ProgramController controller) { 020 this.model = model; 021 this.controller = controller; 022 } 023 024 public DataModel getModel() { 025 return model; 026 } 027 028 public ProgramController getController() { 029 return controller; 030 } 031 032 @Override 033 public Type<Handler> getAssociatedType() { 034 return TYPE; 035 } 036 037 @Override 038 protected void dispatch(Handler handler) { 039 handler.onEvent(this); 040 } 041 042 public static interface Handler extends EventHandler { 043 void onEvent(AfterSaveEvent event); 044 } 045 }