code: @PUT
  	@Produces(MediaType.APPLICATION_JSON)
  	@Consumes(MediaType.APPLICATION_JSON)
  	@Path("/{alertId}")
  	@Description("Updates an alert having the given ID.")
  	public AlertDto updateAlert(@Context HttpServletRequest req, @PathParam("alertId") BigInteger alertId, AlertDto alertDto) {
  		
  		if (alertId == null || alertId.compareTo(BigInteger.ZERO) < 1) {
  			throw new WebApplicationException("Alert Id cannot be null and must be a positive non-zero number.", Status.BAD_REQUEST);
  		}
  		
  		if (alertDto == null) {
  			throw new WebApplicationException("Null object cannot be updated.", Status.BAD_REQUEST);
  		}
  
  		PrincipalUser owner = validateAndGetOwner(req, alertDto.getOwnerName());
  		Alert oldAlert = alertService.findAlertByPrimaryKey(alertId);
  
  		if (oldAlert == null) {
  			throw new WebApplicationException(Response.Status.NOT_FOUND.getReasonPhrase(), Response.Status.NOT_FOUND);
  		}
  		
  		validateResourceAuthorization(req, oldAlert.getOwner(), owner);
  		copyProperties(oldAlert, alertDto);
  		oldAlert.setModifiedBy(getRemoteUser(req));
  		return AlertDto.transformToDto(alertService.updateAlert(oldAlert));
  	}
docs: Updates existing alert.
  
  @param   req       The HttpServlet request object. Cannot be null.
  @param   alertId   The id of an alert. Cannot be null.
  @param   alertDto  The new alert object. Cannot be null.
  
  @return  Updated alert object.
  
  @throws  WebApplicationException  The exception with 404 status will be thrown if the alert does not exist.