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

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


      PersistenceSessionUtil.closeSession(idf);
      List<Map> returnList = new LinkedList<Map>();
      if(results.size()!=0){
        Iterator<Fieldlanguagesvalues> flIterator=results.iterator();
        while(flIterator.hasNext()){
          Fieldlanguagesvalues fl = flIterator.next();
          Map map = new HashMap();
          map.put("id", fl.getFieldvalues_id());
          map.put("value", fl.getValue());
          returnList.add(map);
        }
      }
      FieldLanguage fieldLanguage = FieldLanguageDaoImpl.getInstance().getFieldLanguageById(language_id);
     
View Full Code Here


        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;
View Full Code Here

      Object idf = PersistenceSessionUtil.createSession();
      EntityManager session = PersistenceSessionUtil.getSession();
      EntityTransaction tx = session.getTransaction();
      tx.begin();

      Fieldlanguagesvalues flv = new Fieldlanguagesvalues();
      flv.setStarttime(new Date());
      flv.setValue(fieldvalue);
      flv.setLanguage_id(language_id);
      flv.setFieldvalues_id(field_id);
      flv.setDeleted("false");

      flv = session.merge(flv);
      session.flush();
      Long fieldlanguagesvaluesId = flv.getFieldlanguagesvalues_id();
     
      tx.commit();

      PersistenceSessionUtil.closeSession(idf);
     
View Full Code Here

      } 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

    EntityManager session = PersistenceSessionUtil.getSession();
    EntityTransaction tx = session.getTransaction();
    tx.begin();
    Query query = session.createQuery(hql);
    query.setParameter("fieldlanguagesvalues_id", fieldlanguagesvalues_id);
    Fieldlanguagesvalues flv = null;
    try {
      flv = (Fieldlanguagesvalues) query.getSingleResult();
      } catch (NoResultException ex) {
      }
    tx.commit();
View Full Code Here

    log.debug("doScheduledMeetingReminder : UTC now " + now);
   
    Long language_id = Long.valueOf(Configurationmanagement.getInstance().
            getConfKey(3,"default_lang_id").getConf_value()).longValue();
   
    Fieldlanguagesvalues labelid1158 = Fieldmanagment.getInstance().getFieldByIdAndLanguage(new Long(1158), language_id);
    Fieldlanguagesvalues labelid1153 = Fieldmanagment.getInstance().getFieldByIdAndLanguage(new Long(1153), language_id);
    Fieldlanguagesvalues labelid1154 = Fieldmanagment.getInstance().getFieldByIdAndLanguage(new Long(1154), language_id);
   
   
    for(int i = 0; i < points.size(); i++){
      Appointment ment = points.get(i);
     
     
      // Checking ReminderType - only ReminderType simple mail is concerned!
      if(ment.getRemind().getTypId() == 2 || ment.getRemind().getTypId() == 3){
       
        log.debug("doScheduledMeetingReminder : Found appointment " +  ment.getAppointmentName());
       
        Date appStart = ment.getAppointmentStarttime();
        Date oneHourBeforeAppStart = new Date(System.currentTimeMillis());
        oneHourBeforeAppStart.setTime(appStart.getTime());
        //oneHourBeforeAppStart.setHours(appStart.getHours() -1);
       
        oneHourBeforeAppStart.setMinutes(appStart.getMinutes() - 5);
       
//        System.out.println("doScheduledMeetingReminder : Found appointment 1 " +now);
//        System.out.println("doScheduledMeetingReminder : Found appointment 2 " +appStart);
//        System.out.println("doScheduledMeetingReminder : Found appointment 3 " +oneHourBeforeAppStart);
//        System.out.println("doScheduledMeetingReminder : Found appointment 4 " +now.before(appStart));
//        System.out.println("doScheduledMeetingReminder : Found appointment 5 " +now.after(oneHourBeforeAppStart));
//       
        if(now.before(appStart) && now.after(oneHourBeforeAppStart)){
          log.debug("Meeting " +  ment.getAppointmentName() + " is in reminder range...");
         
          List<MeetingMember> members = MeetingMemberDaoImpl.getInstance().getMeetingMemberByAppointmentId(ment.getAppointmentId());
         
         
          if(members == null || members.size() < 1){
            log.debug("doScheduledMeetingReminder : no members in meeting!");
            continue;
          }
         
          for(int y =0; y < members.size(); y++){
            MeetingMember mm = members.get(y);
           
            log.debug("doScheduledMeetingReminder : Member " + mm.getEmail());
           
            Invitations inv = mm.getInvitation();
           
            if(inv==null) {
              log.error("Error retrieving Invitation for member " + mm.getEmail() + " in Appointment " + ment.getAppointmentName());
            } else {
              // Check if Invitation was updated last time
              Date updateTime = inv.getUpdatetime();
             
              if(updateTime !=null && updateTime.after(oneHourBeforeAppStart)){
                log.debug("Member has been informed within one hour before Meeting start");
                continue;
              }
             
             
              if(inv.getBaseUrl() == null  || inv.getBaseUrl().length() < 1){
                log.error("Error retrieving baseUrl from Invitation ID : " + inv.getInvitations_id());
                continue;
              }
             
              //ment.getAppointmentStarttime().toLocaleString()
             
              Users us = ment.getUserId();
             
              String jNameTimeZone = null;
              if (us != null && us.getOmTimeZone() != null) {
                jNameTimeZone = us.getOmTimeZone().getJname();
              } else {
                Configuration conf = Configurationmanagement.getInstance().getConfKey(3L, "default.timezone");
                if (conf != null) {
                  jNameTimeZone = conf.getConf_value();
                }
              }
             
              OmTimeZone omTimeZone = OmTimeZoneDaoImpl.getInstance().getOmTimeZone(jNameTimeZone);
             
              String timeZoneName = omTimeZone.getIcal();
             
              Calendar cal = Calendar.getInstance();
              cal.setTimeZone(TimeZone.getTimeZone(timeZoneName));
              int offset = cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET);
             
              Date starttime = new Date(ment.getAppointmentStarttime().getTime() + offset);
              Date endtime = new Date(ment.getAppointmentEndtime().getTime() + offset);
             
//              String message = "Meeting : " + ment.getAppointmentName() + "<br>";
//              if(ment.getAppointmentDescription() != null && ment.getAppointmentDescription().length() > 0)
//                message += "(" + ment.getAppointmentDescription() + ")<br>";
//              message += "Start : " + starttime + "<br>";
//              message += "End : " + endtime + "<br>";
//              message += "Timezone : " + omTimeZone.getIcal() + "<br>";
             
             
              String message = labelid1158.getValue() + " "+ ment.getAppointmentName();
             
              if (ment.getAppointmentDescription().length() != 0) {
               
                Fieldlanguagesvalues labelid1152 = Fieldmanagment.getInstance().getFieldByIdAndLanguage(new Long(1152), language_id);
                message += labelid1152.getValue() + ment.getAppointmentDescription();
               
              }
             
              message += "<br/>" + labelid1153.getValue() + ' '
                      + CalendarPatterns.getDateWithTimeByMiliSeconds(starttime)
View Full Code Here

//    System.out.println(offset);
//    System.out.println(starttime);
//    System.out.println(endtime);
   
   
    Fieldlanguagesvalues labelid1157 = Fieldmanagment.getInstance().getFieldByIdAndLanguage(new Long(1157), language_id);
   
    String message = labelid1157.getValue() + appointment.getAppointmentName();
   
    if (appointment.getAppointmentDescription().length() != 0) {
     
      Fieldlanguagesvalues labelid1152 = Fieldmanagment.getInstance().getFieldByIdAndLanguage(new Long(1152), language_id);
      message += labelid1152.getValue() + appointment.getAppointmentDescription();
     
    }
   
    Fieldlanguagesvalues labelid1153 = Fieldmanagment.getInstance().getFieldByIdAndLanguage(new Long(1153), language_id);
    Fieldlanguagesvalues labelid1154 = Fieldmanagment.getInstance().getFieldByIdAndLanguage(new Long(1154), language_id);
   
    message += "<br/>" + labelid1153.getValue() + ' '
            + CalendarPatterns.getDateWithTimeByMiliSeconds(starttime)
            + " (" + timeZoneName + ")"
            + "<br/>";
   
    message += labelid1154.getValue() + ' '
            + CalendarPatterns.getDateWithTimeByMiliSeconds(endtime)
            + " (" + timeZoneName + ")"
            + "<br/>";
   
    String invitorName = user.getFirstname() + " " + user.getLastname() + " [" + user.getAdresses().getEmail() + "]";
   
    Fieldlanguagesvalues labelid1156 = Fieldmanagment.getInstance().getFieldByIdAndLanguage(new Long(1156), language_id);
    message += labelid1156.getValue() + invitorName + "<br/>";
   
    // checking reminderType
    if(appointment.getRemind().getTypId() == 1){
      log.debug("no remindertype defined -> no cancel of invitation");
    }
View Full Code Here

//      System.out.println("Ical "+omTimeZone.getIcal());
//      System.out.println(offset);
//      System.out.println("3"+starttime);
//      System.out.println("4"+endtime);
     
      Fieldlanguagesvalues labelid1151 = Fieldmanagment.getInstance().getFieldByIdAndLanguage(new Long(1151), language_id);
     
      String message = labelid1151.getValue() + " " + point.getAppointmentName();
     
      if (point.getAppointmentDescription().length() != 0) {
       
        Fieldlanguagesvalues labelid1152 = Fieldmanagment.getInstance().getFieldByIdAndLanguage(new Long(1152), language_id);
        message += labelid1152.getValue() + point.getAppointmentDescription();
       
      }
     
      Fieldlanguagesvalues labelid1153 = Fieldmanagment.getInstance().getFieldByIdAndLanguage(new Long(1153), language_id);
      Fieldlanguagesvalues labelid1154 = Fieldmanagment.getInstance().getFieldByIdAndLanguage(new Long(1154), language_id);
     
      message += "<br/>" + labelid1153.getValue() + ' '
              + CalendarPatterns.getDateWithTimeByMiliSeconds(starttime)
              + " (" + timeZoneName + ")"
              + "<br/>";
     
      message += labelid1154.getValue() + ' '
              + CalendarPatterns.getDateWithTimeByMiliSeconds(endtime)
              + " (" + timeZoneName + ")"
              + "<br/>";
     
      Fieldlanguagesvalues labelid1156 = Fieldmanagment.getInstance().getFieldByIdAndLanguage(new Long(1156), language_id);
     
      message += labelid1156.getValue() + invitorName + "<br/>";
     
      if(point.getRemind().getTypId() == 1){
        log.debug("no reminder required");
      } else if(point.getRemind().getTypId() == 2){
        log.debug("Reminder for Appointment : simple email");
View Full Code Here

   
    Date starttime = new Date(appointment.getAppointmentStarttime().getTime() + offset);
    Date endtime = new Date(appointment.getAppointmentEndtime().getTime() + offset);
   
   
    Fieldlanguagesvalues labelid1155 = Fieldmanagment.getInstance().getFieldByIdAndLanguage(new Long(1155), language_id);
   
    String message = labelid1155.getValue() + " " + appointment.getAppointmentName();
   
    if (appointment.getAppointmentDescription().length() != 0) {
     
      Fieldlanguagesvalues labelid1152 = Fieldmanagment.getInstance().getFieldByIdAndLanguage(new Long(1152), language_id);
      message += labelid1152.getValue() + appointment.getAppointmentDescription();
     
    }
   
    Fieldlanguagesvalues labelid1153 = Fieldmanagment.getInstance().getFieldByIdAndLanguage(new Long(1153), language_id);
    Fieldlanguagesvalues labelid1154 = Fieldmanagment.getInstance().getFieldByIdAndLanguage(new Long(1154), language_id);
   
    message += "<br/>" + labelid1153.getValue() + ' '
            + CalendarPatterns.getDateWithTimeByMiliSeconds(starttime)
            + " (" + timeZoneName + ")"
            + "<br/>";
   
    message += labelid1154.getValue() + ' '
            + CalendarPatterns.getDateWithTimeByMiliSeconds(endtime)
            + " (" + timeZoneName + ")"
            + "<br/>";
   
    Fieldlanguagesvalues labelid1156 = Fieldmanagment.getInstance().getFieldByIdAndLanguage(new Long(1156), language_id);
    message += labelid1156.getValue() + invitorName + "<br/>";
   
    // checking reminderType
    if(appointment.getRemind().getTypId() == 1){
      log.debug("no remindertype defined -> no cancel of invitation");
    }
View Full Code Here

        .longValue();

    String template = ResetPasswordTemplate.getInstance()
        .getResetPasswordTemplate(reset_link, default_lang_id);

    Fieldlanguagesvalues labelid517 = Fieldmanagment.getInstance()
        .getFieldByIdAndLanguage(new Long(517), default_lang_id);

    MailHandler.sendMail(email, labelid517.getValue(), template);
  }
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.