refactored

This commit is contained in:
Francesco Mangiacrapa 2020-12-01 16:45:05 +01:00
parent 45ee429045
commit 12020bc9c2
11 changed files with 32 additions and 19 deletions

View File

@ -1,12 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src/test/java"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="test" value="true"/>

View File

@ -1,4 +1,4 @@
package org.gcube.application;
package org.gcube.application.geoportalcommon;
import static org.gcube.resources.discovery.icclient.ICFactory.client;
@ -14,9 +14,9 @@ import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathFactory;
import org.gcube.application.shared.GeoNaDataViewerProfile;
import org.gcube.application.shared.LayerItem;
import org.gcube.application.shared.exception.ApplicationProfileNotFoundException;
import org.gcube.application.geoportalcommon.shared.GeoNaDataViewerProfile;
import org.gcube.application.geoportalcommon.shared.LayerItem;
import org.gcube.application.geoportalcommon.shared.exception.ApplicationProfileNotFoundException;
import org.gcube.common.resources.gcore.utils.XPathHelper;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.resources.discovery.client.api.DiscoveryClient;

View File

@ -1,12 +1,12 @@
package org.gcube.application;
package org.gcube.application.geoportalcommon;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.Arrays;
import org.gcube.application.shared.GeoNaDataViewerProfile;
import org.gcube.application.shared.GeoNaItemRef;
import org.gcube.application.shared.PublicLink;
import org.gcube.application.geoportalcommon.shared.GeoNaDataViewerProfile;
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
import org.gcube.application.geoportalcommon.shared.PublicLink;
import org.gcube.portlets.user.urlshortener.UrlShortener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -82,11 +82,12 @@ public class GeoportalCommon {
* @throws Exception the exception
*/
public GeoNaDataViewerProfile getGeoNaDataViewProfile(String appID) throws Exception {
LOG.info("getGeoNaDataViewProfile called");
LOG.info("getGeoNaDataViewProfile called for: "+appID);
if(appID==null || appID.isEmpty())
appID = GeoportalCommonConstants.GEOPORTAL_DATA_VIEWER_APP;
LOG.info("using AppId: "+appID);
GeoNaDataViewerProfileReader gdvp = new GeoNaDataViewerProfileReader(appID);
GeoNaDataViewerProfile profile = gdvp.readProfileFromInfrastrucure();
LOG.info("Returning profile: " + profile);

View File

@ -1,4 +1,4 @@
package org.gcube.application;
package org.gcube.application.geoportalcommon;
/**
* The Class GeoportalCommonConstants.

View File

@ -1,4 +1,4 @@
package org.gcube.application.shared;
package org.gcube.application.geoportalcommon.shared;
import java.io.Serializable;
import java.util.Map;

View File

@ -1,4 +1,4 @@
package org.gcube.application.shared;
package org.gcube.application.geoportalcommon.shared;
import java.io.Serializable;

View File

@ -1,4 +1,4 @@
package org.gcube.application.shared;
package org.gcube.application.geoportalcommon.shared;
import java.io.Serializable;

View File

@ -1,7 +1,7 @@
/**
*
*/
package org.gcube.application.shared;
package org.gcube.application.geoportalcommon.shared;
import java.io.Serializable;

View File

@ -1,4 +1,4 @@
package org.gcube.application.shared.exception;
package org.gcube.application.geoportalcommon.shared.exception;
/**
* The Class ApplicationProfileException.

View File

@ -1,7 +1,8 @@
package org.gcube.application;
import org.gcube.application.shared.GeoNaDataViewerProfile;
import org.gcube.application.shared.GeoNaItemRef;
import org.gcube.application.geoportalcommon.GeoportalCommon;
import org.gcube.application.geoportalcommon.shared.GeoNaDataViewerProfile;
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
import org.gcube.common.scope.api.ScopeProvider;
public class TestGeonaReader {