Package com.almende.eve.config

Examples of com.almende.eve.config.Config


    String refresh_token = (auth != null) ? auth.getRefreshToken() : null;
    if (refresh_token == null) {
      throw new Exception("No refresh token available");
    }
   
    Config config = getAgentFactory().getConfig();
    String client_id = config.get("google", "client_id");
    String client_secret = config.get("google", "client_secret");
   
    // retrieve new access_token using the refresh_token
    Map<String, String> params = new HashMap<String, String>();
    params.put("client_id", client_id);
    params.put("client_secret", client_secret);
View Full Code Here


    String refresh_token = (auth != null) ? auth.getRefreshToken() : null;
    if (refresh_token == null) {
      throw new Exception("No refresh token available");
    }
   
    Config config = getAgentFactory().getConfig();
    String client_id = config.get("google", "client_id");
    String client_secret = config.get("google", "client_secret");
   
    // retrieve new access_token using the refresh_token
    Map<String, String> params = new HashMap<String, String>();
    params.put("client_id", client_id);
    params.put("client_secret", client_secret);
View Full Code Here

    String refresh_token = (auth != null) ? auth.getRefreshToken() : null;
    if (refresh_token == null) {
      throw new Exception("No refresh token available");
    }
   
    Config config = getAgentHost().getConfig();
    String client_id = config.get("google", "client_id");
    String client_secret = config.get("google", "client_secret");
   
    // retrieve new access_token using the refresh_token
    Map<String, String> params = new HashMap<String, String>();
    params.put("client_id", client_id);
    params.put("client_secret", client_secret);
View Full Code Here

    String refresh_token = (auth != null) ? auth.getRefreshToken() : null;
    if (refresh_token == null) {
      throw new Exception("No refresh token available");
    }
   
    Config config = getAgentHost().getConfig();
    String client_id = config.get("google", "client_id");
    String client_secret = config.get("google", "client_secret");
   
    // retrieve new access_token using the refresh_token
    Map<String, String> params = new HashMap<String, String>();
    params.put("client_id", client_id);
    params.put("client_secret", client_secret);
View Full Code Here

          "Trying default filename '" + filename + "'.");
      }
      String fullname = "/WEB-INF/" + filename;
      logger.info("loading configuration file '" +
          getServletContext().getRealPath(fullname) + "'...");
      Config config = new Config(getServletContext().getResourceAsStream(fullname));
     
      agentFactory = AgentFactory.createInstance(config);
    }
  }
View Full Code Here

    String refresh_token = (auth != null) ? auth.getRefreshToken() : null;
    if (refresh_token == null) {
      throw new Exception("No refresh token available");
    }
   
    Config config = getAgentHost().getConfig();
    String client_id = config.get("google", "client_id");
    String client_secret = config.get("google", "client_secret");
   
    // retrieve new access_token using the refresh_token
    Map<String, String> params = new HashMap<String, String>();
    params.put("client_id", client_id);
    params.put("client_secret", client_secret);
View Full Code Here

  @Override
  public void init() {
    try {
      // load configuration
      InputStream is = getServletContext().getResourceAsStream(CONFIG_FILENAME);
      Config config = new Config(is);

      CLIENT_ID = config.get("google", "client_id");
      if (CLIENT_ID == null) {
        throw new Exception("Parameter 'google.client_id' missing in config");
      }
     
      CLIENT_SECRET = config.get("google", "client_secret");
      if (CLIENT_SECRET == null) {
        throw new Exception("Parameter 'google.client_secret' missing in config");
      }

      REDIRECT_URI = config.get("google_auth_servlet_url");
     
      // TODO: cleanup deprecated parameter some day (deprecated since 2013-02-15)
      if (REDIRECT_URI == null) {
        REDIRECT_URI = config.get("auth_google_servlet_url");
        if (REDIRECT_URI != null) {
          logger.warning("Parameter 'auth_google_servlet_url' is deprecated. " +
              "Use 'google_auth_servlet_url' instead.");
        }
      }
View Full Code Here

        String refresh_token = (auth != null) ? auth.getRefreshToken() : null;
        if (refresh_token == null) {
            throw new Exception("No refresh token available");
        }

        Config config = getAgentHost().getConfig();
        String client_id = config.get("google", "client_id");
        String client_secret = config.get("google", "client_secret");

        // retrieve new access_token using the refresh_token
        Map<String, String> params = new HashMap<String, String>();
        params.put("client_id", client_id);
        params.put("client_secret", client_secret);
View Full Code Here

            + "Trying default filename '" + filename + "'.");
      }
      String fullname = "/WEB-INF/" + filename;
      logger.info("loading configuration file '"
          + getServletContext().getRealPath(fullname) + "'...");
      Config config = new Config(getServletContext().getResourceAsStream(
          fullname));
      host = AgentHost.getInstance();
      host.loadConfig(config);
    }
  }
View Full Code Here

TOP

Related Classes of com.almende.eve.config.Config

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.