@POST @Path("/version") @Produces({MediaType.APPLICATION_JSON}) public Response addVersion(Version version) { if (versionDao.addVersion(version)) return Response.status(201).build(); else return Response.status(409).build(); }
@DELETE @Path("/version") @Produces({MediaType.APPLICATION_JSON}) public Response removeVersion(Version version) { if (versionDao.removeVersion(version)) return Response.status(200).build(); else return Response.status(409).build(); }
@GET @Path("/version") @Produces({MediaType.APPLICATION_JSON}) public Response getVersion() { return Response.ok(versionDao.getLatestVersion()).build(); }