CamelContext camelContext = getContext();
if (camelContext == null) {
throw new IllegalArgumentException("No CamelContext has been injected!");
}
routeCollection.setCamelContext(camelContext);
camelContext.addRouteDefinitions(routeCollection.getRoutes());
}
public void setRouteCollection(RoutesType routeCollection) {
this.routeCollection = routeCollection;
}