Ejemplo n.º 1
0
  /* (non-Javadoc)
   * @see com.salesforce.ide.model.IProxy#getProxyPassword()
   */
  public String getProxyPassword() {
    if (!isProxiesEnabled()) {
      return Constants.EMPTY_STRING;
    }

    IProxyData httpProxyData = getHttpProxyData();
    if (httpProxyData == null) {
      return Constants.EMPTY_STRING;
    }

    if (!httpProxyData.isRequiresAuthentication()) {
      return Constants.EMPTY_STRING;
    }

    if (Utils.isNotEmpty(httpProxyData.getPassword())) {
      if (logger.isDebugEnabled()) {
        logger.debug("Returning '***' as proxy password ");
      }
      return httpProxyData.getPassword();
    } else {
      if (logger.isDebugEnabled()) {
        logger.debug("Returning blank/null proxy password ");
      }
      return Constants.EMPTY_STRING;
    }
  }