From 57a7a23715179c0e4762cb1c9dced04a32124801 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Wed, 3 Feb 2016 16:39:33 +0000 Subject: [PATCH] 1452: Implement a GUI for StatMan Algorithms Importer Task-Url: https://support.d4science.org/issues/1452 Fixed Explorer refresh on save project git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/statistical-algorithms-importer@122812 82a268e6-3cf1-43bd-a215-b396298e98cf --- pom.xml | 21 +++-- .../client/project/ProjectManager.java | 1 + .../uriresolver/UriResolverSMIClient.java | 77 ------------------- 3 files changed, 14 insertions(+), 85 deletions(-) delete mode 100644 src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/uriresolver/UriResolverSMIClient.java diff --git a/pom.xml b/pom.xml index c0c8268..195e551 100644 --- a/pom.xml +++ b/pom.xml @@ -296,11 +296,8 @@ - - org.gcube.portlets.user - uri-resolver-manager - [1.0.0-SNAPSHOT,2.0.0-SNAPSHOT) - + @@ -312,16 +309,24 @@ gt-opengis org.geotools + + xerces + xercesImpl + org.n52.wps 52n-wps-r (0.0.1,5.0.0) + + + xerces + xercesImpl + + - - com.allen-sauer.gwt.log @@ -548,7 +553,7 @@ - + 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 c97d714..b80e2a0 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 @@ -309,6 +309,7 @@ public class ProjectManager { public void onSuccess(Void result) { monitor.hide(); UtilsGXT3.info("Save", "Project saved!"); + fireProjectStatusExplorerRefreshEvent(); } @Override diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/uriresolver/UriResolverSMIClient.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/uriresolver/UriResolverSMIClient.java deleted file mode 100644 index 7f3e9c1..0000000 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/uriresolver/UriResolverSMIClient.java +++ /dev/null @@ -1,77 +0,0 @@ -package org.gcube.portlets.user.statisticalalgorithmsimporter.server.uriresolver; - -import java.util.HashMap; -import java.util.Map; - -import org.gcube.application.framework.core.session.ASLSession; -import org.gcube.portlets.user.statisticalalgorithmsimporter.shared.exception.StatAlgoImporterServiceException; -import org.gcube.portlets.user.statisticalalgorithmsimporter.shared.workspace.ItemDescription; -import org.gcube.portlets.user.uriresolvermanager.UriResolverManager; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Client for retrieve link - * - * - * @author giancarlo email: g.panichi@isti.cnr.it - * - */ -public class UriResolverSMIClient { - private static Logger logger = LoggerFactory - .getLogger(UriResolverSMIClient.class); - - public UriResolverSMIClient() { - - } - - public String resolve(ItemDescription itemDescription, ASLSession aslSession) - throws StatAlgoImporterServiceException { - try { - - String link = ""; - - logger.debug("Get uri from resolver: " + itemDescription); - - UriResolverManager resolver; - Map params = new HashMap(); - if (itemDescription != null) { - resolver = new UriResolverManager( - ApplicationType.SMP_ID.toString()); - params.put("smp-id", itemDescription.getId()); - if (itemDescription.getName() == null) { - params.put("fileName", ""); - } else { - params.put("fileName", itemDescription.getName()); - } - if (itemDescription.getType() == null) { - params.put("contentType", ""); - } else { - params.put("contentType", itemDescription.getType()); - } - logger.debug("Uri Resolver params: " + params); - link = resolver.getLink(params, true); // true, link is shorted - // otherwise none - } else { - logger.debug("No valid ItemDescription: " + itemDescription); - throw new StatAlgoImporterServiceException( - "No valid ItemDescription: " + itemDescription); - - } - - logger.debug("Retrieved Link: " + link); - return link; - - } catch (StatAlgoImporterServiceException e) { - throw e; - } catch (Throwable e) { - e.printStackTrace(); - throw new StatAlgoImporterServiceException( - "Error retrieving uri from resolver: " - + e.getLocalizedMessage()); - } - - } - -}