/*
 * 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 RestTestService;

import javax.ws.rs.core.Context;
import javax.ws.rs.core.UriInfo;
import javax.ws.rs.Produces;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PUT;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

/**
 * REST Web Service
 *
 * @author soac-sh
 */
@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();
        String output = "Product name: " + name + " and 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) {
    }
}


/*
 * 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 RestTestService;

import javax.ws.rs.core.Context;
import javax.ws.rs.core.UriInfo;
import javax.ws.rs.Produces;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PUT;
import javax.ws.rs.core.MediaType;

/**
 * REST Web Service
 *
 * @author soac-sh
 */
@Path("/customers")
public class Customers {

    @Context
    private UriInfo context;

    /**
     * Creates a new instance of Customers
     */
    public Customers() {
    }

    /**
     * Retrieves representation of an instance of RestTestService.Customers
     * @return an instance of java.lang.String
     */
    @GET
    @Produces(MediaType.TEXT_HTML)
    public String getHtml() {
        //TODO return proper representation object
        //throw new UnsupportedOperationException();
        return "<html><h1><body>Customers Section reached</body></h1></html>";
    }

    /**
     * PUT method for updating or creating an instance of Customers
     * @param content representation for the resource
     */
    @PUT
    @Consumes(MediaType.TEXT_HTML)
    public void putHtml(String content) {
    }
}


/*
 * 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 RestTestService;

import javax.ws.rs.core.Context;
import javax.ws.rs.core.UriInfo;
import javax.ws.rs.Produces;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PUT;
import javax.ws.rs.core.MediaType;

/**
 * REST Web Service
 *
 * @author soac-sh
 */
@Path("/department")
public class Department {

    @Context
    private UriInfo context;

    /**
     * Creates a new instance of Department
     */
    public Department() {
    }

    /**
     * Retrieves representation of an instance of RestTestService.Department
     * @return an instance of java.lang.String
     */
    @GET
    @Produces(MediaType.TEXT_HTML)
    public String getHtml() {
        //TODO return proper representation object
        //throw new UnsupportedOperationException();
        return "<html><h1><body>Department Section reached</body></h1></html>";
    }

    /**
     * PUT method for updating or creating an instance of Department
     * @param content representation for the resource
     */
    @PUT
    @Consumes(MediaType.TEXT_HTML)
    public void putHtml(String content) {
    }
}
