2013-02-06 15:40:17 +01:00
|
|
|
package org.gcube.portlets.user.workspace.client.event;
|
|
|
|
|
2015-10-06 12:16:22 +02:00
|
|
|
import org.gcube.portlets.user.workspace.client.ConstantsExplorer.WS_UPLOAD_TYPE;
|
2013-02-06 15:40:17 +01:00
|
|
|
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;
|
|
|
|
|
2015-10-06 12:07:37 +02:00
|
|
|
|
2013-02-06 15:40:17 +01:00
|
|
|
/**
|
2015-10-06 12:07:37 +02:00
|
|
|
* The Class CompletedFileUploadEvent.
|
2013-02-06 15:40:17 +01:00
|
|
|
*
|
2015-10-06 12:07:37 +02:00
|
|
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
|
|
|
* Oct 6, 2015
|
2013-02-06 15:40:17 +01:00
|
|
|
*/
|
|
|
|
public class CompletedFileUploadEvent extends GwtEvent<CompletedFileUploadEventHandler> implements GuiEventInterface{
|
|
|
|
public static Type<CompletedFileUploadEventHandler> TYPE = new Type<CompletedFileUploadEventHandler>();
|
|
|
|
|
|
|
|
private String itemIdentifier;
|
2015-10-05 18:33:14 +02:00
|
|
|
private String parentId;
|
2015-10-06 12:16:22 +02:00
|
|
|
private WS_UPLOAD_TYPE uploadType;
|
|
|
|
|
2015-10-06 12:07:37 +02:00
|
|
|
/**
|
|
|
|
* Instantiates a new completed file upload event.
|
|
|
|
*
|
|
|
|
* @param parentId the parent id
|
|
|
|
* @param itemIdentifier the item identifier
|
|
|
|
* @param uploadType the upload type
|
|
|
|
*/
|
2015-10-06 12:16:22 +02:00
|
|
|
public CompletedFileUploadEvent(String parentId, String itemIdentifier, WS_UPLOAD_TYPE uploadType) {
|
2015-10-05 18:33:14 +02:00
|
|
|
this.parentId = parentId;
|
2013-02-06 15:40:17 +01:00
|
|
|
this.itemIdentifier = itemIdentifier;
|
2015-10-06 12:07:37 +02:00
|
|
|
this.uploadType = uploadType;
|
2013-02-06 15:40:17 +01:00
|
|
|
}
|
|
|
|
|
2015-10-06 12:07:37 +02:00
|
|
|
/* (non-Javadoc)
|
|
|
|
* @see com.google.gwt.event.shared.GwtEvent#getAssociatedType()
|
|
|
|
*/
|
2013-02-06 15:40:17 +01:00
|
|
|
@Override
|
|
|
|
public Type<CompletedFileUploadEventHandler> getAssociatedType() {
|
|
|
|
return TYPE;
|
|
|
|
}
|
|
|
|
|
2015-10-06 12:07:37 +02:00
|
|
|
/* (non-Javadoc)
|
|
|
|
* @see com.google.gwt.event.shared.GwtEvent#dispatch(com.google.gwt.event.shared.EventHandler)
|
|
|
|
*/
|
2013-02-06 15:40:17 +01:00
|
|
|
@Override
|
|
|
|
protected void dispatch(CompletedFileUploadEventHandler handler) {
|
|
|
|
handler.onCompletedFileUploadEvent(this);
|
|
|
|
}
|
|
|
|
|
2015-10-06 12:07:37 +02:00
|
|
|
/* (non-Javadoc)
|
|
|
|
* @see org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface#getKey()
|
|
|
|
*/
|
2013-02-06 15:40:17 +01:00
|
|
|
@Override
|
|
|
|
public EventsTypeEnum getKey() {
|
|
|
|
return EventsTypeEnum.COMPLETED_FILE_UPLOAD_EVENT;
|
|
|
|
}
|
|
|
|
|
2015-10-06 12:07:37 +02:00
|
|
|
/**
|
|
|
|
* Gets the item identifier.
|
|
|
|
*
|
|
|
|
* @return the item identifier
|
|
|
|
*/
|
2013-02-06 15:40:17 +01:00
|
|
|
public String getItemIdentifier() {
|
|
|
|
return itemIdentifier;
|
|
|
|
}
|
2015-10-05 18:33:14 +02:00
|
|
|
|
|
|
|
/**
|
2015-10-06 12:07:37 +02:00
|
|
|
* Gets the parent id.
|
|
|
|
*
|
2015-10-05 18:33:14 +02:00
|
|
|
* @return the parentId
|
|
|
|
*/
|
|
|
|
public String getParentId() {
|
|
|
|
return parentId;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2015-10-06 12:07:37 +02:00
|
|
|
* Sets the item identifier.
|
|
|
|
*
|
2015-10-05 18:33:14 +02:00
|
|
|
* @param itemIdentifier the itemIdentifier to set
|
|
|
|
*/
|
|
|
|
public void setItemIdentifier(String itemIdentifier) {
|
|
|
|
this.itemIdentifier = itemIdentifier;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2015-10-06 12:07:37 +02:00
|
|
|
* Sets the parent id.
|
|
|
|
*
|
2015-10-05 18:33:14 +02:00
|
|
|
* @param parentId the parentId to set
|
|
|
|
*/
|
|
|
|
public void setParentId(String parentId) {
|
|
|
|
this.parentId = parentId;
|
|
|
|
}
|
2013-02-06 15:40:17 +01:00
|
|
|
|
2015-10-06 12:07:37 +02:00
|
|
|
/**
|
|
|
|
* @return the uploadType
|
|
|
|
*/
|
2015-10-06 12:16:22 +02:00
|
|
|
public WS_UPLOAD_TYPE getUploadType() {
|
2015-10-06 12:07:37 +02:00
|
|
|
return uploadType;
|
|
|
|
}
|
2015-10-06 12:16:22 +02:00
|
|
|
|
2013-02-06 15:40:17 +01:00
|
|
|
}
|