/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package RestTestServiceResource;

import javax.ws.rs.core.Context;
import javax.ws.rs.core.UriInfo;
import javax.ws.rs.Consumes;
import javax.ws.rs.Produces;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PUT;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.PathParam;
import javax.ws.rs.QueryParam;

/**
 * REST Web Service
 *
 * @author user-admin
 */
@Path("/products")
public class Products {

    @Context
    private UriInfo context;

    /**
     * Creates a new instance of Products
     */
    public Products() {
    }

    /**
     * Retrieves representation of an instance of RestTestService.Products
     * @return an instance of java.lang.String
     */
    @GET
    @Produces(MediaType.TEXT_HTML)
    public String getHtml(@QueryParam("nameKey") String name, @QueryParam("descKey") String description) {
        //TODO return proper representation object
        //throw new UnsupportedOperationException();
        name = "Product One";
        description = "Product One Description";
        String output = "Product name: " + name + " Product Description: " + description + ".";
       
        return output;
        //return Response.status(200).entity(output).build();
    }

    /**
     * PUT method for updating or creating an instance of Products
     * @param content representation for the resource
     */
    @PUT
    @Consumes(MediaType.TEXT_HTML)
    public void putHtml(String content) {
    }
}
