@PUT @Path("/groups/{groupId}") @Consumes(APPLICATION_JSON) @ApiOperation(value = "Update an existing group trigger definition and its member definitions") @ApiResponses( value = { @ApiResponse(code = 200, message = "Success, Group Trigger updated"), @ApiResponse(code = 500, message = "Internal server error"), @ApiResponse(code = 404, message = "Trigger doesn't exist/Invalid Parameters") }) public Response updateGroupTrigger( @ApiParam(value = "Group Trigger id to be updated", required = true) @PathParam("groupId") final String groupId, @ApiParam(value = "Updated group trigger definition", name = "trigger", required = true) final Trigger groupTrigger) { try { if (groupTrigger != null && !isEmpty(groupId)) { groupTrigger.setId(groupId); } definitions.updateGroupTrigger(tenantId, groupTrigger); if (log.isDebugEnabled()) { log.debug("Trigger: " + groupTrigger); } return ResponseUtil.ok(); } catch (NotFoundException e) { return ResponseUtil.notFound("Trigger " + groupId + " doesn't exist for update"); } catch (Exception e) { log.debug(e.getMessage(), e); return ResponseUtil.internalError(e.getMessage()); } }