/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.k_int.webedit;

import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.UriInfo;
import javax.ws.rs.PathParam;
import javax.ws.rs.Consumes;
import javax.ws.rs.PUT;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.DELETE;

import com.sun.jersey.api.view.ImplicitProduces;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlTransient;


/**
 * REST Web Service
 *
 * @author ibbo
 */

@XmlRootElement
@ImplicitProduces("text/html;qs=5")
@XmlAccessorType(XmlAccessType.FIELD)
@Path("/edit")
public class Resource {
   
  @XmlTransient
  @Context
  private UriInfo context;

  /** Creates a new instance of Made4UWorkOrderResource */
  public Resource() {
  }

  /**
   * Retrieves representation of an instance of info.made4u.made4uws.workorder.Made4UWorkOrderResource
   * @param id resource URI parameter
   * @return an instance of java.lang.String
   */
  @GET
  @Produces({MediaType.APPLICATION_XML, MediaType.TEXT_XML, MediaType.APPLICATION_JSON})
  public Resource getXml() {
    return this;
  }

  /**
   * PUT method for updating or creating an instance of Made4UWorkOrderResource
   * @param id resource URI parameter
   * @param content representation for the resource
   * @return an HTTP response with content of the updated or created resource.
   */
  @PUT
  @Consumes("application/xml")
  public void putXml(@PathParam("id")
  String id, String content) {
    System.out.println(content+","+id);
  }
}
