Package org.eobjects.datacleaner.user

Examples of org.eobjects.datacleaner.user.UserPreferences


  }

  public static HttpClient getHttpClient() {
    DefaultHttpClient httpClient = new DefaultHttpClient();

    final UserPreferences userPreferences = UserPreferences.getInstance();
    if (userPreferences.isProxyEnabled()) {
      // set up HTTP proxy
      final String proxyHostname = userPreferences.getProxyHostname();
      final int proxyPort = userPreferences.getProxyPort();

      final HttpHost proxy = new HttpHost(proxyHostname, proxyPort);
      httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);

      if (userPreferences.isProxyAuthenticationEnabled()) {
        final AuthScope authScope = new AuthScope(proxyHostname, proxyPort);
        final UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(
            userPreferences.getProxyUsername(), userPreferences.getProxyPassword());
        httpClient.getCredentialsProvider().setCredentials(authScope, credentials);
      }
    }

    return httpClient;
View Full Code Here


        analysisJobBuilderWindow.setDatastoreSelectionEnabled(false);
        analysisJobBuilderWindow.setDatastore(singleDatastore, true);
      }
      analysisJobBuilderWindow.open();

      final UserPreferences userPreferences = injector.getInstance(UserPreferences.class);
      final WindowContext windowContext = injector.getInstance(WindowContext.class);

      // set up HTTP service for ExtensionSwap installation
      loadExtensionSwapService(userPreferences, windowContext);

      // load regex swap regexes if logged in
      final RegexSwapUserPreferencesHandler regexSwapHandler = new RegexSwapUserPreferencesHandler(
          (MutableReferenceDataCatalog) configuration.getReferenceDataCatalog());
      userPreferences.addLoginChangeListener(regexSwapHandler);

      final ExitActionListener exitActionListener = _options.getExitActionListener();
      if (exitActionListener != null) {
        windowContext.addExitActionListener(exitActionListener);
      }
View Full Code Here

TOP

Related Classes of org.eobjects.datacleaner.user.UserPreferences

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.