Ejemplo n.º 1
0
 private String getRefAndLevel(AuditStatistics auditStatistics, Locale locale) {
   ResourceBundle refBundle = ResourceBundle.getBundle(refBundleName, locale);
   Collection<ResourceBundle> refAndlevelValueBundleList = new ArrayList();
   for (String bundle : refAndLevelValueBundleNameList) {
     refAndlevelValueBundleList.add(ResourceBundle.getBundle(bundle, locale));
   }
   ResourceBundle levelBundle = ResourceBundle.getBundle(levelBundleName, locale);
   StringBuilder refAndLevel = new StringBuilder();
   refAndLevel.append(StringEscapeUtils.unescapeHtml4(refBundle.getString(REF_KEY)));
   refAndLevel.append(DOUBLE_DOT_KEY);
   refAndLevel.append(
       StringEscapeUtils.unescapeHtml4(
           retrieveI18nValue(
               auditStatistics.getParametersMap().get(REF_KEY), refAndlevelValueBundleList)));
   refAndLevel.append(SEPARATOR_KEY);
   refAndLevel.append(StringEscapeUtils.unescapeHtml4(levelBundle.getString(LEVEL_KEY)));
   refAndLevel.append(DOUBLE_DOT_KEY);
   refAndLevel.append(
       StringEscapeUtils.unescapeHtml4(
           retrieveI18nValue(
               auditStatistics.getParametersMap().get(LEVEL_KEY).replace(";", "-"),
               refAndlevelValueBundleList)));
   return refAndLevel.toString();
 }
Ejemplo n.º 2
0
 @Override
 public String getTitle(AuditStatistics auditStatistics, Locale locale) {
   ResourceBundle bundle = ResourceBundle.getBundle(bundleName, locale);
   StringBuilder subTitle = new StringBuilder();
   subTitle.append(bundle.getString(MARK_KEY));
   subTitle.append(SPACE_KEY);
   subTitle.append(auditStatistics.getRawMark());
   subTitle.append(PERCENT_KEY);
   subTitle.append(SEPARATOR_KEY);
   //        subTitle.append(bundle.getString(weightedMarkKey));
   //        subTitle.append(SPACE_KEY);
   //        subTitle.append(auditStatistics.getWeightedMark());
   //        subTitle.append(PERCENT_KEY);
   //        subTitle.append(SEPARATOR_KEY);
   subTitle.append(getRefAndLevel(auditStatistics, locale));
   return subTitle.toString();
 }