this.customMappings = loadMappingsResult.getCustomMappings();
this.globalConfiguration = loadMappingsResult.getGlobalConfiguration();
}
private List<MappingFileData> loadFromFiles(List<String> mappingFiles) {
MappingFileReader mappingFileReader = new MappingFileReader(XMLParserFactory.getInstance());
List<MappingFileData> mappingFileDataList = new ArrayList<MappingFileData>();
if (mappingFiles != null && mappingFiles.size() > 0) {
log.info("Using the following xml files to load custom mappings for the bean mapper instance: {}", mappingFiles);
for (String mappingFileName : mappingFiles) {
log.info("Trying to find xml mapping file: {}", mappingFileName);
URL url = MappingValidator.validateURL(mappingFileName);
log.info("Using URL [" + url + "] to load custom xml mappings");
MappingFileData mappingFileData = mappingFileReader.read(url);
log.info("Successfully loaded custom xml mappings from URL: [{}]", url);
mappingFileDataList.add(mappingFileData);
}
}