Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package no.hib.tod141.oblig2.jersey;
- import java.util.ArrayList;
- import java.util.List;
- import javax.ws.rs.GET;
- import javax.ws.rs.Path;
- import javax.ws.rs.Produces;
- import javax.ws.rs.core.MediaType;
- import javax.ws.rs.core.Response;
- import no.hib.tod141.oblig2.model.Report;
- import no.hib.tod141.oblig2.model.dao.ReportDAO;
- import no.hib.tod141.oblig2.model.dao.impl.ReportDAOImpl;
- @Path("reports")
- public class RESTReports {
- ArrayList<Report> reports;
- public RESTReports() {
- ReportDAO reportDAO = new ReportDAOImpl();
- reports = (ArrayList<Report>) reportDAO.getReports();
- }
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response getReports() {
- String msg = "hello there";
- return Response.status(200).entity(msg).build();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement