use of org.talend.repository.generic.persistence.GenericRepository in project tdi-studio-se by Talend.
the class RepositoryUpdateTest method setupPropertiesWithProxy.
private void setupPropertiesWithProxy(String id) {
SalesforceConnectionProperties sfp = new SalesforceConnectionProperties("test");
sfp.init();
sfp.loginType.setValue(SalesforceConnectionProperties.LoginType.Basic);
sfp.userPassword.userId.setStoredValue("myUser");
sfp.userPassword.password.setStoredValue("myPassword");
sfp.proxy.useProxy.setStoredValue(Boolean.TRUE);
sfp.proxy.host.setStoredValue("host");
sfp.proxy.port.setStoredValue(1234);
sfp.proxy.userPassword.userId.setStoredValue("proxyUser");
sfp.proxy.userPassword.password.setStoredValue("proxyPassword");
GenericRepository gr = new GenericRepository();
gr.storeProperties(sfp, "test", id, null);
}
use of org.talend.repository.generic.persistence.GenericRepository in project tdi-studio-se by Talend.
the class RepositoryUpdateTest method prepareTableForTest.
private MetadataTable prepareTableForTest(String id) {
MetadataTable table = ConnectionFactory.eINSTANCE.createMetadataTable();
table.setLabel("myTableTest");
MetadataColumn col1 = ConnectionFactory.eINSTANCE.createMetadataColumn();
col1.setLabel("myColumn1");
col1.setTalendType(JavaTypesManager.STRING.getId());
col1.setLength(25);
table.getColumns().add(col1);
Schema avroSchema = MetadataToolAvroHelper.convertToAvro(table);
TaggedValue tv = CoreFactory.eINSTANCE.createTaggedValue();
tv.setTag(IComponentConstants.COMPONENT_PROPERTIES_TAG);
SalesforceModuleProperties smp = new SalesforceModuleProperties("test");
smp.connection.init();
// because we should get connection always from the main
smp.connection.userPassword.userId.setValue("old");
// SalesforceConnectionProperties
smp.moduleName.setStoredValue("myModule");
smp.main.schema.setStoredValue(avroSchema);
GenericRepository gr = new GenericRepository();
gr.storeProperties(smp, table.getLabel(), id + "#", "main.schema");
return table;
}
use of org.talend.repository.generic.persistence.GenericRepository in project tdi-studio-se by Talend.
the class RepositoryUpdateTest method setupPropertiesWithProxyEmptyVars.
private void setupPropertiesWithProxyEmptyVars(String id) {
SalesforceConnectionProperties sfp = new SalesforceConnectionProperties("test");
sfp.init();
sfp.loginType.setValue(SalesforceConnectionProperties.LoginType.Basic);
sfp.userPassword.userId.setStoredValue("myUser");
sfp.userPassword.password.setStoredValue("myPassword");
sfp.proxy.useProxy.setStoredValue(Boolean.TRUE);
sfp.proxy.host.setStoredValue(null);
sfp.proxy.port.setStoredValue(null);
sfp.proxy.userPassword.userId.setStoredValue(null);
sfp.proxy.userPassword.password.setStoredValue(null);
GenericRepository gr = new GenericRepository();
gr.storeProperties(sfp, "test", id, null);
}
use of org.talend.repository.generic.persistence.GenericRepository in project tdi-studio-se by Talend.
the class RepositoryUpdateTest method setupPropertiesWithoutProxy.
private void setupPropertiesWithoutProxy(String id) {
SalesforceConnectionProperties sfp = new SalesforceConnectionProperties("test");
sfp.init();
sfp.loginType.setValue(SalesforceConnectionProperties.LoginType.Basic);
sfp.userPassword.userId.setStoredValue("myUser");
sfp.userPassword.password.setStoredValue("myPassword");
GenericRepository gr = new GenericRepository();
gr.storeProperties(sfp, "test", id, null);
}
Aggregations