Search in sources :

Example 6 with Connector

use of io.syndesis.common.model.connection.Connector in project syndesis-qe by syndesisio.

the class FtpSteps method setFtpUploadData.

@And("^creates finish FTP upload action with values$")
public void setFtpUploadData(DataTable sourceMappingData) {
    final Connection ftpConnection = connectionsEndpoint.get(RestConstants.getFTP_CONNECTION_ID());
    final Connector ftpConnector = connectorsEndpoint.get("ftp");
    Map<String, String> dataMap = sourceMappingData.asMaps(String.class, String.class).get(0);
    final Step ftpStep = new Step.Builder().stepKind(StepKind.endpoint).connection(ftpConnection).id(UUID.randomUUID().toString()).action(TestUtils.findConnectorAction(ftpConnector, "io.syndesis:ftp-upload-connector")).configuredProperties(dataMap).build();
    steps.getStepDefinitions().add(new StepDefinition(ftpStep));
}
Also used : Connector(io.syndesis.common.model.connection.Connector) Connection(io.syndesis.common.model.connection.Connection) StepDefinition(io.syndesis.qe.bdd.entities.StepDefinition) Step(io.syndesis.common.model.integration.Step) And(cucumber.api.java.en.And)

Example 7 with Connector

use of io.syndesis.common.model.connection.Connector in project syndesis-qe by syndesisio.

the class FtpSteps method setFtpDownloadData.

@And("^creates start FTP download action with values$")
public void setFtpDownloadData(DataTable sourceMappingData) {
    final Connection ftpConnection = connectionsEndpoint.get(RestConstants.getFTP_CONNECTION_ID());
    final Connector ftpConnector = connectorsEndpoint.get("ftp");
    Map<String, String> dataMap = sourceMappingData.asMaps(String.class, String.class).get(0);
    final Step ftpStep = new Step.Builder().stepKind(StepKind.endpoint).connection(ftpConnection).id(UUID.randomUUID().toString()).action(TestUtils.findConnectorAction(ftpConnector, "io.syndesis:ftp-download-connector")).configuredProperties(dataMap).build();
    steps.getStepDefinitions().add(new StepDefinition(ftpStep));
}
Also used : Connector(io.syndesis.common.model.connection.Connector) Connection(io.syndesis.common.model.connection.Connection) StepDefinition(io.syndesis.qe.bdd.entities.StepDefinition) Step(io.syndesis.common.model.integration.Step) And(cucumber.api.java.en.And)

Example 8 with Connector

use of io.syndesis.common.model.connection.Connector in project syndesis-qe by syndesisio.

the class S3Steps method createS3CopyStep.

@Given("^create S3 copy step with bucket: \"([^\"]*)\"")
public void createS3CopyStep(String bucketName) {
    final Connector s3Connector = connectorsEndpoint.get("aws-s3");
    final Connection s3Connection = connectionsEndpoint.get(S3BucketNameBuilder.getBucketName(bucketName));
    final Action s3PollingAction = TestUtils.findConnectorAction(s3Connector, "aws-s3-copy-object-connector");
    final ConnectorDescriptor connectorDescriptor = getConnectorDescriptor(s3PollingAction, new HashMap(), S3BucketNameBuilder.getBucketName(bucketName));
    final Step s3Step = new Step.Builder().stepKind(StepKind.endpoint).connection(s3Connection).id(UUID.randomUUID().toString()).action(generateStepAction(s3PollingAction, connectorDescriptor)).build();
    steps.getStepDefinitions().add(new StepDefinition(s3Step));
}
Also used : Connector(io.syndesis.common.model.connection.Connector) ConnectorDescriptor(io.syndesis.common.model.action.ConnectorDescriptor) Action(io.syndesis.common.model.action.Action) HashMap(java.util.HashMap) Connection(io.syndesis.common.model.connection.Connection) StepDefinition(io.syndesis.qe.bdd.entities.StepDefinition) Step(io.syndesis.common.model.integration.Step) AbstractStep(io.syndesis.qe.bdd.AbstractStep) Given(cucumber.api.java.en.Given)

Example 9 with Connector

use of io.syndesis.common.model.connection.Connector in project syndesis-qe by syndesisio.

the class SalesforceSteps method createSfStepWithAction.

@Given("^create SF \"([^\"]*)\" action step on field: \"([^\"]*)\"$")
public void createSfStepWithAction(String action, String field) {
    final Connector salesforceConnector = connectorsEndpoint.get("salesforce");
    final Connection salesforceConnection = connectionsEndpoint.get(RestConstants.getInstance().getSALESFORCE_CONNECTION_ID());
    final Action sfAction = TestUtils.findConnectorAction(salesforceConnector, action);
    final Map<String, String> properties = TestUtils.map("sObjectName", field);
    final ConnectorDescriptor connectorDescriptor = getConnectorDescriptor(sfAction, properties, RestConstants.getInstance().getSALESFORCE_CONNECTION_ID());
    final Step salesforceStep = new Step.Builder().stepKind(StepKind.endpoint).id(UUID.randomUUID().toString()).connection(salesforceConnection).action(generateStepAction(sfAction, connectorDescriptor)).configuredProperties(properties).build();
    steps.getStepDefinitions().add(new StepDefinition(salesforceStep, connectorDescriptor));
}
Also used : Connector(io.syndesis.common.model.connection.Connector) ConnectorDescriptor(io.syndesis.common.model.action.ConnectorDescriptor) Action(io.syndesis.common.model.action.Action) Connection(io.syndesis.common.model.connection.Connection) StepDefinition(io.syndesis.qe.bdd.entities.StepDefinition) Step(io.syndesis.common.model.integration.Step) AbstractStep(io.syndesis.qe.bdd.AbstractStep) Given(cucumber.api.java.en.Given)

Example 10 with Connector

use of io.syndesis.common.model.connection.Connector in project syndesis-qe by syndesisio.

the class DbSteps method createFinishDbInvokeSqlStep.

@Then("^create finish DB invoke sql action step with query \"([^\"]*)\"")
public void createFinishDbInvokeSqlStep(String sqlQuery) {
    final Connection dbConnection = connectionsEndpoint.get(getDbConnectionId());
    final Connector dbConnector = connectorsEndpoint.get("sql");
    final Action dbAction = TestUtils.findConnectorAction(dbConnector, "sql-connector");
    final Map<String, String> properties = TestUtils.map("query", sqlQuery);
    final ConnectorDescriptor connectorDescriptor = getConnectorDescriptor(dbAction, properties, dbConnection.getId().get());
    final Step dbStep = new Step.Builder().stepKind(StepKind.endpoint).id(UUID.randomUUID().toString()).connection(dbConnection).action(generateStepAction(dbAction, connectorDescriptor)).configuredProperties(properties).build();
    steps.getStepDefinitions().add(new StepDefinition(dbStep, connectorDescriptor));
}
Also used : Connector(io.syndesis.common.model.connection.Connector) ConnectorDescriptor(io.syndesis.common.model.action.ConnectorDescriptor) Action(io.syndesis.common.model.action.Action) Connection(io.syndesis.common.model.connection.Connection) StepDefinition(io.syndesis.qe.bdd.entities.StepDefinition) Step(io.syndesis.common.model.integration.Step) AbstractStep(io.syndesis.qe.bdd.AbstractStep) Then(cucumber.api.java.en.Then)

Aggregations

Connection (io.syndesis.common.model.connection.Connection)16 Connector (io.syndesis.common.model.connection.Connector)16 Step (io.syndesis.common.model.integration.Step)12 StepDefinition (io.syndesis.qe.bdd.entities.StepDefinition)12 Given (cucumber.api.java.en.Given)10 Action (io.syndesis.common.model.action.Action)10 ConnectorDescriptor (io.syndesis.common.model.action.ConnectorDescriptor)10 AbstractStep (io.syndesis.qe.bdd.AbstractStep)9 S3BucketNameBuilder (io.syndesis.qe.utils.S3BucketNameBuilder)5 Account (io.syndesis.qe.accounts.Account)4 And (cucumber.api.java.en.And)3 Then (cucumber.api.java.en.Then)3 MappingType (io.atlasmap.v2.MappingType)1 Integration (io.syndesis.common.model.integration.Integration)1 StepKind (io.syndesis.common.model.integration.StepKind)1 AtlasMapperGenerator (io.syndesis.qe.bdd.datamapper.AtlasMapperGenerator)1 DataMapperDefinition (io.syndesis.qe.bdd.entities.DataMapperDefinition)1 DataMapperStepDefinition (io.syndesis.qe.bdd.entities.DataMapperStepDefinition)1 StepsStorage (io.syndesis.qe.bdd.storage.StepsStorage)1 ConnectionsEndpoint (io.syndesis.qe.endpoints.ConnectionsEndpoint)1