@Timed
@ApiOperation(value = "Get a single specified alarm callback for this stream")
@Produces(MediaType.APPLICATION_JSON)
public Response get(@ApiParam(name = "streamid", value = "The id of the stream whose alarm callbacks we want.", required = true) @PathParam("streamid") String streamid,
@ApiParam(name = "alarmCallbackId", value = "The alarm callback id we are getting", required = true) @PathParam("alarmCallbackId") String alarmCallbackId) {
Stream stream = null;
try {
stream = streamService.load(streamid);
} catch (NotFoundException e) {
throw new WebApplicationException(404);
}
AlarmCallbackConfiguration result = alarmCallbackConfigurationService.load(alarmCallbackId);
if (result == null || !result.getStreamId().equals(stream.getId()))
throw new WebApplicationException(404);
return Response.status(Response.Status.OK).entity(json(result.getFields())).build();
}