/**
  * PUT method for updating or creating an instance of StatusResource
  *
  * @param content representation for the resource
  * @return an HTTP response with content of the updated or created resource.
  */
 @POST
 // @Consumes(MediaType.APPLICATION_JSON)
 @Produces("application/json")
 public void addStatus(@FormParam("statusname") String statusname, @FormParam("id") String id) {
   Status status = new Status();
   status.setStatus_id(Integer.parseInt(id));
   status.setStatusName(statusname);
   sdi.addStatus(status);
 }
  @Override
  public void addStatus(Status status) {
    try {

      mdc.connectionPool();
      query = new BasicDBObject("StatusName", status.getStatusName());
      query.append("StatusId", status.getStatus_id());
      mdc.insertCollection("Status", query);

    } catch (UnknownHostException ex) {
      java.util.logging.Logger.getLogger(StatusDaoImpl.class.getName())
          .log(java.util.logging.Level.SEVERE, "Add Status", ex);
    }
  }