Package org.openmeetings.app.persistence.beans.basic

Examples of org.openmeetings.app.persistence.beans.basic.Configuration


 
  public static synchronized String getCryptKey() {
    try {
     
      if (ScopeApplicationAdapter.configKeyCryptClassName == null) {
        Configuration conf = Configurationmanagement.getInstance().getConfKey(3,"crypt_ClassName");
        if (conf != null) {
            ScopeApplicationAdapter.configKeyCryptClassName = conf.getConf_value();
        }
      }
     
      return ScopeApplicationAdapter.configKeyCryptClassName;
    } catch (Exception err) {
View Full Code Here


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

       
        OmTimeZone omTimeZone = OmTimeZoneDaoImpl.getInstance().getOmTimeZone(jNameTimeZone);
     
        //If everything fails
      if (omTimeZone == null) {
        Configuration conf = Configurationmanagement.getInstance().getConfKey(3L, "default.timezone");
        if (conf != null) {
          jNameTimeZone = conf.getConf_value();
        }
        omTimeZone = OmTimeZoneDaoImpl.getInstance().getOmTimeZone(jNameTimeZone);
      }
       
      String timeZoneName = omTimeZone.getIcal();
View Full Code Here

      Long users_id = sessionManagement.checkSession(SID);
      Long user_level = userManagement.getUserLevelByID(users_id);

      if (authLevelManagement.checkWebServiceLevel(user_level)) {

        Configuration conf = cfgManagement.getConfKey(3L,
            "default.timezone");
        String jName_timeZone = "";

        if (conf != null) {
          jName_timeZone = conf.getConf_value();
        }

        Long user_id = userManagement.registerUser(username, userpass,
            lastname, firstname, email, new Date(), street,
            additionalname, fax, zip, states_id, town, language_id,
View Full Code Here

      OmTimeZone omTimeZone = omTimeZoneDaoImpl
          .getOmTimeZone(jNameTimeZone);

      // If everything fails
      if (omTimeZone == null) {
        Configuration conf = cfgManagement.getConfKey(3L,
            "default.timezone");
        if (conf != null) {
          jNameTimeZone = conf.getConf_value();
        }
        omTimeZone = omTimeZoneDaoImpl.getOmTimeZone(jNameTimeZone);
      }

      String timeZoneName = omTimeZone.getIcal();
View Full Code Here

    Properties props = System.getProperties();

    props.put("mail.smtp.host", smtpServer);
    props.put("mail.smtp.port", smtpPort);

    Configuration conf = cfgManagement.getConfKey(3,
        "mail.smtp.starttls.enable");
    if (conf != null) {
      if (conf.getConf_value().equals("1")) {
        props.put("mail.smtp.starttls.enable", "true");
      }
    }

    // Check for Authentification
View Full Code Here

                userObject.getExternalUserId(),
                userObject.getExternalUserType());

            if (user == null) {

              Configuration conf = cfgManagement.getConfKey(3L,
                  "default.timezone");
              String jName_timeZone = "";

              if (conf != null) {
                jName_timeZone = conf.getConf_value();
              }

              long userId = userManagement
                  .addUserWithExternalKey(1, 0, 0,
                      userObject.getFirstname(),
View Full Code Here

  }

  public Boolean getSIPModuleStatus() {
    try {

      Configuration conf = cfgManagement.getConfKey(3L, "sip.enable");

      if (conf == null) {
        return false;
      } else {

        if (conf.getConf_value().equals("yes")) {
          return true;
        }

      }
View Full Code Here

      String middle_i, String last_name, String email, String login,
      String password) {
    try {

      // Check if the OpenXG Gateway is enabled in general
      Configuration sip_openxg_enable = cfgManagement.getConfKey(3L,
          "sip.openxg.enable");

      if (sip_openxg_enable == null
          || !sip_openxg_enable.getConf_value().equals("yes")) {
        log.debug("SIP is disabled");
        return null;
      }

      // client_id and client_secret
      Configuration openxg_client_id = cfgManagement.getConfKey(3L,
          "openxg.client.id");
      Configuration openxg_client_secret = cfgManagement.getConfKey(3L,
          "openxg.client.secret");
      if (openxg_client_id == null || openxg_client_secret == null) {
        throw new Exception(
            "openxg.client.id or openxg.client.secret missing in Configuration table");
      }
      String client_id = openxg_client_id.getConf_value();
      String client_secret = openxg_client_secret.getConf_value();

      // domain
      Configuration openxg_client_domain = cfgManagement.getConfKey(3L,
          "openxg.client.domain");
      if (openxg_client_domain == null) {
        throw new Exception(
            "openxg.client.domain missing in Configuration table");
      }
      String domain = openxg_client_domain.getConf_value();

      // openxg_community_code
      Configuration openxg_community_code = cfgManagement.getConfKey(3L,
          "openxg.community.code");
      if (openxg_community_code == null) {
        throw new Exception(
            "openxg.community.code missing in Configuration table");
      }
      String community_code = openxg_community_code.getConf_value();

      // language_code
      Configuration openxg_language_code = cfgManagement.getConfKey(3L,
          "openxg.language.code");
      if (openxg_language_code == null) {
        throw new Exception(
            "openxg.language.code missing in Configuration table");
      }
      String language_code = openxg_language_code.getConf_value();

      // adminid
      Configuration openxg_adminid = cfgManagement.getConfKey(3L,
          "openxg.adminid");
      if (openxg_adminid == null) {
        throw new Exception(
            "openxg.adminid missing in Configuration table");
      }
      String adminid = openxg_adminid.getConf_value();

      // sip_language_phonecode, for example +358, is important as port of
      // the
      // number/login for the SIP-User via the applet
      Configuration sip_language_phonecode = cfgManagement.getConfKey(3L,
          "sip.language.phonecode");

      if (sip_language_phonecode == null) {
        throw new Exception(
            "No sip.language.phonecode set in Configuration");
      }

      // Calculate the number in national format
      Configuration sip_phonerange_start = cfgManagement.getConfKey(3L,
          "sip.phonerange.start");
      Configuration sip_phonerange = cfgManagement.getConfKey(3L,
          "sip.phonerange");
      Configuration sip_phonerange_currentindex = cfgManagement
          .getConfKey(3L, "sip.phonerange.currentindex");
      if (sip_phonerange_start == null || sip_phonerange == null
          || sip_phonerange_currentindex == null) {
        throw new Exception(
            "sip.phonerange.start, sip.phonerange or sip.phonerange.currentindex missing in Configuration table");
View Full Code Here

  public OpenXGReturnObject openSIPgCreateConference() {
    try {

      // Check if the OpenXG Gateway is enabled in general
      Configuration sip_openxg_enable = cfgManagement.getConfKey(3L,
          "sip.openxg.enable");

      if (sip_openxg_enable == null
          || !sip_openxg_enable.getConf_value().equals("yes")) {
        log.debug("SIP is disabled");
        return null;
      }

      // client_id and client_secret
      Configuration openxg_client_id = cfgManagement.getConfKey(3L,
          "openxg.client.id");
      Configuration openxg_client_secret = cfgManagement.getConfKey(3L,
          "openxg.client.secret");
      if (openxg_client_id == null || openxg_client_secret == null) {
        throw new Exception(
            "openxg.client.id or openxg.client.secret missing in Configuration table");
      }
      String client_id = openxg_client_id.getConf_value();
      String client_secret = openxg_client_secret.getConf_value();

      // domain
      Configuration openxg_client_domain = cfgManagement.getConfKey(3L,
          "openxg.client.domain");
      if (openxg_client_domain == null) {
        throw new Exception(
            "openxg.client.domain missing in Configuration table");
      }
      String domain = openxg_client_domain.getConf_value();

      // language_code
      Configuration openxg_language_code = cfgManagement.getConfKey(3L,
          "openxg.language.code");
      if (openxg_language_code == null) {
        throw new Exception(
            "openxg.language.code missing in Configuration table");
      }
      String language_code = openxg_language_code.getConf_value();

      // adminid
      Configuration openxg_adminid = cfgManagement.getConfKey(3L,
          "openxg.adminid");
      if (openxg_adminid == null) {
        throw new Exception(
            "openxg.adminid missing in Configuration table");
      }
      String adminid = openxg_adminid.getConf_value();

      Date d = new Date();
      long starttime = d.getTime() / 1000;

      long endTime = (d.getTime() / 1000) + (60 * 60);

      // "0", "2147483647",

      // permanent conferences
      starttime = 0;
      endTime = 2147483647;

      String digest = this.digest_calculate(new Object[] { client_id,
          "067201101", domain, "" + starttime, "" + endTime,
          language_code, adminid, client_secret });

      Configuration openxg_wrapper_url = cfgManagement.getConfKey(3L,
          "openxg.wrapper.url");

      if (openxg_wrapper_url == null) {
        throw new Exception(
            "No openxg.wrapper.url set in Configuration");
      }

      String strURL = openxg_wrapper_url.getConf_value();

      // Prepare HTTP post
      HttpPost post = new HttpPost(strURL);
      post.addHeader("User-Agent", "OpenSIPg XML_RPC Client");

View Full Code Here

TOP

Related Classes of org.openmeetings.app.persistence.beans.basic.Configuration

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.