Fixed Task Event

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-widget-common-event@90646 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-01-28 15:01:03 +00:00
parent 9f4baa3261
commit 2715350ec1
1 changed files with 11 additions and 7 deletions

View File

@ -1,6 +1,7 @@
package org.gcube.portlets.user.td.widgetcommonevent.client.event;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.TaskType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
@ -18,7 +19,7 @@ public class TasksMonitorEvent extends GwtEvent<TasksMonitorEvent.TasksMonitorEv
public static Type<TasksMonitorEventHandler> TYPE = new Type<TasksMonitorEventHandler>();
private TaskType taskType;
private String tableId;
private TRId trId;
public interface TasksMonitorEventHandler extends EventHandler {
void onTasksMonitorEvent(TasksMonitorEvent event);
@ -28,13 +29,13 @@ public class TasksMonitorEvent extends GwtEvent<TasksMonitorEvent.TasksMonitorEv
public HandlerRegistration addTasksMonitorEventHandler(TasksMonitorEventHandler handler);
}
public static void fire(HasHandlers source, TaskType taskType, String tableId) {
source.fireEvent(new TasksMonitorEvent(taskType,tableId));
public static void fire(HasHandlers source, TaskType taskType, TRId trId) {
source.fireEvent(new TasksMonitorEvent(taskType,trId));
}
public TasksMonitorEvent(TaskType closeType, String tableId) {
public TasksMonitorEvent(TaskType closeType, TRId trId) {
this.taskType = closeType;
this.tableId = tableId;
this.trId = trId;
}
public static Type<TasksMonitorEventHandler> getType() {
@ -55,8 +56,11 @@ public class TasksMonitorEvent extends GwtEvent<TasksMonitorEvent.TasksMonitorEv
return taskType;
}
public String getTableId() {
return tableId;
public TRId getTrId() {
return trId;
}
public void setTrId(TRId trId) {
this.trId = trId;
}
}