use of org.talend.esb.sam.service.rest.exception.ResourceNotFoundException in project tesb-rt-se by Talend.
the class SAMRestServiceImpl method getEvent.
@Override
public Response getEvent(String id) {
Integer eventId;
try {
eventId = Integer.parseInt(id);
} catch (NumberFormatException ex) {
throw new IllegalParameterException("Error during converting " + id + " parameter to Integer", ex);
}
FlowEvent event = provider.getEventDetails(eventId);
if (null == event) {
throw new ResourceNotFoundException("There no event with " + id + " ID can be found");
}
return Response.ok(event).build();
}
Aggregations