use of org.onebusaway.api.model.transit.TripV2Bean in project onebusaway-application-modules by camsys.
the class TripAction method show.
public DefaultHttpHeaders show() throws ServiceException {
if (!isVersion(V2))
return setUnknownVersionResponse();
if (hasErrors())
return setValidationErrorsResponse();
TripBean trip = _service.getTrip(_id);
if (trip == null)
return setResourceNotFoundResponse();
BeanFactoryV2 factory = getBeanFactoryV2();
EntryWithReferencesBean<TripV2Bean> response = factory.getResponse(trip);
return setOkResponse(response);
}
Aggregations