profile compliant
This commit is contained in:
parent
29ae229759
commit
48487aac1e
|
@ -3,6 +3,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
# Changelog for org.gcube.spatial.data.sdi-service
|
||||
|
||||
## [v1.4.3-SNAPSHOT] 2020-05-15
|
||||
changed maven repos
|
||||
|
||||
## [v1.4.2] 2020-05-15
|
||||
|
||||
|
|
10
pom.xml
10
pom.xml
|
@ -8,7 +8,7 @@
|
|||
</parent>
|
||||
<groupId>org.gcube.spatial.data</groupId>
|
||||
<artifactId>sdi-service</artifactId>
|
||||
<version>1.4.3-SNAPSHOT</version>
|
||||
<version>1.4.3-SNPASHOT</version>
|
||||
<name>SDI Service</name>
|
||||
<description>REST Interface towards SDI facilities</description>
|
||||
<packaging>war</packaging>
|
||||
|
@ -50,18 +50,18 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.spatial.data</groupId>
|
||||
<artifactId>sdi-interface</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||
<version>[1.0.0,2.0.0)</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>uri-resolver-manager</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||
<version>[1.0.0, 2.0.0)</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.gcube.data.transfer</groupId>
|
||||
<artifactId>data-transfer-library</artifactId>
|
||||
<version>[1.2.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||
<version>[1.2.0,2.0.0)</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
@ -73,7 +73,7 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.resourcemanagement</groupId>
|
||||
<artifactId>resourcemanager-client</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||
<version>[1.0.0,2.0.0)</version>
|
||||
</dependency>
|
||||
<!-- SMARTGEARS -->
|
||||
<dependency>
|
||||
|
|
|
@ -3,11 +3,13 @@ package org.gcube.spatial.data.sdi.rest;
|
|||
import javax.inject.Inject;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.WebApplicationException;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
import org.gcube.smartgears.annotations.ManagedBy;
|
||||
import org.gcube.spatia.data.model.profiles.ApplicationProfile;
|
||||
import org.gcube.spatial.data.sdi.SDIServiceManager;
|
||||
import org.gcube.spatial.data.sdi.engine.SDIManager;
|
||||
import org.gcube.spatial.data.sdi.model.ScopeConfiguration;
|
||||
|
@ -53,6 +55,24 @@ public class SDI {
|
|||
}
|
||||
}
|
||||
|
||||
public static final String SERVICE_CLASS_PARAM="service_class";
|
||||
public static final String SERVICE_NAME_PARAM="service_name";
|
||||
|
||||
@GET
|
||||
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
|
||||
@Path("profile/{"+SERVICE_CLASS_PARAM+"}/{"+SERVICE_NAME_PARAM+"}")
|
||||
public ApplicationProfile getProfile(@PathParam(SERVICE_CLASS_PARAM) String serviceClass,
|
||||
@PathParam(SERVICE_NAME_PARAM) String serviceName) {
|
||||
try {
|
||||
log.debug("Looking for Application Profile [SC :{} SN : {}]",serviceClass,serviceName);
|
||||
throw new RuntimeException("Feature not yet available");
|
||||
}catch(WebApplicationException e){
|
||||
log.warn("Unable to serve request",e);
|
||||
throw e;
|
||||
}catch(Throwable e){
|
||||
log.warn("Unable to serve request",e);
|
||||
throw new WebApplicationException("Unable to serve request", e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<application mode='online'>
|
||||
<name>sdi-service</name>
|
||||
<group>SDI</group>
|
||||
<version>1.1.0-SNAPSHOT</version>
|
||||
<description>REST Interface towards SDI facilities</description>
|
||||
<local-persistence location='target' />
|
||||
</application>
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
<web-app>
|
||||
<servlet>
|
||||
<servlet-name>org.gcube.spatial.data.sdi.SDIService</servlet-name>
|
||||
<servlet-class>org.glassfish.jersey.servlet.ServletContainer
|
||||
</servlet-class>
|
||||
<init-param>
|
||||
<param-name>javax.ws.rs.Application</param-name>
|
||||
<param-value>org.gcube.spatial.data.sdi.SDIService</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>jersey.config.server.provider.classnames</param-name>
|
||||
<param-value>org.glassfish.jersey.media.multipart.MultiPartFeature
|
||||
</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>jersey.config.xml.formatOutput</param-name>
|
||||
<param-value>true</param-value>
|
||||
</init-param>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>org.gcube.spatial.data.sdi.SDIService</servlet-name>
|
||||
<url-pattern>/gcube/service/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
</web-app>
|
Loading…
Reference in New Issue