@Test(dataProvider = "javaPropertyProvider") public void testLoadFromJavaProperty(String propName, String connectionName) throws Exception { try { System.setProperty(propName, "force: ForceConnectorConfig config = ForceConnectorConfig.loadFromName(connectionName); assertNotNull(config); assertEquals(config.getAuthEndpoint(), "https: assertEquals(config.getUsername(), "user@org.com"); assertEquals(config.getPassword(), "password"); } finally { System.clearProperty(propName); } }
static ForceConnectorConfig loadFromName(String connectionName) throws IOException { Map<ForceConnectionProperty, String> propMap = ForceConnectorUtils.loadConnectorPropsFromName(connectionName); if (propMap == null) return null; ForceConnectorConfig config = new ForceConnectorConfig(); config.setPropsFromMap(propMap, connectionName); return config; }
ForceConnectorConfig extends ConnectorConfig implements Cloneable { static ForceConnectorConfig loadFromName(String connectionName) throws IOException { Map<ForceConnectionProperty, String> propMap = ForceConnectorUtils.loadConnectorPropsFromName(connectionName); if (propMap == null) return null; ForceConnectorConfig config = new ForceConnectorConfig(); config.setPropsFromMap(propMap, connectionName); return config; } }
ForceConnectorConfig extends ConnectorConfig implements Cloneable { static ForceConnectorConfig loadFromName(String connectionName) throws IOException { Map<ForceConnectionProperty, String> propMap = ForceConnectorUtils.loadConnectorPropsFromName(connectionName); if (propMap == null) return null; ForceConnectorConfig config = new ForceConnectorConfig(); config.setPropsFromMap(propMap, connectionName); return config; } ForceConnectorConfig(); }
ForceConnectorConfig extends ConnectorConfig implements Cloneable { static ForceConnectorConfig loadFromName(String connectionName) throws IOException { Map<ForceConnectionProperty, String> propMap = ForceConnectorUtils.loadConnectorPropsFromName(connectionName); if (propMap == null) return null; ForceConnectorConfig config = new ForceConnectorConfig(); config.setPropsFromMap(propMap, connectionName); return config; } ForceConnectorConfig(); @Override void setAuthEndpoint(String authEndpoint); String getClientId(); void setClientId(String clientId); void setConnectionUrl(String connectionUrl); @Override void setTraceMessage(boolean traceMessage); @Override void setUsername(String username); @Override PrintStream getTraceStream(); @Override int hashCode(); @Override boolean equals(Object obj); }
ForceConnectorConfig extends ConnectorConfig implements Cloneable { static ForceConnectorConfig loadFromName(String connectionName) throws IOException { Map<ForceConnectionProperty, String> propMap = ForceConnectorUtils.loadConnectorPropsFromName(connectionName); if (propMap == null) return null; ForceConnectorConfig config = new ForceConnectorConfig(); config.setPropsFromMap(propMap, connectionName); return config; } ForceConnectorConfig(); @Override void setAuthEndpoint(String authEndpoint); String getClientId(); void setClientId(String clientId); void setConnectionUrl(String connectionUrl); @Override void setTraceMessage(boolean traceMessage); @Override void setUsername(String username); @Override PrintStream getTraceStream(); @Override int hashCode(); @Override boolean equals(Object obj);  }