Integrate legacy library
This commit is contained in:
parent
c5cb6b2df9
commit
fa58b5ba91
|
@ -1,2 +1,6 @@
|
||||||
/org.eclipse.core.resources.prefs
|
/org.eclipse.core.resources.prefs
|
||||||
/org.eclipse.jdt.core.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
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -84,7 +84,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.application</groupId>
|
<groupId>org.gcube.application</groupId>
|
||||||
<artifactId>geoportal-logic</artifactId>
|
<artifactId>geoportal-logic</artifactId>
|
||||||
<version>[1.0.0-SNAPSHOT,2.0.0)</version>
|
<version>[1.0.4-SNAPSHOT,2.0.0)</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ import org.glassfish.jersey.server.ResourceConfig;
|
||||||
public class GeoportalService extends ResourceConfig{
|
public class GeoportalService extends ResourceConfig{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public GeoportalService() {
|
public GeoportalService() {
|
||||||
super();
|
super();
|
||||||
//Register interrfaces
|
//Register interrfaces
|
||||||
|
|
|
@ -15,22 +15,22 @@ public class MongoManager {
|
||||||
|
|
||||||
|
|
||||||
//*********** PROJECTS
|
//*********** PROJECTS
|
||||||
public Project insert(Project proj) {
|
// public Project insert(Project proj) {
|
||||||
// TODO check if existing DB
|
// // TODO check if existing DB
|
||||||
// TODO check if existing collection
|
// // TODO check if existing collection
|
||||||
client.
|
// client.
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
public Project update(Project proj) {
|
// public Project update(Project proj) {
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public void delete(String id) {
|
// public void delete(String id) {
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
public Project load(String id) {
|
// public Project load(String id) {
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
//********** PROFILES
|
//********** PROFILES
|
||||||
|
|
|
@ -22,7 +22,9 @@ import javax.ws.rs.core.MediaType;
|
||||||
|
|
||||||
import org.gcube.application.geoportal.common.rest.InterfaceConstants;
|
import org.gcube.application.geoportal.common.rest.InterfaceConstants;
|
||||||
import org.gcube.application.geoportal.managers.AbstractRecordManager;
|
import org.gcube.application.geoportal.managers.AbstractRecordManager;
|
||||||
|
import org.gcube.application.geoportal.managers.DefatulEMFProvider;
|
||||||
import org.gcube.application.geoportal.service.GeoportalService;
|
import org.gcube.application.geoportal.service.GeoportalService;
|
||||||
|
import org.geotoolkit.style.DefaultExternalMark;
|
||||||
import org.glassfish.jersey.test.JerseyTest;
|
import org.glassfish.jersey.test.JerseyTest;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
@ -40,13 +42,13 @@ public class Concessioni extends JerseyTest {
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void init() {
|
public static void init() {
|
||||||
AbstractRecordManager.setDefaultProvider(new DefaultEMFProvider() {
|
AbstractRecordManager.setDefaultProvider(new DefatulEMFProvider(){
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EntityManagerFactory getFactory() {
|
public EntityManagerFactory getFactory() {
|
||||||
System.err.println("***********************SETTING DEBUG CONTEXT******************");
|
System.err.println("***********************SETTING DEBUG CONTEXT******************");
|
||||||
TokenSetter.set("/gcube/devNext/NexNext");
|
TokenSetter.set("/gcube/devNext/NextNext");
|
||||||
return super.getF
|
return super.getFactory();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,9 @@ public class TokenSetter {
|
||||||
try{
|
try{
|
||||||
if(!props.containsKey(scope)) throw new RuntimeException("No token found for scope : "+scope);
|
if(!props.containsKey(scope)) throw new RuntimeException("No token found for scope : "+scope);
|
||||||
SecurityTokenProvider.instance.set(props.getProperty(scope));
|
SecurityTokenProvider.instance.set(props.getProperty(scope));
|
||||||
}catch(Throwable e){
|
}catch(Exception e){
|
||||||
|
e.printStackTrace(System.err);
|
||||||
|
throw e;
|
||||||
}
|
}
|
||||||
ScopeProvider.instance.set(scope);
|
ScopeProvider.instance.set(scope);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>
|
<class>org.gcube.application.geoportal.model.content.WorkspaceContent</class>
|
||||||
|
|
||||||
<!-- GIS -->
|
<!-- GIS -->
|
||||||
<class>org.gcube.application.geoportal.model.gis.ShapeFileLayerDescriptor</class>
|
|
||||||
<class>org.gcube.application.geoportal.model.gis.SDILayerDescriptor</class>
|
<class>org.gcube.application.geoportal.model.gis.SDILayerDescriptor</class>
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in New Issue