@PUT
	@Path("/{isbn}")
	@Timed(name = "update-book")
	public Response updateBook(@PathParam("isbn") LongParam isbn, @QueryParam("status") String status)
	{
		Book book = null;
		//Update the status
		if(status!= null || status.equalsIgnoreCase("")) {
			book = bookRepository.getBookByISBN(isbn.get());
			if (book == null){
				//When book is not found. Error message shown.
				return Response.status(404).entity("ERROR :404 Book with isbn :"+isbn+" not found").build();
			}
			if(status.equalsIgnoreCase("available")) {
				book.setBookStatus("available"); }
			else if(status.equalsIgnoreCase("checked-out")) {
				book.setBookStatus("checked-out"); }    
			else if(status.equalsIgnoreCase("lost")) {
				book.setBookStatus("lost"); }
			else if(status.equalsIgnoreCase("in-queue")) {
				book.setBookStatus("in-queue"); }
			else{
				book.setBookStatus("available");
				//Return an error here
				return Response.status(404).entity("ERROR :400 Bad Syntax:New status shouldbe : available or lost or inQueue or checkedOut.").build();

			}
		}
		//Save the book back to bookRepository
		bookRepository.updateBook(book, isbn.get());


		String location = "/books/" + isbn;
		
		// The response should contain only links. View update delete create-review
		LinksDto links = new LinksDto();
		links.addLink(new LinkDto("view-book",location,"GET"));
		links.addLink(new LinkDto("update-book", location, "PUT"));
		links.addLink(new LinkDto("delete-book", location, "DELETE"));
		links.addLink(new LinkDto("create-review", location+"/reviews", "POST"));
		//The next line should be displayed if there are reviews.
		if(book.getReviews().size() > 0) {
		links.addLink(new LinkDto("view-all-reviews",location+"/reviews", "GET"));
		}
		
		return Response.ok(links).build();
	}