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 org.gcube.portlets.user.workspace.client.model.FileModel; import com.google.gwt.event.shared.GwtEvent; /** * The Class CompletedFileUploadEvent. * * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it * Oct 6, 2015 */ public class CompletedFileUploadEvent extends GwtEvent implements GuiEventInterface{ public static Type TYPE = new Type(); private String itemIdentifier; private String parentId; private String uploadType; private FileModel parentModel; /** * Instantiates a new completed file upload event. * * @param parentId the parent id * @param itemIdentifier the item identifier * @param uploadType the upload type */ public CompletedFileUploadEvent(String parentId, String itemIdentifier, String uploadType) { this.parentId = parentId; this.itemIdentifier = itemIdentifier; this.uploadType = uploadType; } /* (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(CompletedFileUploadEventHandler handler) { handler.onCompletedFileUploadEvent(this); } /* (non-Javadoc) * @see org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface#getKey() */ @Override public EventsTypeEnum getKey() { return EventsTypeEnum.COMPLETED_FILE_UPLOAD_EVENT; } /** * Gets the item identifier. * * @return the item identifier */ public String getItemIdentifier() { return itemIdentifier; } /** * Gets the parent id. * * @return the parentId */ public String getParentId() { return parentId; } /** * Sets the item identifier. * * @param itemIdentifier the itemIdentifier to set */ public void setItemIdentifier(String itemIdentifier) { this.itemIdentifier = itemIdentifier; } /** * Sets the parent id. * * @param parentId the parentId to set */ public void setParentId(String parentId) { this.parentId = parentId; } /** * Sets the parent model. * * @param parent the new parent model */ public void setParentModel(FileModel parent){ this.parentModel = parent; } /** * Gets the parent model. * * @return the parentModel */ public FileModel getParentModel() { return parentModel; } /** * @return the uploadType */ public String getUploadType() { return uploadType; } }