Skip to content
Snippets Groups Projects
Commit 0b310fc8 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Added methods getLicense and GetCopyright to REST service

parent 8d6c372c
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,6 @@ public class VIPSCoreManagerApplication extends Application
* given list with all resources defined in the project.
*/
private void addRestResourceClasses(Set<Class<?>> resources) {
resources.add(no.bioforsk.vips.core.service.ModelResource.class);
resources.add(no.bioforsk.vips.coremanager.service.JsonParseExceptionMapper.class);
resources.add(no.bioforsk.vips.coremanager.service.ManagerResource.class);
resources.add(no.bioforsk.vips.coremanager.service.ManagerResourceImpl.class);
......
......@@ -131,6 +131,21 @@ public class ManagerResourceImpl implements ManagerResource{
return Response.ok().entity(this.getModelResource().printModelName(modelId, language).readEntity(String.class)).build();
}
@GET
@Path("models/{modelId}/license")
@Produces("text/plain;charset=UTF-8")
public Response printModelLicense(@PathParam("modelId") String modelId)
{
return Response.ok().entity(this.getModelResource().printModelLicense(modelId).readEntity(String.class)).build();
}
@GET
@Path("models/{modelId}/copyright")
@Produces("text/plain;charset=UTF-8")
public Response printModelCopyright(@PathParam("modelId") String modelId)
{
return Response.ok().entity(this.getModelResource().printModelCopyright(modelId).readEntity(String.class)).build();
}
@GET
@Path("models/{modelId}/description")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment