You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2026/02/02 20:52:16 UTC
(nifi) branch NIFI-15258 updated: NIFI-15536: Change Connector API to use DescribedValue vs AllowableValue (#10841)
This is an automated email from the ASF dual-hosted git repository.
markap14 pushed a commit to branch NIFI-15258
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/NIFI-15258 by this push:
new 9e213984b4 NIFI-15536: Change Connector API to use DescribedValue vs AllowableValue (#10841)
9e213984b4 is described below
commit 9e213984b428734df062c8ccf96453a4edd912f2
Author: Bob Paulin <bo...@bobpaulin.com>
AuthorDate: Mon Feb 2 14:52:10 2026 -0600
NIFI-15536: Change Connector API to use DescribedValue vs AllowableValue (#10841)
---
.../java/org/apache/nifi/connectors/kafkas3/KafkaToS3.java | 7 ++++---
.../org/apache/nifi/components/connector/ConnectorNode.java | 6 +++---
.../apache/nifi/components/connector/GhostConnector.java | 6 +++---
.../nifi/components/connector/StandardConnectorNode.java | 11 ++++-------
.../apache/nifi/components/connector/BlockingConnector.java | 6 +++---
.../connector/DynamicAllowableValuesConnector.java | 4 +++-
.../apache/nifi/components/connector/SleepingConnector.java | 6 +++---
.../java/org/apache/nifi/controller/flow/NopConnector.java | 6 +++---
.../src/test/java/org/apache/nifi/nar/DummyConnector.java | 6 +++---
.../java/org/apache/nifi/web/StandardNiFiServiceFacade.java | 4 ++--
.../main/java/org/apache/nifi/web/api/dto/DtoFactory.java | 3 ++-
.../src/main/java/org/apache/nifi/web/dao/ConnectorDAO.java | 4 ++--
.../org/apache/nifi/web/dao/impl/StandardConnectorDAO.java | 4 ++--
.../apache/nifi/web/dao/impl/StandardConnectorDAOTest.java | 13 +++++++------
14 files changed, 44 insertions(+), 42 deletions(-)
diff --git a/nifi-connectors/nifi-kafka-to-s3-bundle/nifi-kafka-to-s3-connector/src/main/java/org/apache/nifi/connectors/kafkas3/KafkaToS3.java b/nifi-connectors/nifi-kafka-to-s3-bundle/nifi-kafka-to-s3-connector/src/main/java/org/apache/nifi/connectors/kafkas3/KafkaToS3.java
index 5549695142..9c4bc1b7d3 100644
--- a/nifi-connectors/nifi-kafka-to-s3-bundle/nifi-kafka-to-s3-connector/src/main/java/org/apache/nifi/connectors/kafkas3/KafkaToS3.java
+++ b/nifi-connectors/nifi-kafka-to-s3-bundle/nifi-kafka-to-s3-connector/src/main/java/org/apache/nifi/connectors/kafkas3/KafkaToS3.java
@@ -22,6 +22,7 @@ import org.apache.nifi.annotation.documentation.Tags;
import org.apache.nifi.components.AllowableValue;
import org.apache.nifi.components.ConfigVerificationResult;
import org.apache.nifi.components.ConfigVerificationResult.Outcome;
+import org.apache.nifi.components.DescribedValue;
import org.apache.nifi.components.connector.AbstractConnector;
import org.apache.nifi.components.connector.ConfigurationStep;
import org.apache.nifi.components.connector.ConnectorConfigurationContext;
@@ -236,7 +237,7 @@ public class KafkaToS3 extends AbstractConnector {
}
@Override
- public List<AllowableValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext flowContext) {
+ public List<DescribedValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext flowContext) {
if (stepName.equals(KafkaTopicsStep.STEP_NAME) && propertyName.equals(KafkaTopicsStep.TOPIC_NAMES.getName())) {
return createAllowableValues(getAvailableTopics(flowContext));
} else if (stepName.equals(S3Step.S3_STEP_NAME) && propertyName.equals(S3Step.S3_REGION.getName())) {
@@ -246,11 +247,11 @@ public class KafkaToS3 extends AbstractConnector {
return super.fetchAllowableValues(stepName, propertyName, flowContext);
}
- private List<AllowableValue> createAllowableValues(final List<String> values) {
+ private List<DescribedValue> createAllowableValues(final List<String> values) {
return values.stream().map(this::createAllowableValue).collect(Collectors.toList());
}
- private AllowableValue createAllowableValue(final String value) {
+ private DescribedValue createAllowableValue(final String value) {
return new AllowableValue(value, value, value);
}
diff --git a/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/components/connector/ConnectorNode.java b/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/components/connector/ConnectorNode.java
index 8a39f4b66a..13cadb3c49 100644
--- a/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/components/connector/ConnectorNode.java
+++ b/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/components/connector/ConnectorNode.java
@@ -19,8 +19,8 @@ package org.apache.nifi.components.connector;
import org.apache.nifi.authorization.resource.ComponentAuthorizable;
import org.apache.nifi.bundle.BundleCoordinate;
-import org.apache.nifi.components.AllowableValue;
import org.apache.nifi.components.ConfigVerificationResult;
+import org.apache.nifi.components.DescribedValue;
import org.apache.nifi.components.ValidationResult;
import org.apache.nifi.components.VersionedComponent;
import org.apache.nifi.components.validation.ValidationState;
@@ -72,9 +72,9 @@ public interface ConnectorNode extends ComponentAuthorizable, VersionedComponent
*/
boolean isExtensionMissing();
- List<AllowableValue> fetchAllowableValues(String stepName, String propertyName);
+ List<DescribedValue> fetchAllowableValues(String stepName, String propertyName);
- List<AllowableValue> fetchAllowableValues(String stepName, String propertyName, String filter);
+ List<DescribedValue> fetchAllowableValues(String stepName, String propertyName, String filter);
void initializeConnector(FrameworkConnectorInitializationContext initializationContext);
diff --git a/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/components/connector/GhostConnector.java b/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/components/connector/GhostConnector.java
index 73f9c98edc..cd8a614b1b 100644
--- a/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/components/connector/GhostConnector.java
+++ b/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/components/connector/GhostConnector.java
@@ -17,9 +17,9 @@
package org.apache.nifi.components.connector;
-import org.apache.nifi.components.AllowableValue;
import org.apache.nifi.components.ConfigVerificationResult;
import org.apache.nifi.components.ConfigVerificationResult.Outcome;
+import org.apache.nifi.components.DescribedValue;
import org.apache.nifi.components.ValidationResult;
import org.apache.nifi.components.connector.components.FlowContext;
import org.apache.nifi.flow.VersionedExternalFlow;
@@ -111,12 +111,12 @@ public class GhostConnector implements Connector {
}
@Override
- public List<AllowableValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext workingContext, final String filter) {
+ public List<DescribedValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext workingContext, final String filter) {
return List.of();
}
@Override
- public List<AllowableValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext workingContext) {
+ public List<DescribedValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext workingContext) {
return List.of();
}
diff --git a/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/components/connector/StandardConnectorNode.java b/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/components/connector/StandardConnectorNode.java
index 7c3b5a8c9d..e614db7070 100644
--- a/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/components/connector/StandardConnectorNode.java
+++ b/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/components/connector/StandardConnectorNode.java
@@ -23,7 +23,6 @@ import org.apache.nifi.authorization.resource.Authorizable;
import org.apache.nifi.authorization.resource.ResourceFactory;
import org.apache.nifi.authorization.resource.ResourceType;
import org.apache.nifi.bundle.BundleCoordinate;
-import org.apache.nifi.components.AllowableValue;
import org.apache.nifi.components.ConfigVerificationResult;
import org.apache.nifi.components.ConfigVerificationResult.Outcome;
import org.apache.nifi.components.DescribedValue;
@@ -617,7 +616,7 @@ public class StandardConnectorNode implements ConnectorNode {
}
@Override
- public List<AllowableValue> fetchAllowableValues(final String stepName, final String propertyName) {
+ public List<DescribedValue> fetchAllowableValues(final String stepName, final String propertyName) {
if (workingFlowContext == null) {
throw new IllegalStateException("Cannot fetch Allowable Values for %s.%s because %s is not being updated.".formatted(
stepName, propertyName, this));
@@ -629,7 +628,7 @@ public class StandardConnectorNode implements ConnectorNode {
}
@Override
- public List<AllowableValue> fetchAllowableValues(final String stepName, final String propertyName, final String filter) {
+ public List<DescribedValue> fetchAllowableValues(final String stepName, final String propertyName, final String filter) {
if (workingFlowContext == null) {
throw new IllegalStateException("Cannot fetch Allowable Values for %s.%s because %s is not being updated.".formatted(
stepName, propertyName, this));
@@ -1385,7 +1384,7 @@ public class StandardConnectorNode implements ConnectorNode {
}
private List<DescribedValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext context) {
- final List<AllowableValue> allowableValues;
+ final List<DescribedValue> allowableValues;
try (NarCloseable ignored = NarCloseable.withComponentNarLoader(extensionManager, getConnector().getClass(), getIdentifier())) {
allowableValues = getConnector().fetchAllowableValues(stepName, propertyName, activeFlowContext);
}
@@ -1394,9 +1393,7 @@ public class StandardConnectorNode implements ConnectorNode {
return Collections.emptyList();
}
- return allowableValues.stream()
- .map(av -> (DescribedValue) av)
- .toList();
+ return allowableValues;
}
@Override
diff --git a/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/components/connector/BlockingConnector.java b/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/components/connector/BlockingConnector.java
index da9836a102..75c35154d6 100644
--- a/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/components/connector/BlockingConnector.java
+++ b/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/components/connector/BlockingConnector.java
@@ -17,8 +17,8 @@
package org.apache.nifi.components.connector;
-import org.apache.nifi.components.AllowableValue;
import org.apache.nifi.components.ConfigVerificationResult;
+import org.apache.nifi.components.DescribedValue;
import org.apache.nifi.components.ValidationResult;
import org.apache.nifi.components.connector.components.FlowContext;
import org.apache.nifi.flow.VersionedExternalFlow;
@@ -116,12 +116,12 @@ public class BlockingConnector implements Connector {
}
@Override
- public List<AllowableValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext workingContext, final String filter) {
+ public List<DescribedValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext workingContext, final String filter) {
return List.of();
}
@Override
- public List<AllowableValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext workingContext) {
+ public List<DescribedValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext workingContext) {
return List.of();
}
diff --git a/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/components/connector/DynamicAllowableValuesConnector.java b/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/components/connector/DynamicAllowableValuesConnector.java
index 1f1a2ee869..404a78b972 100644
--- a/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/components/connector/DynamicAllowableValuesConnector.java
+++ b/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/components/connector/DynamicAllowableValuesConnector.java
@@ -19,6 +19,7 @@ package org.apache.nifi.components.connector;
import org.apache.nifi.components.AllowableValue;
import org.apache.nifi.components.ConfigVerificationResult;
+import org.apache.nifi.components.DescribedValue;
import org.apache.nifi.components.ValidationContext;
import org.apache.nifi.components.ValidationResult;
import org.apache.nifi.components.Validator;
@@ -103,7 +104,7 @@ public class DynamicAllowableValuesConnector extends AbstractConnector {
}
@Override
- public List<AllowableValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext flowContext) {
+ public List<DescribedValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext flowContext) {
if ("Colors".equals(stepName) && "First Primary Color".equals(propertyName)) {
final Set<ProcessorFacade> processorFacades = flowContext.getRootGroup().getProcessors();
if (!processorFacades.isEmpty()) {
@@ -115,6 +116,7 @@ public class DynamicAllowableValuesConnector extends AbstractConnector {
return fileValues.stream()
.map(AllowableValue::new)
+ .map(DescribedValue.class::cast)
.toList();
} catch (final InvocationFailedException e) {
throw new RuntimeException("Failed to fetch allowable values from connector.", e);
diff --git a/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/components/connector/SleepingConnector.java b/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/components/connector/SleepingConnector.java
index f2dbbe65c7..6818b5b059 100644
--- a/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/components/connector/SleepingConnector.java
+++ b/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/components/connector/SleepingConnector.java
@@ -17,8 +17,8 @@
package org.apache.nifi.components.connector;
-import org.apache.nifi.components.AllowableValue;
import org.apache.nifi.components.ConfigVerificationResult;
+import org.apache.nifi.components.DescribedValue;
import org.apache.nifi.components.ValidationResult;
import org.apache.nifi.components.connector.components.FlowContext;
import org.apache.nifi.flow.VersionedExternalFlow;
@@ -110,12 +110,12 @@ public class SleepingConnector implements Connector {
}
@Override
- public List<AllowableValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext workingContext, final String filter) {
+ public List<DescribedValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext workingContext, final String filter) {
return List.of();
}
@Override
- public List<AllowableValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext workingContext) {
+ public List<DescribedValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext workingContext) {
return List.of();
}
diff --git a/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/flow/NopConnector.java b/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/flow/NopConnector.java
index 4701b06d68..c2dc1ab49a 100644
--- a/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/flow/NopConnector.java
+++ b/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/flow/NopConnector.java
@@ -17,8 +17,8 @@
package org.apache.nifi.controller.flow;
-import org.apache.nifi.components.AllowableValue;
import org.apache.nifi.components.ConfigVerificationResult;
+import org.apache.nifi.components.DescribedValue;
import org.apache.nifi.components.ValidationResult;
import org.apache.nifi.components.connector.ConfigurationStep;
import org.apache.nifi.components.connector.Connector;
@@ -151,12 +151,12 @@ public class NopConnector implements Connector {
}
@Override
- public List<AllowableValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext workingContext, final String filter) {
+ public List<DescribedValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext workingContext, final String filter) {
return List.of();
}
@Override
- public List<AllowableValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext workingContext) {
+ public List<DescribedValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext workingContext) {
return List.of();
}
diff --git a/nifi-framework-bundle/nifi-framework/nifi-framework-nar-utils/src/test/java/org/apache/nifi/nar/DummyConnector.java b/nifi-framework-bundle/nifi-framework/nifi-framework-nar-utils/src/test/java/org/apache/nifi/nar/DummyConnector.java
index ed2fdd6b07..2a2b21cde1 100644
--- a/nifi-framework-bundle/nifi-framework/nifi-framework-nar-utils/src/test/java/org/apache/nifi/nar/DummyConnector.java
+++ b/nifi-framework-bundle/nifi-framework/nifi-framework-nar-utils/src/test/java/org/apache/nifi/nar/DummyConnector.java
@@ -17,8 +17,8 @@
package org.apache.nifi.nar;
import org.apache.nifi.annotation.documentation.Tags;
-import org.apache.nifi.components.AllowableValue;
import org.apache.nifi.components.ConfigVerificationResult;
+import org.apache.nifi.components.DescribedValue;
import org.apache.nifi.components.ValidationResult;
import org.apache.nifi.components.connector.ConfigurationStep;
import org.apache.nifi.components.connector.Connector;
@@ -104,12 +104,12 @@ public class DummyConnector implements Connector {
}
@Override
- public List<AllowableValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext flowContext) {
+ public List<DescribedValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext flowContext) {
return List.of();
}
@Override
- public List<AllowableValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext flowContext, final String filter) {
+ public List<DescribedValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext flowContext, final String filter) {
return List.of();
}
diff --git a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
index aa76c19a37..f08f8297b5 100644
--- a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
+++ b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
@@ -72,9 +72,9 @@ import org.apache.nifi.cluster.event.NodeEvent;
import org.apache.nifi.cluster.manager.exception.IllegalNodeDeletionException;
import org.apache.nifi.cluster.manager.exception.UnknownNodeException;
import org.apache.nifi.cluster.protocol.NodeIdentifier;
-import org.apache.nifi.components.AllowableValue;
import org.apache.nifi.components.ConfigVerificationResult;
import org.apache.nifi.components.ConfigurableComponent;
+import org.apache.nifi.components.DescribedValue;
import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.components.RequiredPermission;
import org.apache.nifi.components.ValidationResult;
@@ -3827,7 +3827,7 @@ public class StandardNiFiServiceFacade implements NiFiServiceFacade {
public ConnectorPropertyAllowableValuesEntity getConnectorPropertyAllowableValues(final String connectorId,
final String stepName, final String groupName, final String propertyName, final String filter) {
// groupName is retained for REST API backward compatibility but is no longer used by the underlying API
- final List<AllowableValue> allowableValues = connectorDAO.fetchAllowableValues(connectorId, stepName, propertyName, filter);
+ final List<DescribedValue> allowableValues = connectorDAO.fetchAllowableValues(connectorId, stepName, propertyName, filter);
final List<AllowableValueEntity> allowableValueEntities = allowableValues.stream()
.map(av -> entityFactory.createAllowableValueEntity(dtoFactory.createAllowableValueDto(av), true))
diff --git a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java
index 4b2ec0e9dd..78281e5a56 100644
--- a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java
+++ b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java
@@ -63,6 +63,7 @@ import org.apache.nifi.cluster.manager.StatusMerger;
import org.apache.nifi.cluster.protocol.NodeIdentifier;
import org.apache.nifi.components.AllowableValue;
import org.apache.nifi.components.ConfigVerificationResult;
+import org.apache.nifi.components.DescribedValue;
import org.apache.nifi.components.PropertyDependency;
import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.components.ValidationResult;
@@ -5489,7 +5490,7 @@ public final class DtoFactory {
* @param allowableValue the allowable value
* @return the DTO
*/
- public AllowableValueDTO createAllowableValueDto(final AllowableValue allowableValue) {
+ public AllowableValueDTO createAllowableValueDto(final DescribedValue allowableValue) {
if (allowableValue == null) {
return null;
}
diff --git a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/ConnectorDAO.java b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/ConnectorDAO.java
index 6e2ff0f0c3..c681c17e9a 100644
--- a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/ConnectorDAO.java
+++ b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/ConnectorDAO.java
@@ -18,8 +18,8 @@ package org.apache.nifi.web.dao;
import org.apache.nifi.asset.Asset;
import org.apache.nifi.bundle.BundleCoordinate;
-import org.apache.nifi.components.AllowableValue;
import org.apache.nifi.components.ConfigVerificationResult;
+import org.apache.nifi.components.DescribedValue;
import org.apache.nifi.components.connector.ConnectorNode;
import org.apache.nifi.components.connector.ConnectorUpdateContext;
import org.apache.nifi.web.api.dto.ConfigurationStepConfigurationDTO;
@@ -64,7 +64,7 @@ public interface ConnectorDAO {
List<ConfigVerificationResult> verifyConfigurationStep(String id, String configurationStepName, ConfigurationStepConfigurationDTO configurationStepConfiguration);
- List<AllowableValue> fetchAllowableValues(String id, String stepName, String propertyName, String filter);
+ List<DescribedValue> fetchAllowableValues(String id, String stepName, String propertyName, String filter);
void verifyCreateAsset(String id);
diff --git a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardConnectorDAO.java b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardConnectorDAO.java
index a2d0b17705..409dac9623 100644
--- a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardConnectorDAO.java
+++ b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardConnectorDAO.java
@@ -18,8 +18,8 @@ package org.apache.nifi.web.dao.impl;
import org.apache.nifi.asset.Asset;
import org.apache.nifi.bundle.BundleCoordinate;
-import org.apache.nifi.components.AllowableValue;
import org.apache.nifi.components.ConfigVerificationResult;
+import org.apache.nifi.components.DescribedValue;
import org.apache.nifi.components.connector.AssetReference;
import org.apache.nifi.components.connector.ConnectorAssetRepository;
import org.apache.nifi.components.connector.ConnectorNode;
@@ -228,7 +228,7 @@ public class StandardConnectorDAO implements ConnectorDAO {
}
@Override
- public List<AllowableValue> fetchAllowableValues(final String id, final String stepName, final String propertyName, final String filter) {
+ public List<DescribedValue> fetchAllowableValues(final String id, final String stepName, final String propertyName, final String filter) {
final ConnectorNode connector = getConnector(id);
if (filter == null || filter.isEmpty()) {
return connector.fetchAllowableValues(stepName, propertyName);
diff --git a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/web/dao/impl/StandardConnectorDAOTest.java b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/web/dao/impl/StandardConnectorDAOTest.java
index f18c011b96..5cbf1ef589 100644
--- a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/web/dao/impl/StandardConnectorDAOTest.java
+++ b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/web/dao/impl/StandardConnectorDAOTest.java
@@ -17,6 +17,7 @@
package org.apache.nifi.web.dao.impl;
import org.apache.nifi.components.AllowableValue;
+import org.apache.nifi.components.DescribedValue;
import org.apache.nifi.components.connector.ConnectorAssetRepository;
import org.apache.nifi.components.connector.ConnectorConfiguration;
import org.apache.nifi.components.connector.ConnectorNode;
@@ -193,14 +194,14 @@ class StandardConnectorDAOTest {
@Test
void testFetchAllowableValuesWithoutFilter() {
- final List<AllowableValue> expectedValues = List.of(
+ final List<DescribedValue> expectedValues = List.of(
new AllowableValue("value1", "Value 1", "First value"),
new AllowableValue("value2", "Value 2", "Second value")
);
when(connectorRepository.getConnector(CONNECTOR_ID)).thenReturn(connectorNode);
when(connectorNode.fetchAllowableValues(STEP_NAME, PROPERTY_NAME)).thenReturn(expectedValues);
- final List<AllowableValue> result = connectorDAO.fetchAllowableValues(CONNECTOR_ID, STEP_NAME, PROPERTY_NAME, null);
+ final List<DescribedValue> result = connectorDAO.fetchAllowableValues(CONNECTOR_ID, STEP_NAME, PROPERTY_NAME, null);
assertEquals(expectedValues, result);
verify(connectorNode).fetchAllowableValues(STEP_NAME, PROPERTY_NAME);
@@ -209,13 +210,13 @@ class StandardConnectorDAOTest {
@Test
void testFetchAllowableValuesWithEmptyFilter() {
- final List<AllowableValue> expectedValues = List.of(
+ final List<DescribedValue> expectedValues = List.of(
new AllowableValue("value1", "Value 1", "First value")
);
when(connectorRepository.getConnector(CONNECTOR_ID)).thenReturn(connectorNode);
when(connectorNode.fetchAllowableValues(STEP_NAME, PROPERTY_NAME)).thenReturn(expectedValues);
- final List<AllowableValue> result = connectorDAO.fetchAllowableValues(CONNECTOR_ID, STEP_NAME, PROPERTY_NAME, "");
+ final List<DescribedValue> result = connectorDAO.fetchAllowableValues(CONNECTOR_ID, STEP_NAME, PROPERTY_NAME, "");
assertEquals(expectedValues, result);
verify(connectorNode).fetchAllowableValues(STEP_NAME, PROPERTY_NAME);
@@ -225,13 +226,13 @@ class StandardConnectorDAOTest {
@Test
void testFetchAllowableValuesWithFilter() {
final String filter = "test-filter";
- final List<AllowableValue> expectedValues = List.of(
+ final List<DescribedValue> expectedValues = List.of(
new AllowableValue("filtered-value", "Filtered Value", "Filtered result")
);
when(connectorRepository.getConnector(CONNECTOR_ID)).thenReturn(connectorNode);
when(connectorNode.fetchAllowableValues(STEP_NAME, PROPERTY_NAME, filter)).thenReturn(expectedValues);
- final List<AllowableValue> result = connectorDAO.fetchAllowableValues(CONNECTOR_ID, STEP_NAME, PROPERTY_NAME, filter);
+ final List<DescribedValue> result = connectorDAO.fetchAllowableValues(CONNECTOR_ID, STEP_NAME, PROPERTY_NAME, filter);
assertEquals(expectedValues, result);
verify(connectorNode).fetchAllowableValues(STEP_NAME, PROPERTY_NAME, filter);