77 lines
1.8 KiB
Java
77 lines
1.8 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 org.gcube.portlets.user.workspace.client.model.FileModel;
|
|
|
|
import com.google.gwt.event.shared.GwtEvent;
|
|
|
|
/**
|
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
|
*
|
|
*/
|
|
public class CompletedFileUploadEvent extends GwtEvent<CompletedFileUploadEventHandler> implements GuiEventInterface{
|
|
public static Type<CompletedFileUploadEventHandler> TYPE = new Type<CompletedFileUploadEventHandler>();
|
|
|
|
private String itemIdentifier;
|
|
private String parentId;
|
|
|
|
private FileModel parentModel;
|
|
|
|
public CompletedFileUploadEvent(String parentId, String itemIdentifier) {
|
|
this.parentId = parentId;
|
|
this.itemIdentifier = itemIdentifier;
|
|
}
|
|
|
|
@Override
|
|
public Type<CompletedFileUploadEventHandler> getAssociatedType() {
|
|
return TYPE;
|
|
}
|
|
|
|
@Override
|
|
protected void dispatch(CompletedFileUploadEventHandler handler) {
|
|
handler.onCompletedFileUploadEvent(this);
|
|
}
|
|
|
|
@Override
|
|
public EventsTypeEnum getKey() {
|
|
return EventsTypeEnum.COMPLETED_FILE_UPLOAD_EVENT;
|
|
}
|
|
|
|
public String getItemIdentifier() {
|
|
return itemIdentifier;
|
|
}
|
|
|
|
/**
|
|
* @return the parentId
|
|
*/
|
|
public String getParentId() {
|
|
return parentId;
|
|
}
|
|
|
|
/**
|
|
* @param itemIdentifier the itemIdentifier to set
|
|
*/
|
|
public void setItemIdentifier(String itemIdentifier) {
|
|
this.itemIdentifier = itemIdentifier;
|
|
}
|
|
|
|
/**
|
|
* @param parentId the parentId to set
|
|
*/
|
|
public void setParentId(String parentId) {
|
|
this.parentId = parentId;
|
|
}
|
|
|
|
public void setParentModel(FileModel parent){
|
|
this.parentModel = parent;
|
|
}
|
|
|
|
/**
|
|
* @return the parentModel
|
|
*/
|
|
public FileModel getParentModel() {
|
|
return parentModel;
|
|
}
|
|
}
|