Esempio n. 1
0
 /**
  * восстановление парамтеров отчета
  *
  * @param report
  */
 private void restoreParamsValue(RptMain report) {
   try {
     UIProfile profile = getReportUIProfile(report);
     for (Map.Entry<String, ReportParameter> entry : reportParams.entrySet()) {
       // не восстанавливаем системные и установленные через API параметры
       if (!entry.getKey().startsWith("__") && !externalParams.contains(entry.getKey())) {
         String propValue = profile.getProperty(entry.getKey());
         if (propValue != null)
           entry
               .getValue()
               .setValue(DataUtils.stringToValue(propValue, entry.getValue().getJavaType()));
       }
     }
   } catch (Exception e) {
     log.error("Cann't restore report parameters, report code: " + report.getCode(), e);
   }
 }