Integrate legacy library

This commit is contained in:
Fabio Sinibaldi 2020-11-16 18:21:07 +01:00
parent c5cb6b2df9
commit fa58b5ba91
7 changed files with 30 additions and 22 deletions

View File

@ -1,2 +1,6 @@
/org.eclipse.core.resources.prefs
/org.eclipse.jdt.core.prefs
/org.eclipse.jpt.core.prefs
/org.eclipse.m2e.core.prefs
/org.eclipse.wst.common.project.facet.core.prefs.xml
/org.eclipse.wst.common.project.facet.core.xml

View File

@ -84,7 +84,7 @@
<dependency>
<groupId>org.gcube.application</groupId>
<artifactId>geoportal-logic</artifactId>
<version>[1.0.0-SNAPSHOT,2.0.0)</version>
<version>[1.0.4-SNAPSHOT,2.0.0)</version>
</dependency>

View File

@ -13,6 +13,7 @@ import org.glassfish.jersey.server.ResourceConfig;
public class GeoportalService extends ResourceConfig{
public GeoportalService() {
super();
//Register interrfaces

View File

@ -15,22 +15,22 @@ public class MongoManager {
//*********** PROJECTS
public Project insert(Project proj) {
// TODO check if existing DB
// TODO check if existing collection
client.
}
public Project update(Project proj) {
}
public void delete(String id) {
}
public Project load(String id) {
}
// public Project insert(Project proj) {
// // TODO check if existing DB
// // TODO check if existing collection
// client.
//
// }
// public Project update(Project proj) {
//
// }
//
// public void delete(String id) {
//
// }
// public Project load(String id) {
//
// }
//********** PROFILES

View File

@ -22,7 +22,9 @@ import javax.ws.rs.core.MediaType;
import org.gcube.application.geoportal.common.rest.InterfaceConstants;
import org.gcube.application.geoportal.managers.AbstractRecordManager;
import org.gcube.application.geoportal.managers.DefatulEMFProvider;
import org.gcube.application.geoportal.service.GeoportalService;
import org.geotoolkit.style.DefaultExternalMark;
import org.glassfish.jersey.test.JerseyTest;
import org.junit.BeforeClass;
import org.junit.Test;
@ -40,13 +42,13 @@ public class Concessioni extends JerseyTest {
@BeforeClass
public static void init() {
AbstractRecordManager.setDefaultProvider(new DefaultEMFProvider() {
AbstractRecordManager.setDefaultProvider(new DefatulEMFProvider(){
@Override
public EntityManagerFactory getFactory() {
System.err.println("***********************SETTING DEBUG CONTEXT******************");
TokenSetter.set("/gcube/devNext/NexNext");
return super.getF
TokenSetter.set("/gcube/devNext/NextNext");
return super.getFactory();
}
});
}

View File

@ -24,7 +24,9 @@ public class TokenSetter {
try{
if(!props.containsKey(scope)) throw new RuntimeException("No token found for scope : "+scope);
SecurityTokenProvider.instance.set(props.getProperty(scope));
}catch(Throwable e){
}catch(Exception e){
e.printStackTrace(System.err);
throw e;
}
ScopeProvider.instance.set(scope);
}

View File

@ -19,7 +19,6 @@ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org
<class>org.gcube.application.geoportal.model.content.WorkspaceContent</class>
<!-- GIS -->
<class>org.gcube.application.geoportal.model.gis.ShapeFileLayerDescriptor</class>
<class>org.gcube.application.geoportal.model.gis.SDILayerDescriptor</class>