use of io.atlasmap.core.ADMArchiveHandler in project atlasmap by atlasmap.
the class AtlasService method loadExplodedMappingDirectory.
private ADMArchiveHandler loadExplodedMappingDirectory(Integer mappingDefinitionId) {
java.nio.file.Path mappingDirPath = Paths.get(getMappingSubDirectory(mappingDefinitionId));
File mappingDirFile = mappingDirPath.toFile();
if (!mappingDirFile.exists()) {
mappingDirFile.mkdirs();
}
ADMArchiveHandler admHandler = new ADMArchiveHandler(this.libraryLoader);
admHandler.setIgnoreLibrary(true);
try {
admHandler.load(mappingDirPath);
} catch (Exception e) {
LOG.error("Unexpected error while loading mapping directory.\n" + e.getMessage(), e);
throw new WebApplicationException(e.getMessage(), e, Status.INTERNAL_SERVER_ERROR);
}
return admHandler;
}
Aggregations