Examples of FieldLanguage


Examples of org.openmeetings.app.persistence.beans.lang.FieldLanguage

  private EntityManager em;

  public Long addLanguage(String langName, Boolean langRtl, String code) {
    try {

      FieldLanguage fl = new FieldLanguage();
      fl.setStarttime(new Date());
      fl.setDeleted("false");
      fl.setName(langName);
      fl.setRtl(langRtl);
      fl.setCode(code);

      fl = em.merge(fl);
      Long languages_id = fl.getLanguage_id();

      return languages_id;
    } catch (Exception ex2) {
      log.error("[addLanguage]: ", ex2);
    }
View Full Code Here

Examples of org.openmeetings.app.persistence.beans.lang.FieldLanguage

      log.debug("users_id: " + users_id);
      log.debug("user_level: " + user_level);

      if (user_level != null && user_level > 0) {
        FieldLanguage fl = getFieldLanguageDaoImpl()
            .getFieldLanguageById(language_id);

        List<Fieldlanguagesvalues> flvList = getFieldmanagment().getMixedFieldValuesList(language_id);

        if (fl != null && flvList != null) {
          Document doc = createDocument(flvList, getFieldmanagment().getUntranslatedFieldValuesList(language_id));

          String requestedFile = fl.getName() + ".xml";

          httpServletResponse.reset();
          httpServletResponse.resetBuffer();
          OutputStream out = httpServletResponse.getOutputStream();
          httpServletResponse
View Full Code Here

Examples of org.openmeetings.app.persistence.beans.lang.FieldLanguage

  }

  public Long updateFieldLanguage(Long language_id, String langName,
      String code, String deleted) {
    try {
      FieldLanguage fl = this.getFieldLanguageById(language_id);
      fl.setUpdatetime(new Date());
      if (langName.length() > 0)
        fl.setName(langName);
      if (code.length() > 0)
        fl.setCode(code);
      fl.setDeleted(deleted);
      this.updateLanguage(fl);
      return language_id;
    } catch (Exception ex2) {
      log.error("[updateLanguage]: ", ex2);
    }
View Full Code Here

Examples of org.openmeetings.app.persistence.beans.lang.FieldLanguage

          + "WHERE c.deleted <> :deleted "
          + "AND c.language_id = :language_id";
      TypedQuery<FieldLanguage> query = em.createQuery(hql, FieldLanguage.class);
      query.setParameter("deleted", "true");
      query.setParameter("language_id", language_id);
      FieldLanguage fl = null;
      try {
        fl = query.getSingleResult();
      } catch (NoResultException ex) {
      }
      return fl;
View Full Code Here

Examples of org.openmeetings.app.persistence.beans.lang.FieldLanguage

      try {
        flv = performReplace(query.getSingleResult());
      } catch (NoResultException ex) {
      }

      FieldLanguage fieldLanguage = fieldLanguageDaoImpl
          .getFieldLanguageById(language_id);

      log.debug("Getting FieldById for Language "
          + fieldLanguage.getName());

      // Check for Right To Left Languages
      if (fieldLanguage.getRtl()) {

        log.debug("Language requieres RTL");

        Fieldlanguagesvalues remote = flv;
        Fieldlanguagesvalues toAdd = new Fieldlanguagesvalues();
View Full Code Here

Examples of org.openmeetings.app.persistence.beans.lang.FieldLanguage

        Object[] row = (Object[])fl;
        map.put("id", (Long)row[0]);
        map.put("value", performReplace((String)row[1], appName));
        returnList.add(map);
      }
      FieldLanguage fieldLanguage = fieldLanguageDaoImpl
          .getFieldLanguageById(language_id);

      log.debug("Getting Labels for Language " + fieldLanguage.getName());

      // Check for Right To Left Languages
      if (fieldLanguage.getRtl()) {
        log.debug("Language requieres RTL!");

        List<Map<String, Object>> returnRtlList = new LinkedList<Map<String, Object>>();

        for (Iterator<Map<String, Object>> iter = returnList.iterator(); iter
View Full Code Here

Examples of org.openmeetings.app.persistence.beans.lang.FieldLanguage

      query.setParameter("language_id", language_id);
      query.setParameter("start", start);
      query.setParameter("max", start + max);

      List<Fieldlanguagesvalues> returnList = performReplace(query.getResultList());
      FieldLanguage fieldLanguage = fieldLanguageDaoImpl
          .getFieldLanguageById(language_id);

      log.debug("GEtting all fields by language : "
          + fieldLanguage.getName());

      // Check for Right To Left Languages
      if (fieldLanguage.getRtl()) {
        log.debug("language : " + fieldLanguage.getName()
            + " requieres RTL");

        List<Fieldlanguagesvalues> returnRtlList = new LinkedList<Fieldlanguagesvalues>();

        for (Iterator<Fieldlanguagesvalues> iter = returnList
            .iterator(); iter.hasNext();) {
          Fieldlanguagesvalues remote = iter.next();
          Fieldlanguagesvalues toAdd = new Fieldlanguagesvalues();
          toAdd.setFieldlanguagesvalues_id(remote
              .getFieldlanguagesvalues_id());
          toAdd.setFieldvalues_id(remote.getFieldvalues_id());
          toAdd.setLanguage_id(remote.getLanguage_id());

          String[] splitted = remote.getValue().split(" ");
          String reverseOrder = "";
          for (int i = splitted.length - 1; i >= 0; i--) {
            reverseOrder += splitted[i];
            if (splitted.length != 1) {
              reverseOrder += " ";
            }
          }
          toAdd.setValue(reverseOrder);

          returnRtlList.add(toAdd);
        }

        return returnRtlList;
      } else {
        log.debug("language : " + fieldLanguage.getName()
            + " requieres NO RTL");

        return returnList;

      }
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.