use of com.haulmont.cuba.core.global.Resources in project cuba by cuba-platform.
the class CreditsLoader method load.
public CreditsLoader load() {
String configProperty = AppContext.getProperty("cuba.creditsConfig");
if (StringUtils.isBlank(configProperty)) {
log.info("Property cuba.creditsConfig is empty");
return this;
}
StrTokenizer tokenizer = new StrTokenizer(configProperty);
String[] locations = tokenizer.getTokenArray();
for (String location : locations) {
Resources resources = AppBeans.get(Resources.NAME);
String xml = resources.getResourceAsString(location);
if (xml == null) {
log.debug("Resource {} not found, ignore it", location);
continue;
}
Element rootElement = Dom4j.readDocument(xml).getRootElement();
loadLicenses(rootElement);
loadConfig(rootElement);
}
Collections.sort(items);
return this;
}
Aggregations