Function that looks at the {@link PaymentSessionConfig} and determines whether the data is
ready to charge.

@param config specifies what data is required
@return whether the data is ready to charge
359005
public boolean updateIsPaymentReadyToCharge(@NonNull PaymentSessionConfig config) {
        if (StripeTextUtils.isBlank(getSelectedPaymentMethodId()) ||
                (config.isShippingInfoRequired() && getShippingInformation() == null) ||
                (config.isShippingMethodRequired() && getShippingMethod() == null)) {
            setPaymentReadyToCharge(false);
            return false;
        }
        setPaymentReadyToCharge(true);
        return true;
    }
1321911
public void loadConfig(String config)
        throws IOException
    {
        Properties properties = new Properties();
        Resource resource=Resource.newResource(config);
        properties.load(resource.getInputStream());
        
        _jdbcDriver = properties.getProperty("jdbcdriver");
        _url = properties.getProperty("url");
        _userName = properties.getProperty("username");
        _password = properties.getProperty("password");
        _userTable = properties.getProperty("usertable");
        _userTableKey = properties.getProperty("usertablekey");
        _userTableUserField = properties.getProperty("usertableuserfield");
        _userTablePasswordField = properties.getProperty("usertablepasswordfield");
        _roleTable = properties.getProperty("roletable");
        _roleTableKey = properties.getProperty("roletablekey");
        _roleTableRoleField = properties.getProperty("roletablerolefield");
        _userRoleTable = properties.getProperty("userroletable");
        _userRoleTableUserKey = properties.getProperty("userroletableuserkey");
        _userRoleTableRoleKey = properties.getProperty("userroletablerolekey");
        _cacheTime = new Integer(properties.getProperty("cachetime")).intValue();
        
        if (_jdbcDriver == null || _jdbcDriver.equals("")
            || _url == null || _url.equals("")
            || _userName == null || _userName.equals("")
            || _password == null
            || _cacheTime < 0)
        {
            if(log.isDebugEnabled())log.debug("UserRealm " + getName()
                        + " has not been properly configured");
        }
        _cacheTime *= 1000;
        _lastHashPurge = 0;
        _userSql = "select " + _userTableKey + ","
            + _userTablePasswordField + " from "
            + _userTable + " where "
            + _userTableUserField + " = ?";
        _roleSql = "select r." + _roleTableRoleField
            + " from " + _roleTable + " r, "
            + _userRoleTable + " u where u."
            + _userRoleTableUserKey + " = ?"
            + " and r." + _roleTableKey + " = u."
            + _userRoleTableRoleKey;
    }
626667
private void parseConfiguration(String config) {

        CmsSelectConfigurationParser parser = new CmsSelectConfigurationParser(config);
        // set the help info first!!
        for (Entry<String, String> helpEntry : parser.getHelpTexts().entrySet()) {
            m_selectBox.setTitle(helpEntry.getKey(), helpEntry.getValue());
        }
        //set value and option to the combo box.
        m_selectBox.setItems(parser.getOptions());
        //if one entrance is declared for default.
        if (parser.getDefaultValue() != null) {
            //set the declared value selected.
            m_selectBox.selectValue(parser.getDefaultValue());
            m_defaultValue = parser.getDefaultValue();
        }
        fireChangeEvent();
    }
144543
public static boolean isSslKeyManagerEnabled(HttpClientConfig config) {
    return StringUtils.isNotEmpty(config.getSslContextType())
        && StringUtils.isNotEmpty(config.getKeyManagerType())
        && StringUtils.isNotEmpty(config.getKeyStoreType())
        && StringUtils.isNotEmpty(config.getKeyStorePath());
  }
906266
private static Configuration hibernateConfiguration(Config config)
  {
    int transactionTimeout = config.getProperty("hibernate.transaction.timeout", int.class, 0);
    int min_size = config.getProperty("hibernate.c3p0.min_size", int.class, 0);
    int max_size = config.getProperty("hibernate.c3p0.max_size", int.class, 0);
    int max_statements = config.getProperty("hibernate.c3p0.max_statements", int.class, 0);

    // takes care max_size greater than min_size and max_statements greater than max_size
    // otherwise strange behavior occurs on multi-threading, see DatabaseTest#executeConcurentNativeHibernate()

    if(max_size > 0 && max_size < 4) {
      max_size = 4;
    }
    if(min_size > 0 && min_size > max_size) {
      min_size = max_size;
    }
    if(max_statements > 0 && max_statements < max_size) {
      max_statements = max_size;
    }

    Properties properties = config.getUnusedProperties();
    if(!config.getAttribute("test-session", boolean.class, false)) {
      // do not use C3P0 database connections pool when run tests
      // if tests are executed from Ant script, for speed reason all ran into a single virtual machine
      // every test requiring database connection will acquire connection but do no dispose till virtual machine end
      // leading to connections pool exhaust and test suite halt
      properties.setProperty("hibernate.connection.provider_class", "org.hibernate.connection.C3P0ConnectionProvider");
      properties.setProperty("hibernate.c3p0.idle_test_period", TEST_PERIOD);
      properties.setProperty("hibernate.c3p0.preferredTestQuery", TEST_QUERY);
    }

    Configuration configuration = new Configuration();
    configuration.setProperties(properties);

    properties.setProperty("hibernate.transaction.timeout", Integer.toString(transactionTimeout));
    if(max_size != 0) {
      configuration.setProperty("hibernate.c3p0.max_size", Integer.toString(max_size));
      properties.setProperty("hibernate.c3p0.max_size", Integer.toString(max_size));
    }
    if(min_size != 0) {
      configuration.setProperty("hibernate.c3p0.min_size", Integer.toString(min_size));
      properties.setProperty("hibernate.c3p0.min_size", Integer.toString(min_size));
    }
    if(max_statements != 0) {
      configuration.setProperty("hibernate.c3p0.max_statements", Integer.toString(max_statements));
      properties.setProperty("hibernate.c3p0.max_statements", Integer.toString(max_statements));
    }

    // traverse all packages from <mappings> elements and add mapping files to configuration
    for(Config mappings : config.findChildren("mappings")) {
      String filesPattern = mappings.getAttribute("files-pattern", "*.hbm.xml");
      // missing package attribute is replaced with empty string that is the 'name' of package root
      String packageName = mappings.getAttribute("package", "");
      for(String resource : Classes.listPackageResources(packageName, filesPattern)) {
        configuration.addResource(resource);
      }
    }

    return configuration;
  }
1092161
@PublicEvolving
	public boolean contains(ConfigOption<?> configOption) {
		synchronized (this.confData){
			// first try the current key
			if (this.confData.containsKey(configOption.key())) {
				return true;
			}
			else if (configOption.hasFallbackKeys()) {
				// try the fallback keys
				for (FallbackKey fallbackKey : configOption.fallbackKeys()) {
					if (this.confData.containsKey(fallbackKey.getKey())) {
						loggingFallback(fallbackKey, configOption);
						return true;
					}
				}
			}

			return false;
		}
	}
1046751
public void load(FileConfiguration config) {
        this.config = config;
        
        try {
            parse();
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
        }
    }
77525
@Override
  public ICCASessionData getAppSessionData(Class<? extends AppSession> clazz, String sessionId) {
    if (clazz.equals(ClientCCASession.class)) {
      ClientCCASessionDataReplicatedImpl data =
          new ClientCCASessionDataReplicatedImpl(sessionId, this.mobicentsCluster, this.replicatedSessionDataSource.getContainer());
      return data;
    }
    else if (clazz.equals(ServerCCASession.class)) {
      ServerCCASessionDataReplicatedImpl data = new ServerCCASessionDataReplicatedImpl(sessionId, this.mobicentsCluster);
      return data;
    }
    throw new IllegalArgumentException();
  }
375664
function checkConfig (config) {
    if (config) {
        if (!util.isObject(config)) {
            throw new CartoValidationError('\'config\' property must be an object.', CartoValidationErrorTypes.INCORRECT_TYPE);
        }
        _checkServerURL(config.serverURL);
    }
}
554353
private function _checkConfig($config = null)
    {
        if ($config === null) {
            $config = $this->config;
        }
        if (!($config instanceof ArrayAccess)
            && !is_array($config)
        ) {
            throw new Klarna_IncompleteConfigurationException;
        }
    }
1191791
function checkOpts(config, cb) {
  // jshint eqnull: true

  var prefix = "ragents.createSession(): "

  if (config == null) throw Error(prefix + "config is null")

  if (config.url == null) throw Error(prefix + "config.url is null")
  if (config.key == null) throw Error(prefix + "config.key is null")

  if (null == cb)        throw Error(prefix + "callback is null")
  if (!_.isFunction(cb)) throw Error(prefix + "callback is not a function")
}
443200
function isInvalidConfiguration(config) {
  return R.compose(
    R.any(R.either(R.isNil, R.isEmpty))
  , R.values
  , R.pickAll(['url', 'port'])
  , R.propOr({}, 'server')
  )(config)
}
245322
private void checkSslConfigAvailability(Config config) {
        if (config.getAdvancedNetworkConfig().isEnabled()) {
            return;
        }
        SSLConfig sslConfig = config.getNetworkConfig().getSSLConfig();
        checkSslConfigAvailability(sslConfig);
    }
169566
private void parseConfig(String config) {

        if (isValidConfig(config)) {
            String[] conf = config.split("x");
            if (conf[0].trim().equals("?")) {
                m_width = I_CmsFormatRestriction.DIMENSION_NOT_SET;
            } else {
                m_width = CmsClientStringUtil.parseInt(conf[0]);
                m_width = (m_width == 0) ? I_CmsFormatRestriction.DIMENSION_NOT_SET : m_width;
            }
            if (conf[1].trim().equals("?")) {
                m_height = I_CmsFormatRestriction.DIMENSION_NOT_SET;
            } else {
                m_height = CmsClientStringUtil.parseInt(conf[1]);
                m_height = (m_height == 0) ? I_CmsFormatRestriction.DIMENSION_NOT_SET : m_height;
            }
        }
    }
977986
@Override
  public ICCASessionData getAppSessionData(Class<? extends AppSession> clazz, String sessionId) {
    if (clazz.equals(ClientCCASession.class)) {
      ClientCCASessionDataLocalImpl data = new ClientCCASessionDataLocalImpl();
      data.setSessionId(sessionId);
      return data;
    }
    else if (clazz.equals(ServerCCASession.class)) {
      ServerCCASessionDataLocalImpl data = new ServerCCASessionDataLocalImpl();
      data.setSessionId(sessionId);
      return data;
    }
    throw new IllegalArgumentException(clazz.toString());
  }
753591
public static boolean hasAccess(Config config, int type) {

	boolean has = true;
	if (config instanceof ConfigWeb) {
	    has = ((ConfigWeb) config).getSecurityManager().getAccess(type) != SecurityManager.VALUE_NO;
	}
	return has;
    }
307716
public static void checkConfigSanity(final Properties config) {
        // auto-committing offsets should be disabled
        final Object autoCommit = config.getProperty("auto.commit.enable");
        if (autoCommit == null || Boolean.parseBoolean(String.valueOf(autoCommit))) {
            throw new IllegalArgumentException("kafka configuration 'auto.commit.enable' should be set to false for operation in storm");
        }

        // consumer timeout should not block calls indefinitely
        final Object consumerTimeout = config.getProperty("consumer.timeout.ms");
        if (consumerTimeout == null || Integer.parseInt(String.valueOf(consumerTimeout)) < 0) {
            throw new IllegalArgumentException("kafka configuration value for 'consumer.timeout.ms' is not suitable for operation in storm");
        }
    }