2013-02-06 15:40:17 +01:00
|
|
|
package org.gcube.portlets.user.workspace.client.event;
|
|
|
|
|
2014-01-23 17:20:38 +01:00
|
|
|
import java.util.List;
|
|
|
|
|
2013-09-12 12:27:18 +02:00
|
|
|
import org.gcube.portlets.user.workspace.client.interfaces.EventsTypeEnum;
|
|
|
|
import org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface;
|
|
|
|
|
2013-02-06 15:40:17 +01:00
|
|
|
import com.google.gwt.event.shared.GwtEvent;
|
|
|
|
|
2013-09-12 12:27:18 +02:00
|
|
|
public class PasteItemEvent extends GwtEvent<PasteItemEventHandler> implements GuiEventInterface{
|
2013-02-06 15:40:17 +01:00
|
|
|
public static Type<PasteItemEventHandler> TYPE = new Type<PasteItemEventHandler>();
|
|
|
|
|
2014-01-23 17:20:38 +01:00
|
|
|
// private String itemId = null;
|
2013-02-06 15:40:17 +01:00
|
|
|
private String folderDestinationId;
|
2014-01-23 17:20:38 +01:00
|
|
|
|
|
|
|
private List<String> ids;
|
2013-02-06 15:40:17 +01:00
|
|
|
|
2014-01-23 17:20:38 +01:00
|
|
|
// public PasteItemEvent(String itemId, String folderDestinationId) {
|
|
|
|
// this.itemId = itemId;
|
|
|
|
// this.folderDestinationId = folderDestinationId;
|
|
|
|
// }
|
|
|
|
|
|
|
|
public PasteItemEvent(List<String> ids, String folderDestinationId) {
|
|
|
|
this.ids = ids;
|
2013-02-06 15:40:17 +01:00
|
|
|
this.folderDestinationId = folderDestinationId;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public Type<PasteItemEventHandler> getAssociatedType() {
|
|
|
|
return TYPE;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void dispatch(PasteItemEventHandler handler) {
|
|
|
|
handler.onCopyAndPaste(this);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-01-23 17:20:38 +01:00
|
|
|
// public String getItemId() {
|
|
|
|
// return itemId;
|
|
|
|
// }
|
2013-02-06 15:40:17 +01:00
|
|
|
|
|
|
|
public String getFolderDestinationId() {
|
|
|
|
return folderDestinationId;
|
|
|
|
}
|
|
|
|
|
2013-09-12 12:27:18 +02:00
|
|
|
/* (non-Javadoc)
|
|
|
|
* @see org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface#getKey()
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
public EventsTypeEnum getKey() {
|
|
|
|
return EventsTypeEnum.PASTED_EVENT;
|
|
|
|
}
|
|
|
|
|
2014-01-23 17:20:38 +01:00
|
|
|
public List<String> getIds() {
|
|
|
|
return ids;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setIds(List<String> ids) {
|
|
|
|
this.ids = ids;
|
|
|
|
}
|
|
|
|
|
2013-02-06 15:40:17 +01:00
|
|
|
}
|