private void setPropsFromMap(Map<ForceConnectionProperty, String> propMap, String propSource) { String errorMessage = "Could not load valid ForceConnectorConfig properties from " + propSource + "."; String endpointValue = propMap.get(ForceConnectionProperty.ENDPOINT); ForceConnectionProperty.ENDPOINT.validateValue(endpointValue, errorMessage); setAuthEndpoint(endpointValue); String userValue = propMap.get(ForceConnectionProperty.USER); ForceConnectionProperty.USER.validateValue(userValue, errorMessage); setUsername(userValue); String passwordValue = propMap.get(ForceConnectionProperty.PASSWORD); ForceConnectionProperty.PASSWORD.validateValue(passwordValue, errorMessage); setPassword(passwordValue); String clientIdValue; if ((clientIdValue = propMap.get(ForceConnectionProperty.CLIENTID)) != null) { ForceConnectionProperty.CLIENTID.validateValue(clientIdValue, errorMessage); setClientId(clientIdValue); } String timeoutValue; if ((timeoutValue = propMap.get(ForceConnectionProperty.TIMEOUT)) != null) { ForceConnectionProperty.TIMEOUT.validateValue(timeoutValue, errorMessage); int timeout = Integer.valueOf(timeoutValue); if (timeout > 0) setReadTimeout(timeout); } }
private void setPropsFromMap(Map<ForceConnectionProperty, String> propMap, String propSource) { String errorMessage = "Could not load valid ForceConnectorConfig properties from " + propSource + "."; String endpointValue = propMap.get(ForceConnectionProperty.ENDPOINT); ForceConnectionProperty.ENDPOINT.validateValue(endpointValue, errorMessage); setAuthEndpoint(endpointValue); String userValue = propMap.get(ForceConnectionProperty.USER); ForceConnectionProperty.USER.validateValue(userValue, errorMessage); setUsername(userValue); String passwordValue = propMap.get(ForceConnectionProperty.PASSWORD); ForceConnectionProperty.PASSWORD.validateValue(passwordValue, errorMessage); setPassword(passwordValue); String clientIdValue; if ((clientIdValue = propMap.get(ForceConnectionProperty.CLIENTID)) != null) { ForceConnectionProperty.CLIENTID.validateValue(clientIdValue, errorMessage); setClientId(clientIdValue); } String timeoutValue; if ((timeoutValue = propMap.get(ForceConnectionProperty.TIMEOUT)) != null) { ForceConnectionProperty.TIMEOUT.validateValue(timeoutValue, errorMessage); int timeout = Integer.valueOf(timeoutValue); if (timeout > 0) setReadTimeout(timeout); } }
config.setAuthEndpoint(endpoint); config.setUsername(getConnectionUserName()); config.setPassword(getConnectionPassword());
config.setAuthEndpoint(endpoint); config.setUsername(getConnectionUserName()); config.setPassword(getConnectionPassword());