use of core.framework.impl.template.source.FileTemplateSource in project core-ng-project by neowu.
the class TemplateManager method load.
private Map<String, HTMLTemplate> load(String templatePath, Class<?> modelClass) {
HTMLTemplateBuilder builder = new HTMLTemplateBuilder(new FileTemplateSource(webDirectory.root(), templatePath), modelClass);
builder.cdn = cdnManager;
Map<String, HTMLTemplate> templates = Maps.newHashMap();
for (String language : message.languages) {
builder.message = key -> message.get(key, language);
HTMLTemplate htmlTemplate = builder.build();
templates.put(language, htmlTemplate);
}
return templates;
}
Aggregations