Component component = exchange.getContext().getComponent("properties");
PropertiesComponent pc = exchange.getContext().getTypeConverter()
.mandatoryConvertTo(PropertiesComponent.class, component);
// enclose key with {{ }} to force parsing
String[] paths = locations.split(",");
return pc.parseUri(pc.getPrefixToken() + key + pc.getSuffixToken(), paths);
} else {
// the properties component is mandatory if no locations provided
Component component = exchange.getContext().hasComponent("properties");
if (component == null) {
throw new IllegalArgumentException("PropertiesComponent with name properties must be defined"