return paramValueStr;
}
private static Reporting createReportingEngine(PropertiesLoader propertiesLoader) throws IOException {
DefaultFormatterFactory formatterFactory = new DefaultFormatterFactory();
Reporting reporting = new Reporting();
Properties properties = propertiesLoader.load();
String openOfficePath = properties.getProperty(PropertiesLoader.CUBA_REPORTING_OPENOFFICE_PATH);
String openOfficePorts = properties.getProperty(PropertiesLoader.CUBA_REPORTING_OPENOFFICE_PORTS);
if (StringUtils.isNotBlank(openOfficePath) && StringUtils.isNotBlank(openOfficePorts)) {
String[] portsStr = openOfficePorts.split("[,|]");
Integer[] ports = new Integer[portsStr.length];
for (int i = 0, portsStrLength = portsStr.length; i < portsStrLength; i++) {
String str = portsStr[i];
ports[i] = Integer.valueOf(str);
}
OfficeIntegration officeIntegration = new OfficeIntegration(openOfficePath, ports);
formatterFactory.setOfficeIntegration(officeIntegration);
String openOfficeTimeout = properties.getProperty(PropertiesLoader.CUBA_REPORTING_OPENOFFICE_TIMEOUT);
if (StringUtils.isNotBlank(openOfficeTimeout)) {
officeIntegration.setTimeoutInSeconds(Integer.valueOf(openOfficeTimeout));
}