use of org.drools.core.builder.conf.impl.DecisionTableConfigurationImpl in project drools by kiegroup.
the class MultipleSheetsLoadingTest method createXLSResourceConfig.
private ResourceConfiguration createXLSResourceConfig(final String worksheetName) {
final DecisionTableConfiguration resourceConfig = new DecisionTableConfigurationImpl();
resourceConfig.setInputType(DecisionTableInputType.XLS);
resourceConfig.setWorksheetName(worksheetName);
return resourceConfig;
}
use of org.drools.core.builder.conf.impl.DecisionTableConfigurationImpl in project drools by kiegroup.
the class ResourceUtil method getDecisionTableResourceFromClasspath.
public static Resource getDecisionTableResourceFromClasspath(final String resourceName, final Class classLoaderFromClass, final DecisionTableInputType type) {
final Resource dtable = KieServices.Factory.get().getResources().newClassPathResource(resourceName, classLoaderFromClass);
final DecisionTableConfiguration resourceConfig = new DecisionTableConfigurationImpl();
resourceConfig.setInputType(type);
dtable.setConfiguration(resourceConfig);
return dtable;
}
use of org.drools.core.builder.conf.impl.DecisionTableConfigurationImpl in project drools by kiegroup.
the class DecisionTableConfigurationHandler method start.
public Object start(String uri, String localName, Attributes attrs, ExtensibleXmlParser parser) throws SAXException {
parser.startElementBuilder(localName, attrs);
String type = attrs.getValue("input-type");
String worksheetName = attrs.getValue("worksheet-name");
emptyAttributeCheck(localName, "input-type", type, parser);
DecisionTableConfiguration dtConf = new DecisionTableConfigurationImpl();
dtConf.setInputType(DecisionTableInputType.valueOf(type));
if (!StringUtils.isEmpty(worksheetName)) {
dtConf.setWorksheetName(worksheetName);
}
return dtConf;
}
Aggregations