added logs
This commit is contained in:
parent
52ebe6d98e
commit
0e22394486
10
.classpath
10
.classpath
|
@ -6,13 +6,19 @@
|
|||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="test" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="test" value="true"/>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
|
|
|
@ -1,45 +1,55 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<wb-module deploy-name="metadata-profile-form-builder-widget-0.1.0-SNAPSHOT">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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"/>
|
||||
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/resources"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<property name="context-root" value="metadata-profile-form-builder-widget"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<property name="java-output-path" value="/metadata-profile-form-builder-widget/target/classes"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</wb-module>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
1
pom.xml
1
pom.xml
|
@ -111,7 +111,6 @@
|
|||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.portal</groupId>
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
<!-- Other module inherits -->
|
||||
<inherits name="com.github.gwtbootstrap.Bootstrap" />
|
||||
<!-- Responsive design -->
|
||||
<set-property name="bootstrap.responsiveDesign"
|
||||
value="true" />
|
||||
<!-- <set-property name="bootstrap.responsiveDesign" value="true" /> -->
|
||||
<inherits
|
||||
name='com.github.gwtbootstrap.datetimepicker.Datetimepicker' />
|
||||
<inherits name='com.github.gwtbootstrap.datepicker.Datepicker' />
|
||||
|
@ -19,8 +18,7 @@
|
|||
|
||||
<inherits name='com.google.gwt.json.JSON' />
|
||||
|
||||
<inherits
|
||||
name='org.gcube.portlets.widgets.openlayerbasicwidgets.olbasicwidgets' />
|
||||
<inherits name='org.gcube.portlets.widgets.openlayerbasicwidgets.olbasicwidgets' />
|
||||
|
||||
<stylesheet src='MetadataProfileFormBuilder.css' />
|
||||
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui">
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:b="urn:import:com.github.gwtbootstrap.client.ui">
|
||||
<g:HTMLPanel>
|
||||
<div class="bar-container">
|
||||
<g:HTML styleName="progress myBackground" ui:field='progressBarContainer' >
|
||||
<g:HTML styleName="progress myBackground"
|
||||
ui:field='progressBarContainer'>
|
||||
<span class="blue" style="width: 100%;">
|
||||
<span id="upload-percent-number">0%</span>
|
||||
</span>
|
||||
|
|
|
@ -3,6 +3,7 @@ package org.gcube.portlets.widgets.mpformbuilder.client.ui.upload;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.ConstantsMPFormBuilder;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.ui.upload.events.NotifyUploadEvent;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.ui.upload.events.NotifyUploadEvent.UPLOAD_EVENT_TYPE;
|
||||
|
||||
|
@ -44,7 +45,7 @@ public class SingleUploadMonitor {
|
|||
*/
|
||||
private void startTimer(TimerUpload timer){
|
||||
String clientUploadKey = timer.getInitWorkspaceUploader().getClientUploadKey();
|
||||
GWT.log("Starting new timer for key: "+clientUploadKey);
|
||||
ConstantsMPFormBuilder.jslog("Starting new timer for key: "+clientUploadKey);
|
||||
currentTimersRun.put(clientUploadKey, timer);
|
||||
timer.scheduleRepeating(2000);
|
||||
}
|
||||
|
|
|
@ -56,12 +56,17 @@ public class TimerUpload extends Timer{
|
|||
@Override
|
||||
public void run() {
|
||||
|
||||
ConstantsMPFormBuilder.jslog("Timer run called");
|
||||
|
||||
final SingleUploadMonitor monitor = SingleUploadMonitor.getInstance();
|
||||
|
||||
ConstantsMPFormBuilder.jslog("Calling getUpload Status...");
|
||||
|
||||
MetadataProfileFormBuilderServiceAsync.Util.getInstance().getUploadStatus(initWorkspaceUploader.getClientUploadKey(), new AsyncCallback<FileUploadingState>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(final FileUploadingState result) {
|
||||
ConstantsMPFormBuilder.jslog("getUploadStatus returned: "+result);
|
||||
try{
|
||||
synchronized(this){
|
||||
lastWorkspaceUploader = result;
|
||||
|
@ -110,7 +115,7 @@ public class TimerUpload extends Timer{
|
|||
upv.update(result);;
|
||||
}else{
|
||||
// monitor.deleteUploaderByClientKey(workspaceUploader.getClientUploadKey());
|
||||
GWT.log("Timer is null or already closed or completed");
|
||||
ConstantsMPFormBuilder.jslog("Timer is null or already closed or completed");
|
||||
cancel();
|
||||
monitor.removeTimer(initWorkspaceUploader.getClientUploadKey());
|
||||
}
|
||||
|
@ -140,7 +145,7 @@ public class TimerUpload extends Timer{
|
|||
*/
|
||||
@Override
|
||||
public void cancel() {
|
||||
GWT.log("Cancelling timer for "+lastWorkspaceUploader);
|
||||
ConstantsMPFormBuilder.jslog("Cancelling timer for "+lastWorkspaceUploader);
|
||||
super.cancel();
|
||||
}
|
||||
|
||||
|
|
|
@ -531,6 +531,7 @@ public class MetadataProfileFormBuilderUploadServlet extends HttpServlet impleme
|
|||
workspaceUploader.setStatusDescription("File uploaded correclty");
|
||||
workspaceUploader.setUploadStatus(UPLOAD_STATUS.COMPLETED);
|
||||
saveWorkspaceUploaderInSession(workspaceUploader, request.getSession());
|
||||
logger.info("File uploaded at: "+tempFile.getAbsolutePath());
|
||||
}catch (Exception e) {
|
||||
workspaceUploader.setStatusDescription("Error on uploading: "+fileName+". "+e.getMessage());
|
||||
workspaceUploader.setUploadStatus(UPLOAD_STATUS.FAILED);
|
||||
|
|
|
@ -5,6 +5,8 @@ package org.gcube.portlets.widgets.mpformbuilder.shared.upload;
|
|||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
|
||||
/**
|
||||
* The Class FileUploaded.
|
||||
|
@ -13,12 +15,13 @@ import java.io.Serializable;
|
|||
*
|
||||
* Oct 8, 2020
|
||||
*/
|
||||
public class FileUploaded implements Serializable{
|
||||
public class FileUploaded implements Serializable, IsSerializable{
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -3849355202624924112L;
|
||||
private static final long serialVersionUID = -7869956386977214114L;
|
||||
|
||||
/** The file name. */
|
||||
private String fileName;
|
||||
|
|
|
@ -17,11 +17,11 @@ import com.google.gwt.user.client.rpc.IsSerializable;
|
|||
*/
|
||||
public class FileUploadingState implements Serializable, IsSerializable{
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 2858520729654840274L;
|
||||
|
||||
private static final long serialVersionUID = 5634754596251776526L;
|
||||
|
||||
/**
|
||||
* The Enum UPLOAD_STATUS.
|
||||
|
|
|
@ -4,18 +4,22 @@ import java.io.Serializable;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
/**
|
||||
* The Class UploadProgress.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* Sep 1, 2015
|
||||
*/
|
||||
public final class UploadProgress implements Serializable{
|
||||
public final class UploadProgress implements Serializable, IsSerializable{
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 419707497192632320L;
|
||||
private static final long serialVersionUID = 8859140133243692103L;
|
||||
|
||||
private List<UploadEvent> events = new ArrayList<UploadEvent>();
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
<!-- Other module inherits -->
|
||||
<inherits name="com.github.gwtbootstrap.Bootstrap" />
|
||||
<!-- Responsive design -->
|
||||
<set-property name="bootstrap.responsiveDesign"
|
||||
value="true" />
|
||||
<!-- <set-property name="bootstrap.responsiveDesign" value="true" /> -->
|
||||
<inherits
|
||||
name='com.github.gwtbootstrap.datetimepicker.Datetimepicker' />
|
||||
<inherits name='com.github.gwtbootstrap.datepicker.Datepicker' />
|
||||
|
@ -19,8 +18,7 @@
|
|||
|
||||
<inherits name='com.google.gwt.json.JSON' />
|
||||
|
||||
<inherits
|
||||
name='org.gcube.portlets.widgets.openlayerbasicwidgets.olbasicwidgets' />
|
||||
<inherits name='org.gcube.portlets.widgets.openlayerbasicwidgets.olbasicwidgets' />
|
||||
|
||||
<stylesheet src='MetadataProfileFormBuilder.css' />
|
||||
|
||||
|
|
Loading…
Reference in New Issue