@Test public void afterPropertiesSet() throws Exception { Resource ruleFolder = new ClassPathResource("/rules"); String ruleFolderPath = ruleFolder.getFile().getCanonicalPath(); unit.setRuleFileLocation(ruleFolderPath); unit.setRuleSpreadsheetFilename("drools-form-string-builder-rules.xlsx"); StringBuilder stringBuilder = new StringBuilder(); unit.afterPropertiesSet(); unit.applyRules(stringBuilder); assertEquals("empty", stringBuilder.toString()); }
public void afterPropertiesSet() throws Exception { String ruleFileName = getRuleFileLocation() + "/" + getRuleSpreadsheetFilename(); log.debug("Loading rules from {}", ruleFileName); File ruleFile = new File(ruleFileName); if (ruleFile.exists() && ruleFile.isFile()) { updateRulesFromFile(ruleFile); } else { log.warn("No such file: {}", ruleFileName); } }
SimpleStatelessSingleObjectRuleManager implements ApplicationListener<AbstractConfigurationFileEvent> { public void afterPropertiesSet() throws Exception { String ruleFileName = getRuleFileLocation() + "/" + getRuleSpreadsheetFilename(); log.debug("Loading rules from {}", ruleFileName); File ruleFile = new File(ruleFileName); if (ruleFile.exists() && ruleFile.isFile()) { updateRulesFromFile(ruleFile); } else { log.warn("No such file: {}", ruleFileName); } } }
SimpleStatelessSingleObjectRuleManager implements ApplicationListener<AbstractConfigurationFileEvent> { public void afterPropertiesSet() throws Exception { String ruleFileName = getRuleFileLocation() + "/" + getRuleSpreadsheetFilename(); log.debug("Loading rules from {}", ruleFileName); File ruleFile = new File(ruleFileName); if (ruleFile.exists() && ruleFile.isFile()) { updateRulesFromFile(ruleFile); } else { log.warn("No such file: {}", ruleFileName); } }  }
SimpleStatelessSingleObjectRuleManager implements ApplicationListener<AbstractConfigurationFileEvent> { public void afterPropertiesSet() throws Exception { String ruleFileName = getRuleFileLocation() + "/" + getRuleSpreadsheetFilename(); log.debug("Loading rules from {}", ruleFileName); File ruleFile = new File(ruleFileName); if (ruleFile.exists() && ruleFile.isFile()) { updateRulesFromFile(ruleFile); } else { log.warn("No such file: {}", ruleFileName); } }  KieBase getKieBase(); void setKieBase(KieBase kieBase); T applyRules(T businessObject); void afterPropertiesSet(); @Override void onApplicationEvent(AbstractConfigurationFileEvent fileEvent); synchronized void updateRulesFromFile(File configFile); String getRuleSpreadsheetFilename(); void setRuleSpreadsheetFilename(String ruleSpreadsheetFilename); String getRuleFileLocation(); void setRuleFileLocation(String ruleFileLocation); }
SimpleStatelessSingleObjectRuleManager implements ApplicationListener<AbstractConfigurationFileEvent> { public void afterPropertiesSet() throws Exception { String ruleFileName = getRuleFileLocation() + "/" + getRuleSpreadsheetFilename(); log.debug("Loading rules from {}", ruleFileName); File ruleFile = new File(ruleFileName); if (ruleFile.exists() && ruleFile.isFile()) { updateRulesFromFile(ruleFile); } else { log.warn("No such file: {}", ruleFileName); } }  KieBase getKieBase(); void setKieBase(KieBase kieBase); T applyRules(T businessObject); void afterPropertiesSet(); @Override void onApplicationEvent(AbstractConfigurationFileEvent fileEvent); synchronized void updateRulesFromFile(File configFile); String getRuleSpreadsheetFilename(); void setRuleSpreadsheetFilename(String ruleSpreadsheetFilename); String getRuleFileLocation(); void setRuleFileLocation(String ruleFileLocation);  }