use of io.atlasmap.core.DefaultAtlasFieldActionService in project atlasmap by atlasmap.
the class GenerateFieldActionsMojo method generateFieldAction.
private void generateFieldAction(List<URL> urls) throws MojoFailureException, MojoExecutionException {
DefaultAtlasFieldActionService fieldActionService = DefaultAtlasFieldActionService.getInstance();
ClassLoader origTccl = Thread.currentThread().getContextClassLoader();
ActionDetails answer = new ActionDetails();
try (URLClassLoader loader = new URLClassLoader(urls.toArray(new URL[urls.size()]), origTccl)) {
fieldActionService.init(loader);
} catch (Exception e) {
throw new MojoExecutionException("Could not load field actions:", e);
}
answer.getActionDetail().addAll(fieldActionService.listActionDetails());
writeToJsonFile(DEFAULT_OUTPUT_FILE_PREFIX, answer);
}
Aggregations