Package com.erudika.para.core

Examples of com.erudika.para.core.Sysprop.addProperty()


      lang.putAll(getDefaultLanguage())// copy default langmap
      int approved = 0;

      for (Translation trans : tlist) {
        lang.put(trans.getThekey(), trans.getValue());
        saved.addProperty(trans.getThekey(), trans.getValue());
        approved++;
      }
      if (approved > 0) {
        updateTranslationProgressMap(appid, langCode, approved);
      }
View Full Code Here


    Map<String, String> dlang = getDefaultLanguage();
    int approved = 0;

    for (String key : dlang.keySet()) {
      if (lang.containsKey(key)) {
        s.addProperty(key, lang.get(key));
        if (!dlang.get(key).equals(lang.get(key))) {
          approved++;
        }
      } else {
        s.addProperty(key, dlang.get(key));
View Full Code Here

        s.addProperty(key, lang.get(key));
        if (!dlang.get(key).equals(lang.get(key))) {
          approved++;
        }
      } else {
        s.addProperty(key, dlang.get(key));
      }
    }
    if (approved > 0) {
      updateTranslationProgressMap(appid, langCode, approved);
    }
View Full Code Here

      return false;
    }
    Sysprop s = dao.read(appid, keyPrefix.concat(langCode));

    if (s != null && !value.equals(s.getProperty(key))) {
      s.addProperty(key, value);
      dao.update(appid, s);
      updateTranslationProgressMap(appid, langCode, PLUS);
      return true;
    }
    return false;
View Full Code Here

    }
    Sysprop s = dao.read(appid, keyPrefix.concat(langCode));
    String defStr = getDefaultLanguage().get(key);

    if (s != null && !defStr.equals(s.getProperty(key))) {
      s.addProperty(key, defStr);
      dao.update(appid, s);
      updateTranslationProgressMap(appid, langCode, MINUS);
      return true;
    }
    return false;
View Full Code Here

    if (approved > defsize) {
      approved = defsize;
    }

    if (defsize == 0) {
      progress.addProperty(langCode, 0);
    } else {
      progress.addProperty(langCode, (int) ((approved / defsize) * 100));
    }
    dao.update(appid, progress);
  }
View Full Code Here

    }

    if (defsize == 0) {
      progress.addProperty(langCode, 0);
    } else {
      progress.addProperty(langCode, (int) ((approved / defsize) * 100));
    }
    dao.update(appid, progress);
  }

  private Sysprop getProgressMap(String appid) {
View Full Code Here

  private Sysprop getProgressMap(String appid) {
    Sysprop progress = dao.read(appid, progressKey);
    if (progress == null) {
      progress = new Sysprop(progressKey);
      for (String key : progressMap.keySet()) {
        progress.addProperty(key, progressMap.get(key));
      }
      progress.addProperty(getDefaultLanguageCode(), 100);
      dao.create(appid, progress);
    }
    return progress;
View Full Code Here

    if (progress == null) {
      progress = new Sysprop(progressKey);
      for (String key : progressMap.keySet()) {
        progress.addProperty(key, progressMap.get(key));
      }
      progress.addProperty(getDefaultLanguageCode(), 100);
      dao.create(appid, progress);
    }
    return progress;
  }
}
View Full Code Here

      lang.putAll(getDefaultLanguage())// copy default langmap
      int approved = 0;

      for (Translation trans : tlist) {
        lang.put(trans.getThekey(), trans.getValue());
        saved.addProperty(trans.getThekey(), trans.getValue());
        approved++;
      }
      if (approved > 0) {
        updateTranslationProgressMap(appid, langCode, approved);
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.