From f8aaa60efb96fbb17974914a36ef8190936aab6c Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Fri, 12 May 2017 16:26:05 +0000 Subject: [PATCH] ref 8541: StatisticalAlgorithmImporter - Support Java 8 compatibility https://support.d4science.org/issues/8541 Updated to support Java 8 compatibility git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/statistical-algorithms-importer@148631 82a268e6-3cf1-43bd-a215-b396298e98cf --- .classpath | 6 +- distro/changelog.xml | 6 +- pom.xml | 8 +- .../client/CommonMessages.java | 4 +- .../client/PortalViewport.java | 68 +-- .../client/StatAlgoImporter.java | 4 +- .../client/StatAlgoImporterController.java | 4 +- .../client/codeparser/CodeParser.java | 4 +- .../client/event/DeleteItemEvent.java | 4 +- .../client/event/ImportCodeEvent.java | 4 +- .../client/event/InputReadyEvent.java | 4 +- .../client/event/InputRequestEvent.java | 4 +- .../client/event/MainCodeSetEvent.java | 4 +- .../client/event/NewMainCodeEvent.java | 4 +- .../event/NewSelectedRowsVariableEvent.java | 4 +- .../client/event/ProjectStatusEvent.java | 4 +- .../client/event/SessionExpiredEvent.java | 4 +- .../client/event/ShowCodeEvent.java | 4 +- .../event/StatAlgoImporterRibbonEvent.java | 4 +- .../controller/ControllerRequestEvent.java | 4 +- .../client/maindata/CodeEditMessages.java | 4 +- .../client/maindata/CodeEditPanel.java | 4 +- .../client/maindata/CodeViewerPanel.java | 4 +- .../client/maindata/MainDataPanel.java | 4 +- .../monitor/StatAlgoImporterMonitor.java | 22 +- .../client/project/ProjectManager.java | 4 +- .../client/properties/CodeDataProperties.java | 2 +- .../properties/DataTypePropertiesCombo.java | 4 +- .../properties/GlobalVariablesProperties.java | 4 +- .../properties/IOTypePropertiesCombo.java | 4 +- .../InputOutputVariablesProperties.java | 4 +- .../InterpreterPackageInfoProperties.java | 4 +- .../properties/RequestedVREProperties.java | 4 +- .../client/resource/SAIStyles.java | 4 +- .../resource/StatAlgoImporterResources.java | 4 +- .../client/ribbon/EmptyPanel.java | 2 +- .../client/ribbon/HomeToolBar.java | 4 +- .../client/ribbon/HomeToolBarMessages.java | 4 +- .../client/ribbon/StatAlgoImporterMenu.java | 2 +- .../client/ribbon/StatAlgoImporterRibbon.java | 4 +- .../StatAlgoImporterRibbonMessages.java | 2 +- .../client/rpc/StatAlgoImporterService.java | 44 +- .../rpc/StatAlgoImporterServiceAsync.java | 36 +- .../client/tools/ToolsPanel.java | 4 +- .../tools/explorer/ExplorerProjectPanel.java | 4 +- .../tools/input/GlobalVariablesPanel.java | 4 +- .../input/InputOutputVariablesPanel.java | 4 +- .../client/tools/input/InputTypeMessages.java | 2 +- .../tools/input/InputVariableMessages.java | 4 +- .../tools/input/InputVariablePanel.java | 4 +- .../tools/input/InputVariablePanelState.java | 2 +- .../tools/input/InputVariableTabPanel.java | 4 +- .../tools/input/InterpreterInfoPanel.java | 4 +- .../client/tools/input/ProjectInfoPanel.java | 4 +- .../type/ControllerRequestEventType.java | 4 +- .../client/type/ImportCodeType.java | 4 +- .../client/type/ProjectStatusEventType.java | 4 +- .../client/type/SessionExpiredType.java | 4 +- .../type/StatAlgoImporterRibbonType.java | 4 +- .../client/type/UIStateType.java | 4 +- .../client/upload/CodeUploadDialog.java | 4 +- .../client/upload/CodeUploadPanel.java | 4 +- .../client/upload/ImportCodeDescription.java | 4 +- .../FileUploadProgressBarUpdater.java | 4 +- .../FileUploadProgressCardUpdater.java | 4 +- .../progress/FileUploadProgressListener.java | 28 +- .../progress/FileUploadProgressUpdater.java | 85 ++-- .../client/utils/Format.java | 4 +- .../client/utils/InfoMessageBox.java | 4 +- .../client/utils/UtilsGXT3.java | 4 +- .../server/LocalUploadServlet.java | 4 +- .../server/SessionOp.java | 6 +- .../server/SessionUtil.java | 94 ++-- .../server/annotation/WPS4RParser.java | 4 +- .../server/annotation/WPSAlgorithmInfo.java | 4 +- .../server/file/CodeFileUploadSession.java | 4 +- .../server/file/CodeReader.java | 4 +- .../server/file/FileUploadListener.java | 4 +- .../server/file/FileUtil.java | 33 +- .../server/generator/AlgorithmGenerator.java | 4 +- .../server/generator/InfoGenerator.java | 4 +- .../server/generator/ProjectBuilder.java | 4 +- .../portlet/StatAlgoImporterPortlet.java | 2 +- .../server/social/AlgorithmNotification.java | 4 +- .../server/social/Recipient.java | 4 +- .../server/storage/FilesStorage.java | 409 +++++++++--------- .../server/storage/MainCodeSave.java | 67 ++- .../server/storage/ProjectArchiver.java | 4 +- .../server/uriresolver/ApplicationType.java | 4 +- .../server/util/ServiceCredentials.java | 4 +- .../shared/Constants.java | 4 +- .../shared/code/CodeData.java | 4 +- .../StatAlgoImporterServiceException.java | 23 +- ...atAlgoImporterSessionExpiredException.java | 17 +- .../shared/file/FileUploadMonitor.java | 34 +- .../shared/file/FileUploadState.java | 7 +- .../shared/input/DataType.java | 4 +- .../shared/input/GlobalVariables.java | 20 +- .../shared/input/IOType.java | 4 +- .../shared/input/InputOutputVariables.java | 4 +- .../shared/input/InterpreterInfo.java | 4 +- .../shared/input/InterpreterPackageInfo.java | 18 +- .../shared/input/ProjectInfo.java | 4 +- .../shared/input/RequestedVRE.java | 4 +- .../shared/project/InputData.java | 4 +- .../shared/project/MainCode.java | 4 +- .../shared/project/Project.java | 4 +- .../shared/project/ProjectCompile.java | 4 +- .../shared/project/ProjectDeploy.java | 4 +- .../shared/project/ProjectFolder.java | 4 +- .../shared/project/ProjectTarget.java | 4 +- .../shared/session/SessionConstants.java | 4 +- .../shared/session/UserInfo.java | 21 +- .../shared/workspace/ItemDescription.java | 12 +- .../TestStatAlgoImporter.java | 4 +- 115 files changed, 670 insertions(+), 752 deletions(-) diff --git a/.classpath b/.classpath index e822e32..d1a53be 100644 --- a/.classpath +++ b/.classpath @@ -1,12 +1,12 @@ - + - + @@ -45,5 +45,5 @@ - + diff --git a/distro/changelog.xml b/distro/changelog.xml index c4cf32b..40055b5 100644 --- a/distro/changelog.xml +++ b/distro/changelog.xml @@ -1,8 +1,12 @@ + + Support Java 8 compatibility [ticket #8541] + Updated PortalContext support[ticket #6279] Added support only for file data type in output - parameter[ticket #7120] + parameter[ticket #7120] + Updated Storage support diff --git a/pom.xml b/pom.xml index 1121d04..501fcc8 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ 4.0.0 org.gcube.portlets.user statistical-algorithms-importer - 1.5.0-SNAPSHOT + 1.6.0-SNAPSHOT war @@ -42,7 +42,11 @@ distro config ${project.build.directory}/${project.build.finalName} - + + + 1.7 + + 2.6.1 3.3.2 diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/CommonMessages.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/CommonMessages.java index 7a70b4a..a442162 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/CommonMessages.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/CommonMessages.java @@ -4,8 +4,8 @@ import com.google.gwt.i18n.client.Messages; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public interface CommonMessages extends Messages { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/PortalViewport.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/PortalViewport.java index 738b692..6475467 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/PortalViewport.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/PortalViewport.java @@ -15,8 +15,8 @@ import com.sencha.gxt.widget.core.client.container.Viewport.ViewportAppearance; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class PortalViewport extends SimpleContainer { @@ -24,13 +24,12 @@ public class PortalViewport extends SimpleContainer { protected int rightScrollBarSize = 17; protected boolean enableScroll; - /** * Creates a viewport layout container with the default appearance. */ public PortalViewport() { - this(GWT. create(ViewportAppearance.class)); + this(GWT.create(ViewportAppearance.class)); } /** @@ -45,15 +44,14 @@ public class PortalViewport extends SimpleContainer { SafeHtmlBuilder sb = new SafeHtmlBuilder(); appearance.render(sb); - XElement element=XDOM.create(sb.toSafeHtml()); - setElement((Element)element); + XElement element = XDOM.create(sb.toSafeHtml()); + setElement((Element) element); monitorWindowResize = true; forceLayoutOnResize = true; getFocusSupport().setIgnore(false); resize(); } catch (Exception e) { - Log.error("PortalViewport: constructor error " - + e.getLocalizedMessage()); + Log.error("PortalViewport: constructor error " + e.getLocalizedMessage()); } } @@ -102,21 +100,19 @@ public class PortalViewport extends SimpleContainer { protected void resize() { int viewWidth; - if(enableScroll){ - viewWidth= calculateWidth() - rightScrollBarSize; + if (enableScroll) { + viewWidth = calculateWidth() - rightScrollBarSize; } else { viewWidth = calculateWidth(); } - + int viewHeight = calculateHeight(); - Log.info("AM resize viewWidth: " + viewWidth + " viewHeight: " - + viewHeight + " clientWidth: " + Window.getClientWidth() - + " clientHeight: " + Window.getClientHeight()); + Log.info("AM resize viewWidth: " + viewWidth + " viewHeight: " + viewHeight + " clientWidth: " + + Window.getClientWidth() + " clientHeight: " + Window.getClientHeight()); try { setPixelSize(viewWidth, viewHeight); } catch (Exception e) { - Log.error("PortalViewport: error in resize() at setPixelSize " - + e.getLocalizedMessage()); + Log.error("PortalViewport: error in resize() at setPixelSize " + e.getLocalizedMessage()); } } @@ -127,52 +123,20 @@ public class PortalViewport extends SimpleContainer { protected void onWindowResize(int width, int height) { int viewWidth = calculateWidth(); int viewHeight = calculateHeight(); - Log.trace("AM onWindowResize viewWidth: " + viewWidth - + " viewHeight: " + viewHeight + " clientWidth: " - + Window.getClientWidth() + " clientHeight: " - + Window.getClientHeight()); + Log.trace("AM onWindowResize viewWidth: " + viewWidth + " viewHeight: " + viewHeight + " clientWidth: " + + Window.getClientWidth() + " clientHeight: " + Window.getClientHeight()); setPixelSize(viewWidth, viewHeight); } - /** - * Update window size - */ - /* - * public void resize(){ - * - * RootPanel workspace = RootPanel.get("tdp"); - * - * int topBorder = workspace.getAbsoluteTop(); - * - * int leftBorder = workspace.getAbsoluteLeft(); - * - * int footer = 85; - * - * int rootHeight = (Window.getClientHeight() - topBorder - 4 - footer);// - - * ((footer == null)?0:(footer.getOffsetHeight()-15)); - * - * if (rootHeight < 550) rootHeight = 550; - * - * int rootWidth = Window.getClientWidth() - 2* leftBorder; //- - * rightScrollBar; - * - * System.out.println("New workspace dimension Height: "+rootHeight+" Width: " - * +rootWidth); - * - * this.setHeight(rootHeight); this.setWidth(rootWidth); } - */ - protected int calculateWidth() { int leftBorder = getAbsoluteLeft(); - Log.info("AM width: " - + String.valueOf(Window.getClientWidth() - 2 * leftBorder)); + Log.info("AM width: " + String.valueOf(Window.getClientWidth() - 2 * leftBorder)); return Window.getClientWidth() - 2 * leftBorder; } protected int calculateHeight() { int topBorder = getAbsoluteTop(); - Log.info("AM height: " - + String.valueOf(Window.getClientHeight() - topBorder - 34)); + Log.info("AM height: " + String.valueOf(Window.getClientHeight() - topBorder - 34)); return Window.getClientHeight() - topBorder - 34; } diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/StatAlgoImporter.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/StatAlgoImporter.java index 8a3fee9..cf9e71f 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/StatAlgoImporter.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/StatAlgoImporter.java @@ -22,8 +22,8 @@ import com.sencha.gxt.widget.core.client.container.Viewport; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class StatAlgoImporter implements EntryPoint { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/StatAlgoImporterController.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/StatAlgoImporterController.java index 581b31f..d676f28 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/StatAlgoImporterController.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/StatAlgoImporterController.java @@ -40,8 +40,8 @@ import com.sencha.gxt.widget.core.client.event.DialogHideEvent.DialogHideHandler /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class StatAlgoImporterController { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/codeparser/CodeParser.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/codeparser/CodeParser.java index 07316be..d57df6e 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/codeparser/CodeParser.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/codeparser/CodeParser.java @@ -9,8 +9,8 @@ import com.google.gwt.regexp.shared.RegExp; /** * - * @author Giancarlo Panichi email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class CodeParser { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/DeleteItemEvent.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/DeleteItemEvent.java index f543fff..52219f3 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/DeleteItemEvent.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/DeleteItemEvent.java @@ -11,8 +11,8 @@ import com.google.gwt.event.shared.HasHandlers; * Main Code Set Event * * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class DeleteItemEvent extends diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/ImportCodeEvent.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/ImportCodeEvent.java index cc927e9..0e8cfff 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/ImportCodeEvent.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/ImportCodeEvent.java @@ -11,8 +11,8 @@ import com.google.gwt.event.shared.HasHandlers; * Import Code Event * * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ImportCodeEvent extends diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/InputReadyEvent.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/InputReadyEvent.java index e5ba731..4f48a19 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/InputReadyEvent.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/InputReadyEvent.java @@ -11,8 +11,8 @@ import com.google.gwt.event.shared.HasHandlers; * Input Save Ready Event * * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class InputReadyEvent extends diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/InputRequestEvent.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/InputRequestEvent.java index bb56cef..b5f75f9 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/InputRequestEvent.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/InputRequestEvent.java @@ -9,8 +9,8 @@ import com.google.gwt.event.shared.HasHandlers; * Input Save Event * * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class InputRequestEvent extends diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/MainCodeSetEvent.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/MainCodeSetEvent.java index bc55dcb..09495d8 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/MainCodeSetEvent.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/MainCodeSetEvent.java @@ -11,8 +11,8 @@ import com.google.gwt.event.shared.HasHandlers; * Main Code Set Event * * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class MainCodeSetEvent extends diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/NewMainCodeEvent.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/NewMainCodeEvent.java index 3a40295..65ba79c 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/NewMainCodeEvent.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/NewMainCodeEvent.java @@ -11,8 +11,8 @@ import com.google.gwt.event.shared.HasHandlers; * Main Code Set Event * * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class NewMainCodeEvent extends diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/NewSelectedRowsVariableEvent.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/NewSelectedRowsVariableEvent.java index d44c350..3280cec 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/NewSelectedRowsVariableEvent.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/NewSelectedRowsVariableEvent.java @@ -11,8 +11,8 @@ import com.google.gwt.event.shared.HasHandlers; * Input Save Event * * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class NewSelectedRowsVariableEvent diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/ProjectStatusEvent.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/ProjectStatusEvent.java index e84c792..9c2ca93 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/ProjectStatusEvent.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/ProjectStatusEvent.java @@ -12,8 +12,8 @@ import com.google.gwt.event.shared.HasHandlers; * Project Status Event * * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ProjectStatusEvent extends diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/SessionExpiredEvent.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/SessionExpiredEvent.java index 833f603..1ff10bc 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/SessionExpiredEvent.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/SessionExpiredEvent.java @@ -10,8 +10,8 @@ import com.google.gwt.event.shared.HasHandlers; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class SessionExpiredEvent extends GwtEvent { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/ShowCodeEvent.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/ShowCodeEvent.java index 809c210..0c921a8 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/ShowCodeEvent.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/ShowCodeEvent.java @@ -11,8 +11,8 @@ import com.google.gwt.event.shared.HasHandlers; * Show Code Event * * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ShowCodeEvent extends diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/StatAlgoImporterRibbonEvent.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/StatAlgoImporterRibbonEvent.java index 32361bc..5a19335 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/StatAlgoImporterRibbonEvent.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/StatAlgoImporterRibbonEvent.java @@ -9,8 +9,8 @@ import com.google.gwt.event.shared.HasHandlers; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class StatAlgoImporterRibbonEvent extends diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/controller/ControllerRequestEvent.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/controller/ControllerRequestEvent.java index 5dec987..8fb954f 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/controller/ControllerRequestEvent.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/event/controller/ControllerRequestEvent.java @@ -11,8 +11,8 @@ import com.google.gwt.event.shared.HasHandlers; * * * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ControllerRequestEvent extends diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/maindata/CodeEditMessages.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/maindata/CodeEditMessages.java index 8304e43..ca373c8 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/maindata/CodeEditMessages.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/maindata/CodeEditMessages.java @@ -4,8 +4,8 @@ import com.google.gwt.i18n.client.Messages; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public interface CodeEditMessages extends Messages { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/maindata/CodeEditPanel.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/maindata/CodeEditPanel.java index cf66365..5ec996f 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/maindata/CodeEditPanel.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/maindata/CodeEditPanel.java @@ -50,8 +50,8 @@ import edu.ycp.cs.dh.acegwt.client.ace.AceSelectionListener; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class CodeEditPanel extends ContentPanel { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/maindata/CodeViewerPanel.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/maindata/CodeViewerPanel.java index a92cc5d..8e8fcd4 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/maindata/CodeViewerPanel.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/maindata/CodeViewerPanel.java @@ -46,8 +46,8 @@ import com.sencha.gxt.widget.core.client.menu.MenuItem; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class CodeViewerPanel extends ContentPanel { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/maindata/MainDataPanel.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/maindata/MainDataPanel.java index 675c55a..205a3a6 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/maindata/MainDataPanel.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/maindata/MainDataPanel.java @@ -11,8 +11,8 @@ import com.sencha.gxt.widget.core.client.container.SimpleContainer; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class MainDataPanel extends SimpleContainer { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/monitor/StatAlgoImporterMonitor.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/monitor/StatAlgoImporterMonitor.java index 0b4adaf..147bbe7 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/monitor/StatAlgoImporterMonitor.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/monitor/StatAlgoImporterMonitor.java @@ -5,30 +5,33 @@ import com.sencha.gxt.widget.core.client.box.AutoProgressMessageBox; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class StatAlgoImporterMonitor extends AutoProgressMessageBox { - - public StatAlgoImporterMonitor(){ + + public StatAlgoImporterMonitor() { super("Waiting", "Please wait..."); create(); } - + /** * * @param headingHtml + * head * @param messageHtml + * message */ public StatAlgoImporterMonitor(SafeHtml headingHtml, SafeHtml messageHtml) { super(headingHtml, messageHtml); create(); } - + /** * * @param headingHtml + * head */ public StatAlgoImporterMonitor(SafeHtml headingHtml) { super(headingHtml); @@ -38,7 +41,9 @@ public class StatAlgoImporterMonitor extends AutoProgressMessageBox { /** * * @param headingHtml + * head * @param messageHtml + * message */ public StatAlgoImporterMonitor(String headingHtml, String messageHtml) { super(headingHtml, messageHtml); @@ -48,6 +53,7 @@ public class StatAlgoImporterMonitor extends AutoProgressMessageBox { /** * * @param headingHtml + * head */ public StatAlgoImporterMonitor(String headingHtml) { super(headingHtml); @@ -59,7 +65,5 @@ public class StatAlgoImporterMonitor extends AutoProgressMessageBox { auto(); show(); } - - - + } diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/project/ProjectManager.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/project/ProjectManager.java index ca82cb4..81c1c54 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/project/ProjectManager.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/project/ProjectManager.java @@ -35,8 +35,8 @@ import com.sencha.gxt.widget.core.client.event.DialogHideEvent.DialogHideHandler /** * - * @author Giancarlo Panichi email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ProjectManager { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/CodeDataProperties.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/CodeDataProperties.java index e9bb511..93dea35 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/CodeDataProperties.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/CodeDataProperties.java @@ -10,7 +10,7 @@ import com.sencha.gxt.data.shared.PropertyAccess; /** * * @author giancarlo - * email: g.panichi@isti.cnr.it + * * */ public interface CodeDataProperties extends PropertyAccess { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/DataTypePropertiesCombo.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/DataTypePropertiesCombo.java index 2efee3e..a5f8e6e 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/DataTypePropertiesCombo.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/DataTypePropertiesCombo.java @@ -9,8 +9,8 @@ import com.sencha.gxt.data.shared.PropertyAccess; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/GlobalVariablesProperties.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/GlobalVariablesProperties.java index 5e85312..538dc5b 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/GlobalVariablesProperties.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/GlobalVariablesProperties.java @@ -9,8 +9,8 @@ import com.sencha.gxt.data.shared.PropertyAccess; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public interface GlobalVariablesProperties extends diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/IOTypePropertiesCombo.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/IOTypePropertiesCombo.java index dc2a4a2..60354a1 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/IOTypePropertiesCombo.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/IOTypePropertiesCombo.java @@ -9,8 +9,8 @@ import com.sencha.gxt.data.shared.PropertyAccess; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/InputOutputVariablesProperties.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/InputOutputVariablesProperties.java index 73c9740..9896117 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/InputOutputVariablesProperties.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/InputOutputVariablesProperties.java @@ -10,8 +10,8 @@ import com.sencha.gxt.data.shared.PropertyAccess; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public interface InputOutputVariablesProperties extends diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/InterpreterPackageInfoProperties.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/InterpreterPackageInfoProperties.java index a4f9438..fe50f3a 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/InterpreterPackageInfoProperties.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/InterpreterPackageInfoProperties.java @@ -8,8 +8,8 @@ import com.sencha.gxt.data.shared.PropertyAccess; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public interface InterpreterPackageInfoProperties extends diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/RequestedVREProperties.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/RequestedVREProperties.java index 602a296..e06abbe 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/RequestedVREProperties.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/properties/RequestedVREProperties.java @@ -8,8 +8,8 @@ import com.sencha.gxt.data.shared.PropertyAccess; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public interface RequestedVREProperties extends PropertyAccess { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/resource/SAIStyles.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/resource/SAIStyles.java index 8c974b1..a92dd42 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/resource/SAIStyles.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/resource/SAIStyles.java @@ -7,8 +7,8 @@ import com.google.gwt.resources.client.CssResource; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public interface SAIStyles extends CssResource { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/resource/StatAlgoImporterResources.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/resource/StatAlgoImporterResources.java index eda196d..aa97966 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/resource/StatAlgoImporterResources.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/resource/StatAlgoImporterResources.java @@ -10,8 +10,8 @@ import com.google.gwt.resources.client.ImageResource; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public interface StatAlgoImporterResources extends ClientBundle { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/ribbon/EmptyPanel.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/ribbon/EmptyPanel.java index f985195..9372f98 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/ribbon/EmptyPanel.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/ribbon/EmptyPanel.java @@ -5,7 +5,7 @@ import com.sencha.gxt.widget.core.client.ContentPanel; /** * * @author giancarlo - * email: g.panichi@isti.cnr.it + * * */ public class EmptyPanel extends ContentPanel { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/ribbon/HomeToolBar.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/ribbon/HomeToolBar.java index 38c8038..58369b1 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/ribbon/HomeToolBar.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/ribbon/HomeToolBar.java @@ -28,8 +28,8 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class HomeToolBar { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/ribbon/HomeToolBarMessages.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/ribbon/HomeToolBarMessages.java index c68374f..e631973 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/ribbon/HomeToolBarMessages.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/ribbon/HomeToolBarMessages.java @@ -4,8 +4,8 @@ import com.google.gwt.i18n.client.Messages; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public interface HomeToolBarMessages extends Messages { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/ribbon/StatAlgoImporterMenu.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/ribbon/StatAlgoImporterMenu.java index 873188c..d38d07f 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/ribbon/StatAlgoImporterMenu.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/ribbon/StatAlgoImporterMenu.java @@ -8,7 +8,7 @@ import com.sencha.gxt.widget.core.client.TabPanel; /** * * @author giancarlo - * email: g.panichi@isti.cnr.it + * * */ public class StatAlgoImporterMenu extends TabPanel { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/ribbon/StatAlgoImporterRibbon.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/ribbon/StatAlgoImporterRibbon.java index 00e7f89..e04e7f3 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/ribbon/StatAlgoImporterRibbon.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/ribbon/StatAlgoImporterRibbon.java @@ -13,8 +13,8 @@ import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.Verti /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class StatAlgoImporterRibbon { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/ribbon/StatAlgoImporterRibbonMessages.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/ribbon/StatAlgoImporterRibbonMessages.java index b24f467..2f39301 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/ribbon/StatAlgoImporterRibbonMessages.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/ribbon/StatAlgoImporterRibbonMessages.java @@ -6,7 +6,7 @@ import com.google.gwt.i18n.client.Messages; /** * * @author giancarlo - * email: g.panichi@isti.cnr.it + * * */ public interface StatAlgoImporterRibbonMessages extends Messages { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/rpc/StatAlgoImporterService.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/rpc/StatAlgoImporterService.java index fce8ec0..36198b8 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/rpc/StatAlgoImporterService.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/rpc/StatAlgoImporterService.java @@ -15,8 +15,8 @@ import com.google.gwt.user.client.rpc.RemoteServiceRelativePath; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ @RemoteServiceRelativePath("statalgoimporterservice") @@ -26,6 +26,7 @@ public interface StatAlgoImporterService extends RemoteService { * * @return UserInfo user inforamations * @throws StatAlgoImporterServiceException + * exception */ public UserInfo hello() throws StatAlgoImporterServiceException; @@ -33,48 +34,37 @@ public interface StatAlgoImporterService extends RemoteService { /** * Get File Upload Monitor during the file upload operation in Import CSV * - * @return FileUploadMonitor + * @return FileUploadMonitor file upload monitor * @throws StatAlgoImporterServiceException + * exception */ - public FileUploadMonitor getFileUploadMonitor() - throws StatAlgoImporterServiceException; + public FileUploadMonitor getFileUploadMonitor() throws StatAlgoImporterServiceException; // Code - public ArrayList getCode() - throws StatAlgoImporterServiceException; + public ArrayList getCode() throws StatAlgoImporterServiceException; - public void createProjectOnWorkspace(ItemDescription itemDescription) - throws StatAlgoImporterServiceException; + public void createProjectOnWorkspace(ItemDescription itemDescription) throws StatAlgoImporterServiceException; // - public Project setMainCode(ItemDescription itemDescription) - throws StatAlgoImporterServiceException; + public Project setMainCode(ItemDescription itemDescription) throws StatAlgoImporterServiceException; - public void addResourceToProject(ItemDescription itemDescription) - throws StatAlgoImporterServiceException; + public void addResourceToProject(ItemDescription itemDescription) throws StatAlgoImporterServiceException; - public Project deleteResourceOnProject(ItemDescription itemDescription) - throws StatAlgoImporterServiceException; + public Project deleteResourceOnProject(ItemDescription itemDescription) throws StatAlgoImporterServiceException; - public void saveProject(InputData inputData) - throws StatAlgoImporterServiceException; + public void saveProject(InputData inputData) throws StatAlgoImporterServiceException; - public Project openProjectOnWorkspace(ItemDescription newProjectFolder) - throws StatAlgoImporterServiceException; + public Project openProjectOnWorkspace(ItemDescription newProjectFolder) throws StatAlgoImporterServiceException; public void saveCode(String code) throws StatAlgoImporterServiceException; - public void createSoftware(InputData inputData) - throws StatAlgoImporterServiceException; + public void createSoftware(InputData inputData) throws StatAlgoImporterServiceException; - public String getPublicLink(ItemDescription itemDescription) - throws StatAlgoImporterServiceException; + public String getPublicLink(ItemDescription itemDescription) throws StatAlgoImporterServiceException; - public Project restoreUISession(String value) - throws StatAlgoImporterServiceException; + public Project restoreUISession(String value) throws StatAlgoImporterServiceException; - public Project setNewMainCode(ItemDescription itemDescription, - String code) throws StatAlgoImporterServiceException; + public Project setNewMainCode(ItemDescription itemDescription, String code) throws StatAlgoImporterServiceException; public void publishSoftware() throws StatAlgoImporterServiceException; diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/rpc/StatAlgoImporterServiceAsync.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/rpc/StatAlgoImporterServiceAsync.java index 4af2e2a..2d98598 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/rpc/StatAlgoImporterServiceAsync.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/rpc/StatAlgoImporterServiceAsync.java @@ -17,8 +17,8 @@ import com.google.gwt.user.client.rpc.AsyncCallback; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public interface StatAlgoImporterServiceAsync { @@ -26,43 +26,31 @@ public interface StatAlgoImporterServiceAsync { public static StatAlgoImporterServiceAsync INSTANCE = (StatAlgoImporterServiceAsync) GWT .create(StatAlgoImporterService.class); - /** - * - * @param callback - */ void hello(AsyncCallback callback); void getFileUploadMonitor(AsyncCallback callback); void getCode(AsyncCallback> callback); - void createProjectOnWorkspace(ItemDescription itemDescription, - AsyncCallback callback); - - void setMainCode(ItemDescription itemDescription, - AsyncCallback callback); + void createProjectOnWorkspace(ItemDescription itemDescription, AsyncCallback callback); - void addResourceToProject(ItemDescription itemDescription, - AsyncCallback asyncCallback); + void setMainCode(ItemDescription itemDescription, AsyncCallback callback); - void saveProject(InputData inputData, - AsyncCallback asyncCallback); + void addResourceToProject(ItemDescription itemDescription, AsyncCallback asyncCallback); - void deleteResourceOnProject(ItemDescription itemDescription, - AsyncCallback asyncCallback); + void saveProject(InputData inputData, AsyncCallback asyncCallback); - void openProjectOnWorkspace(ItemDescription newProjectFolder, - AsyncCallback asyncCallback); + void deleteResourceOnProject(ItemDescription itemDescription, AsyncCallback asyncCallback); + + void openProjectOnWorkspace(ItemDescription newProjectFolder, AsyncCallback asyncCallback); void saveCode(String code, AsyncCallback asyncCallback); - - void setNewMainCode(ItemDescription itemDescription, String code, - AsyncCallback asyncCallback); + + void setNewMainCode(ItemDescription itemDescription, String code, AsyncCallback asyncCallback); void createSoftware(InputData inputData, AsyncCallback callback); - void getPublicLink(ItemDescription itemDescription, - AsyncCallback asyncCallback); + void getPublicLink(ItemDescription itemDescription, AsyncCallback asyncCallback); void restoreUISession(String value, AsyncCallback asyncCallback); diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/ToolsPanel.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/ToolsPanel.java index 3e36034..28412ba 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/ToolsPanel.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/ToolsPanel.java @@ -14,8 +14,8 @@ import com.sencha.gxt.widget.core.client.container.MarginData; /** * - * @author Giancarlo Panichi email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ToolsPanel extends ContentPanel { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/explorer/ExplorerProjectPanel.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/explorer/ExplorerProjectPanel.java index 5a6809b..ec655c7 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/explorer/ExplorerProjectPanel.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/explorer/ExplorerProjectPanel.java @@ -39,8 +39,8 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ExplorerProjectPanel extends ContentPanel { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/GlobalVariablesPanel.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/GlobalVariablesPanel.java index 29d0a5c..31f9a61 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/GlobalVariablesPanel.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/GlobalVariablesPanel.java @@ -60,8 +60,8 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class GlobalVariablesPanel extends ContentPanel { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputOutputVariablesPanel.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputOutputVariablesPanel.java index 8b75c7c..ca25d2e 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputOutputVariablesPanel.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputOutputVariablesPanel.java @@ -59,8 +59,8 @@ import com.sencha.gxt.widget.core.client.grid.editing.GridRowEditing; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class InputOutputVariablesPanel extends ContentPanel { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputTypeMessages.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputTypeMessages.java index e0e7e75..cf15052 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputTypeMessages.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputTypeMessages.java @@ -7,7 +7,7 @@ import com.google.gwt.i18n.client.Messages; /** * * @author giancarlo - * email: g.panichi@isti.cnr.it + * * */ public interface InputTypeMessages extends Messages { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputVariableMessages.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputVariableMessages.java index e6bc20b..1907859 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputVariableMessages.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputVariableMessages.java @@ -4,8 +4,8 @@ import com.google.gwt.i18n.client.Messages; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public interface InputVariableMessages extends Messages { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputVariablePanel.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputVariablePanel.java index 6758258..a7694c0 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputVariablePanel.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputVariablePanel.java @@ -13,8 +13,8 @@ import com.sencha.gxt.widget.core.client.container.AccordionLayoutContainer.Acco /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class InputVariablePanel extends ContentPanel { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputVariablePanelState.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputVariablePanelState.java index 0dd2c2b..9fa6744 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputVariablePanelState.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputVariablePanelState.java @@ -3,7 +3,7 @@ package org.gcube.portlets.user.statisticalalgorithmsimporter.client.tools.input /** * * @author giancarlo - * email: g.panichi@isti.cnr.it + * * */ public enum InputVariablePanelState { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputVariableTabPanel.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputVariableTabPanel.java index 8b419c3..7c90aca 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputVariableTabPanel.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InputVariableTabPanel.java @@ -15,8 +15,8 @@ import com.sencha.gxt.widget.core.client.TabPanel; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class InputVariableTabPanel extends TabPanel { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InterpreterInfoPanel.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InterpreterInfoPanel.java index 9edeccc..9e84b41 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InterpreterInfoPanel.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/InterpreterInfoPanel.java @@ -48,8 +48,8 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class InterpreterInfoPanel extends ContentPanel { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/ProjectInfoPanel.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/ProjectInfoPanel.java index 5cbe568..a205d9d 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/ProjectInfoPanel.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/tools/input/ProjectInfoPanel.java @@ -19,8 +19,8 @@ import com.sencha.gxt.widget.core.client.form.validator.RegExValidator; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ProjectInfoPanel extends ContentPanel { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/type/ControllerRequestEventType.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/type/ControllerRequestEventType.java index cdfc82b..063cc5c 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/type/ControllerRequestEventType.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/type/ControllerRequestEventType.java @@ -2,8 +2,8 @@ package org.gcube.portlets.user.statisticalalgorithmsimporter.client.type; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public enum ControllerRequestEventType { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/type/ImportCodeType.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/type/ImportCodeType.java index 4809f04..216008c 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/type/ImportCodeType.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/type/ImportCodeType.java @@ -2,8 +2,8 @@ package org.gcube.portlets.user.statisticalalgorithmsimporter.client.type; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public enum ImportCodeType { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/type/ProjectStatusEventType.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/type/ProjectStatusEventType.java index e63e14a..988e8ff 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/type/ProjectStatusEventType.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/type/ProjectStatusEventType.java @@ -2,8 +2,8 @@ package org.gcube.portlets.user.statisticalalgorithmsimporter.client.type; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public enum ProjectStatusEventType { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/type/SessionExpiredType.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/type/SessionExpiredType.java index 048cc33..d3fc84c 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/type/SessionExpiredType.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/type/SessionExpiredType.java @@ -2,8 +2,8 @@ package org.gcube.portlets.user.statisticalalgorithmsimporter.client.type; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public enum SessionExpiredType { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/type/StatAlgoImporterRibbonType.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/type/StatAlgoImporterRibbonType.java index 114092d..73d7f78 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/type/StatAlgoImporterRibbonType.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/type/StatAlgoImporterRibbonType.java @@ -2,8 +2,8 @@ package org.gcube.portlets.user.statisticalalgorithmsimporter.client.type; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public enum StatAlgoImporterRibbonType { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/type/UIStateType.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/type/UIStateType.java index dafe678..d0eb3e9 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/type/UIStateType.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/type/UIStateType.java @@ -2,8 +2,8 @@ package org.gcube.portlets.user.statisticalalgorithmsimporter.client.type; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public enum UIStateType { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/CodeUploadDialog.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/CodeUploadDialog.java index 9452ae9..d19fcf0 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/CodeUploadDialog.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/CodeUploadDialog.java @@ -8,8 +8,8 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler; /** * Dialog for Code Upload * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class CodeUploadDialog extends Window { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/CodeUploadPanel.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/CodeUploadPanel.java index 5d2310d..94a30c3 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/CodeUploadPanel.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/CodeUploadPanel.java @@ -31,8 +31,8 @@ import com.sencha.gxt.widget.core.client.form.FormPanel; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class CodeUploadPanel extends FormPanel { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/ImportCodeDescription.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/ImportCodeDescription.java index 973e437..5cfdbd3 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/ImportCodeDescription.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/ImportCodeDescription.java @@ -4,8 +4,8 @@ import org.gcube.portlets.user.statisticalalgorithmsimporter.client.type.ImportC /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ImportCodeDescription { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/progress/FileUploadProgressBarUpdater.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/progress/FileUploadProgressBarUpdater.java index 4736ab7..b69498b 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/progress/FileUploadProgressBarUpdater.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/progress/FileUploadProgressBarUpdater.java @@ -10,8 +10,8 @@ import com.sencha.gxt.widget.core.client.ProgressBar; /** * Updates a {@link ProgressBar} progress and text based on {@link FileUploadProgressListener} events. * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class FileUploadProgressBarUpdater implements FileUploadProgressListener { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/progress/FileUploadProgressCardUpdater.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/progress/FileUploadProgressCardUpdater.java index b40affd..f253ac3 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/progress/FileUploadProgressCardUpdater.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/progress/FileUploadProgressCardUpdater.java @@ -8,8 +8,8 @@ import com.allen_sauer.gwt.log.client.Log; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class FileUploadProgressCardUpdater implements FileUploadProgressListener { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/progress/FileUploadProgressListener.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/progress/FileUploadProgressListener.java index eb80c38..6b4aeb3 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/progress/FileUploadProgressListener.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/progress/FileUploadProgressListener.java @@ -3,30 +3,28 @@ */ package org.gcube.portlets.user.statisticalalgorithmsimporter.client.upload.progress; - - - /** * Defines a listener for file upload progress. * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public interface FileUploadProgressListener { - + /** * Called when the operation is starting. */ public void operationInitializing(); - + /** * Called when there is a progress for the operation. - * @param elaborated the elaborated part. + * + * @param elaborated + * the elaborated part. */ public void operationUpdate(float elaborated); - - + /** * Called when the operation is complete. */ @@ -34,8 +32,14 @@ public interface FileUploadProgressListener { /** * Called when the operation is failed. - * @param caught the failure exception. - * @param reason the failure reason. + * + * + * @param caught + * error + * @param reason + * reason + * @param failureDetails + * details */ public void operationFailed(Throwable caught, String reason, String failureDetails); } diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/progress/FileUploadProgressUpdater.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/progress/FileUploadProgressUpdater.java index b091137..29048fb 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/progress/FileUploadProgressUpdater.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/upload/progress/FileUploadProgressUpdater.java @@ -15,15 +15,14 @@ import com.google.gwt.user.client.rpc.AsyncCallback; /** * * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class FileUploadProgressUpdater extends Timer { protected ArrayList listeners = new ArrayList(); - /** * {@inheritDoc} */ @@ -32,97 +31,87 @@ public class FileUploadProgressUpdater extends Timer { Log.debug("requesting operation progress"); StatAlgoImporterServiceAsync.INSTANCE.getFileUploadMonitor(new AsyncCallback() { - public void onFailure(Throwable caught) { cancel(); Log.error("Error retrieving the operation state", caught); String message = getStack(caught); fireOperationFailed(caught, "Failed getting operation updates", message); } - + public void onSuccess(FileUploadMonitor result) { - Log.info("retrieved FileUploadMonitor: "+result.getState()); + Log.info("retrieved FileUploadMonitor: " + result.getState()); switch (result.getState()) { case STARTED: Log.debug("File Upload Started"); break; case INPROGRESS: - Log.debug("Progress: "+result.getElaboratedLenght()+" of "+result.getTotalLenght()); + Log.debug("Progress: " + result.getElaboratedLenght() + " of " + result.getTotalLenght()); fireOperationUpdate(result.getPercentDone()); break; case FAILED: - Log.debug("File Upload Failed"); + Log.debug("File Upload Failed"); cancel(); - fireOperationFailed(new Throwable("File Upload Failed") ,result.getFailureReason(), result.getFailureDetails()); + fireOperationFailed(new Throwable("File Upload Failed"), result.getFailureReason(), + result.getFailureDetails()); break; case COMPLETED: cancel(); Log.debug("File Upload Completed"); - fireOperationComplete(); + fireOperationComplete(); break; default: break; } - + } - - - - - + }); - - - + } - - - - protected String getStack(Throwable e) - { - String message = e.getLocalizedMessage()+" ->
"; + + protected String getStack(Throwable e) { + String message = e.getLocalizedMessage() + " ->
"; Throwable c = e.getCause(); - if (c!=null) message += getStack(c); + if (c != null) + message += getStack(c); return message; } - protected void fireOperationInitializing() - { - for (FileUploadProgressListener listener:listeners) listener.operationInitializing(); - } - - protected void fireOperationUpdate(float elaborated) - { - for (FileUploadProgressListener listener:listeners) listener.operationUpdate(elaborated); + protected void fireOperationInitializing() { + for (FileUploadProgressListener listener : listeners) + listener.operationInitializing(); } - protected void fireOperationComplete() - { - for (FileUploadProgressListener listener:listeners) listener.operationComplete(); + protected void fireOperationUpdate(float elaborated) { + for (FileUploadProgressListener listener : listeners) + listener.operationUpdate(elaborated); } - - protected void fireOperationFailed(Throwable caught, String failure, String failureDetails) - { - for (FileUploadProgressListener listener:listeners) listener.operationFailed(caught, failure, failureDetails); + + protected void fireOperationComplete() { + for (FileUploadProgressListener listener : listeners) + listener.operationComplete(); } - - + + protected void fireOperationFailed(Throwable caught, String failure, String failureDetails) { + for (FileUploadProgressListener listener : listeners) + listener.operationFailed(caught, failure, failureDetails); + } + /** * * @param listener + * listener */ - public void addListener(FileUploadProgressListener listener) - { + public void addListener(FileUploadProgressListener listener) { listeners.add(listener); } - /** * * @param listener + * listener */ - public void removeListener(FileUploadProgressListener listener) - { + public void removeListener(FileUploadProgressListener listener) { listeners.remove(listener); } } diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/utils/Format.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/utils/Format.java index 523f01f..017ad9a 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/utils/Format.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/utils/Format.java @@ -5,8 +5,8 @@ package org.gcube.portlets.user.statisticalalgorithmsimporter.client.utils; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class Format { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/utils/InfoMessageBox.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/utils/InfoMessageBox.java index f9f3a1c..f15764a 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/utils/InfoMessageBox.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/utils/InfoMessageBox.java @@ -4,8 +4,8 @@ import com.sencha.gxt.widget.core.client.box.MessageBox; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class InfoMessageBox extends MessageBox { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/utils/UtilsGXT3.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/utils/UtilsGXT3.java index 2faf5b6..a058346 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/utils/UtilsGXT3.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/utils/UtilsGXT3.java @@ -11,8 +11,8 @@ import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class UtilsGXT3 { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/LocalUploadServlet.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/LocalUploadServlet.java index 4b0e6c7..2789204 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/LocalUploadServlet.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/LocalUploadServlet.java @@ -33,8 +33,8 @@ import com.allen_sauer.gwt.log.client.Log; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class LocalUploadServlet extends HttpServlet { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/SessionOp.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/SessionOp.java index ee9c4be..8153787 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/SessionOp.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/SessionOp.java @@ -11,10 +11,10 @@ import org.slf4j.LoggerFactory; /** * - * @author Giancarlo Panichi email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi * - * @param + * + * @param type */ public class SessionOp { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/SessionUtil.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/SessionUtil.java index 490b8c1..3ac404d 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/SessionUtil.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/SessionUtil.java @@ -27,8 +27,8 @@ import org.slf4j.LoggerFactory; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class SessionUtil { @@ -38,11 +38,12 @@ public class SessionUtil { /** * * @param httpServletRequest - * @return - * @throws TDGWTServiceException + * http servlet request + * @return service credentials + * @throws StatAlgoImporterServiceException + * exception */ - public static ServiceCredentials getServiceCredentials( - HttpServletRequest httpServletRequest) + public static ServiceCredentials getServiceCredentials(HttpServletRequest httpServletRequest) throws StatAlgoImporterServiceException { return getServiceCredentials(httpServletRequest, null); } @@ -50,12 +51,14 @@ public class SessionUtil { /** * * @param httpServletRequest + * http servlet request * @param scopeGroupId - * @return - * @throws TDGWTServiceException + * scope group id + * @return service credentials + * @throws StatAlgoImporterServiceException + * exception */ - public static ServiceCredentials getServiceCredentials( - HttpServletRequest httpServletRequest, String scopeGroupId) + public static ServiceCredentials getServiceCredentials(HttpServletRequest httpServletRequest, String scopeGroupId) throws StatAlgoImporterServiceException { ServiceCredentials sCredentials = null; @@ -113,8 +116,7 @@ public class SessionUtil { GCubeUser gCubeUser = pContext.getCurrentUser(httpServletRequest); if (gCubeUser == null) { - String error = "Error retrieving gCubeUser in scope " + scope - + ": " + gCubeUser; + String error = "Error retrieving gCubeUser in scope " + scope + ": " + gCubeUser; logger.error(error); throw new StatAlgoImporterServiceException(error); } @@ -122,8 +124,7 @@ public class SessionUtil { userName = gCubeUser.getUsername(); if (userName == null || userName.isEmpty()) { - String error = "Error retrieving username in scope " + scope - + ": " + userName; + String error = "Error retrieving username in scope " + scope + ": " + userName; logger.error(error); throw new StatAlgoImporterServiceException(error); } @@ -131,8 +132,7 @@ public class SessionUtil { token = pContext.getCurrentUserToken(scope, userName); if (token == null || token.isEmpty()) { - String error = "Error retrieving token for " + userName - + " in " + scope + ": " + token; + String error = "Error retrieving token for " + userName + " in " + scope + ": " + token; logger.error(error); throw new StatAlgoImporterServiceException(error); } @@ -176,16 +176,14 @@ public class SessionUtil { } else { - groupId = String.valueOf(pContext - .getCurrentGroupId(httpServletRequest)); + groupId = String.valueOf(pContext.getCurrentGroupId(httpServletRequest)); groupName = pContext.getCurrentGroupName(httpServletRequest); } - sCredentials = new ServiceCredentials(userName, fullName, name, - lastName, email, scope, groupId, groupName, userAvatarURL, - token); + sCredentials = new ServiceCredentials(userName, fullName, name, lastName, email, scope, groupId, groupName, + userAvatarURL, token); } logger.info("ServiceCredentials: " + sCredentials); @@ -194,17 +192,14 @@ public class SessionUtil { } // - public static ArrayList getRecipients( - ServletContext servletContest) { + public static ArrayList getRecipients(ServletContext servletContest) { @SuppressWarnings("unchecked") - ArrayList recipients = (ArrayList) servletContest - .getAttribute(Constants.RECIPIENTS); + ArrayList recipients = (ArrayList) servletContest.getAttribute(Constants.RECIPIENTS); return recipients; } - public static ArrayList setRecipients( - ServletContext servletContest, ArrayList recipients) { + public static ArrayList setRecipients(ServletContext servletContest, ArrayList recipients) { servletContest.setAttribute(Constants.RECIPIENTS, recipients); return recipients; @@ -214,60 +209,45 @@ public class SessionUtil { public static FileUploadMonitor getFileUploadMonitor(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws Exception { SessionOp sessionOp = new SessionOp<>(); - FileUploadMonitor fileUploadMonitor = sessionOp.get(httpRequest, - serviceCredentials, - SessionConstants.FILE_UPLOAD_MONITOR,FileUploadMonitor.class); + FileUploadMonitor fileUploadMonitor = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.FILE_UPLOAD_MONITOR, FileUploadMonitor.class); return fileUploadMonitor; } - public static void setFileUploadMonitor(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setFileUploadMonitor(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, FileUploadMonitor fileUploadMonitor) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.FILE_UPLOAD_MONITOR, - fileUploadMonitor); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.FILE_UPLOAD_MONITOR, fileUploadMonitor); } // - public static CodeFileUploadSession getCodeFileUploadSession( - HttpServletRequest httpRequest, + public static CodeFileUploadSession getCodeFileUploadSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { SessionOp sessionOp = new SessionOp<>(); - CodeFileUploadSession fileUploadSession = sessionOp.get(httpRequest, - serviceCredentials, + CodeFileUploadSession fileUploadSession = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.IMPORT_CODE_FILE_UPLOAD_SESSION); return fileUploadSession; } - - public static void setCodeFileUploadSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + + public static void setCodeFileUploadSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, CodeFileUploadSession codeFileUploadSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.IMPORT_CODE_FILE_UPLOAD_SESSION, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.IMPORT_CODE_FILE_UPLOAD_SESSION, codeFileUploadSession); } - - // - public static Project getProjectSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials) { + public static Project getProjectSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { SessionOp sessionOp = new SessionOp<>(); - Project project = sessionOp.get(httpRequest, serviceCredentials, - SessionConstants.PROJECT); + Project project = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.PROJECT); return project; } - - public static void setProjectSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, Project project) { + + public static void setProjectSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, + Project project) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.PROJECT, project); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.PROJECT, project); } - - } diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/annotation/WPS4RParser.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/annotation/WPS4RParser.java index ab82f8e..46b44cd 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/annotation/WPS4RParser.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/annotation/WPS4RParser.java @@ -30,8 +30,8 @@ import org.slf4j.LoggerFactory; /** * - * @author Giancarlo Panichi email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class WPS4RParser { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/annotation/WPSAlgorithmInfo.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/annotation/WPSAlgorithmInfo.java index 249f128..38720ee 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/annotation/WPSAlgorithmInfo.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/annotation/WPSAlgorithmInfo.java @@ -7,8 +7,8 @@ import org.gcube.portlets.user.statisticalalgorithmsimporter.shared.input.InputO /** * - * @author Giancarlo Panichi email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class WPSAlgorithmInfo implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/file/CodeFileUploadSession.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/file/CodeFileUploadSession.java index 5d1f235..5f7adeb 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/file/CodeFileUploadSession.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/file/CodeFileUploadSession.java @@ -7,8 +7,8 @@ import org.gcube.portlets.user.statisticalalgorithmsimporter.shared.file.FileUpl /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class CodeFileUploadSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/file/CodeReader.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/file/CodeReader.java index 078180c..5aff3a8 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/file/CodeReader.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/file/CodeReader.java @@ -20,8 +20,8 @@ import org.slf4j.LoggerFactory; * * Read code and convert it in ArrayList * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class CodeReader { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/file/FileUploadListener.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/file/FileUploadListener.java index 4ae529d..a33cfb6 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/file/FileUploadListener.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/file/FileUploadListener.java @@ -11,8 +11,8 @@ import org.slf4j.LoggerFactory; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class FileUploadListener implements ProgressListener { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/file/FileUtil.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/file/FileUtil.java index 8cbda25..3575cb7 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/file/FileUtil.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/file/FileUtil.java @@ -17,15 +17,18 @@ import org.apache.commons.io.IOUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +/** + * + * @author Giancarlo Panichi + * + * + */ public class FileUtil { - protected static final Logger logger = LoggerFactory - .getLogger(FileUtil.class); + protected static final Logger logger = LoggerFactory.getLogger(FileUtil.class); - public static final String[] ZIP_MIMETYPES = new String[] { - "application/x-compress", "application/x-compressed", - "application/x-gzip", "application/x-winzip", "application/x-zip", - "application/zip", "multipart/x-zip" }; + public static final String[] ZIP_MIMETYPES = new String[] { "application/x-compress", "application/x-compressed", + "application/x-gzip", "application/x-winzip", "application/x-zip", "application/zip", "multipart/x-zip" }; /** * Check if the content type is a zip type. @@ -48,10 +51,12 @@ public class FileUtil { * the zip stream. * @param os * the output stream. + * @return zip entry name * @throws Exception + * exception */ - public static String unZip(InputStream is, OutputStream os) - throws Exception { + + public static String unZip(InputStream is, OutputStream os) throws Exception { try { ZipInputStream zis = new ZipInputStream(is); ZipEntry entry; @@ -87,20 +92,18 @@ public class FileUtil { return message.toString(); } - public static void setImportCodeFile(CodeFileUploadSession fileUploadSession, - InputStream is, String name, String mimeType) throws Exception { - + public static void setImportCodeFile(CodeFileUploadSession fileUploadSession, InputStream is, String name, + String mimeType) throws Exception { + File csvTmp = setImportFile(is, "import", ".code", name, mimeType); fileUploadSession.setCodeName(name); fileUploadSession.setCodeFile(csvTmp); } - - - public static File setImportFile(InputStream is, String tempName, - String extention, String name, String mimeType) throws Exception { + public static File setImportFile(InputStream is, String tempName, String extention, String name, String mimeType) + throws Exception { File fileTmp = File.createTempFile(tempName, extention); fileTmp.deleteOnExit(); diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/generator/AlgorithmGenerator.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/generator/AlgorithmGenerator.java index 3aa465a..7c89da0 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/generator/AlgorithmGenerator.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/generator/AlgorithmGenerator.java @@ -22,8 +22,8 @@ import org.slf4j.LoggerFactory; /** * - * @author Giancarlo Panichi email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class AlgorithmGenerator { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/generator/InfoGenerator.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/generator/InfoGenerator.java index 96db29f..9361c3a 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/generator/InfoGenerator.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/generator/InfoGenerator.java @@ -16,8 +16,8 @@ import org.slf4j.LoggerFactory; /** * - * @author Giancarlo Panichi email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class InfoGenerator { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/generator/ProjectBuilder.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/generator/ProjectBuilder.java index 1eb6d8a..ec115a6 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/generator/ProjectBuilder.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/generator/ProjectBuilder.java @@ -31,8 +31,8 @@ import org.slf4j.LoggerFactory; /** * - * @author Giancarlo Panichi email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ProjectBuilder { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/portlet/StatAlgoImporterPortlet.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/portlet/StatAlgoImporterPortlet.java index c71c758..3dc03fb 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/portlet/StatAlgoImporterPortlet.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/portlet/StatAlgoImporterPortlet.java @@ -18,7 +18,7 @@ import org.slf4j.LoggerFactory; /** * * @author giancarlo - * email: g.panichi@isti.cnr.it + * * */ public class StatAlgoImporterPortlet extends GenericPortlet { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/social/AlgorithmNotification.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/social/AlgorithmNotification.java index db9bdc7..e0b8074 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/social/AlgorithmNotification.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/social/AlgorithmNotification.java @@ -24,8 +24,8 @@ import org.slf4j.LoggerFactory; /** * TDMNotification notification sharing TR, templates or rules * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class AlgorithmNotification extends Thread { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/social/Recipient.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/social/Recipient.java index 1a49017..ad13e43 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/social/Recipient.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/social/Recipient.java @@ -4,8 +4,8 @@ import java.io.Serializable; /** * - * @author Giancarlo Panichi email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class Recipient implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/storage/FilesStorage.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/storage/FilesStorage.java index 303002b..c376a03 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/storage/FilesStorage.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/storage/FilesStorage.java @@ -24,8 +24,8 @@ import org.slf4j.LoggerFactory; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ @@ -35,8 +35,7 @@ public class FilesStorage { private static final String STATISTICAL_ALGORITHM_PROJECT_FILE_DESCRIPTION = "Statistical Algorithm Project File"; private static final String STATISTICAL_ALGORITHM_PROJECT_FILE_NAME = "stat_algo.project"; - public static final Logger logger = LoggerFactory - .getLogger(FilesStorage.class); + public static final Logger logger = LoggerFactory.getLogger(FilesStorage.class); /** * @@ -44,28 +43,25 @@ public class FilesStorage { * User * @param itemId * Item id - * @return Public link + * @return public link * @throws StatAlgoImporterServiceException + * exception */ - public String getPublicLink(String user, String itemId) - throws StatAlgoImporterServiceException { + public String getPublicLink(String user, String itemId) throws StatAlgoImporterServiceException { Workspace ws; try { - logger.info("Get public link: [user=" + user + ", itemId=" + itemId - + "]"); + logger.info("Get public link: [user=" + user + ", itemId=" + itemId + "]"); ws = HomeLibrary.getUserWorkspace(user); WorkspaceItem workSpaceItem = ws.getItem(itemId); if (workSpaceItem.isFolder()) { - throw new StatAlgoImporterServiceException( - "Attention this is a folder!"); + throw new StatAlgoImporterServiceException("Attention this is a folder!"); } if (workSpaceItem instanceof FolderItem) { return workSpaceItem.getPublicLink(false); } else { - throw new StatAlgoImporterServiceException( - "Attention no public link for this item!"); + throw new StatAlgoImporterServiceException("Attention no public link for this item!"); } } catch (Throwable e) { @@ -83,30 +79,28 @@ public class FilesStorage { * Item id * @param folderId * Folder id + * @return workspace item * @throws StatAlgoImporterServiceException + * exception */ - public WorkspaceItem copyItemOnFolder(String user, String itemId, - String folderId) throws StatAlgoImporterServiceException { + public WorkspaceItem copyItemOnFolder(String user, String itemId, String folderId) + throws StatAlgoImporterServiceException { Workspace ws; try { - logger.info("Copy item on folder: [user=" + user + ", itemId=" - + itemId + ", folderId=" + folderId + "]"); + logger.info("Copy item on folder: [user=" + user + ", itemId=" + itemId + ", folderId=" + folderId + "]"); ws = HomeLibrary.getUserWorkspace(user); WorkspaceItem workSpaceItem = ws.getItem(folderId); if (!workSpaceItem.isFolder()) { - throw new StatAlgoImporterServiceException( - "Destination is not a folder!"); + throw new StatAlgoImporterServiceException("Destination is not a folder!"); } WorkspaceItem item = ws.copy(itemId, folderId); return item; } catch (Throwable e) { - logger.error( - "Copy item on folder on workspace: " - + e.getLocalizedMessage(), e); + logger.error("Copy item on folder on workspace: " + e.getLocalizedMessage(), e); throw new StatAlgoImporterServiceException(e.getLocalizedMessage()); } @@ -122,33 +116,29 @@ public class FilesStorage { * Destination folder id * @param newName * New name - * + * @return workspace item * @throws StatAlgoImporterServiceException + * exception */ - public WorkspaceItem copyItemOnFolderWithNewName(String user, - String itemId, String folderId, String newName) + public WorkspaceItem copyItemOnFolderWithNewName(String user, String itemId, String folderId, String newName) throws StatAlgoImporterServiceException { Workspace ws; try { - logger.info("Copy item on folder with new name: [user=" + user - + ", itemId=" + itemId + ", folderId=" + folderId - + ", newName=" + newName + "]"); + logger.info("Copy item on folder with new name: [user=" + user + ", itemId=" + itemId + ", folderId=" + + folderId + ", newName=" + newName + "]"); ws = HomeLibrary.getUserWorkspace(user); WorkspaceItem workSpaceItem = ws.getItem(folderId); if (!workSpaceItem.isFolder()) { - throw new StatAlgoImporterServiceException( - "Destination is not a folder!"); + throw new StatAlgoImporterServiceException("Destination is not a folder!"); } WorkspaceItem item = ws.copy(itemId, newName, folderId); return item; } catch (Throwable e) { - logger.error( - "Copy item on folder with new name on workspace: " - + e.getLocalizedMessage(), e); + logger.error("Copy item on folder with new name on workspace: " + e.getLocalizedMessage(), e); throw new StatAlgoImporterServiceException(e.getLocalizedMessage()); } @@ -161,21 +151,19 @@ public class FilesStorage { * @param itemId * Item id * @throws StatAlgoImporterServiceException + * exception */ - public void deleteItemOnFolder(String user, String itemId) - throws StatAlgoImporterServiceException { + public void deleteItemOnFolder(String user, String itemId) throws StatAlgoImporterServiceException { Workspace ws; try { - logger.info("Delete item on folder: [user=" + user + ", itemId=" - + itemId + "]"); + logger.info("Delete item on folder: [user=" + user + ", itemId=" + itemId + "]"); ws = HomeLibrary.getUserWorkspace(user); ws.removeItems(itemId); return; } catch (Throwable e) { - logger.error( - "Delete Item on workspace: " + e.getLocalizedMessage(), e); + logger.error("Delete Item on workspace: " + e.getLocalizedMessage(), e); throw new StatAlgoImporterServiceException(e.getLocalizedMessage()); } @@ -185,24 +173,24 @@ public class FilesStorage { /** * * @param user - * User + * user * @param parentId - * Foler id + * parent id + * @param folderName + * folder name * @throws StatAlgoImporterServiceException + * exception */ - public void deleteFolder(String user, String parentId, String folderName) - throws StatAlgoImporterServiceException { + public void deleteFolder(String user, String parentId, String folderName) throws StatAlgoImporterServiceException { Workspace ws; try { - logger.info("Delete folder: [user=" + user + ", parentId=" - + parentId + ", folderName=" + folderName + "]"); + logger.info("Delete folder: [user=" + user + ", parentId=" + parentId + ", folderName=" + folderName + "]"); ws = HomeLibrary.getUserWorkspace(user); WorkspaceItem workSpaceItem = ws.getItem(parentId); if (!workSpaceItem.isFolder()) { - throw new StatAlgoImporterServiceException( - "No valid project folder!"); + throw new StatAlgoImporterServiceException("No valid project folder!"); } WorkspaceItem target = ws.find(folderName, parentId); @@ -213,8 +201,7 @@ public class FilesStorage { return; } catch (Throwable e) { - logger.error( - "Delete folder on workspace: " + e.getLocalizedMessage(), e); + logger.error("Delete folder on workspace: " + e.getLocalizedMessage(), e); throw new StatAlgoImporterServiceException(e.getLocalizedMessage()); } @@ -224,36 +211,36 @@ public class FilesStorage { /** * * @param user - * User + * user * @param parentId - * Destination folder id - * @return Folder + * parent id + * @param folderName + * folder name + * @param folderDescription + * folder description + * @return workspace folder * @throws StatAlgoImporterServiceException + * exception */ - public WorkspaceFolder createFolder(String user, String parentId, - String folderName, String folderDescription) + public WorkspaceFolder createFolder(String user, String parentId, String folderName, String folderDescription) throws StatAlgoImporterServiceException { Workspace ws; try { - logger.info("Create folder: [user=" + user + ", parentId=" - + parentId + ", folderName=" + folderName + logger.info("Create folder: [user=" + user + ", parentId=" + parentId + ", folderName=" + folderName + ", folderDescription=" + folderDescription + "]"); ws = HomeLibrary.getUserWorkspace(user); WorkspaceItem workSpaceItem = ws.getItem(parentId); if (!workSpaceItem.isFolder()) { - throw new StatAlgoImporterServiceException( - "No valid project folder!"); + throw new StatAlgoImporterServiceException("No valid project folder!"); } - WorkspaceFolder projectTargetFolder = ws.createFolder(folderName, - folderDescription, parentId); + WorkspaceFolder projectTargetFolder = ws.createFolder(folderName, folderDescription, parentId); return projectTargetFolder; } catch (Throwable e) { - logger.error( - "Create folder on workspace: " + e.getLocalizedMessage(), e); + logger.error("Create folder on workspace: " + e.getLocalizedMessage(), e); throw new StatAlgoImporterServiceException(e.getLocalizedMessage()); } @@ -265,23 +252,23 @@ public class FilesStorage { * @param user * User * @param parentId - * Destination folder id - * @return Folder + * Parent id + * @param name + * Name + * @return workspace item * @throws StatAlgoImporterServiceException + * Exception */ - public WorkspaceItem find(String user, String parentId, String name) - throws StatAlgoImporterServiceException { + public WorkspaceItem find(String user, String parentId, String name) throws StatAlgoImporterServiceException { Workspace ws; try { - logger.info("Find: [user=" + user + ", parentId=" + parentId - + ", name=" + name + "]"); + logger.info("Find: [user=" + user + ", parentId=" + parentId + ", name=" + name + "]"); ws = HomeLibrary.getUserWorkspace(user); WorkspaceItem workSpaceItem = ws.getItem(parentId); if (!workSpaceItem.isFolder()) { - throw new StatAlgoImporterServiceException( - "No valid project folder!"); + throw new StatAlgoImporterServiceException("No valid project folder!"); } return ws.find(name, parentId); @@ -297,45 +284,40 @@ public class FilesStorage { /** * * @param user - * user + * User * @param inputStream - * input stream + * Input stream * @param folderId - * destination folder + * Folder id * @throws StatAlgoImporterServiceException + * Exception */ - public void saveStatisticalAlgorithmProject(String user, - InputStream inputStream, String folderId) + public void saveStatisticalAlgorithmProject(String user, InputStream inputStream, String folderId) throws StatAlgoImporterServiceException { Workspace ws; try { - logger.info("Save project: [user=" + user + ", folderId=" - + folderId + "]"); + logger.info("Save project: [user=" + user + ", folderId=" + folderId + "]"); ws = HomeLibrary.getUserWorkspace(user); WorkspaceItem workSpaceItem = ws.getItem(folderId); if (!workSpaceItem.isFolder()) { - throw new StatAlgoImporterServiceException( - "Destination is not a folder!"); + throw new StatAlgoImporterServiceException("Destination is not a folder!"); } - WorkspaceItem projectItem = ws.find( - STATISTICAL_ALGORITHM_PROJECT_FILE_NAME, folderId); + WorkspaceItem projectItem = ws.find(STATISTICAL_ALGORITHM_PROJECT_FILE_NAME, folderId); if (projectItem == null) { ws.createExternalFile(STATISTICAL_ALGORITHM_PROJECT_FILE_NAME, - STATISTICAL_ALGORITHM_PROJECT_FILE_DESCRIPTION, - STATISTICAL_ALGORITHM_PROJECT_MIMETYPE, inputStream, - folderId); + STATISTICAL_ALGORITHM_PROJECT_FILE_DESCRIPTION, STATISTICAL_ALGORITHM_PROJECT_MIMETYPE, + inputStream, folderId); } else { ws.updateItem(projectItem.getId(), inputStream); } return; } catch (Throwable e) { - logger.error( - "Save project on workspace: " + e.getLocalizedMessage(), e); + logger.error("Save project on workspace: " + e.getLocalizedMessage(), e); throw new StatAlgoImporterServiceException(e.getLocalizedMessage()); } @@ -344,49 +326,45 @@ public class FilesStorage { /** * * @param user - * user + * User * @param inputStream - * input stream + * Input stream * @param name - * item name + * Name * @param description - * item description + * Description * @param mimeType - * item mimetype + * Mimetype * @param folderId - * destination folder + * Folder destination * @throws StatAlgoImporterServiceException + * Exception */ - public void saveItemOnWorkspace(String user, InputStream inputStream, - String name, String description, String mimeType, String folderId) - throws StatAlgoImporterServiceException { + public void saveItemOnWorkspace(String user, InputStream inputStream, String name, String description, + String mimeType, String folderId) throws StatAlgoImporterServiceException { Workspace ws; try { - logger.info("Save item on workspace: [user=" + user + ", name=" - + name + ", description=" + description + ", mimeType=" - + mimeType + ", folderId=" + folderId + "]"); + logger.info("Save item on workspace: [user=" + user + ", name=" + name + ", description=" + description + + ", mimeType=" + mimeType + ", folderId=" + folderId + "]"); ws = HomeLibrary.getUserWorkspace(user); WorkspaceItem workSpaceItem = ws.getItem(folderId); if (!workSpaceItem.isFolder()) { - throw new StatAlgoImporterServiceException( - "Destination is not a folder!"); + throw new StatAlgoImporterServiceException("Destination is not a folder!"); } WorkspaceItem projectItem = ws.find(name, folderId); if (projectItem == null) { - ws.createExternalFile(name, description, mimeType, inputStream, - folderId); + ws.createExternalFile(name, description, mimeType, inputStream, folderId); } else { ws.updateItem(projectItem.getId(), inputStream); } return; } catch (Throwable e) { - logger.error("Save item on workspace: " + e.getLocalizedMessage(), - e); + logger.error("Save item on workspace: " + e.getLocalizedMessage(), e); throw new StatAlgoImporterServiceException(e.getLocalizedMessage()); } @@ -408,32 +386,27 @@ public class FilesStorage { * Destination folder * @return Workspace item * @throws StatAlgoImporterServiceException + * Exceptioon */ - public WorkspaceItem createItemOnWorkspace(String user, - InputStream inputStream, String name, String description, - String mimeType, String folderId) - throws StatAlgoImporterServiceException { + public WorkspaceItem createItemOnWorkspace(String user, InputStream inputStream, String name, String description, + String mimeType, String folderId) throws StatAlgoImporterServiceException { Workspace ws; try { - logger.info("Create item on workspace: [user=" + user + ", name=" - + name + ", description=" + description + ", mimeType=" - + mimeType + ", folderId=" + folderId + "]"); + logger.info("Create item on workspace: [user=" + user + ", name=" + name + ", description=" + description + + ", mimeType=" + mimeType + ", folderId=" + folderId + "]"); ws = HomeLibrary.getUserWorkspace(user); WorkspaceItem workSpaceItem = ws.getItem(folderId); if (!workSpaceItem.isFolder()) { - throw new StatAlgoImporterServiceException( - "Destination is not a folder!"); + throw new StatAlgoImporterServiceException("Destination is not a folder!"); } - ExternalFile workspaceItem = ws.createExternalFile(name, - description, mimeType, inputStream, folderId); + ExternalFile workspaceItem = ws.createExternalFile(name, description, mimeType, inputStream, folderId); return workspaceItem; } catch (Throwable e) { - logger.error( - "Create item on workspace: " + e.getLocalizedMessage(), e); + logger.error("Create item on workspace: " + e.getLocalizedMessage(), e); throw new StatAlgoImporterServiceException(e.getLocalizedMessage()); } @@ -447,36 +420,32 @@ public class FilesStorage { * Folder id * @return Input stream * @throws StatAlgoImporterServiceException + * Exception + * */ - public InputStream retrieveProjectItemOnWorkspace(String user, - String folderId) throws StatAlgoImporterServiceException { + public InputStream retrieveProjectItemOnWorkspace(String user, String folderId) + throws StatAlgoImporterServiceException { Workspace ws; try { - logger.info("Retrieve project item on workspace: [user=" + user - + ", folderId=" + folderId + "]"); + logger.info("Retrieve project item on workspace: [user=" + user + ", folderId=" + folderId + "]"); ws = HomeLibrary.getUserWorkspace(user); WorkspaceItem workSpaceItem = ws.getItem(folderId); if (!workSpaceItem.isFolder()) { - throw new StatAlgoImporterServiceException( - "Item is not valid folder!"); + throw new StatAlgoImporterServiceException("Item is not valid folder!"); } - WorkspaceItem projectItem = ws.find( - STATISTICAL_ALGORITHM_PROJECT_FILE_NAME, folderId); + WorkspaceItem projectItem = ws.find(STATISTICAL_ALGORITHM_PROJECT_FILE_NAME, folderId); if (projectItem == null) { - throw new StatAlgoImporterServiceException( - "No project found in this folder!"); + throw new StatAlgoImporterServiceException("No project found in this folder!"); } return retrieveInputStream(user, projectItem); } catch (Throwable e) { - logger.error( - "Retrieve project item on workspace: " - + e.getLocalizedMessage(), e); + logger.error("Retrieve project item on workspace: " + e.getLocalizedMessage(), e); throw new StatAlgoImporterServiceException(e.getLocalizedMessage()); } } @@ -484,27 +453,26 @@ public class FilesStorage { /** * * @param user + * User * @param folderId - * @return boolean + * Folder id + * @return boolean True if exist * @throws StatAlgoImporterServiceException + * Exception */ - public boolean existProjectItemOnWorkspace(String user, String folderId) - throws StatAlgoImporterServiceException { + public boolean existProjectItemOnWorkspace(String user, String folderId) throws StatAlgoImporterServiceException { Workspace ws; try { - logger.info("Exist project item on workspace: [user=" + user - + ", folderId=" + folderId + "]"); + logger.info("Exist project item on workspace: [user=" + user + ", folderId=" + folderId + "]"); ws = HomeLibrary.getUserWorkspace(user); WorkspaceItem workSpaceItem = ws.getItem(folderId); if (!workSpaceItem.isFolder()) { - throw new StatAlgoImporterServiceException( - "Item is not valid folder!"); + throw new StatAlgoImporterServiceException("Item is not valid folder!"); } - WorkspaceItem projectItem = ws.find( - STATISTICAL_ALGORITHM_PROJECT_FILE_NAME, folderId); + WorkspaceItem projectItem = ws.find(STATISTICAL_ALGORITHM_PROJECT_FILE_NAME, folderId); if (projectItem == null) { return false; @@ -513,9 +481,7 @@ public class FilesStorage { } } catch (Throwable e) { - logger.error( - "Exist project item on workspace: " - + e.getLocalizedMessage(), e); + logger.error("Exist project item on workspace: " + e.getLocalizedMessage(), e); throw new StatAlgoImporterServiceException(e.getLocalizedMessage()); } } @@ -523,16 +489,18 @@ public class FilesStorage { /** * * @param user + * User * @param itemId - * @return WorkspaceItem + * Item id + * @return Workspace Item * @throws StatAlgoImporterServiceException + * Exception */ public WorkspaceItem retrieveItemInfoOnWorkspace(String user, String itemId) throws StatAlgoImporterServiceException { Workspace ws; try { - logger.info("Retrieve item info on workspace: [user=" + user - + ", itemId=" + itemId + "]"); + logger.info("Retrieve item info on workspace: [user=" + user + ", itemId=" + itemId + "]"); ws = HomeLibrary.getUserWorkspace(user); @@ -540,9 +508,7 @@ public class FilesStorage { return workSpaceItem; } catch (Throwable e) { - logger.error( - "Retrieve item info on workspace: " - + e.getLocalizedMessage(), e); + logger.error("Retrieve item info on workspace: " + e.getLocalizedMessage(), e); throw new StatAlgoImporterServiceException(e.getLocalizedMessage()); } } @@ -555,27 +521,24 @@ public class FilesStorage { * Item id * @return Input stream * @throws StatAlgoImporterServiceException + * Excetpion */ - public InputStream retrieveItemOnWorkspace(String user, String itemId) - throws StatAlgoImporterServiceException { + public InputStream retrieveItemOnWorkspace(String user, String itemId) throws StatAlgoImporterServiceException { Workspace ws; try { - logger.info("Retrieve item on workspace: [user=" + user - + ", itemId=" + itemId + "]"); + logger.info("Retrieve item on workspace: [user=" + user + ", itemId=" + itemId + "]"); ws = HomeLibrary.getUserWorkspace(user); WorkspaceItem workSpaceItem = ws.getItem(itemId); if (workSpaceItem.isFolder()) { - throw new StatAlgoImporterServiceException( - "Folder Item is not valid!"); + throw new StatAlgoImporterServiceException("Folder Item is not valid!"); } return retrieveInputStream(user, workSpaceItem); } catch (Throwable e) { - logger.error( - "Retieve item on workspace: " + e.getLocalizedMessage(), e); + logger.error("Retieve item on workspace: " + e.getLocalizedMessage(), e); throw new StatAlgoImporterServiceException(e.getLocalizedMessage()); } @@ -586,28 +549,24 @@ public class FilesStorage { * @param user * User * @param wi - * WorkspaceItem + * Workspace item * @return InputStream * @throws StatAlgoImporterServiceException + * Exception */ - public InputStream retrieveInputStream(String user, WorkspaceItem wi) - throws StatAlgoImporterServiceException { + public InputStream retrieveInputStream(String user, WorkspaceItem wi) throws StatAlgoImporterServiceException { InputStream is = null; try { - logger.info("Retrieve input stream: [user=" + user - + ", workspaceItem=" + wi + "]"); + logger.info("Retrieve input stream: [user=" + user + ", workspaceItem=" + wi + "]"); org.gcube.common.homelibrary.home.workspace.folder.items.File gcubeItem = ((org.gcube.common.homelibrary.home.workspace.folder.items.File) wi); is = gcubeItem.getData(); return is; } catch (Throwable e) { - logger.error( - "Error retrieving file from storage: " - + e.getLocalizedMessage(), e); - throw new StatAlgoImporterServiceException( - "Error retrieving file from storage: " - + e.getLocalizedMessage(), e); + logger.error("Error retrieving file from storage: " + e.getLocalizedMessage(), e); + throw new StatAlgoImporterServiceException("Error retrieving file from storage: " + e.getLocalizedMessage(), + e); } } @@ -621,24 +580,21 @@ public class FilesStorage { * @param data * String to save * @throws StatAlgoImporterServiceException + * Exception */ - public void saveStringInItem(String user, String itemId, String data) - throws StatAlgoImporterServiceException { + public void saveStringInItem(String user, String itemId, String data) throws StatAlgoImporterServiceException { Workspace ws; try { - logger.info("Save string in item: [user=" + user + ", itemId=" - + itemId + "]"); - + logger.info("Save string in item: [user=" + user + ", itemId=" + itemId + "]"); + ws = HomeLibrary.getUserWorkspace(user); WorkspaceItem workSpaceItem = ws.getItem(itemId); if (workSpaceItem == null) { - throw new StatAlgoImporterServiceException( - "No item retrieved on workspace!"); + throw new StatAlgoImporterServiceException("No item retrieved on workspace!"); } else { if (workSpaceItem.isFolder()) { - throw new StatAlgoImporterServiceException( - "Item is a folder!"); + throw new StatAlgoImporterServiceException("Item is a folder!"); } else { } @@ -651,30 +607,36 @@ public class FilesStorage { return; } catch (Throwable e) { - logger.error( - "Save string in item on workspace: " - + e.getLocalizedMessage(), e); + logger.error("Save string in item on workspace: " + e.getLocalizedMessage(), e); throw new StatAlgoImporterServiceException(e.getLocalizedMessage()); } } + /** + * + * @param user + * User + * @param itemId + * Item id + * @param is + * Input stream + * @throws StatAlgoImporterServiceException + * Exception + */ public void saveInputStreamInItem(String user, String itemId, InputStream is) throws StatAlgoImporterServiceException { Workspace ws; try { - logger.info("Save input stream in item: [user=" + user + ", itemId=" - + itemId + "]"); - + logger.info("Save input stream in item: [user=" + user + ", itemId=" + itemId + "]"); + ws = HomeLibrary.getUserWorkspace(user); WorkspaceItem workSpaceItem = ws.getItem(itemId); if (workSpaceItem == null) { - throw new StatAlgoImporterServiceException( - "No item retrieved on workspace!"); + throw new StatAlgoImporterServiceException("No item retrieved on workspace!"); } else { if (workSpaceItem.isFolder()) { - throw new StatAlgoImporterServiceException( - "Item is a folder!"); + throw new StatAlgoImporterServiceException("Item is a folder!"); } else { } @@ -685,26 +647,31 @@ public class FilesStorage { return; } catch (Throwable e) { - logger.error( - "Save input stream in item on workspace: " - + e.getLocalizedMessage(), e); + logger.error("Save input stream in item on workspace: " + e.getLocalizedMessage(), e); throw new StatAlgoImporterServiceException(e.getLocalizedMessage()); } } - public File zipFolder(String user, String folderId) - throws StatAlgoImporterServiceException { + /** + * + * @param user + * User + * @param folderId + * Folder Id + * @return Zip folder + * @throws StatAlgoImporterServiceException + * Exception + */ + public File zipFolder(String user, String folderId) throws StatAlgoImporterServiceException { Workspace ws; try { - logger.info("Zip folder: [user=" + user + ", folderId=" - + folderId + "]"); - + logger.info("Zip folder: [user=" + user + ", folderId=" + folderId + "]"); + ws = HomeLibrary.getUserWorkspace(user); WorkspaceItem workSpaceItem = ws.getItem(folderId); if (!workSpaceItem.isFolder()) { - throw new StatAlgoImporterServiceException( - "Item is not valid folder!"); + throw new StatAlgoImporterServiceException("Item is not valid folder!"); } WorkspaceFolder folder = (WorkspaceFolder) workSpaceItem; @@ -714,26 +681,35 @@ public class FilesStorage { return fileZip; } catch (Throwable e) { - logger.error("Zip folder on workspace: " + e.getLocalizedMessage(), - e); + logger.error("Zip folder on workspace: " + e.getLocalizedMessage(), e); throw new StatAlgoImporterServiceException(e.getLocalizedMessage()); } } - public File zipFolder(String user, String folderId, - List idsToExclude) throws StatAlgoImporterServiceException { + /** + * + * @param user + * User + * @param folderId + * Folder id + * @param idsToExclude + * List of ids to exclude + * @return Zip folder + * @throws StatAlgoImporterServiceException + * Exception + */ + public File zipFolder(String user, String folderId, List idsToExclude) + throws StatAlgoImporterServiceException { Workspace ws; try { - logger.info("Zip folder with exclude: [user=" + user + ", folderId=" - + folderId + "]"); - + logger.info("Zip folder with exclude: [user=" + user + ", folderId=" + folderId + "]"); + ws = HomeLibrary.getUserWorkspace(user); WorkspaceItem workSpaceItem = ws.getItem(folderId); if (!workSpaceItem.isFolder()) { - throw new StatAlgoImporterServiceException( - "Item is not valid folder!"); + throw new StatAlgoImporterServiceException("Item is not valid folder!"); } WorkspaceFolder folder = (WorkspaceFolder) workSpaceItem; @@ -743,21 +719,25 @@ public class FilesStorage { return fileZip; } catch (Throwable e) { - logger.error( - "Zip folder with exclude on workspace: " - + e.getLocalizedMessage(), e); + logger.error("Zip folder with exclude on workspace: " + e.getLocalizedMessage(), e); throw new StatAlgoImporterServiceException(e.getLocalizedMessage()); } } - public void downloadInputFile(String fileUrl, Path destination) - throws StatAlgoImporterServiceException { + /** + * + * @param fileUrl + * Url + * @param destination + * Destination + * @throws StatAlgoImporterServiceException + * Exception + */ + public void downloadInputFile(String fileUrl, Path destination) throws StatAlgoImporterServiceException { try { - logger.info("Download input file: [fileUrl=" + fileUrl + ", destination=" - + destination + "]"); - + logger.info("Download input file: [fileUrl=" + fileUrl + ", destination=" + destination + "]"); URL smpFile = new URL(fileUrl); URLConnection uc = (URLConnection) smpFile.openConnection(); @@ -771,8 +751,7 @@ public class FilesStorage { } } - private void inputStreamToFile(InputStream is, Path destination) - throws FileNotFoundException, IOException { + private void inputStreamToFile(InputStream is, Path destination) throws FileNotFoundException, IOException { FileOutputStream out = new FileOutputStream(destination.toFile()); byte buf[] = new byte[1024]; int len = 0; diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/storage/MainCodeSave.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/storage/MainCodeSave.java index e40a0da..2b94902 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/storage/MainCodeSave.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/storage/MainCodeSave.java @@ -17,15 +17,14 @@ import org.slf4j.LoggerFactory; /** * * @author Giancarlo Panichi - * email: g.panichi@isti.cnr.it + * * */ public class MainCodeSave { private static final String ALGORITHM_DESCRIPTION = "Algorithm"; private static final String ALGORITHM_MIMETYPE = "text/plain"; - public static final Logger logger = LoggerFactory - .getLogger(MainCodeSave.class); + public static final Logger logger = LoggerFactory.getLogger(MainCodeSave.class); public MainCodeSave() { @@ -34,39 +33,44 @@ public class MainCodeSave { /** * * @param serviceCredentials + * Service credentials * @param file + * File * @param code + * Code * @param project + * Prject * @throws StatAlgoImporterServiceException + * Exception */ - public void save(ServiceCredentials serviceCredentials, ItemDescription file, - String code, Project project) throws StatAlgoImporterServiceException{ + public void save(ServiceCredentials serviceCredentials, ItemDescription file, String code, Project project) + throws StatAlgoImporterServiceException { FilesStorage filesStorage = new FilesStorage(); filesStorage.saveStringInItem(serviceCredentials.getUserName(), file.getId(), code); } - - + /** * * @param serviceCredentials - * @param file description of destination file - * @param code code to insert in the file - * @param project - * @return ItemDescription + * Service credentials + * @param file + * Description of destination file + * @param code + * Code to insert in the file + * @param project + * Project + * @return ItemDescription Item description * @throws StatAlgoImporterServiceException + * exception */ - public ItemDescription saveNew(ServiceCredentials serviceCredentials, ItemDescription file, - String code, Project project) - throws StatAlgoImporterServiceException { + public ItemDescription saveNew(ServiceCredentials serviceCredentials, ItemDescription file, String code, + Project project) throws StatAlgoImporterServiceException { Path tempFile = createTempFile(file, code); - ItemDescription mainCode = saveInWorkspace(tempFile, serviceCredentials, file, - project); + ItemDescription mainCode = saveInWorkspace(tempFile, serviceCredentials, file, project); return mainCode; } - - private Path createTempFile(ItemDescription file, String code) - throws StatAlgoImporterServiceException { + private Path createTempFile(ItemDescription file, String code) throws StatAlgoImporterServiceException { try { Path tempFile = Files.createTempFile(file.getName(), ""); @@ -78,36 +82,29 @@ public class MainCodeSave { } catch (IOException e) { logger.error(e.getLocalizedMessage()); e.printStackTrace(); - throw new StatAlgoImporterServiceException(e.getLocalizedMessage(), - e); + throw new StatAlgoImporterServiceException(e.getLocalizedMessage(), e); } } - private ItemDescription saveInWorkspace(Path tempFile, - ServiceCredentials serviceCredentials, ItemDescription file, Project project) - throws StatAlgoImporterServiceException { + private ItemDescription saveInWorkspace(Path tempFile, ServiceCredentials serviceCredentials, ItemDescription file, + Project project) throws StatAlgoImporterServiceException { FilesStorage filesStorage = new FilesStorage(); WorkspaceItem mainCodeItem; try { - mainCodeItem = filesStorage.createItemOnWorkspace( - serviceCredentials.getUserName(), - Files.newInputStream(tempFile, StandardOpenOption.READ), - file.getName(), ALGORITHM_DESCRIPTION, ALGORITHM_MIMETYPE, - project.getProjectFolder().getFolder().getId()); + mainCodeItem = filesStorage.createItemOnWorkspace(serviceCredentials.getUserName(), + Files.newInputStream(tempFile, StandardOpenOption.READ), file.getName(), ALGORITHM_DESCRIPTION, + ALGORITHM_MIMETYPE, project.getProjectFolder().getFolder().getId()); } catch (IOException e) { logger.error(e.getLocalizedMessage()); e.printStackTrace(); - throw new StatAlgoImporterServiceException(e.getLocalizedMessage(), - e); + throw new StatAlgoImporterServiceException(e.getLocalizedMessage(), e); } ItemDescription mainCode; try { - mainCode = new ItemDescription(mainCodeItem.getId(), - mainCodeItem.getName(), mainCodeItem.getOwner() - .getPortalLogin(), mainCodeItem.getPath(), - mainCodeItem.getType().name()); + mainCode = new ItemDescription(mainCodeItem.getId(), mainCodeItem.getName(), + mainCodeItem.getOwner().getPortalLogin(), mainCodeItem.getPath(), mainCodeItem.getType().name()); } catch (InternalErrorException e) { logger.error(e.getLocalizedMessage()); e.printStackTrace(); diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/storage/ProjectArchiver.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/storage/ProjectArchiver.java index 7e7c4d5..d101db2 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/storage/ProjectArchiver.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/storage/ProjectArchiver.java @@ -19,8 +19,8 @@ import org.slf4j.LoggerFactory; /** * - * @author Giancarlo Panichi email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ProjectArchiver { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/uriresolver/ApplicationType.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/uriresolver/ApplicationType.java index 674321b..c1760c4 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/uriresolver/ApplicationType.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/uriresolver/ApplicationType.java @@ -2,8 +2,8 @@ package org.gcube.portlets.user.statisticalalgorithmsimporter.server.uriresolver /** * - * @author Giancarlo Panichi email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public enum ApplicationType { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/util/ServiceCredentials.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/util/ServiceCredentials.java index b38dbcc..5d10225 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/util/ServiceCredentials.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/util/ServiceCredentials.java @@ -4,8 +4,8 @@ import java.io.Serializable; /** * - * @author Giancarlo Panichi email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ServiceCredentials implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/Constants.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/Constants.java index 51eb505..66bb642 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/Constants.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/Constants.java @@ -2,8 +2,8 @@ package org.gcube.portlets.user.statisticalalgorithmsimporter.shared; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class Constants { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/code/CodeData.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/code/CodeData.java index 41e1578..3750ed0 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/code/CodeData.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/code/CodeData.java @@ -4,8 +4,8 @@ import java.io.Serializable; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class CodeData implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/exception/StatAlgoImporterServiceException.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/exception/StatAlgoImporterServiceException.java index 31561cf..a366378 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/exception/StatAlgoImporterServiceException.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/exception/StatAlgoImporterServiceException.java @@ -5,16 +5,14 @@ package org.gcube.portlets.user.statisticalalgorithmsimporter.shared.exception; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class StatAlgoImporterServiceException extends Exception { - private static final long serialVersionUID = -2255657546267656458L; - /** * */ @@ -24,15 +22,22 @@ public class StatAlgoImporterServiceException extends Exception { /** * @param message + * message */ public StatAlgoImporterServiceException(String message) { super(message); } - - - public StatAlgoImporterServiceException(String message,Throwable t) { - super(message,t); + + /** + * + * @param message + * message + * @param throwable + * throwable + * + */ + public StatAlgoImporterServiceException(String message, Throwable throwable) { + super(message, throwable); } - } diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/exception/StatAlgoImporterSessionExpiredException.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/exception/StatAlgoImporterSessionExpiredException.java index c06bfb6..bbc209b 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/exception/StatAlgoImporterSessionExpiredException.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/exception/StatAlgoImporterSessionExpiredException.java @@ -3,10 +3,10 @@ package org.gcube.portlets.user.statisticalalgorithmsimporter.shared.exception; /** * ASL Session Expired Exception * - * @author "Giancarlo Panichi" + * @author Giancarlo Panichi * */ -public class StatAlgoImporterSessionExpiredException extends StatAlgoImporterServiceException { +public class StatAlgoImporterSessionExpiredException extends StatAlgoImporterServiceException { private static final long serialVersionUID = -4831171355042165166L; @@ -19,18 +19,21 @@ public class StatAlgoImporterSessionExpiredException extends StatAlgoImporterSe /** * @param message + * message */ public StatAlgoImporterSessionExpiredException(String message) { super(message); } - + /** * * @param message - * @param t + * message + * @param throwable + * throwable */ - public StatAlgoImporterSessionExpiredException(String message,Throwable t) { - super(message,t); + public StatAlgoImporterSessionExpiredException(String message, Throwable throwable) { + super(message, throwable); } - + } diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/file/FileUploadMonitor.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/file/FileUploadMonitor.java index 6691fc5..8f3f41e 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/file/FileUploadMonitor.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/file/FileUploadMonitor.java @@ -7,22 +7,22 @@ import java.io.Serializable; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class FileUploadMonitor implements Serializable { private static final long serialVersionUID = -1150111422206443617L; - + protected long totalLenght; protected long elaboratedLenght; protected FileUploadState state; protected String failureReason; protected String failureDetails; protected float percentDone; - - public FileUploadMonitor(){ + + public FileUploadMonitor() { state = FileUploadState.INPROGRESS; } @@ -31,7 +31,7 @@ public class FileUploadMonitor implements Serializable { this.elaboratedLenght = elaboratedLenght; this.state = state; this.failureReason = failureReason; - this.percentDone=0; + this.percentDone = 0; } /** @@ -40,7 +40,7 @@ public class FileUploadMonitor implements Serializable { public long getTotalLenght() { return totalLenght; } - + /** * @return the elaboratedLenght */ @@ -48,8 +48,7 @@ public class FileUploadMonitor implements Serializable { return elaboratedLenght; } - - public FileUploadState getState(){ + public FileUploadState getState() { return state; } @@ -76,8 +75,7 @@ public class FileUploadMonitor implements Serializable { this.failureDetails = failureDetails; } - public void setState(FileUploadState state) - { + public void setState(FileUploadState state) { this.state = state; } @@ -90,7 +88,8 @@ public class FileUploadMonitor implements Serializable { } /** - * @param totalLenght the totalLenght to set + * @param totalLenght + * the totalLenght to set */ public void setTotalLenght(long totalLenght) { this.totalLenght = totalLenght; @@ -99,6 +98,7 @@ public class FileUploadMonitor implements Serializable { /** * * @param elaboratedLenght + * elaborated lenght */ public void setElaboratedLenght(long elaboratedLenght) { this.elaboratedLenght = elaboratedLenght; @@ -107,7 +107,9 @@ public class FileUploadMonitor implements Serializable { /** * * @param failureReason + * failure reason * @param failureDetails + * failure details */ public void setFailed(String failureReason, String failureDetails) { this.state = FileUploadState.FAILED; @@ -117,11 +119,9 @@ public class FileUploadMonitor implements Serializable { @Override public String toString() { - return "FileUploadMonitor [totalLenght=" + totalLenght - + ", elaboratedLenght=" + elaboratedLenght + ", state=" + state - + ", failureReason=" + failureReason + ", failureDetails=" - + failureDetails + ", percentDone=" + percentDone + "]"; + return "FileUploadMonitor [totalLenght=" + totalLenght + ", elaboratedLenght=" + elaboratedLenght + ", state=" + + state + ", failureReason=" + failureReason + ", failureDetails=" + failureDetails + ", percentDone=" + + percentDone + "]"; } - } diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/file/FileUploadState.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/file/FileUploadState.java index 22f3bcd..2f4fbd1 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/file/FileUploadState.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/file/FileUploadState.java @@ -4,11 +4,16 @@ package org.gcube.portlets.user.statisticalalgorithmsimporter.shared.file; /** - * @author Federico De Faveri defaveri@isti.cnr.it + * + * @author Giancarlo Panichi + * * */ public enum FileUploadState { + /** + * The operation is started + */ STARTED, /** diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/DataType.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/DataType.java index d004f53..a7d5272 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/DataType.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/DataType.java @@ -5,8 +5,8 @@ import java.util.List; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public enum DataType { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/GlobalVariables.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/GlobalVariables.java index 99a7e78..8788c22 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/GlobalVariables.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/GlobalVariables.java @@ -4,8 +4,8 @@ import java.io.Serializable; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class GlobalVariables implements Serializable { @@ -23,14 +23,18 @@ public class GlobalVariables implements Serializable { /** * - * @param id + * @param id + * id * @param name + * name * @param description + * description * @param defaultValue + * default value * @param dataType + * data type */ - public GlobalVariables(int id, String name, String description, - String defaultValue, DataType dataType) { + public GlobalVariables(int id, String name, String description, String defaultValue, DataType dataType) { super(); this.id = id; this.name = name; @@ -81,12 +85,8 @@ public class GlobalVariables implements Serializable { @Override public String toString() { - return "GlobalVariables [id=" + id + ", name=" + name - + ", description=" + description + ", defaultValue=" + return "GlobalVariables [id=" + id + ", name=" + name + ", description=" + description + ", defaultValue=" + defaultValue + ", dataType=" + dataType + "]"; } - - - } diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/IOType.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/IOType.java index 4cb20a3..1cf4c0f 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/IOType.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/IOType.java @@ -5,8 +5,8 @@ import java.util.List; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public enum IOType { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/InputOutputVariables.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/InputOutputVariables.java index bacabe7..d60a1e8 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/InputOutputVariables.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/InputOutputVariables.java @@ -4,8 +4,8 @@ import java.io.Serializable; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class InputOutputVariables implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/InterpreterInfo.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/InterpreterInfo.java index 593df99..8a26f33 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/InterpreterInfo.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/InterpreterInfo.java @@ -5,8 +5,8 @@ import java.util.ArrayList; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class InterpreterInfo implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/InterpreterPackageInfo.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/InterpreterPackageInfo.java index b73dd5f..a952f8c 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/InterpreterPackageInfo.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/InterpreterPackageInfo.java @@ -4,8 +4,8 @@ import java.io.Serializable; /** * - * @author Giancarlo Panichi email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class InterpreterPackageInfo implements Serializable { @@ -19,12 +19,15 @@ public class InterpreterPackageInfo implements Serializable { public InterpreterPackageInfo() { super(); } - + /** * - * @param id - * @param name Package Name - * @param version Package Version + * @param id + * id + * @param name + * name + * @param version + * version */ public InterpreterPackageInfo(int id, String name, String version) { super(); @@ -59,8 +62,7 @@ public class InterpreterPackageInfo implements Serializable { @Override public String toString() { - return "InterpreterPackageInfo [id=" + id + ", name=" + name - + ", version=" + version + "]"; + return "InterpreterPackageInfo [id=" + id + ", name=" + name + ", version=" + version + "]"; } } diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/ProjectInfo.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/ProjectInfo.java index e96326c..6aa4671 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/ProjectInfo.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/ProjectInfo.java @@ -4,8 +4,8 @@ import java.io.Serializable; /** * - * @author Giancarlo Panichi email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ProjectInfo implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/RequestedVRE.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/RequestedVRE.java index 027e125..69c3a4a 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/RequestedVRE.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/input/RequestedVRE.java @@ -4,8 +4,8 @@ import java.io.Serializable; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class RequestedVRE implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/InputData.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/InputData.java index cef4515..5128845 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/InputData.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/InputData.java @@ -10,8 +10,8 @@ import org.gcube.portlets.user.statisticalalgorithmsimporter.shared.input.InputO /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class InputData implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/MainCode.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/MainCode.java index 5aa175b..9150ce6 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/MainCode.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/MainCode.java @@ -6,8 +6,8 @@ import org.gcube.portlets.user.statisticalalgorithmsimporter.shared.workspace.It /** * - * @author Giancarlo Panichi email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class MainCode implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/Project.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/Project.java index 2740212..3efa6d6 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/Project.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/Project.java @@ -4,8 +4,8 @@ import java.io.Serializable; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class Project implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/ProjectCompile.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/ProjectCompile.java index 944282d..e3d1dcf 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/ProjectCompile.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/ProjectCompile.java @@ -6,8 +6,8 @@ import org.gcube.portlets.user.statisticalalgorithmsimporter.shared.workspace.It /** * - * @author Giancarlo Panichi email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ProjectCompile implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/ProjectDeploy.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/ProjectDeploy.java index 14061a4..69d0bed 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/ProjectDeploy.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/ProjectDeploy.java @@ -6,8 +6,8 @@ import org.gcube.portlets.user.statisticalalgorithmsimporter.shared.workspace.It /** * - * @author Giancarlo Panichi email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ProjectDeploy implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/ProjectFolder.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/ProjectFolder.java index 68da04a..2943418 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/ProjectFolder.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/ProjectFolder.java @@ -6,8 +6,8 @@ import org.gcube.portlets.user.statisticalalgorithmsimporter.shared.workspace.It /** * - * @author Giancarlo Panichi email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ProjectFolder implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/ProjectTarget.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/ProjectTarget.java index d06e142..3f4f22d 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/ProjectTarget.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/project/ProjectTarget.java @@ -6,8 +6,8 @@ import org.gcube.portlets.user.statisticalalgorithmsimporter.shared.workspace.It /** * - * @author Giancarlo Panichi email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ProjectTarget implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/session/SessionConstants.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/session/SessionConstants.java index 15fc1b8..7c3b3af 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/session/SessionConstants.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/session/SessionConstants.java @@ -2,8 +2,8 @@ package org.gcube.portlets.user.statisticalalgorithmsimporter.shared.session; /** * - * @author giancarlo - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class SessionConstants { diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/session/UserInfo.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/session/UserInfo.java index 067fa67..8afb6ac 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/session/UserInfo.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/session/UserInfo.java @@ -4,8 +4,8 @@ import java.io.Serializable; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class UserInfo implements Serializable { @@ -26,15 +26,20 @@ public class UserInfo implements Serializable { /** * * @param username + * user name * @param groupId + * group id * @param groupName + * group name * @param scope - * @param scopeName + * scope * @param userEmailAddress + * email * @param userFullName + * full name */ - public UserInfo(String username, String groupId, String groupName, - String scope, String userEmailAddress, String userFullName) { + public UserInfo(String username, String groupId, String groupName, String scope, String userEmailAddress, + String userFullName) { super(); this.username = username; this.groupId = groupId; @@ -94,10 +99,8 @@ public class UserInfo implements Serializable { @Override public String toString() { - return "UserInfo [username=" + username + ", groupId=" + groupId - + ", groupName=" + groupName + ", scope=" + scope - + ", userEmailAddress=" + userEmailAddress + ", userFullName=" - + userFullName + "]"; + return "UserInfo [username=" + username + ", groupId=" + groupId + ", groupName=" + groupName + ", scope=" + + scope + ", userEmailAddress=" + userEmailAddress + ", userFullName=" + userFullName + "]"; } } diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/workspace/ItemDescription.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/workspace/ItemDescription.java index 1d6a603..1909087 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/workspace/ItemDescription.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/shared/workspace/ItemDescription.java @@ -4,8 +4,8 @@ import java.io.Serializable; /** * - * @author Giancarlo Panichi email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ItemDescription implements Serializable { @@ -81,13 +81,7 @@ public class ItemDescription implements Serializable { this.publicLink = publicLink; } - /** - * Compare basic information with another ItemDescription not null - * - * @param itemDescription - * @return boolean - * - */ + public boolean compareInfo(ItemDescription itemDescription){ if(itemDescription!=null && id.compareTo(itemDescription.getId())==0 && name.compareTo(itemDescription.getName())==0 && diff --git a/src/test/java/org/gcube/portlets/user/statisticalalgorithmsimporter/TestStatAlgoImporter.java b/src/test/java/org/gcube/portlets/user/statisticalalgorithmsimporter/TestStatAlgoImporter.java index b8b7df4..8e37168 100644 --- a/src/test/java/org/gcube/portlets/user/statisticalalgorithmsimporter/TestStatAlgoImporter.java +++ b/src/test/java/org/gcube/portlets/user/statisticalalgorithmsimporter/TestStatAlgoImporter.java @@ -7,8 +7,8 @@ package org.gcube.portlets.user.statisticalalgorithmsimporter; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TestStatAlgoImporter {