Guest User

TdsiResource.java

a guest
Apr 12th, 2015
230
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package services;
  2.  
  3. import javax.persistence.EntityManager;
  4. import javax.persistence.EntityManagerFactory;
  5. import javax.persistence.Persistence;
  6. import javax.ws.rs.core.Context;
  7. import javax.ws.rs.core.UriInfo;
  8. import javax.ws.rs.PathParam;
  9. import javax.ws.rs.Consumes;
  10. import javax.ws.rs.Produces;
  11. import javax.ws.rs.GET;
  12. import javax.ws.rs.Path;
  13. import javax.ws.rs.PUT;
  14.  
  15. @Path("tdsi")
  16. public class TdsiResource {
  17.  
  18. @Context
  19. private UriInfo context;
  20.  
  21. private final EntityManagerFactory factory;
  22. private final EntityManager manager;
  23.  
  24. public TdsiResource() {
  25. factory = Persistence.createEntityManagerFactory("tdsiWSPU");
  26. manager = factory.createEntityManager();
  27. }
  28.  
  29. @GET
  30. @Produces("application/json")
  31. public String getJson() {
  32. //TODO return proper representation object
  33. throw new UnsupportedOperationException();
  34. }
  35.  
  36. @PUT
  37. @Consumes("application/json")
  38. public void putJson(String content) {
  39. }
  40. }
RAW Paste Data