fixing messages

This commit is contained in:
francesco 2020-10-13 14:30:24 +02:00
parent 4368eca1e9
commit 52ebe6d98e
6 changed files with 12 additions and 12 deletions

View File

@ -6,12 +6,6 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<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="optional" value="true"/>

View File

@ -181,7 +181,7 @@ public class CreateMetadataForm extends Composite implements HasGenericFormListe
protected static final String PRODUCT_CREATED_OK = "Item correctly published!";
/** The Constant TRYING_TO_CREATE_PRODUCT. */
private static final String DATA_FORM_FILLED_IN_CORRECTLY = "Data form filled in correclty";
private static final String DATA_FORM_FILLED_IN_CORRECTLY = "Very well!!! Data form filled in correclty!";
/** The Constant MISSING_PUBLISH_RIGHTS. */
protected static final String MISSING_PUBLISH_RIGHTS = "It seems you are not authorized to publish on catalogue. Request it to the VRE manager or the portal administrator.";
@ -639,7 +639,7 @@ public class CreateMetadataForm extends Composite implements HasGenericFormListe
formDataBean = gdb;
// alert
alertOnCreate(DATA_FORM_FILLED_IN_CORRECTLY, AlertType.INFO, false);
alertOnCreate(DATA_FORM_FILLED_IN_CORRECTLY, AlertType.SUCCESS, false);
createButton.setEnabled(false);
createButton.setVisible(false);

View File

@ -49,7 +49,7 @@ public class DialogUpload extends FormPanel implements HasWorskpaceUploadNotific
protected WorkspaceUploaderListenerController controller = new WorkspaceUploaderListenerController();
/** The timer. */
private TimerUpload timer;
protected TimerUpload timer;
/**
* The Enum UPLOAD_TYPE.
@ -155,21 +155,25 @@ public class DialogUpload extends FormPanel implements HasWorskpaceUploadNotific
switch (resultMessage.getStatus()) {
case ERROR:
removeLoading();
timer.cancel();
GWT.log("Error during upload "+resultMessage.getMessage());
break;
case UNKNOWN:
removeLoading();
timer.cancel();
GWT.log("Error during upload "+resultMessage.getMessage());
break;
case WARN: {
GWT.log("Upload completed with warnings "+resultMessage.getMessage());
removeLoading();
timer.cancel();
break;
}
case SESSION_EXPIRED:{
GWT.log("Upload aborted due to session expired: "+ resultMessage.getMessage());
Window.alert("Session expired, please reload the page");
removeLoading();
timer.cancel();
break;
}
case OK: {

View File

@ -121,21 +121,25 @@ public class MultipleDilaogUpload extends DialogUpload {
switch (resultMessage.getStatus()) {
case ERROR:
removeLoading();
timer.cancel();
GWT.log("Error during upload " + resultMessage.getMessage());
break;
case UNKNOWN:
removeLoading();
timer.cancel();
GWT.log("Error during upload " + resultMessage.getMessage());
break;
case WARN: {
GWT.log("Upload completed with warnings "+ resultMessage.getMessage());
removeLoading();
timer.cancel();
break;
}
case SESSION_EXPIRED:{
GWT.log("Upload aborted due to session expired: "+ resultMessage.getMessage());
Window.alert("Session expired, please reload the page");
removeLoading();
timer.cancel();
break;
}
case OK: {

View File

@ -176,8 +176,6 @@ public class MetadataProfileFormBuilderUploadServlet extends HttpServlet impleme
logger.info("UPLOAD-SERVLET session: "+session);
logger.debug("UPLOAD-SERVLET (" + session.getId() + ") new upload request received.");
if(WsUtil.isSessionExpired(request)){
logger.error("SESSION_EXPIRED: session is expired");
sendSessionExpired(response, "SESSION_EXPIRED: session is expired");

View File

@ -56,7 +56,7 @@ public class WsUtil {
* @throws Exception the exception
*/
public static boolean isSessionExpired(HttpServletRequest request) throws Exception {
logger.debug("workspace session validating...");
logger.debug("session validating...");
return PortalContext.getConfiguration().getCurrentUser(request)==null;
}