public void filter(ContainerRequestContext containerRequestContext, ContainerResponseContext containerResponseContext) throws IOException {
String method = containerRequestContext.getRequest().getMethod();
if (method.equals("POST") && containerResponseContext.getStatus() == Response.Status.OK.getStatusCode()) {
containerResponseContext.setStatus(Response.Status.CREATED.getStatusCode());
RestEntity entity = (RestEntity) containerResponseContext.getEntity();
String id = entity.getId();
containerResponseContext.getHeaders().add("Location",
containerRequestContext.getUriInfo().getAbsolutePathBuilder().path(id).build().toString());
}
//containerResponseContext.getHeaders().put("Location")