use of org.apache.ofbiz.service.config.model.ServiceLocation in project ofbiz-framework by apache.
the class AbstractEngine method createLocationMap.
// creates the location alias map
protected static Map<String, String> createLocationMap() {
Map<String, String> tmpMap = new HashMap<>();
List<ServiceLocation> locationsList = null;
try {
locationsList = ServiceConfigUtil.getServiceEngine().getServiceLocations();
} catch (GenericConfigException e) {
// FIXME: Refactor API so exceptions can be thrown and caught.
Debug.logError(e, module);
throw new RuntimeException(e.getMessage());
}
for (ServiceLocation e : locationsList) {
tmpMap.put(e.getName(), e.getLocation());
}
Debug.logInfo("Loaded Service Locations: " + tmpMap, module);
return Collections.unmodifiableMap(tmpMap);
}
Aggregations