code: @POST
  	@Produces(MediaType.APPLICATION_JSON)
  	@Consumes(MediaType.APPLICATION_JSON)
  	@Path("/{alertId}/triggers")
  	@Description("Creates new triggers for the given alert ID.")
  	public List<TriggerDto> addTrigger(@Context HttpServletRequest req,
  			@PathParam("alertId") BigInteger alertId, TriggerDto triggerDto) {
  		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 (triggerDto == null) {
  			throw new WebApplicationException("Null trigger object cannot be created.", Status.BAD_REQUEST);
  		}
  
  		Alert alert = alertService.findAlertByPrimaryKey(alertId);
  
  		if (alert != null) {
  			validateResourceAuthorization(req, alert.getOwner(), getRemoteUser(req));
  
  			Trigger trigger = new Trigger(alert, triggerDto.getType(), triggerDto.getName(), triggerDto.getThreshold(),
  					triggerDto.getSecondaryThreshold(), triggerDto.getInertia());
  			List<Trigger> triggers = new ArrayList<Trigger>(alert.getTriggers());
  
  			triggers.add(trigger);
  			alert.setTriggers(triggers);
  			alert.setModifiedBy(getRemoteUser(req));
  			return TriggerDto.transformToDto(alertService.updateAlert(alert).getTriggers());
  		}
  		throw new WebApplicationException(Response.Status.NOT_FOUND.getReasonPhrase(), Response.Status.NOT_FOUND);
  	}
docs: Creates a new Trigger for a given alert.
  
  @param   req         The HttpServlet request object. Cannot be null.
  @param   alertId     The alert Id. Cannot be null and must be a positive non-zero number.
  @param   triggerDto  The trigger object. Cannot be null.
  
  @return  The alert object for which the trigger was added.
  
  @throws  WebApplicationException  The exception with 404 status will be thrown if an alert does not exist.