use of org.wso2.carbon.bps.common.analytics.config.TBPSAnalytics in project carbon-business-process by wso2.
the class BPSAnalyticsConfiguration method initConfigurationFromFile.
/**
* Initialize the configuration object from the properties in the BPS Analytics config xml file.
*/
private void initConfigurationFromFile(File BPSAnalyticsConfigurationFile) {
SecretResolver secretResolver = null;
try (InputStream in = new FileInputStream(BPSAnalyticsConfigurationFile)) {
StAXOMBuilder builder = new StAXOMBuilder(in);
secretResolver = SecretResolverFactory.create(builder.getDocumentElement(), true);
} catch (Exception e) {
log.warn("Error occurred while retrieving secured BPS Analytics configuration.", e);
}
TBPSAnalytics tBPSAnalytics = bpsAnalyticsDocument.getBPSAnalytics();
if (tBPSAnalytics == null) {
return;
}
if (tBPSAnalytics.getAnalyticServer() != null) {
initAnalytics(secretResolver, tBPSAnalytics.getAnalyticServer());
}
if (tBPSAnalytics.getBPMN() != null) {
initBPMNAnalytics(tBPSAnalytics.getBPMN());
}
}
Aggregations