Put all configuration properties in a given {@link Properties} object into a given
{@link Configuration} object.

@param properties the given {@link Properties} object
@param configuration the given {@link Configuration} object
482041
public static void putPropertiesIntoConfiguration(Properties properties, Configuration configuration) {
    for (String name : properties.stringPropertyNames()) {
      configuration.set(name, properties.getProperty(name));
    }
  }
619118
public void setConfiguration(Configuration configuration) {

        this.configuration = configuration;

        // init ParamReaders with the new <Configuration>
        ParamReaders.getInstance().setConfiguration(configuration);

        // register as listener to configuration change
        FoundationConfigurationListenerRegistry.addFoundationConfigurationListener(this);

        // verify that all configured values are correct
        verifyConfiguration();

    }
945917
public void raConfigure(ConfigProperties configProperties) {
        name = (String) configProperties.getProperty(NAME_CONFIG_PROPERTY).getValue();
        configureUpdatableProperties(configProperties);
    }
33857
@JsonAnySetter
    public void putConfigurationValue(String key, Object value) {
        this.configuration.put(key, value);
    }
779717
@Override
    public void setProperties(Properties properties) {
        if (this.env == null) {
            this.env = properties;
        } else {
            this.env.putAll(properties);
        }

        if (baseGateway != null) {
            baseGateway.setProperties(properties);
        }
    }
452364
protected void setProperties(Properties properties) {
        Properties oldProperties = internalProperties;
        synchronized(this) {
            internalProperties = properties;
        }
        notifyPropertiesChanged(oldProperties);
    }
63429
public void setValue(Properties properties)  {
        if (properties == null) {
            throw new IllegalArgumentException("properties must not be null");
        }
        if (type == null) {
            type = ItemType.PROPERTIES;
        }
        if (!isMappableType()) {
            throw new IllegalArgumentException("The type of this item must be 'properties' or 'map'");
        }
        tokensMap = new LinkedHashMap<>();
        for (String key : properties.stringPropertyNames()) {
            Object o = properties.get(key);
            if (o instanceof Token[]) {
                tokensMap.put(key, (Token[])o);
            } else if (o instanceof Token) {
                Token[] tokens = new Token[] { (Token)o };
                tokensMap.put(key, tokens);
            } else {
                Token[] tokens = TokenParser.makeTokens(o.toString(), isTokenize());
                putValue(name, tokens);
            }
        }
    }
600814
private static String configurationString(Properties properties, String key, String defaultValue)
   {
      if (properties != null)
      {
         return properties.getProperty(key, defaultValue);
      }

      return defaultValue;
   }
264092
public void setProperties(Properties properties) throws ConfigurationException {
		String dbDriver = properties.getProperty("dbdriver").toString();
		if (dbDriver == null) {
			throw new ConfigurationException("please specify dbDriver for connectionpool");
		}

		dbUrl = properties.getProperty("dburl").toString();
		dbUsername = properties.getProperty("dbusername").toString();
		dbUserpassword = properties.getProperty("dbuserpassword").toString();

		if (properties.getProperty("nrof_connections") != null) {
			initialNrofConnections = Integer.valueOf(properties.getProperty("nrof_connections"));
			maxNrofConnections = Integer.valueOf(properties.getProperty("nrof_connections"));
		} else {
			initialNrofConnections = Integer.valueOf(properties.getProperty("initial_nrof_connections", "" + initialNrofConnections));
			maxNrofConnections = Integer.valueOf(properties.getProperty("max_nrof_connections", "" + maxNrofConnections));
			//set default option
			//properties.getProperty("nrof_connections", new GenericValue(initialNrofConnections)).toInteger().intValue();
		}
		connectionRequestTimeout = Integer.valueOf(properties.getProperty("connection_request_timeout", "" + connectionRequestTimeout));
		connectionTimeout = Integer.valueOf(properties.getProperty("connection_timeout", "" + connectionTimeout));
		connectionTimeoutCheck = Integer.valueOf(properties.getProperty("connection_timeout_check_interval", "" + connectionTimeoutCheck));

		connectionTestStatement = properties.getProperty("connection_test_statement", connectionTestStatement).toString();

		createReadOnlyConnections = Boolean.valueOf(properties.getProperty("create_readonly_connections", "" + createReadOnlyConnections));
		defaultIsolationLevel = isolationLevelStrings.indexOf(properties.getProperty("default_isolaton_level", "" + defaultIsolationLevel));

		try {
			Class.forName(dbDriver);
			Enumeration drivers = DriverManager.getDrivers();

			driverInfo = "";
			int count = 0;
			while (drivers.hasMoreElements()) {
				count++;
				Driver driver = (Driver) drivers.nextElement();
				driverInfo += "driver " + count + ": " + driver.getMajorVersion() + '.' + driver.getMinorVersion() + "\n";
			}
		} catch (ClassNotFoundException cnfe) {
			throw new ConfigurationException("ERROR: Driver \"" + dbDriver + "\" not found...");
		}
		resetStatistics();
	}
1247324
@InterfaceAudience.Public
    public void setUserProperties(Map<String, Object> userProperties) {
        Map<String, Object> newProps = new HashMap<String, Object>();
        newProps.putAll(userProperties);
        for (String key : properties.keySet()) {
            if (key.startsWith("_")) {
                newProps.put(key, properties.get(key));  // Preserve metadata properties
            }
        }
        properties = newProps;
    }
1245760
public void assignConfiguredProperties(final ComponentDescriptor<?> descriptor, final Object component,
            final ComponentConfiguration componentConfiguration) {
        final AssignConfiguredPropertiesHelper helper = new AssignConfiguredPropertiesHelper();
        helper.assignProperties(component, descriptor, componentConfiguration);
    }
147294
public void setConfigurationProperties(java.util.Collection<SdkConfigurationProperty> configurationProperties) {
        if (configurationProperties == null) {
            this.configurationProperties = null;
            return;
        }

        this.configurationProperties = new java.util.ArrayList<SdkConfigurationProperty>(configurationProperties);
    }
923963
public void setProperties(Collection<String> properties) {
        if (null == this.properties) {
            this.properties = new ArrayList<>();
        }
        this.properties.clear();
        this.properties.addAll(properties);
    }
1178213
@Override
    public void configure(Properties configuration) {
        String u = configuration.getProperty(ANDROLOG_REPORTER_POST_URL);
        if (u == null) {
            Log.e(this, "The Property " + ANDROLOG_REPORTER_POST_URL
                    + " is mandatory");
            return;
        }
        try {
            url = new URL(u);
        } catch (MalformedURLException e) {
            Log.e(this, "The Property " + ANDROLOG_REPORTER_POST_URL
                    + " is not a valid url", e);
        }
    }
284914
private static void setDefaultProperties(CitrusAppConfiguration configuration) {
        for (Map.Entry<String, String> entry : configuration.getDefaultProperties().entrySet()) {
            log.debug(String.format("Setting application property %s=%s", entry.getKey(), entry.getValue()));
            System.setProperty(entry.getKey(), Optional.ofNullable(entry.getValue()).orElse(""));
        }
    }
234669
public void setConfigurations(java.util.Collection<java.util.Map<String, String>> configurations) {
        if (configurations == null) {
            this.configurations = null;
            return;
        }

        this.configurations = new java.util.ArrayList<java.util.Map<String, String>>(configurations);
    }
469270
public void setProperties(Map<String, Object> properties)
    {
        this.properties.clear();
        this.properties.putAll(properties);
    }