Examples of OmTimeZone


Examples of org.apache.openmeetings.persistence.beans.basic.OmTimeZone

            invitation.setAllowEntry(true);
            return invitation;
          }

        } else if (invitation.getIsValidByTime()) {
          OmTimeZone tz = invitation.getOmTimeZone() == null
              ? omTimeZoneDaoImpl.getOmTimeZone(configurationDao.getConfValue("default.timezone", String.class, "Europe/Berlin"))
              : invitation.getOmTimeZone();
          Calendar now = Calendar.getInstance(TimeZone.getTimeZone(tz.getIcal()));
          Calendar start = Calendar.getInstance(TimeZone.getTimeZone(tz.getIcal()));
          start.setTime(invitation.getValidFrom());

          Calendar end = Calendar.getInstance(TimeZone.getTimeZone(tz.getIcal()));
          end.setTime(invitation.getValidTo());
          if (now.after(start) && now.before(end)) {
            this.updateInvitation(invitation);
            // invitation.setInvitationpass(null);
            invitation.setAllowEntry(true);
View Full Code Here

Examples of org.apache.openmeetings.persistence.beans.basic.OmTimeZone

    }
   
    String jNameTimeZone = configurationDao.getConfValue(
        "default.timezone", String.class, "Europe/Berlin");
   
    OmTimeZone omTimeZone = this.getOmTimeZone(jNameTimeZone);
    if (omTimeZone == null) {
      throw new RuntimeException("Could not find default.timezone, misconfiguration of database");
    }
    return omTimeZone;
  }
View Full Code Here

Examples of org.apache.openmeetings.persistence.beans.basic.OmTimeZone

  public Long addOmTimeZone(String name, String label, String iCal,
      Integer orderId) {
    try {

      OmTimeZone omTimeZone = new OmTimeZone();

      omTimeZone.setJname(name);
      omTimeZone.setLabel(label);
      omTimeZone.setIcal(iCal);
      omTimeZone.setOrderId(orderId);
      omTimeZone.setInserted(new Date());

      omTimeZone = em.merge(omTimeZone);
      Long omTimeZoneId = omTimeZone.getOmtimezoneId();

      return omTimeZoneId;

    } catch (Exception ex) {
      log.error("[addOmTimeZone]", ex);
View Full Code Here

Examples of org.apache.openmeetings.persistence.beans.basic.OmTimeZone

  public OmTimeZoneConverter(OmTimeZoneDao omTimeZoneDaoImpl) {
    this.omTimeZoneDaoImpl = omTimeZoneDaoImpl;
  }
 
  public OmTimeZone read(InputNode node) throws Exception {
    OmTimeZone omTimeZone;
    try {
      omTimeZone = omTimeZoneDaoImpl.getOmTimeZone(node.getValue());
    } catch (Exception e) {
      omTimeZone = new OmTimeZone();
    }

    return omTimeZone;
  }
View Full Code Here

Examples of org.apache.openmeetings.persistence.beans.basic.OmTimeZone

      log.info("validFromMinute: " + validFromMinute);

      Long users_id = sessiondataDao.checkSession(SID);
      Long user_level = userManager.getUserLevelByID(users_id);

      OmTimeZone omTimeZone = omTimeZoneDaoImpl
          .getOmTimeZone(jNameTimeZone);

      // If everything fails
      if (omTimeZone == null) {
        omTimeZone = omTimeZoneDaoImpl.getOmTimeZone(configurationDao.getConfValue("default.timezone", String.class, "Europe/Berlin"));
      }

      Calendar date = Calendar.getInstance();
      date.setTime(validFromDate);
     
      String timeZoneName = omTimeZone.getIcal();
      Calendar calFrom = Calendar.getInstance(TimeZone.getTimeZone(timeZoneName));
      calFrom.set(Calendar.YEAR, date.get(Calendar.YEAR));
      calFrom.set(Calendar.MONTH, date.get(Calendar.MONTH));
      calFrom.set(Calendar.DAY_OF_MONTH, date.get(Calendar.DAY_OF_MONTH));
      calFrom.set(Calendar.HOUR_OF_DAY, validFromHour);
View Full Code Here

Examples of org.apache.openmeetings.persistence.beans.basic.OmTimeZone

   * @param jName
   * @return
   */
  public TimeZone getTimezoneByOmTimeZoneId(Long omtimezoneId) {

    OmTimeZone omTimeZone = omTimeZoneDaoImpl
        .getOmTimeZoneById(omtimezoneId);

    TimeZone timeZone = TimeZone.getTimeZone(omTimeZone.getIcal());

    if (timeZone != null) {
      return timeZone;
    }

    // if user has not time zone get one from the server configuration

    String defaultTzName = configurationDao.getConfValue("default.timezone", String.class, "Europe/Berlin");

    OmTimeZone omTimeZoneDefault = omTimeZoneDaoImpl.getOmTimeZone(defaultTzName);

    TimeZone timeZoneByOmTimeZone = TimeZone
        .getTimeZone(omTimeZoneDefault.getIcal());

    if (timeZoneByOmTimeZone != null) {
      return timeZoneByOmTimeZone;
    }

View Full Code Here

Examples of org.apache.openmeetings.persistence.beans.basic.OmTimeZone

            // the UI
            // only has around 24 timezones
            // and Java around 600++
            Long sendToUserId = 0L;
            TimeZone timezoneMember = null;
            OmTimeZone omTimeZone = null;
            if (clientMember.get("userId") != null) {
              sendToUserId = Long.valueOf(
                  clientMember.get("userId").toString())
                  .longValue();
            }
View Full Code Here

Examples of org.apache.openmeetings.persistence.beans.basic.OmTimeZone

      String timeZoneName = item.attributeValue("name");
      String timeZoneLabel = item.attributeValue("label");
      Integer orderId = Integer.valueOf(item.attributeValue("orderId"));
      String iCal = item.attributeValue("iCal");

      OmTimeZone omTimeZone = new OmTimeZone();
      omTimeZone.setIcal(iCal);
      omTimeZone.setJname(timeZoneName);
      omTimeZone.setLabel(timeZoneLabel);
      omTimeZone.setOrderId(orderId);

      omTimeZones.add(omTimeZone);
    }

    return omTimeZones;
View Full Code Here

Examples of org.apache.openmeetings.persistence.beans.basic.OmTimeZone

          // the one for the UI display object to map to, cause the UI
          // only has around 24 timezones
          // and Java around 600++
          Long sendToUserId = 0L;
          TimeZone timezoneMember = null;
          OmTimeZone omTimeZone = null;
          if (clientMember.get("userId") != null) {
            sendToUserId = Long.valueOf(
                clientMember.get("userId").toString())
                .longValue();
          }
View Full Code Here

Examples of org.apache.openmeetings.persistence.beans.basic.OmTimeZone

     * ##################### Import Users
     */
    {
      List<User> list = readUserList(f, "users.xml", "users");
      for (User u : list) {
        OmTimeZone tz = u.getOmTimeZone();
        if (tz == null || tz.getJname() == null) {
          String jNameTimeZone = configurationDao.getConfValue(
              "default.timezone", String.class, "Europe/Berlin");
          OmTimeZone omTimeZone = omTimeZoneDaoImpl.getOmTimeZone(jNameTimeZone);
          u.setOmTimeZone(omTimeZone);
          u.setForceTimeZoneCheck(true);
        } else {
          u.setForceTimeZoneCheck(false);
        }
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.