Package org.openmeetings.app.persistence.beans.lang

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


      } else {
        fv.setName(name);
        fv.setUpdatetime(new Date());
        this.updateField(fv);
      }
      Fieldlanguagesvalues flv = this
          .getFieldlanguagesvaluesById(fieldlanguagesvalues_id);
      if (flv == null) {
        return new Long(-25);
      } else {
        flv.setUpdatetime(new Date());
        flv.setValue(value);
        this.updateFieldLanguagesLabel(flv);
      }
      return fieldvalues_id;
    } catch (Exception ex2) {
      log.error("[updateFieldLanguagesLabel]: ", ex2);
View Full Code Here


  private Fieldlanguagesvalues getFieldlanguagesvaluesById(
      Long fieldlanguagesvalues_id) throws Exception {
    String hql = "select f from Fieldlanguagesvalues f WHERE f.fieldlanguagesvalues_id = :fieldlanguagesvalues_id ";
    TypedQuery<Fieldlanguagesvalues> query = em.createQuery(hql, Fieldlanguagesvalues.class);
    query.setParameter("fieldlanguagesvalues_id", fieldlanguagesvalues_id);
    Fieldlanguagesvalues flv = null;
    try {
      flv = performReplace(query.getSingleResult());
    } catch (NoResultException ex) {
    }
    return flv;
View Full Code Here

  private String performReplace(String val, String appName) {
    return val.replaceAll("\\$APP_NAME", appName);
  }
 
  private Fieldlanguagesvalues performReplace(Fieldlanguagesvalues f, String appName) {
    Fieldlanguagesvalues r = new Fieldlanguagesvalues();
    r.setDeleted(f.getDeleted());
    r.setFieldlanguagesvalues_id(f.getFieldlanguagesvalues_id());
    r.setFieldvalues_id(f.getFieldvalues_id());
    r.setLanguage_id(f.getLanguage_id());
    r.setStarttime(f.getStarttime());
    r.setUpdatetime(f.getUpdatetime());
    r.setValue(performReplace(f.getValue(), appName));
    return r;
  }
View Full Code Here

        .longValue();

    // Get the required labels one time for all meeting members. The
    // Language of the email will be the system default language
    String labelid1158 = fieldmanagment.getString(1158L, language_id);
    Fieldlanguagesvalues labelid1153 = fieldmanagment
        .getFieldByIdAndLanguage(new Long(1153), language_id);
    Fieldlanguagesvalues labelid1154 = fieldmanagment
        .getFieldByIdAndLanguage(new Long(1154), language_id);

    for (int i = 0; i < points.size(); i++) {
      Appointment ment = points.get(i);
View Full Code Here

    String message = labelid1158 + " "
        + ment.getAppointmentName();

    if (ment.getAppointmentDescription().length() != 0) {

      Fieldlanguagesvalues labelid1152 = fieldmanagment
          .getFieldByIdAndLanguage(new Long(1152), language_id);
      message += labelid1152.getValue()
          + ment.getAppointmentDescription();

    }

    message += "<br/>"
View Full Code Here

      if (hash == null) {
        // No hash
        Long default_lang_id = Long.valueOf(
            getConfigurationmanagement().getConfKey(3,
                "default_lang_id").getConf_value()).longValue();
        Fieldlanguagesvalues labelid669 = getFieldmanagment()
            .getFieldByIdAndLanguage(new Long(669), default_lang_id);
        Fieldlanguagesvalues labelid672 = getFieldmanagment()
            .getFieldByIdAndLanguage(new Long(672), default_lang_id);

        ctx.put("message", labelid669.getValue());
        ctx.put("link",
            "<a href='" + loginURL + "'>" + labelid672.getValue()
                + "</a>");
        return getVelocityView().getVelocityEngine().getTemplate(
            "activation_template.vm");
      }
      //
      Users user = getUsermanagement().getUserByActivationHash(hash);

      if (user == null) {
        // No User Found with this Hash
        Long default_lang_id = Long.valueOf(
            getConfigurationmanagement().getConfKey(3,
                "default_lang_id").getConf_value()).longValue();

        Fieldlanguagesvalues labelid669 = getFieldmanagment()
            .getFieldByIdAndLanguage(new Long(669), default_lang_id);
        Fieldlanguagesvalues labelid672 = getFieldmanagment()
            .getFieldByIdAndLanguage(new Long(672), default_lang_id);

        ctx.put("message", labelid669.getValue());
        ctx.put("link",
            "<a href='" + loginURL + "'>" + labelid672.getValue()
                + "</a>");
        return getVelocityView().getVelocityEngine().getTemplate(
            "activation_template.vm");

      } else if (user.getStatus() == 1) {
        // already activated
        Long default_lang_id = Long.valueOf(
            getConfigurationmanagement().getConfKey(3,
                "default_lang_id").getConf_value()).longValue();

        Fieldlanguagesvalues labelid670 = getFieldmanagment()
            .getFieldByIdAndLanguage(new Long(670), default_lang_id);
        Fieldlanguagesvalues labelid672 = getFieldmanagment()
            .getFieldByIdAndLanguage(new Long(672), default_lang_id);

        ctx.put("message", labelid670.getValue());
        ctx.put("link",
            "<a href='" + loginURL + "'>" + labelid672.getValue()
                + "</a>");
        return getVelocityView().getVelocityEngine().getTemplate(
            "activation_template.vm");

      } else if (user.getStatus() == 0) {
        // activate
        user.setStatus(1);
        user.setUpdatetime(new Date());

        getUsermanagement().updateUser(user);

        Long default_lang_id = Long.valueOf(
            getConfigurationmanagement().getConfKey(3,
                "default_lang_id").getConf_value()).longValue();

        Fieldlanguagesvalues labelid671 = getFieldmanagment()
            .getFieldByIdAndLanguage(new Long(671), default_lang_id);
        Fieldlanguagesvalues labelid672 = getFieldmanagment()
            .getFieldByIdAndLanguage(new Long(672), default_lang_id);

        ctx.put("message", labelid671.getValue());
        ctx.put("link",
            "<a href='" + loginURL + "'>" + labelid672.getValue()
                + "</a>");
        return getVelocityView().getVelocityEngine().getTemplate(
            "activation_template.vm");

      } else {
        // unkown Status
        Long default_lang_id = Long.valueOf(
            getConfigurationmanagement().getConfKey(3,
                "default_lang_id").getConf_value()).longValue();

        Fieldlanguagesvalues labelid672 = getFieldmanagment()
            .getFieldByIdAndLanguage(new Long(672), default_lang_id);

        ctx.put("message", "Unkown Status");
        ctx.put("link",
            "<a href='" + loginURL + "'>" + labelid672.getValue()
                + "</a>");
        return getVelocityView().getVelocityEngine().getTemplate(
            "activation_template.vm");

      }
View Full Code Here

TOP

Related Classes of org.openmeetings.app.persistence.beans.lang.Fieldlanguagesvalues

Copyright © 2018 www.massapicom. 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.