private List<ActionDescriptor.ActionDescriptorStep> getPropertyDefinitionStepsInitialize() { return ConnectorDescriptor.super.getPropertyDefinitionSteps(); }
public Builder replaceConfigurationProperty( final String propertyName, final Consumer<ConfigurationProperty.Builder> configurationPropertyConfigurator) { final ConnectorDescriptor definition = build(); final List<ActionDescriptorStep> steps = definition.getPropertyDefinitionSteps(); int stepIdx; ActionDescriptorStep step = null; for (stepIdx = 0; stepIdx < steps.size(); stepIdx++) { final ActionDescriptorStep potentialStep = steps.get(stepIdx); final Map<String, ConfigurationProperty> properties = potentialStep.getProperties(); if (properties.containsKey(propertyName)) { step = potentialStep; break; } } if (step == null) { // found no property to replace, lets just ignore it return this; } final ConfigurationProperty configurationProperty = step.getProperties().get(propertyName); final ConfigurationProperty.Builder configurationPropertyModifier = new ConfigurationProperty.Builder().createFrom(configurationProperty); configurationPropertyConfigurator.accept(configurationPropertyModifier); final ActionDescriptorStep.Builder stepModifier = new ActionDescriptorStep.Builder() .createFrom(step) .putProperty(propertyName, configurationPropertyModifier.build()); final List<ActionDescriptorStep> modifiedSteps = new ArrayList<>(steps); modifiedSteps.set(stepIdx, stepModifier.build()); return propertyDefinitionSteps(modifiedSteps); } }
pair(one.getInputDataShape(), another.getInputDataShape(), "input-data-shape"), pair(one.getOutputDataShape(), another.getOutputDataShape(), "output-data-shape"), pair(one.getPropertyDefinitionSteps(), another.getPropertyDefinitionSteps(), "property-defn-steps"), pair(one.getConfiguredProperties(), another.getConfiguredProperties(), "configured-properties"));
"descriptor"); assertThat(generatedAction.getDescriptor().getPropertyDefinitionSteps()) .as("Generated and expected action definition property definition steps for action with id: " + actionId + " differs") .isEqualTo(expectedAction.getDescriptor().getPropertyDefinitionSteps());
"descriptor"); assertThat(generatedAction.getDescriptor().getPropertyDefinitionSteps()) .as("Generated and expected action definition property definition steps for action with id: " + actionId + " differs") .isEqualTo(expectedAction.getDescriptor().getPropertyDefinitionSteps());