File size: 675 Bytes
e789b06 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
TDAT: public ITemplateEngine getTemplateEngine(String type) throws Exception { // Get template engine defined into the Spring config ITemplateEngine templateEngine = (ITemplateEngine) applicationContext .getBean(type); // Test if template engine have configuration ID String configurationId = templateEngine.getConfigurationId(); if (!StringUtils.isEmpty(configurationId)) { // Template engine works with Configuration, get it ITemplateConfiguration configuration = getTemplateConfiguration(configurationId); templateEngine.setConfiguration(configuration); } return templateEngine; } COM: <s> return template engine of type code type code </s> |