workspace-tree-widget/src/main/java/org/gcube/portlets/user/workspace/client/event/PasteItemEvent.java

64 lines
1.5 KiB
Java
Raw Normal View History

package org.gcube.portlets.user.workspace.client.event;
import java.util.List;
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;
private List<String> ids;
// public PasteItemEvent(String itemId, String folderDestinationId) {
// this.itemId = itemId;
// this.folderDestinationId = folderDestinationId;
// }
public PasteItemEvent(List<String> ids, String folderDestinationId) {
this.ids = ids;
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;
}
public List<String> getIds() {
return ids;
}
public void setIds(List<String> ids) {
this.ids = ids;
}
}