package org.gcube.portlets.user.workspace.client.gridevent; 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; /** * The Class MoveItemsEvent. * * @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it) * Oct 4, 2018 */ public class MoveItemsGEvent extends GwtEvent implements GuiEventInterface{ public static Type TYPE = new Type(); private String folderDestinationId; private List ids; private String folderSourceId; //Used to move private boolean treeRefreshable; /** * Instantiates a new move items event. * * @param ids the ids * @param folderDestinationId the folder destination id */ public MoveItemsGEvent(List ids, String folderDestinationId) { this.ids = ids; this.folderDestinationId = folderDestinationId; } /* (non-Javadoc) * @see com.google.gwt.event.shared.GwtEvent#getAssociatedType() */ @Override public Type getAssociatedType() { return TYPE; } /* (non-Javadoc) * @see com.google.gwt.event.shared.GwtEvent#dispatch(com.google.gwt.event.shared.EventHandler) */ @Override protected void dispatch(MoveItemsGEventHandler handler) { handler.onMoveItems(this); } /** * Gets the folder destination id. * * @return the folder destination id */ public String getFolderDestinationId() { return folderDestinationId; } /* (non-Javadoc) * @see org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface#getKey() */ @Override public EventsTypeEnum getKey() { return EventsTypeEnum.MOVED_EVENT; } /** * Gets the ids. * * @return the ids */ public List getIds() { return ids; } /** * Sets the ids. * * @param ids the new ids */ public void setIds(List ids) { this.ids = ids; } /** * Gets the folder source id. * * @return the folder source id */ public String getFolderSourceId() { return folderSourceId; } /** * Sets the folder source id. * * @param folderSourceId the new folder source id */ public void setFolderSourceId(String folderSourceId) { this.folderSourceId = folderSourceId; } /** * Sets the tree refreshable. * * @param bool the new tree refreshable */ public void setTreeRefreshable(boolean bool){ this.treeRefreshable = bool; } /** * Checks if is tree refreshable. * * @return true, if is tree refreshable */ public boolean isTreeRefreshable() { return treeRefreshable; } }