private TubeFactoryList getTubeFactories(URI endpointReference, TubeFactoryListResolver resolver) {
if (appConfig != null && appConfig.getTubelines() != null) {
for (TubelineMapping mapping : appConfig.getTubelines().getTubelineMappings()) {
if (mapping.getEndpointRef().equals(endpointReference.toString())) {
TubeFactoryList list = resolver.getFactories(getTubeline(appConfig, resolveReference(mapping.getTubelineRef())));
if (list != null) {
return list;
} else {
break;
}
}
}
if (appConfig.getTubelines().getDefault() != null) {
TubeFactoryList list = resolver.getFactories(getTubeline(appConfig, resolveReference(appConfig.getTubelines().getDefault())));
if (list != null) {
return list;
}
}
}
for (TubelineMapping mapping : defaultConfig.getTubelines().getTubelineMappings()) {
if (mapping.getEndpointRef().equals(endpointReference.toString())) {
TubeFactoryList list = resolver.getFactories(getTubeline(defaultConfig, resolveReference(mapping.getTubelineRef())));
if (list != null) {
return list;
} else {
break;
}