429: Workspace: uploading big files
Task-Url: https://support.d4science.org/issues/429 Removed unused code git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-uploader@119361 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
98f8bcb2d6
commit
945030861f
|
@ -6,6 +6,7 @@
|
|||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="src/main/resources"/>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<property name="context-root" value="workspace-uploader"/>
|
||||
<property name="java-output-path" value="/workspace-uploader-TRUNK/target/workspace-uploader-1.0.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
</wb-module>
|
||||
|
|
|
@ -33,7 +33,7 @@ public class WorkspaceUploadNotification {
|
|||
* @param parentID the parent id
|
||||
* @param itemId the item id
|
||||
*/
|
||||
void onUploadCompleted(String parentID, String itemId);
|
||||
void onUploadCompleted(String parentId, String itemId);
|
||||
|
||||
/**
|
||||
* On upload aborted.
|
||||
|
|
|
@ -17,6 +17,7 @@ import com.google.gwt.core.client.GWT;
|
|||
import com.google.gwt.dom.client.Style.Unit;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.user.client.Timer;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.ui.Anchor;
|
||||
|
@ -209,7 +210,7 @@ public class DialogUploadStream extends ClosableDialog implements HasWorskpaceUp
|
|||
GWT.log("SubmitEvent");
|
||||
addLoading();
|
||||
enableButtons(false);
|
||||
WorkspaceUploaderItem fakeUploader = new WorkspaceUploaderItem();
|
||||
final WorkspaceUploaderItem fakeUploader = new WorkspaceUploaderItem();
|
||||
fakeUploader.setClientUploadKey(clientUploadKey);
|
||||
UploaderMonitor.getInstance().addNewSubmit(fakeUploader, fileUpload.getFilename());
|
||||
setVisible(false);
|
||||
|
|
|
@ -8,6 +8,7 @@ import java.util.List;
|
|||
|
||||
import org.gcube.portlets.widgets.workspaceuploader.client.ConstantsWorkspaceUploader;
|
||||
import org.gcube.portlets.widgets.workspaceuploader.client.DialogResult;
|
||||
import org.gcube.portlets.widgets.workspaceuploader.client.WorkspaceUploadNotification.HasWorskpaceUploadNotificationListener;
|
||||
import org.gcube.portlets.widgets.workspaceuploader.client.WorkspaceUploadNotification.WorskpaceUploadNotificationListener;
|
||||
import org.gcube.portlets.widgets.workspaceuploader.client.WorkspaceUploaderServiceAsync;
|
||||
import org.gcube.portlets.widgets.workspaceuploader.shared.HandlerResultMessage;
|
||||
|
@ -326,24 +327,4 @@ public class MultipleDilaogUploadStream extends DialogUploadStream {
|
|||
}
|
||||
return out;
|
||||
}-*/;
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.gcube.portlets.widgets.workspaceuploader.client.WorkspaceUploadNotification.HasWorskpaceUploadNotificationListener#addWorkspaceUploadNotificationListener(org.gcube.portlets.widgets.workspaceuploader.client.WorkspaceUploadNotification.WorskpaceUploadNotificationListener)
|
||||
*/
|
||||
@Override
|
||||
public void addWorkspaceUploadNotificationListener(
|
||||
WorskpaceUploadNotificationListener handler) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.gcube.portlets.widgets.workspaceuploader.client.WorkspaceUploadNotification.HasWorskpaceUploadNotificationListener#removeWorkspaceUploadNotificationListener(org.gcube.portlets.widgets.workspaceuploader.client.WorkspaceUploadNotification.WorskpaceUploadNotificationListener)
|
||||
*/
|
||||
@Override
|
||||
public void removeWorkspaceUploadNotificationListener(
|
||||
WorskpaceUploadNotificationListener handler) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -155,21 +155,21 @@ public class UploaderMonitor {
|
|||
/**
|
||||
* Poll workspace uploader.
|
||||
*
|
||||
* @param workspaceUploaderItem the workspace uploader item
|
||||
* @param workspaceUploader the workspace uploader item
|
||||
*/
|
||||
public void pollWorkspaceUploader(final WorkspaceUploaderItem workspaceUploaderItem){
|
||||
public void pollWorkspaceUploader(final WorkspaceUploaderItem workspaceUploader){
|
||||
|
||||
Timer timer = new Timer() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
WorkspaceUploaderServiceAsync.Util.getInstance().getUploadStatus(workspaceUploaderItem.getClientUploadKey(), new AsyncCallback<WorkspaceUploaderItem>() {
|
||||
WorkspaceUploaderServiceAsync.Util.getInstance().getUploadStatus(workspaceUploader.getClientUploadKey(), new AsyncCallback<WorkspaceUploaderItem>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(WorkspaceUploaderItem result) {
|
||||
// GWT.log("onSuccess: "+result.toString());
|
||||
synchronized(this){
|
||||
Timer tmn = mapTimer.get(workspaceUploaderItem);
|
||||
Timer tmn = mapTimer.get(workspaceUploader.getClientUploadKey());
|
||||
if(tmn!=null && tmn.isRunning()){
|
||||
if(result.getUploadStatus().equals(UPLOAD_STATUS.COMPLETED)){
|
||||
mapTimer.remove(tmn);
|
||||
|
@ -194,14 +194,14 @@ public class UploaderMonitor {
|
|||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
GWT.log("onFailure: "+caught.getMessage());
|
||||
notifyUploadError(workspaceUploaderItem.getFile().getParentId(), null, caught);
|
||||
notifyUploadError(workspaceUploader.getFile().getParentId(), null, caught);
|
||||
cancel();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
mapTimer.put(workspaceUploaderItem.getClientUploadKey(), timer);
|
||||
mapTimer.put(workspaceUploader.getClientUploadKey(), timer);
|
||||
timer.scheduleRepeating(2000);
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<url-pattern>/workspaceuploader/workspaceUploadServlet</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>workspaceUploadServletStream</servlet-name>
|
||||
<url-pattern>/workspaceuploader/workspaceUploadServletStream</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
|
Loading…
Reference in New Issue