Search in sources :

Example 1 with SalesforceInputDefinition

use of org.talend.components.salesforce.dataprep.SalesforceInputDefinition in project components by Talend.

the class SalesforceInputTestIT method createCommonSalesforceInputPropertiesForModule.

private SalesforceInputProperties createCommonSalesforceInputPropertiesForModule() {
    SalesforceDatastoreDefinition datastore_def = new SalesforceDatastoreDefinition();
    SalesforceDatastoreProperties datastore_props = new SalesforceDatastoreProperties("datastore");
    CommonTestUtils.setValueForDatastoreProperties(datastore_props);
    SalesforceDatasetProperties dataset = (SalesforceDatasetProperties) datastore_def.createDatasetProperties(datastore_props);
    dataset.moduleName.setValue("Account");
    SalesforceInputDefinition input_def = new SalesforceInputDefinition();
    SalesforceInputProperties input_props = (SalesforceInputProperties) input_def.createRuntimeProperties();
    input_props.setDatasetProperties(dataset);
    List<String> products = input_def.getSupportedProducts();
    assertNotNull(products);
    assertEquals(1, products.size());
    assertEquals(SupportedProduct.DATAPREP, products.get(0));
    return input_props;
}
Also used : SalesforceDatastoreProperties(org.talend.components.salesforce.datastore.SalesforceDatastoreProperties) SalesforceDatastoreDefinition(org.talend.components.salesforce.datastore.SalesforceDatastoreDefinition) SalesforceInputProperties(org.talend.components.salesforce.dataprep.SalesforceInputProperties) SalesforceInputDefinition(org.talend.components.salesforce.dataprep.SalesforceInputDefinition) SalesforceDatasetProperties(org.talend.components.salesforce.dataset.SalesforceDatasetProperties)

Example 2 with SalesforceInputDefinition

use of org.talend.components.salesforce.dataprep.SalesforceInputDefinition in project components by Talend.

the class SalesforceInputTestIT method createCommonSalesforceInputPropertiesForQuery.

private SalesforceInputProperties createCommonSalesforceInputPropertiesForQuery() {
    SalesforceDatastoreDefinition datastore_def = new SalesforceDatastoreDefinition();
    SalesforceDatastoreProperties datastore_props = new SalesforceDatastoreProperties("datastore");
    CommonTestUtils.setValueForDatastoreProperties(datastore_props);
    SalesforceDatasetProperties dataset = (SalesforceDatasetProperties) datastore_def.createDatasetProperties(datastore_props);
    dataset.sourceType.setValue(SalesforceDatasetProperties.SourceType.SOQL_QUERY);
    dataset.query.setValue("SELECT Id, Name FROM Account");
    SalesforceInputDefinition input_def = new SalesforceInputDefinition();
    SalesforceInputProperties input_props = (SalesforceInputProperties) input_def.createRuntimeProperties();
    input_props.setDatasetProperties(dataset);
    return input_props;
}
Also used : SalesforceDatastoreProperties(org.talend.components.salesforce.datastore.SalesforceDatastoreProperties) SalesforceDatastoreDefinition(org.talend.components.salesforce.datastore.SalesforceDatastoreDefinition) SalesforceInputProperties(org.talend.components.salesforce.dataprep.SalesforceInputProperties) SalesforceInputDefinition(org.talend.components.salesforce.dataprep.SalesforceInputDefinition) SalesforceDatasetProperties(org.talend.components.salesforce.dataset.SalesforceDatasetProperties)

Aggregations

SalesforceInputDefinition (org.talend.components.salesforce.dataprep.SalesforceInputDefinition)2 SalesforceInputProperties (org.talend.components.salesforce.dataprep.SalesforceInputProperties)2 SalesforceDatasetProperties (org.talend.components.salesforce.dataset.SalesforceDatasetProperties)2 SalesforceDatastoreDefinition (org.talend.components.salesforce.datastore.SalesforceDatastoreDefinition)2 SalesforceDatastoreProperties (org.talend.components.salesforce.datastore.SalesforceDatastoreProperties)2