updated consumes

This commit is contained in:
Francesco Mangiacrapa 2024-04-18 17:43:35 +02:00
parent 62fd269a86
commit 57dec57f72
3 changed files with 8 additions and 2 deletions

View File

@ -129,6 +129,9 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<dependent-module archiveName="uri-resolver-manager-1.8.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/uri-resolver-manager/uri-resolver-manager">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="geoportal-data-mapper-1.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-data-mapper/geoportal-data-mapper"> <dependent-module archiveName="geoportal-data-mapper-1.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-data-mapper/geoportal-data-mapper">
<dependency-type>uses</dependency-type> <dependency-type>uses</dependency-type>
</dependent-module> </dependent-module>

View File

@ -4,6 +4,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.GET; import javax.ws.rs.GET;
import javax.ws.rs.Path; import javax.ws.rs.Path;
import javax.ws.rs.PathParam; import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.WebApplicationException; import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Context; import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
@ -29,7 +30,7 @@ import org.slf4j.LoggerFactory;
* *
* Apr 16, 2024 * Apr 16, 2024
*/ */
@Path("/geoportal") @Path("geoportal")
public class GeoportalExporter { public class GeoportalExporter {
public static final String EXPORT_TYPE = "type"; public static final String EXPORT_TYPE = "type";
@ -58,6 +59,7 @@ public class GeoportalExporter {
*/ */
@GET @GET
@Path("/export/{type}/{usecase_id}/{project_id}") @Path("/export/{type}/{usecase_id}/{project_id}")
@Produces({ MediaType.TEXT_HTML, MediaType.TEXT_PLAIN })
public Response export(@Context HttpServletRequest req, @PathParam(EXPORT_TYPE) String export_type, public Response export(@Context HttpServletRequest req, @PathParam(EXPORT_TYPE) String export_type,
@PathParam(PATH_USECASE_ID) String ucdID, @PathParam(PATH_PROJECT_ID) String projectID) @PathParam(PATH_USECASE_ID) String ucdID, @PathParam(PATH_PROJECT_ID) String projectID)
throws WebApplicationException { throws WebApplicationException {
@ -129,6 +131,7 @@ public class GeoportalExporter {
@GET @GET
@Path("/export/{type}/healthcheck") @Path("/export/{type}/healthcheck")
@Produces({ MediaType.TEXT_HTML, MediaType.TEXT_PLAIN })
public Response healthcheck(@Context HttpServletRequest req, @PathParam(EXPORT_TYPE) String export_type) public Response healthcheck(@Context HttpServletRequest req, @PathParam(EXPORT_TYPE) String export_type)
throws WebApplicationException { throws WebApplicationException {

View File

@ -47,7 +47,7 @@ import com.google.common.cache.CacheLoader.InvalidCacheLoadException;
* *
* Apr 03, 2024 * Apr 03, 2024
*/ */
@Path("/geo") @Path("geo")
public class GeoportalResolver { public class GeoportalResolver {
public static final String GEO_DE = "de"; // data-entry public static final String GEO_DE = "de"; // data-entry