use of org.kie.dmn.core.compiler.DMNCompilerConfigurationImpl in project drools by kiegroup.
the class DMNAssemblerService method compilerConfigWithKModulePrefs.
/**
* Returns a DMNCompilerConfiguration with the specified properties set, and applying the explicited dmnProfiles.
* @param chainedProperties applies properties --it does not do any classloading nor profile loading based on these properites, just passes the values.
* @param dmnProfiles applies these DMNProfile(s) to the DMNCompilerConfiguration
* @return
*/
public static DMNCompilerConfiguration compilerConfigWithKModulePrefs(ChainedProperties chainedProperties, List<DMNProfile> dmnProfiles) {
DMNCompilerConfigurationImpl config = (DMNCompilerConfigurationImpl) DMNFactory.newCompilerConfiguration();
Map<String, String> dmnPrefs = new HashMap<>();
chainedProperties.mapStartsWith(dmnPrefs, ORG_KIE_DMN_PREFIX, true);
config.setProperties(dmnPrefs);
for (DMNProfile dmnProfile : dmnProfiles) {
config.addExtensions(dmnProfile.getExtensionRegisters());
config.addDRGElementCompilers(dmnProfile.getDRGElementCompilers());
config.addFEELProfile(dmnProfile);
}
return config;
}
Aggregations