use of org.onebusaway.api.model.transit.RouteV2Bean in project onebusaway-application-modules by camsys.
the class RoutesForAgencyAction method show.
public DefaultHttpHeaders show() {
if (hasErrors())
return setValidationErrorsResponse();
if (!isVersion(V2))
return setUnknownVersionResponse();
ListBean<RouteBean> routes = _service.getRoutesForAgencyId(_id);
BeanFactoryV2 factory = getBeanFactoryV2();
List<RouteV2Bean> beans = new ArrayList<RouteV2Bean>();
for (RouteBean route : routes.getList()) beans.add(factory.getRoute(route));
return setOkResponse(factory.list(beans, false));
}
Aggregations