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

Service documentation

parent 3d830018
No related branches found
No related tags found
No related merge requests found
...@@ -30,6 +30,9 @@ import javax.ws.rs.Produces; ...@@ -30,6 +30,9 @@ import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam; import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Context; import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
import com.webcohesion.enunciate.metadata.Facet;
import no.nibio.vips.util.ServletUtil; import no.nibio.vips.util.ServletUtil;
/** /**
...@@ -37,6 +40,7 @@ import no.nibio.vips.util.ServletUtil; ...@@ -37,6 +40,7 @@ import no.nibio.vips.util.ServletUtil;
* @author Tor-Einar Skog <tor-einar.skog@nibio.no> * @author Tor-Einar Skog <tor-einar.skog@nibio.no>
*/ */
@Path("rest/barkbeetle") @Path("rest/barkbeetle")
@Facet("restricted")
public class BarkbeetleService { public class BarkbeetleService {
@PersistenceContext(unitName="VIPSLogic-PU") @PersistenceContext(unitName="VIPSLogic-PU")
EntityManager em; EntityManager em;
......
...@@ -51,7 +51,6 @@ import no.nibio.vips.logic.util.SessionControllerGetter; ...@@ -51,7 +51,6 @@ import no.nibio.vips.logic.util.SessionControllerGetter;
* @author Tor-Einar Skog <tor-einar.skog@nibio.no> * @author Tor-Einar Skog <tor-einar.skog@nibio.no>
*/ */
@Path("rest/auth") @Path("rest/auth")
@Facet("restricted")
public class AuthenticationService { public class AuthenticationService {
@Context @Context
......
...@@ -68,7 +68,6 @@ import org.wololo.geojson.Feature; ...@@ -68,7 +68,6 @@ import org.wololo.geojson.Feature;
* @author Tor-Einar Skog <tor-einar.skog@nibio.no> * @author Tor-Einar Skog <tor-einar.skog@nibio.no>
*/ */
@Path("rest/observation") @Path("rest/observation")
@Facet("restricted")
public class ObservationService { public class ObservationService {
@Context @Context
...@@ -449,9 +448,15 @@ public class ObservationService { ...@@ -449,9 +448,15 @@ public class ObservationService {
: Response.status(404).entity("No observations of organism with id=" + organismId).build(); : Response.status(404).entity("No observations of organism with id=" + organismId).build();
} }
/**
* When was the last time a change was made in cropCategories or organisms?
*
* @responseExample application/json {"lastUpdated": "2021-02-08"}
*/
@GET @GET
@Path("organismsystemupdated") @Path("organismsystemupdated")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
public Response getDateOfLastOrganismSystemUpdate() public Response getDateOfLastOrganismSystemUpdate()
{ {
ObjectMapper objectMapper = new ObjectMapper(); ObjectMapper objectMapper = new ObjectMapper();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment