47 lines
1.2 KiB
Java
47 lines
1.2 KiB
Java
package org.gcube.portlets.user.workspace.client.event;
|
|
|
|
import org.gcube.portlets.user.workspace.client.interfaces.EventsTypeEnum;
|
|
import org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface;
|
|
|
|
import com.google.gwt.event.shared.GwtEvent;
|
|
|
|
public class PasteItemEvent extends GwtEvent<PasteItemEventHandler> implements GuiEventInterface{
|
|
public static Type<PasteItemEventHandler> TYPE = new Type<PasteItemEventHandler>();
|
|
|
|
private String itemId = null;
|
|
private String folderDestinationId;
|
|
|
|
public PasteItemEvent(String itemId, String folderDestinationId) {
|
|
this.itemId = itemId;
|
|
this.folderDestinationId = folderDestinationId;
|
|
}
|
|
|
|
@Override
|
|
public Type<PasteItemEventHandler> getAssociatedType() {
|
|
return TYPE;
|
|
}
|
|
|
|
@Override
|
|
protected void dispatch(PasteItemEventHandler handler) {
|
|
handler.onCopyAndPaste(this);
|
|
|
|
}
|
|
|
|
public String getItemId() {
|
|
return itemId;
|
|
}
|
|
|
|
public String getFolderDestinationId() {
|
|
return folderDestinationId;
|
|
}
|
|
|
|
/* (non-Javadoc)
|
|
* @see org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface#getKey()
|
|
*/
|
|
@Override
|
|
public EventsTypeEnum getKey() {
|
|
return EventsTypeEnum.PASTED_EVENT;
|
|
}
|
|
|
|
}
|