Start and configure GreenMail using given properties.

@param properties the properties such as System.getProperties()
506682
public void doRun(Properties properties) {
        ServerSetup[] serverSetup = new PropertiesBasedServerSetupBuilder().build(properties);

        if (serverSetup.length == 0) {
            printUsage(System.out);

        } else {
            greenMail = new GreenMail(serverSetup);
            log.info("Starting GreenMail standalone v{} using {}",
                    BuildInfo.INSTANCE.getProjectVersion(), Arrays.toString(serverSetup));
            greenMail.withConfiguration(new PropertiesBasedGreenMailConfigurationBuilder().build(properties))
                    .start();
        }
    }
482041
public static void putPropertiesIntoConfiguration(Properties properties, Configuration configuration) {
    for (String name : properties.stringPropertyNames()) {
      configuration.set(name, properties.getProperty(name));
    }
  }
143473
private void loadPropertiesQueitly()
	{
		try
		{
			properties = PropertiesFileExtensions.loadProperties(this,
				EmailConstants.PROPERTIES_FILENAME);
		}
		catch (IOException e)
		{
			e.printStackTrace();
		}
	}
1194094
protected void updateConfiguration(Map<String, Object> properties) {
        if (properties != null) {
            this.properties.clear();
            this.properties.putAll(properties);
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Current Properties: " + this.properties);
        }
    }
147294
public void setConfigurationProperties(java.util.Collection<SdkConfigurationProperty> configurationProperties) {
        if (configurationProperties == null) {
            this.configurationProperties = null;
            return;
        }

        this.configurationProperties = new java.util.ArrayList<SdkConfigurationProperty>(configurationProperties);
    }
565615
public int setProperties(Map<String,Object> properties)
    {
        return this.setProperties(properties, DBConstants.DISPLAY, DBConstants.SCREEN_MOVE);
    }
72846
function (properties) {
		properties = properties || {};
		_.forEach(properties, function (property, name) {
			this.initProperty(name, property);
		}, this);
	}
1307208
public void setProperty(final String propertyName, final List<String> values) {
        Preconditions.checkNotNull(propertyName);
        if (values == null) {
            properties.put(propertyName, null);
            return;
        }
        properties.put(propertyName, values);
    }
255248
private void setProperties(Properties properties) {
        Props props = new Props(properties);
        if(props.containsKey(ClientConfig.ENABLE_JMX_PROPERTY)) {
            this.setEnableJmx(props.getBoolean(ClientConfig.ENABLE_JMX_PROPERTY));
        }

        if(props.containsKey(ClientConfig.BOOTSTRAP_URLS_PROPERTY)) {
            List<String> urls = props.getList(ClientConfig.BOOTSTRAP_URLS_PROPERTY);
            if(urls.size() > 0) {
                setHttpBootstrapURL(urls.get(0));
            }
        }

        if(props.containsKey(ClientConfig.MAX_TOTAL_CONNECTIONS_PROPERTY)) {
            setMaxR2ConnectionPoolSize(props.getInt(ClientConfig.MAX_TOTAL_CONNECTIONS_PROPERTY,
                                                    maxR2ConnectionPoolSize));
        }

        if(props.containsKey(ClientConfig.ROUTING_TIMEOUT_MS_PROPERTY))
            this.setTimeoutMs(props.getLong(ClientConfig.ROUTING_TIMEOUT_MS_PROPERTY, timeoutMs),
                              TimeUnit.MILLISECONDS);

        // By default, make all the timeouts equal to routing timeout
        timeoutConfig = new TimeoutConfig(timeoutMs, false);

        if(props.containsKey(ClientConfig.GETALL_ROUTING_TIMEOUT_MS_PROPERTY))
            timeoutConfig.setOperationTimeout(VoldemortOpCode.GET_ALL_OP_CODE,
                                              props.getInt(ClientConfig.GETALL_ROUTING_TIMEOUT_MS_PROPERTY));

        if(props.containsKey(ClientConfig.GET_ROUTING_TIMEOUT_MS_PROPERTY))
            timeoutConfig.setOperationTimeout(VoldemortOpCode.GET_OP_CODE,
                                              props.getInt(ClientConfig.GET_ROUTING_TIMEOUT_MS_PROPERTY));

        if(props.containsKey(ClientConfig.PUT_ROUTING_TIMEOUT_MS_PROPERTY)) {
            long putTimeoutMs = props.getInt(ClientConfig.PUT_ROUTING_TIMEOUT_MS_PROPERTY);
            timeoutConfig.setOperationTimeout(VoldemortOpCode.PUT_OP_CODE, putTimeoutMs);
            // By default, use the same thing for getVersions() also
            timeoutConfig.setOperationTimeout(VoldemortOpCode.GET_VERSION_OP_CODE, putTimeoutMs);
        }

        // of course, if someone overrides it, we will respect that
        if(props.containsKey(ClientConfig.GET_VERSIONS_ROUTING_TIMEOUT_MS_PROPERTY))
            timeoutConfig.setOperationTimeout(VoldemortOpCode.GET_VERSION_OP_CODE,
                                              props.getInt(ClientConfig.GET_VERSIONS_ROUTING_TIMEOUT_MS_PROPERTY));

        if(props.containsKey(ClientConfig.DELETE_ROUTING_TIMEOUT_MS_PROPERTY))
            timeoutConfig.setOperationTimeout(VoldemortOpCode.DELETE_OP_CODE,
                                              props.getInt(ClientConfig.DELETE_ROUTING_TIMEOUT_MS_PROPERTY));

        if(props.containsKey(ClientConfig.ALLOW_PARTIAL_GETALLS_PROPERTY))
            timeoutConfig.setPartialGetAllAllowed(props.getBoolean(ClientConfig.ALLOW_PARTIAL_GETALLS_PROPERTY));

    }
1285851
@Deprecated
  public ProjectDefinition setProperties(Properties properties) {
    for (Entry<Object, Object> entry : properties.entrySet()) {
      this.properties.put(entry.getKey().toString(), entry.getValue().toString());
    }
    return this;
  }
151305
protected void configureLinkedInClient(final Collection<BaseClient> properties) {
        val ln = pac4jProperties.getLinkedIn();
        if (StringUtils.isNotBlank(ln.getId()) && StringUtils.isNotBlank(ln.getSecret())) {
            val client = new LinkedIn2Client(ln.getId(), ln.getSecret());
            configureClient(client, ln);

            if (StringUtils.isNotBlank(ln.getScope())) {
                client.setScope(ln.getScope());
            }

            if (StringUtils.isNotBlank(ln.getFields())) {
                client.setFields(ln.getFields());
            }
            LOGGER.debug("Created client [{}] with identifier [{}]", client.getName(), client.getKey());
            properties.add(client);
        }
    }
469270
public void setProperties(Map<String, Object> properties)
    {
        this.properties.clear();
        this.properties.putAll(properties);
    }
764203
public void init(Properties properties) {
        staleIfError = Parameters.STALE_IF_ERROR.getValue(properties);
        staleWhileRevalidate = Parameters.STALE_WHILE_REVALIDATE.getValue(properties);
        int maxAsynchronousWorkers = Parameters.MAX_ASYNCHRONOUS_WORKERS.getValue(properties);
        if (staleWhileRevalidate > 0 && maxAsynchronousWorkers == 0) {
            throw new ConfigurationException("You must set a positive value for maxAsynchronousWorkers "
                    + "in order to enable background revalidation (staleWhileRevalidate)");
        }
        ttl = Parameters.TTL.getValue(properties);
        xCacheHeader = Parameters.X_CACHE_HEADER.getValue(properties);
        viaHeader = Parameters.VIA_HEADER.getValue(properties);
        LOG.info("Initializing cache for provider " + Arrays.toString(Parameters.REMOTE_URL_BASE.getValue(properties))
                + " staleIfError=" + staleIfError + " staleWhileRevalidate=" + staleWhileRevalidate + " ttl=" + ttl
                + " xCacheHeader=" + xCacheHeader + " viaHeader=" + viaHeader);
    }
680131
public void setProperties( Map<String,String> properties ) {
        Map<String,String> userProperties = systemSession.getUserProperties();
        if ( userProperties == null ) {
            userProperties = new HashMap<String,String>();
        }
        userProperties.putAll( properties );
        
        log.debug( "Session userProperties: {}", userProperties );
        
        systemSession = (MavenRepositorySystemSession)systemSession.setUserProperties( userProperties );
        
    }
1181141
@SuppressWarnings("unchecked")
    public void raConfigure(ConfigProperties properties) {
        String httpClientFactoryClassName = (String) properties.getProperty(CFG_PROPERTY_HTTP_CLIENT_FACTORY)
                .getValue();
        if (!httpClientFactoryClassName.isEmpty()) {
            try {
                httpClientFactory = ((Class<? extends HttpAsyncClientFactory>) Class
                        .forName(httpClientFactoryClassName)).newInstance();
            } catch (Exception e) {
                tracer.severe("failed to load http client factory class", e);
            }
        } else {
            this.maxTotal = (Integer) properties.getProperty(CFG_PROPERTY_MAX_CONNECTIONS_TOTAL).getValue();
            this.defaultMaxPerRoute = (Integer) properties.getProperty(CFG_PROPERTY_DEFAULT_MAX_CONNECTIONS_PER_ROUTE)
                    .getValue();
            this.connectTimeout = (Integer) properties.getProperty(CFG_PROPERTY_DEFAULT_CONNECT_TIMEOUT).getValue();
            this.socketTimeout = (Integer) properties.getProperty(CFG_PROPERTY_DEFAULT_SOCKET_TIMEOUT).getValue();
        }
    }
917235
public final void setHeaderProperties(Properties headerProperties)
    {
        this.headerProperties=null;
        if(headerProperties!=null)
        {
            this.headerProperties=new Properties();
            this.headerProperties.putAll(headerProperties);
        }
    }
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();
	}