46 lines
1.2 KiB
Java
46 lines
1.2 KiB
Java
package org.gcube.portlets.user.dataminermanager.client.events;
|
|
|
|
import com.google.gwt.event.shared.GwtEvent;
|
|
import com.google.gwt.event.shared.EventHandler;
|
|
|
|
import org.gcube.portlets.user.dataminermanager.client.bean.ComputationItem;
|
|
|
|
import com.google.gwt.event.shared.HasHandlers;
|
|
|
|
public class ResubmitComputationEvent extends
|
|
GwtEvent<ResubmitComputationEvent.ResubmitComputationHandler> {
|
|
|
|
public static Type<ResubmitComputationHandler> TYPE = new Type<ResubmitComputationHandler>();
|
|
private ComputationItem jobItem;
|
|
|
|
public interface ResubmitComputationHandler extends EventHandler {
|
|
void onResubmitComputation(ResubmitComputationEvent event);
|
|
}
|
|
|
|
public ResubmitComputationEvent(ComputationItem jobItem) {
|
|
this.jobItem = jobItem;
|
|
}
|
|
|
|
public ComputationItem getJobItem() {
|
|
return jobItem;
|
|
}
|
|
|
|
@Override
|
|
protected void dispatch(ResubmitComputationHandler handler) {
|
|
handler.onResubmitComputation(this);
|
|
}
|
|
|
|
@Override
|
|
public Type<ResubmitComputationHandler> getAssociatedType() {
|
|
return TYPE;
|
|
}
|
|
|
|
public static Type<ResubmitComputationHandler> getType() {
|
|
return TYPE;
|
|
}
|
|
|
|
public static void fire(HasHandlers source, ComputationItem jobItem) {
|
|
source.fireEvent(new ResubmitComputationEvent(jobItem));
|
|
}
|
|
}
|