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/11 21:37:09 UTC

(nifi-api) branch NIFI-15258 updated (4532fff -> b6e4d82)

This is an automated email from the ASF dual-hosted git repository.

markap14 pushed a change to branch NIFI-15258
in repository https://gitbox.apache.org/repos/asf/nifi-api.git


 discard 4532fff  NIFI-15565: Code cleanup (#64)
    omit 7b621d1  NIFI-15557: Allow Connectors to enable a Controller Service using overridden property values (#63)
    omit 7107ba5  NIFI-15480: Added DropFlowFileSummary, ability to drop FlowFiles from a ConnectionFacade / ProcessGroupFacade (#62)
    omit 80de11f  NIFI-15538: When starting/stopping components allow specifying whether or not the action should be recursive; code cleanup and simplification to use a Virtual Thread to execute code sequentially instead of chaining CompletableFutures. (#61)
    omit 6baaaa6  NIFI-15514: Bug fix - ensure that when AbstractConnector is started, it includes all components, not just processors and controller services; code cleanup (#57)
    omit babe0f1  NIFI-15536: Change Connector API to use DescribedValue vs AllowableValue (#60)
    omit 5749b54  NIFI-15467: Allow Connectors to specify bundle compatability when upd… (#54)
    omit 063fa4b  NIFI-15485: Include provider name when providing fqn for secrets (#52)
    omit e7dceb2  NIFI-15451: Provide ability for Connectors to lookup Bundles available for a given component type (#46)
    omit 542d061  NIFI-15461: Fixed bug that caused system tests to fail (#48)
    omit da295c4  NIFI-15446: Updated JavaDocs to clarify how invocations of Connector Methods work (#45)
    omit 51aa3f9  NIFI-15440: Implementation of ConnectorActions (#47)
    omit 25b4af4  NIFI-15427: Added drainFlowFiles(FlowContext) method to Connector (#42)
    omit 893faac  NIFI-15428: If non-existent property value is set, connector should be invalid. (#43)
    omit 8121edc  NIFI-15353: Adding documentation writers for connectors. (#40)
    omit 9d0f895  NIFI-15356: Introducing the ConnectorWebMethod. (#37)
    omit 1bbe285  NIFI-15369: Allow ConfigurationStep to depend on another (ConfigurationStep,Property) tuple (#39)
    omit 8be1e12  NIFI-15361: Removing documentation from ConfigurationStep. (#38)
    omit 6818a2d  NIFI-15315 Add support for assets in Connectors (#31)
    omit a444e85  NIFI-15352: Added getFullyQualifiedName to secret, to encapsulate the… (#35)
    omit 2da2f7a  NIFI-15258: Enable Custom UI to retrieve connector with flow contexts (#33)
    omit 162d212  NIFI-15343: Adding providerId to Secret. (#30)
    omit e71fd0e  NIFI-15312: Moved SecretsProvider / SecretsManager to framework instead of api; added description to Secret and updated ParameterProvider to allow more specific fetching of parameters; cleaned up Connector validation logic (#29)
    omit ea37cfa  NIFI-15326: Adding support for connector configuration step documentation. (#28)
    omit 3de0980  NIFI-15322: Require all property descriptors within a PropertyGroup / ConfigurationStep are unique (#27)
    omit 848f964  NIFI-15259: Adding web context interface for custom Connector UIs.
    omit 69107e9  NIFI-15258: Initial API for Connectors
     add d2b25da  NIFI-15487 Updated version to 2.6.0
     add c7db1dc  NIFI-15487 Merged NIFI-15487-RC1
     add 641d4cb  NIFI-15487 Updated version to 2.7.0-SNAPSHOT
     add 592c38f  NIFI-15503 Updated README with required Maven Version 3.9.11 (#55)
     add 2bd06f4  NIFI-15502 Updated Checkstyle rules to match primary project configuration (#56)
     add 8f01fd3  NIFI-15516 Upgraded Maven from 3.9.11 to 3.9.12 (#58)
     add 66891e9  NIFI-15502 Fixed typos and some of the grammar in the comments (#59)
     new 2c0363b  NIFI-15258: Initial API for Connectors
     new c52fa55  NIFI-15259: Adding web context interface for custom Connector UIs.
     new f62bedf  NIFI-15322: Require all property descriptors within a PropertyGroup / ConfigurationStep are unique (#27)
     new 8b4a93b  NIFI-15326: Adding support for connector configuration step documentation. (#28)
     new 3e46ab9  NIFI-15312: Moved SecretsProvider / SecretsManager to framework instead of api; added description to Secret and updated ParameterProvider to allow more specific fetching of parameters; cleaned up Connector validation logic (#29)
     new 910bd9b  NIFI-15343: Adding providerId to Secret. (#30)
     new 0c153a9  NIFI-15258: Enable Custom UI to retrieve connector with flow contexts (#33)
     new de2d6ce  NIFI-15352: Added getFullyQualifiedName to secret, to encapsulate the… (#35)
     new 39c3c15  NIFI-15315 Add support for assets in Connectors (#31)
     new e3fa975  NIFI-15361: Removing documentation from ConfigurationStep. (#38)
     new cee255f  NIFI-15369: Allow ConfigurationStep to depend on another (ConfigurationStep,Property) tuple (#39)
     new 75f3b4b  NIFI-15356: Introducing the ConnectorWebMethod. (#37)
     new 6705411  NIFI-15353: Adding documentation writers for connectors. (#40)
     new 635a439  NIFI-15428: If non-existent property value is set, connector should be invalid. (#43)
     new a63bc4e  NIFI-15427: Added drainFlowFiles(FlowContext) method to Connector (#42)
     new 93df081  NIFI-15440: Implementation of ConnectorActions (#47)
     new 6a7f7ff  NIFI-15446: Updated JavaDocs to clarify how invocations of Connector Methods work (#45)
     new 997f413  NIFI-15461: Fixed bug that caused system tests to fail (#48)
     new 86b0a89  NIFI-15451: Provide ability for Connectors to lookup Bundles available for a given component type (#46)
     new c255171  NIFI-15485: Include provider name when providing fqn for secrets (#52)
     new 7d13e70  NIFI-15467: Allow Connectors to specify bundle compatability when upd… (#54)
     new d553fcd  NIFI-15536: Change Connector API to use DescribedValue vs AllowableValue (#60)
     new 8541f0f  NIFI-15514: Bug fix - ensure that when AbstractConnector is started, it includes all components, not just processors and controller services; code cleanup (#57)
     new 50012d9  NIFI-15538: When starting/stopping components allow specifying whether or not the action should be recursive; code cleanup and simplification to use a Virtual Thread to execute code sequentially instead of chaining CompletableFutures. (#61)
     new 39aa9dc  NIFI-15480: Added DropFlowFileSummary, ability to drop FlowFiles from a ConnectionFacade / ProcessGroupFacade (#62)
     new 9e809ad  NIFI-15557: Allow Connectors to enable a Controller Service using overridden property values (#63)
     new b6e4d82  NIFI-15565: Code cleanup (#64)

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (4532fff)
            \
             N -- N -- N   refs/heads/NIFI-15258 (b6e4d82)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 27 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .mvn/wrapper/maven-wrapper.properties              |   2 +-
 README.md                                          |   2 +-
 checkstyle.xml                                     | 162 +++++++----
 pom.xml                                            |   4 +-
 src/main/java/org/apache/nifi/action/Action.java   |   5 +-
 .../nifi/annotation/behavior/DynamicProperty.java  |   5 +-
 .../annotation/behavior/DynamicRelationship.java   |   7 +-
 .../behavior/RequiresInstanceClassLoading.java     |   2 +-
 .../nifi/annotation/behavior/Restriction.java      |   3 +-
 .../nifi/annotation/behavior/SideEffectFree.java   |   2 +-
 .../nifi/annotation/behavior/SupportsBatching.java |   2 +-
 .../annotation/configuration/DefaultSchedule.java  |   3 +-
 .../annotation/configuration/DefaultSettings.java  |   3 +-
 .../documentation/DeprecationNotice.java           |   3 +-
 .../nifi/annotation/documentation/SeeAlso.java     |   3 +-
 .../nifi/annotation/lifecycle/OnDisabled.java      |   3 +-
 .../nifi/annotation/lifecycle/OnRemoved.java       |   5 +-
 .../nifi/annotation/lifecycle/OnShutdown.java      |   5 +-
 .../nifi/annotation/lifecycle/OnStopped.java       |   5 +-
 .../org/apache/nifi/components/AllowableValue.java |   2 +-
 .../nifi/components/ConfigurableComponent.java     |   3 +-
 .../apache/nifi/components/PropertyDescriptor.java |   4 +-
 .../org/apache/nifi/components/PropertyValue.java  |   7 +-
 .../nifi/components/resource/ResourceContext.java  |   2 +-
 .../components/resource/ResourceReference.java     |   2 +-
 .../components/resource/ResourceReferences.java    |   2 +-
 .../state/exception/StateTooLargeException.java    |   3 +-
 .../org/apache/nifi/context/PropertyContext.java   |   3 +-
 .../nifi/controller/ConfigurationContext.java      |   2 +-
 .../controller/VerifiableControllerService.java    |   2 +-
 .../nifi/controller/status/ProcessorStatus.java    |   3 +-
 .../status/analytics/StatusAnalyticsEngine.java    |   2 +-
 .../documentation/AbstractDocumentationWriter.java |   5 +-
 .../ExtensionDocumentationWriter.java              |   3 +-
 ...tionControllerServiceInitializationContext.java |   5 +-
 ...ionFlowRegistryClientInitializationContext.java |   2 +-
 ...ocumentationProcessorInitializationContext.java |   5 +-
 ...ocumentationReportingInitializationContext.java |   7 +-
 .../init/EmptyControllerServiceLookup.java         |   3 +-
 .../nifi/documentation/init/NopStateManager.java   |   3 +-
 .../documentation/xml/XmlDocumentationWriter.java  |  33 +--
 .../nifi/expression/AttributeExpression.java       |   8 +-
 src/main/java/org/apache/nifi/flow/BatchSize.java  |   1 +
 .../org/apache/nifi/flow/ConnectableComponent.java |   1 +
 .../org/apache/nifi/flow/ControllerServiceAPI.java |   4 +-
 .../java/org/apache/nifi/flow/VersionedLabel.java  |   4 +-
 .../org/apache/nifi/flow/VersionedProcessor.java   |   6 +-
 ...ernalResourceProviderInitializationContext.java |   2 +-
 .../java/org/apache/nifi/flowfile/FlowFile.java    |   2 +-
 .../org/apache/nifi/kerberos/KerberosContext.java  |   2 +-
 .../java/org/apache/nifi/logging/ComponentLog.java |   2 +-
 .../processor/AbstractSessionFactoryProcessor.java |   5 +-
 .../java/org/apache/nifi/processor/DataUnit.java   | 300 ++++++++++-----------
 .../org/apache/nifi/processor/ProcessSession.java  |  23 +-
 .../java/org/apache/nifi/processor/Processor.java  |   2 +-
 .../nifi/processor/exception/ProcessException.java |   1 -
 .../exception/TerminatedTaskException.java         |   5 +-
 .../nifi/provenance/ProvenanceEventBuilder.java    |   7 +-
 .../nifi/provenance/ProvenanceEventRecord.java     |   4 +-
 .../nifi/provenance/ProvenanceEventType.java       |   2 +-
 .../registry/flow/AbstractFlowRegistryClient.java  |   2 +-
 .../FlowRegistryClientInitializationContext.java   |   2 +-
 .../org/apache/nifi/reporting/EventAccess.java     |  10 +-
 .../apache/nifi/reporting/ReportingContext.java    |   5 +-
 .../reporting/ReportingInitializationContext.java  |   5 +-
 .../nifi/reporting/VerifiableReportingTask.java    |   2 +-
 .../java/org/apache/nifi/search/SearchContext.java |   3 +-
 67 files changed, 419 insertions(+), 320 deletions(-)


(nifi-api) 05/27: NIFI-15312: Moved SecretsProvider / SecretsManager to framework instead of api; added description to Secret and updated ParameterProvider to allow more specific fetching of parameters; cleaned up Connector validation logic (#29)

Posted by ma...@apache.org.
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-api.git

commit 3e46ab96b680669d731f904e663f5dcb51d90726
Author: Mark Payne <ma...@hotmail.com>
AuthorDate: Fri Dec 12 18:00:53 2025 -0500

    NIFI-15312: Moved SecretsProvider / SecretsManager to framework instead of api; added description to Secret and updated ParameterProvider to allow more specific fetching of parameters; cleaned up Connector validation logic (#29)
---
 .../components/connector/AbstractConnector.java    | 72 ++++++++++------------
 .../connector/ConnectorPropertyDescriptor.java     | 19 ++++++
 .../apache/nifi/components/connector/Secret.java   |  2 +
 .../nifi/components/connector/SecretProvider.java  | 33 ----------
 .../nifi/components/connector/SecretsManager.java  | 33 ----------
 .../apache/nifi/parameter/ParameterProvider.java   | 55 +++++++++++++++++
 6 files changed, 109 insertions(+), 105 deletions(-)

diff --git a/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java b/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
index 4cfac54..6db3acc 100644
--- a/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
+++ b/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
@@ -283,25 +283,41 @@ public abstract class AbstractConnector implements Connector {
     }
 
     @Override
-    public List<ValidationResult> validate(final FlowContext context, final ConnectorValidationContext validationContext) {
-        final List<ValidationResult> validationResults = new ArrayList<>();
-        validate(context, context.getRootGroup(), validationContext, validationResults);
-        return validationResults;
-    }
+    public List<ValidationResult> validate(final FlowContext flowContext, final ConnectorValidationContext validationContext) {
+        final ConnectorConfigurationContext configContext = flowContext.getConfigurationContext();
+        final List<ValidationResult> results = new ArrayList<>();
+        final List<ConfigurationStep> configurationSteps = getConfigurationSteps(flowContext);
 
-    private void validate(final FlowContext context, final ProcessGroupFacade group, final ConnectorValidationContext validationContext, final List<ValidationResult> validationResults) {
-        final List<ValidationResult> connectorPropertiesResults = validate(context, context.getConfigurationContext(), validationContext);
-        if (!connectorPropertiesResults.isEmpty()) {
-            connectorPropertiesResults.stream()
-                .filter(result -> !result.isValid())
-                .forEach(validationResults::add);
+        for (final ConfigurationStep configurationStep : configurationSteps) {
+            results.addAll(validateConfigurationStep(configurationStep, configContext, validationContext));
+        }
 
-            // If any invalid results on the connector configuration itself, do not proceed with further validation of components
-            if (!validationResults.isEmpty()) {
-                return;
+        // only run customValidate if regular validation is successful. This allows Processor developers to not have to check
+        // if values are null or invalid so that they can focus only on the interaction between the properties, etc.
+        if (results.isEmpty()) {
+            final Collection<ValidationResult> customResults = customValidate(configContext);
+            if (customResults != null) {
+                for (final ValidationResult result : customResults) {
+                    if (!result.isValid()) {
+                        results.add(result);
+                    }
+                }
             }
         }
 
+        return results;
+    }
+
+
+    protected List<ValidationResult> validateComponents(final FlowContext context, final ProcessGroupFacade group, final ConnectorValidationContext validationContext) {
+        final List<ValidationResult> validationResults = new ArrayList<>();
+        validateComponents(context, group, validationContext, validationResults);
+        return validationResults;
+    }
+
+    private void validateComponents(final FlowContext context, final ProcessGroupFacade group, final ConnectorValidationContext validationContext,
+            final List<ValidationResult> validationResults) {
+
         for (final ProcessorFacade processor : group.getProcessors()) {
             final List<ValidationResult> processorResults = processor.validate();
             for (final ValidationResult result : processorResults) {
@@ -339,7 +355,7 @@ public abstract class AbstractConnector implements Connector {
         }
 
         for (final ProcessGroupFacade childGroup : group.getProcessGroups()) {
-            validate(context, childGroup, validationContext, validationResults);
+            validateComponents(context, childGroup, validationContext, validationResults);
         }
     }
 
@@ -425,33 +441,11 @@ public abstract class AbstractConnector implements Connector {
         }
     }
 
-    private List<ValidationResult> validate(final FlowContext workingContext, final ConnectorConfigurationContext context, final ConnectorValidationContext validationContext) {
-        final List<ValidationResult> results = new ArrayList<>();
-        final List<ConfigurationStep> configurationSteps = getConfigurationSteps(workingContext);
-
-        for (final ConfigurationStep configurationStep : configurationSteps) {
-            results.addAll(validateConfigurationStep(configurationStep, context, validationContext));
-        }
-
-        // only run customValidate if regular validation is successful. This allows Processor developers to not have to check
-        // if values are null or invalid so that they can focus only on the interaction between the properties, etc.
-        if (results.isEmpty()) {
-            final Collection<ValidationResult> customResults = customValidate(context);
-            if (customResults != null) {
-                for (final ValidationResult result : customResults) {
-                    if (!result.isValid()) {
-                        results.add(result);
-                    }
-                }
-            }
-        }
-
-        return results;
-    }
 
     @Override
     public List<ValidationResult> validateConfigurationStep(final ConfigurationStep configurationStep, final ConnectorConfigurationContext configurationContext,
-        final ConnectorValidationContext validationContext) {
+            final ConnectorValidationContext validationContext) {
+
         final String stepName = configurationStep.getName();
         final List<ValidationResult> results = new ArrayList<>();
 
diff --git a/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyDescriptor.java b/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyDescriptor.java
index f765d11..209039b 100644
--- a/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyDescriptor.java
+++ b/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyDescriptor.java
@@ -28,6 +28,7 @@ import java.util.Collections;
 import java.util.EnumSet;
 import java.util.HashSet;
 import java.util.List;
+import java.util.Objects;
 import java.util.Set;
 import java.util.regex.Pattern;
 import java.util.stream.Collectors;
@@ -210,6 +211,24 @@ public final class ConnectorPropertyDescriptor {
             .build();
     }
 
+    @Override
+    public boolean equals(final Object o) {
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        final ConnectorPropertyDescriptor that = (ConnectorPropertyDescriptor) o;
+        return Objects.equals(name, that.name);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hashCode(name);
+    }
+
+    @Override
+    public String toString() {
+        return "ConnectorPropertyDescriptor[name=" + name + "]";
+    }
 
     public static final class Builder {
         private String name;
diff --git a/src/main/java/org/apache/nifi/components/connector/Secret.java b/src/main/java/org/apache/nifi/components/connector/Secret.java
index 4d6e8c5..5b50ea4 100644
--- a/src/main/java/org/apache/nifi/components/connector/Secret.java
+++ b/src/main/java/org/apache/nifi/components/connector/Secret.java
@@ -25,6 +25,8 @@ public interface Secret {
 
     String getName();
 
+    String getDescription();
+
     String getValue();
 
 }
diff --git a/src/main/java/org/apache/nifi/components/connector/SecretProvider.java b/src/main/java/org/apache/nifi/components/connector/SecretProvider.java
deleted file mode 100644
index 22849a5..0000000
--- a/src/main/java/org/apache/nifi/components/connector/SecretProvider.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.nifi.components.connector;
-
-import java.io.IOException;
-import java.util.List;
-
-public interface SecretProvider {
-
-    String getProviderId();
-
-    String getProviderName();
-
-    List<Secret> getAllSecrets() throws IOException;
-
-    List<Secret> getSecrets(List<String> fullyQualifiedSecretNames) throws IOException;
-
-}
diff --git a/src/main/java/org/apache/nifi/components/connector/SecretsManager.java b/src/main/java/org/apache/nifi/components/connector/SecretsManager.java
deleted file mode 100644
index 564b717..0000000
--- a/src/main/java/org/apache/nifi/components/connector/SecretsManager.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.nifi.components.connector;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.Optional;
-import java.util.Set;
-
-public interface SecretsManager {
-
-    Optional<Secret> getSecret(SecretReference secretReference) throws IOException;
-
-    List<Secret> getAllSecrets() throws IOException;
-
-    Set<SecretProvider> getSecretProviders();
-
-}
diff --git a/src/main/java/org/apache/nifi/parameter/ParameterProvider.java b/src/main/java/org/apache/nifi/parameter/ParameterProvider.java
index f97d529..a2f3dd0 100644
--- a/src/main/java/org/apache/nifi/parameter/ParameterProvider.java
+++ b/src/main/java/org/apache/nifi/parameter/ParameterProvider.java
@@ -23,7 +23,10 @@ import org.apache.nifi.migration.PropertyConfiguration;
 import org.apache.nifi.reporting.InitializationException;
 
 import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 
 /**
  * Defines a provider that is responsible for fetching from an external source Parameters with
@@ -102,4 +105,56 @@ public interface ParameterProvider extends ConfigurableComponent {
      */
     default void migrateProperties(PropertyConfiguration config) {
     }
+
+    /**
+     * Fetches named groups of parameters from an external source, filtering to only include the specified parameter names.
+     * It is up to the implementation to determine how a fully qualified parameter name maps to a group and parameter name
+     * and to optimize the fetching accordingly. The default implementation fetches all parameters and filters them, assuming
+     * that the fully qualified parameter name is of the form "GroupName.ParameterName".
+     *
+     * @param context The <code>ConfigurationContext</code>for the provider
+     * @param fullyQualifiedParameterNames the fully qualified names of the parameters to fetch
+     * @return A list of fetched Parameter groups containing only the specified parameters
+     * @throws IOException if there is an I/O problem while fetching the Parameters
+     */
+    default List<ParameterGroup> fetchParameters(ConfigurationContext context, List<String> fullyQualifiedParameterNames) throws IOException {
+        final List<ParameterGroup> allGroups = fetchParameters(context);
+        final List<ParameterGroup> filteredGroups = new ArrayList<>();
+
+        for (final ParameterGroup group : allGroups) {
+            // Determine which parameter names are desired from this group
+            final List<String> desiredParameterNames = new ArrayList<>();
+            final String prefix = group.getGroupName() + ".";
+            for (final String fullyQualifiedParameterName : fullyQualifiedParameterNames) {
+                if (fullyQualifiedParameterName.startsWith(prefix)) {
+                    final String secretName = fullyQualifiedParameterName.substring(prefix.length());
+                    desiredParameterNames.add(secretName);
+                }
+            }
+
+            // If no parameters are desired from this group, skip it
+            if (desiredParameterNames.isEmpty()) {
+                continue;
+            }
+
+            // Create a HashSet for quick lookup
+            final Set<String> parameterNameSet = new HashSet<>(desiredParameterNames);
+            final List<Parameter> filteredParameters = new ArrayList<>();
+            for (final Parameter parameter : group.getParameters()) {
+                if (!parameterNameSet.contains(parameter.getDescriptor().getName())) {
+                    continue;
+                }
+
+                filteredParameters.add(parameter);
+            }
+
+            // If we found any desired parameters, add them to the result
+            if (!filteredParameters.isEmpty()) {
+                filteredGroups.add(new ParameterGroup(group.getGroupName(), filteredParameters));
+            }
+        }
+
+        // Return the filtered groups
+        return filteredGroups;
+    }
 }


(nifi-api) 02/27: NIFI-15259: Adding web context interface for custom Connector UIs.

Posted by ma...@apache.org.
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-api.git

commit c52fa551a35eaadd30c94d97ea8ada999305c1bc
Author: Matt Gilman <ma...@gmail.com>
AuthorDate: Mon Dec 8 19:32:02 2025 -0500

    NIFI-15259: Adding web context interface for custom Connector UIs.
---
 .../apache/nifi/web/NiFiConnectorWebContext.java   | 37 ++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/src/main/java/org/apache/nifi/web/NiFiConnectorWebContext.java b/src/main/java/org/apache/nifi/web/NiFiConnectorWebContext.java
new file mode 100644
index 0000000..5bebf42
--- /dev/null
+++ b/src/main/java/org/apache/nifi/web/NiFiConnectorWebContext.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.web;
+
+/**
+ * NiFi web context providing access to Connector instances for
+ * connector custom UIs.
+ */
+public interface NiFiConnectorWebContext {
+
+    /**
+     * Returns the Connector instance for the given connector ID.
+     * The returned Connector can be cast to a connector-specific interface
+     * if the custom UI's classloader has visibility to that interface
+     * (typically through the NAR classloader hierarchy).
+     *
+     * @param <T> the expected type of the Connector
+     * @param connectorId the ID of the connector to retrieve
+     * @return the Connector instance
+     * @throws IllegalArgumentException if the connector does not exist
+     */
+    <T> T getConnector(String connectorId) throws IllegalArgumentException;
+}


(nifi-api) 20/27: NIFI-15485: Include provider name when providing fqn for secrets (#52)

Posted by ma...@apache.org.
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-api.git

commit c25517189e407f4420cb3cf4a382831612cb9cfa
Author: Mark Payne <ma...@hotmail.com>
AuthorDate: Thu Jan 22 09:35:28 2026 -0500

    NIFI-15485: Include provider name when providing fqn for secrets (#52)
---
 .../java/org/apache/nifi/components/connector/SecretReference.java     | 2 +-
 src/main/java/org/apache/nifi/parameter/ParameterProvider.java         | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/nifi/components/connector/SecretReference.java b/src/main/java/org/apache/nifi/components/connector/SecretReference.java
index d4c29b4..d717ec2 100644
--- a/src/main/java/org/apache/nifi/components/connector/SecretReference.java
+++ b/src/main/java/org/apache/nifi/components/connector/SecretReference.java
@@ -96,6 +96,6 @@ public final class SecretReference implements ConnectorValueReference {
 
     @Override
     public String toString() {
-        return "SecretReference[providerId=" + providerId + ", providerName=" + providerName + ", secretName=" + secretName + "]";
+        return "SecretReference[providerId=" + providerId + ", providerName=" + providerName + ", secretName=" + secretName + ", fullyQualifiedName=" + fullyQualifiedName + "]";
     }
 }
diff --git a/src/main/java/org/apache/nifi/parameter/ParameterProvider.java b/src/main/java/org/apache/nifi/parameter/ParameterProvider.java
index c1a6caf..d8cf6ad 100644
--- a/src/main/java/org/apache/nifi/parameter/ParameterProvider.java
+++ b/src/main/java/org/apache/nifi/parameter/ParameterProvider.java
@@ -124,7 +124,8 @@ public interface ParameterProvider extends ConfigurableComponent {
         for (final ParameterGroup group : allGroups) {
             // Determine which parameter names are desired from this group
             final List<String> desiredParameterNames = new ArrayList<>();
-            final String prefix = group.getGroupName() + ".";
+            final String name = context.getName();
+            final String prefix = name + "." + group.getGroupName() + ".";
             for (final String fullyQualifiedParameterName : fullyQualifiedParameterNames) {
                 if (fullyQualifiedParameterName.startsWith(prefix)) {
                     final String secretName = fullyQualifiedParameterName.substring(prefix.length());


(nifi-api) 13/27: NIFI-15353: Adding documentation writers for connectors. (#40)

Posted by ma...@apache.org.
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-api.git

commit 6705411cc94b859e46b9931da92a92a92fd2e916
Author: Matt Gilman <ma...@gmail.com>
AuthorDate: Tue Dec 23 11:50:26 2025 -0500

    NIFI-15353: Adding documentation writers for connectors. (#40)
    
    This closes #40
---
 .../AbstractConnectorDocumentationWriter.java      | 106 +++
 .../ConnectorDocumentationWriter.java              |  52 ++
 .../apache/nifi/documentation/ExtensionType.java   |   4 +-
 ...ocumentationConnectorInitializationContext.java |  54 ++
 .../xml/XmlConnectorDocumentationWriter.java       | 344 ++++++++
 ...entationConnectorInitializationContextTest.java |  77 ++
 .../xml/XmlConnectorDocumentationWriterTest.java   | 866 +++++++++++++++++++++
 7 files changed, 1502 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/nifi/documentation/AbstractConnectorDocumentationWriter.java b/src/main/java/org/apache/nifi/documentation/AbstractConnectorDocumentationWriter.java
new file mode 100644
index 0000000..f10fcd1
--- /dev/null
+++ b/src/main/java/org/apache/nifi/documentation/AbstractConnectorDocumentationWriter.java
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.documentation;
+
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.DeprecationNotice;
+import org.apache.nifi.annotation.documentation.SeeAlso;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.components.connector.ConfigurationStep;
+import org.apache.nifi.components.connector.Connector;
+import org.apache.nifi.documentation.init.DocumentationConnectorInitializationContext;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * Base class for ConnectorDocumentationWriter that simplifies iterating over all information for a Connector,
+ * creating a separate method for each piece of documentation, to ensure that implementations properly override
+ * all methods and therefore properly account for all information about a Connector.
+ *
+ * Please note that while this class lives within the nifi-api, it is provided primarily as a means for documentation components within
+ * the NiFi NAR Maven Plugin. Its home is the nifi-api, however, because the API is needed in order to extract the relevant information and
+ * the NAR Maven Plugin cannot have a direct dependency on nifi-api (doing so would cause a circular dependency). By having this homed within
+ * the nifi-api, the Maven plugin is able to discover the class dynamically and invoke the one or two methods necessary to create the documentation.
+ *
+ * This is a new capability for Connectors and therefore, you should
+ * <b>NOTE WELL:</b> At this time, while this class is part of nifi-api, it is still evolving and may change in a non-backward-compatible manner or even be
+ * removed from one incremental release to the next. Use at your own risk!
+ */
+public abstract class AbstractConnectorDocumentationWriter implements ConnectorDocumentationWriter {
+
+    @Override
+    public void initialize(final Connector connector) {
+        connector.initialize(new DocumentationConnectorInitializationContext());
+    }
+
+    @Override
+    public final void write(final Connector connector) throws IOException {
+        writeHeader(connector);
+        writeBody(connector);
+        writeFooter(connector);
+    }
+
+    protected void writeBody(final Connector connector) throws IOException {
+        writeExtensionName(connector.getClass().getName());
+        writeExtensionType(ExtensionType.CONNECTOR);
+        writeDeprecationNotice(connector.getClass().getAnnotation(DeprecationNotice.class));
+        writeDescription(getDescription(connector));
+        writeTags(getTags(connector));
+        writeConfigurationSteps(connector.getConfigurationSteps());
+        writeSeeAlso(connector.getClass().getAnnotation(SeeAlso.class));
+    }
+
+    protected String getDescription(final Connector connector) {
+        final CapabilityDescription capabilityDescription = connector.getClass().getAnnotation(CapabilityDescription.class);
+        if (capabilityDescription == null) {
+            return null;
+        }
+        return capabilityDescription.value();
+    }
+
+    protected List<String> getTags(final Connector connector) {
+        final Tags tags = connector.getClass().getAnnotation(Tags.class);
+        if (tags == null) {
+            return Collections.emptyList();
+        }
+        final String[] tagValues = tags.value();
+        return tagValues == null ? Collections.emptyList() : Arrays.asList(tagValues);
+    }
+
+    protected abstract void writeHeader(Connector connector) throws IOException;
+
+    protected abstract void writeExtensionName(String extensionName) throws IOException;
+
+    protected abstract void writeExtensionType(ExtensionType extensionType) throws IOException;
+
+    protected abstract void writeDeprecationNotice(DeprecationNotice deprecationNotice) throws IOException;
+
+    protected abstract void writeDescription(String description) throws IOException;
+
+    protected abstract void writeTags(List<String> tags) throws IOException;
+
+    protected abstract void writeConfigurationSteps(List<ConfigurationStep> configurationSteps) throws IOException;
+
+    protected abstract void writeSeeAlso(SeeAlso seeAlso) throws IOException;
+
+    protected abstract void writeFooter(Connector connector) throws IOException;
+
+}
+
diff --git a/src/main/java/org/apache/nifi/documentation/ConnectorDocumentationWriter.java b/src/main/java/org/apache/nifi/documentation/ConnectorDocumentationWriter.java
new file mode 100644
index 0000000..a7edb41
--- /dev/null
+++ b/src/main/java/org/apache/nifi/documentation/ConnectorDocumentationWriter.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.documentation;
+
+import java.io.IOException;
+import org.apache.nifi.components.connector.Connector;
+
+/**
+ * Generates documentation for an instance of a Connector.
+ *
+ * Please note that while this class lives within the nifi-api, it is provided primarily as a means for documentation components within
+ * the NiFi NAR Maven Plugin. Its home is the nifi-api, however, because the API is needed in order to extract the relevant information and
+ * the NAR Maven Plugin cannot have a direct dependency on nifi-api (doing so would cause a circular dependency). By having this homed within
+ * the nifi-api, the Maven plugin is able to discover the class dynamically and invoke the one or two methods necessary to create the documentation.
+ *
+ * This is a new capability for Connectors and therefore, you should
+ * <b>NOTE WELL:</b> At this time, while this class is part of nifi-api, it is still evolving and may change in a non-backward-compatible manner or even be
+ * removed from one incremental release to the next. Use at your own risk!
+ */
+public interface ConnectorDocumentationWriter {
+
+    /**
+     * Calls initialize on the connector. Must be called before calling any write methods.
+     *
+     * @param connector the connector to initialize
+     */
+    void initialize(Connector connector);
+
+    /**
+     * Write the documentation for the given connector.
+     *
+     * @param connector the connector to document
+     * @throws IOException if an error occurs writing the documentation
+     */
+    void write(Connector connector) throws IOException;
+
+}
+
diff --git a/src/main/java/org/apache/nifi/documentation/ExtensionType.java b/src/main/java/org/apache/nifi/documentation/ExtensionType.java
index 7f6fbab..160966e 100644
--- a/src/main/java/org/apache/nifi/documentation/ExtensionType.java
+++ b/src/main/java/org/apache/nifi/documentation/ExtensionType.java
@@ -27,5 +27,7 @@ public enum ExtensionType {
 
     PARAMETER_PROVIDER,
 
-    FLOW_REGISTRY_CLIENT;
+    FLOW_REGISTRY_CLIENT,
+
+    CONNECTOR;
 }
diff --git a/src/main/java/org/apache/nifi/documentation/init/DocumentationConnectorInitializationContext.java b/src/main/java/org/apache/nifi/documentation/init/DocumentationConnectorInitializationContext.java
new file mode 100644
index 0000000..3529a9f
--- /dev/null
+++ b/src/main/java/org/apache/nifi/documentation/init/DocumentationConnectorInitializationContext.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.documentation.init;
+
+import java.util.UUID;
+import org.apache.nifi.components.connector.ConnectorInitializationContext;
+import org.apache.nifi.components.connector.FlowUpdateException;
+import org.apache.nifi.components.connector.components.FlowContext;
+import org.apache.nifi.flow.VersionedExternalFlow;
+import org.apache.nifi.logging.ComponentLog;
+
+/**
+ * A ConnectorInitializationContext implementation for use during documentation generation.
+ * This context provides minimal functionality needed to initialize a Connector for the purposes
+ * of extracting its configuration steps and other documentation metadata.
+ */
+public class DocumentationConnectorInitializationContext implements ConnectorInitializationContext {
+    private final String uuid = UUID.randomUUID().toString();
+
+    @Override
+    public String getIdentifier() {
+        return uuid;
+    }
+
+    @Override
+    public String getName() {
+        return "DocumentationConnector";
+    }
+
+    @Override
+    public ComponentLog getLogger() {
+        return new NopComponentLog();
+    }
+
+    @Override
+    public void updateFlow(final FlowContext flowContext, final VersionedExternalFlow versionedExternalFlow) throws FlowUpdateException {
+        // No-op for documentation purposes - we don't actually update any flows
+    }
+}
+
diff --git a/src/main/java/org/apache/nifi/documentation/xml/XmlConnectorDocumentationWriter.java b/src/main/java/org/apache/nifi/documentation/xml/XmlConnectorDocumentationWriter.java
new file mode 100644
index 0000000..9fdcc19
--- /dev/null
+++ b/src/main/java/org/apache/nifi/documentation/xml/XmlConnectorDocumentationWriter.java
@@ -0,0 +1,344 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.documentation.xml;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.function.Function;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+import org.apache.nifi.annotation.documentation.DeprecationNotice;
+import org.apache.nifi.annotation.documentation.SeeAlso;
+import org.apache.nifi.components.DescribedValue;
+import org.apache.nifi.components.connector.ConfigurationStep;
+import org.apache.nifi.components.connector.ConfigurationStepDependency;
+import org.apache.nifi.components.connector.Connector;
+import org.apache.nifi.components.connector.ConnectorPropertyDependency;
+import org.apache.nifi.components.connector.ConnectorPropertyDescriptor;
+import org.apache.nifi.components.connector.ConnectorPropertyGroup;
+import org.apache.nifi.documentation.AbstractConnectorDocumentationWriter;
+import org.apache.nifi.documentation.ExtensionType;
+
+/**
+ * XML-based implementation of ConnectorDocumentationWriter.
+ * Please note that while this class lives within the nifi-api, it is provided primarily as a means for documentation components within
+ * the NiFi NAR Maven Plugin. Its home is the nifi-api, however, because the API is needed in order to extract the relevant information and
+ * the NAR Maven Plugin cannot have a direct dependency on nifi-api (doing so would cause a circular dependency). By having this homed within
+ * the nifi-api, the Maven plugin is able to discover the class dynamically and invoke the one or two methods necessary to create the documentation.
+ *
+ * This is a new capability for Connectors and therefore, you should
+ * <b>NOTE WELL:</b> At this time, while this class is part of nifi-api, it is still evolving and may change in a non-backward-compatible manner or even be
+ * removed from one incremental release to the next. Use at your own risk!
+ */
+public class XmlConnectorDocumentationWriter extends AbstractConnectorDocumentationWriter {
+    private final XMLStreamWriter writer;
+
+    public XmlConnectorDocumentationWriter(final OutputStream out) throws XMLStreamException {
+        this.writer = XMLOutputFactory.newInstance().createXMLStreamWriter(out, "UTF-8");
+    }
+
+    public XmlConnectorDocumentationWriter(final XMLStreamWriter writer) {
+        this.writer = writer;
+    }
+
+    @Override
+    protected void writeHeader(final Connector connector) throws IOException {
+        writeStartElement("extension");
+    }
+
+    @Override
+    protected void writeExtensionName(final String extensionName) throws IOException {
+        writeTextElement("name", extensionName);
+    }
+
+    @Override
+    protected void writeExtensionType(final ExtensionType extensionType) throws IOException {
+        writeTextElement("type", extensionType.name());
+    }
+
+    @Override
+    protected void writeDeprecationNotice(final DeprecationNotice deprecationNotice) throws IOException {
+        if (deprecationNotice == null) {
+            return;
+        }
+
+        final Class<?>[] classes = deprecationNotice.alternatives();
+        final String[] classNames = deprecationNotice.classNames();
+
+        final Set<String> alternatives = new LinkedHashSet<>();
+        for (final Class<?> alternativeClass : classes) {
+            alternatives.add(alternativeClass.getName());
+        }
+
+        Collections.addAll(alternatives, classNames);
+
+        writeStartElement("deprecationNotice");
+        writeTextElement("reason", deprecationNotice.reason());
+        writeTextArray("alternatives", "alternative", alternatives);
+        writeEndElement();
+    }
+
+    @Override
+    protected void writeDescription(final String description) throws IOException {
+        if (description == null) {
+            return;
+        }
+        writeTextElement("description", description);
+    }
+
+    @Override
+    protected void writeTags(final List<String> tags) throws IOException {
+        if (tags == null || tags.isEmpty()) {
+            return;
+        }
+        writeTextArray("tags", "tag", tags);
+    }
+
+    @Override
+    protected void writeConfigurationSteps(final List<ConfigurationStep> configurationSteps) throws IOException {
+        if (configurationSteps == null || configurationSteps.isEmpty()) {
+            return;
+        }
+
+        writeStartElement("configurationSteps");
+        for (final ConfigurationStep step : configurationSteps) {
+            writeConfigurationStep(step);
+        }
+        writeEndElement();
+    }
+
+    private void writeConfigurationStep(final ConfigurationStep step) throws IOException {
+        writeStartElement("configurationStep");
+
+        writeTextElement("name", step.getName());
+        if (step.getDescription() != null) {
+            writeTextElement("description", step.getDescription());
+        }
+
+        // Write step dependencies
+        final Set<ConfigurationStepDependency> stepDependencies = step.getDependencies();
+        if (stepDependencies != null && !stepDependencies.isEmpty()) {
+            writeStartElement("stepDependencies");
+            for (final ConfigurationStepDependency dependency : stepDependencies) {
+                writeConfigurationStepDependency(dependency);
+            }
+            writeEndElement();
+        }
+
+        // Write property groups
+        final List<ConnectorPropertyGroup> propertyGroups = step.getPropertyGroups();
+        if (propertyGroups != null && !propertyGroups.isEmpty()) {
+            writeStartElement("propertyGroups");
+            for (final ConnectorPropertyGroup group : propertyGroups) {
+                writePropertyGroup(group);
+            }
+            writeEndElement();
+        }
+
+        writeEndElement();
+    }
+
+    private void writeConfigurationStepDependency(final ConfigurationStepDependency dependency) throws IOException {
+        writeStartElement("stepDependency");
+
+        writeTextElement("stepName", dependency.getStepName());
+        writeTextElement("propertyName", dependency.getPropertyName());
+
+        final Set<String> dependentValues = dependency.getDependentValues();
+        if (dependentValues != null && !dependentValues.isEmpty()) {
+            writeTextArray("dependentValues", "dependentValue", dependentValues);
+        }
+
+        writeEndElement();
+    }
+
+    private void writePropertyGroup(final ConnectorPropertyGroup group) throws IOException {
+        writeStartElement("propertyGroup");
+
+        if (group.getName() != null) {
+            writeTextElement("name", group.getName());
+        }
+        if (group.getDescription() != null) {
+            writeTextElement("description", group.getDescription());
+        }
+
+        final List<ConnectorPropertyDescriptor> properties = group.getProperties();
+        if (properties != null && !properties.isEmpty()) {
+            writeStartElement("properties");
+            for (final ConnectorPropertyDescriptor property : properties) {
+                writeConnectorProperty(property);
+            }
+            writeEndElement();
+        }
+
+        writeEndElement();
+    }
+
+    private void writeConnectorProperty(final ConnectorPropertyDescriptor property) throws IOException {
+        writeStartElement("property");
+
+        writeTextElement("name", property.getName());
+        if (property.getDescription() != null) {
+            writeTextElement("description", property.getDescription());
+        }
+        if (property.getDefaultValue() != null) {
+            writeTextElement("defaultValue", property.getDefaultValue());
+        }
+        writeBooleanElement("required", property.isRequired());
+        writeTextElement("propertyType", property.getType().name());
+        writeBooleanElement("allowableValuesFetchable", property.isAllowableValuesFetchable());
+
+        // Write allowable values
+        final List<DescribedValue> allowableValues = property.getAllowableValues();
+        if (allowableValues != null && !allowableValues.isEmpty()) {
+            writeStartElement("allowableValues");
+            for (final DescribedValue value : allowableValues) {
+                writeAllowableValue(value);
+            }
+            writeEndElement();
+        }
+
+        // Write property dependencies
+        final Set<ConnectorPropertyDependency> dependencies = property.getDependencies();
+        if (dependencies != null && !dependencies.isEmpty()) {
+            writeStartElement("dependencies");
+            for (final ConnectorPropertyDependency dependency : dependencies) {
+                writePropertyDependency(dependency);
+            }
+            writeEndElement();
+        }
+
+        writeEndElement();
+    }
+
+    private void writeAllowableValue(final DescribedValue value) throws IOException {
+        writeStartElement("allowableValue");
+        writeTextElement("displayName", value.getDisplayName());
+        writeTextElement("value", value.getValue());
+        if (value.getDescription() != null) {
+            writeTextElement("description", value.getDescription());
+        }
+        writeEndElement();
+    }
+
+    private void writePropertyDependency(final ConnectorPropertyDependency dependency) throws IOException {
+        writeStartElement("dependency");
+        writeTextElement("propertyName", dependency.getPropertyName());
+
+        final Set<String> dependentValues = dependency.getDependentValues();
+        if (dependentValues != null && !dependentValues.isEmpty()) {
+            writeTextArray("dependentValues", "dependentValue", dependentValues);
+        }
+
+        writeEndElement();
+    }
+
+    @Override
+    protected void writeSeeAlso(final SeeAlso seeAlso) throws IOException {
+        if (seeAlso == null) {
+            return;
+        }
+
+        final Class<?>[] classes = seeAlso.value();
+        final String[] classNames = seeAlso.classNames();
+
+        final Set<String> toSee = new LinkedHashSet<>();
+        if (classes != null) {
+            for (final Class<?> classToSee : classes) {
+                toSee.add(classToSee.getName());
+            }
+        }
+
+        if (classNames != null) {
+            Collections.addAll(toSee, classNames);
+        }
+
+        writeTextArray("seeAlso", "see", toSee);
+    }
+
+    @Override
+    protected void writeFooter(final Connector connector) throws IOException {
+        writeEndElement();
+    }
+
+    // Utility methods for XML writing
+
+    private void writeStartElement(final String elementName) throws IOException {
+        try {
+            writer.writeStartElement(elementName);
+        } catch (final XMLStreamException e) {
+            throw new IOException(e);
+        }
+    }
+
+    private void writeEndElement() throws IOException {
+        try {
+            writer.writeEndElement();
+        } catch (final XMLStreamException e) {
+            throw new IOException(e);
+        }
+    }
+
+    private void writeTextElement(final String name, final String text) throws IOException {
+        writeStartElement(name);
+        writeText(text);
+        writeEndElement();
+    }
+
+    private void writeBooleanElement(final String name, final boolean value) throws IOException {
+        writeTextElement(name, String.valueOf(value));
+    }
+
+    private void writeText(final String text) throws IOException {
+        if (text == null) {
+            return;
+        }
+        try {
+            writer.writeCharacters(text);
+        } catch (final XMLStreamException e) {
+            throw new IOException(e);
+        }
+    }
+
+    private void writeTextArray(final String outerTagName, final String elementTagName, final Collection<String> values) throws IOException {
+        writeTextArray(outerTagName, elementTagName, values, String::toString);
+    }
+
+    private <T> void writeTextArray(final String outerTagName, final String elementTagName, final Collection<T> values, final Function<T, String> transform) throws IOException {
+        writeStartElement(outerTagName);
+
+        if (values != null) {
+            for (final T value : values) {
+                writeStartElement(elementTagName);
+                if (value != null) {
+                    writeText(transform.apply(value));
+                }
+                writeEndElement();
+            }
+        }
+
+        writeEndElement();
+    }
+
+}
+
diff --git a/src/test/java/org/apache/nifi/documentation/init/DocumentationConnectorInitializationContextTest.java b/src/test/java/org/apache/nifi/documentation/init/DocumentationConnectorInitializationContextTest.java
new file mode 100644
index 0000000..96c4dcb
--- /dev/null
+++ b/src/test/java/org/apache/nifi/documentation/init/DocumentationConnectorInitializationContextTest.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.documentation.init;
+
+import org.apache.nifi.logging.ComponentLog;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+class DocumentationConnectorInitializationContextTest {
+
+    private DocumentationConnectorInitializationContext context;
+
+    @BeforeEach
+    void setUp() {
+        context = new DocumentationConnectorInitializationContext();
+    }
+
+    @Test
+    void testGetIdentifierReturnsNonNullUUID() {
+        final String identifier = context.getIdentifier();
+
+        assertNotNull(identifier);
+    }
+
+    @Test
+    void testGetIdentifierReturnsConsistentValue() {
+        final String identifier1 = context.getIdentifier();
+        final String identifier2 = context.getIdentifier();
+
+        assertEquals(identifier1, identifier2);
+    }
+
+    @Test
+    void testDifferentInstancesHaveDifferentIdentifiers() {
+        final DocumentationConnectorInitializationContext otherContext = new DocumentationConnectorInitializationContext();
+
+        assertNotEquals(context.getIdentifier(), otherContext.getIdentifier());
+    }
+
+    @Test
+    void testGetNameReturnsExpectedValue() {
+        assertEquals("DocumentationConnector", context.getName());
+    }
+
+    @Test
+    void testGetLoggerReturnsNopComponentLog() {
+        final ComponentLog logger = context.getLogger();
+
+        assertNotNull(logger);
+        assertEquals(NopComponentLog.class, logger.getClass());
+    }
+
+    @Test
+    void testUpdateFlowDoesNotThrow() throws Exception {
+        // updateFlow is a no-op for documentation purposes, should not throw
+        context.updateFlow(null, null);
+    }
+}
+
diff --git a/src/test/java/org/apache/nifi/documentation/xml/XmlConnectorDocumentationWriterTest.java b/src/test/java/org/apache/nifi/documentation/xml/XmlConnectorDocumentationWriterTest.java
new file mode 100644
index 0000000..dc5912d
--- /dev/null
+++ b/src/test/java/org/apache/nifi/documentation/xml/XmlConnectorDocumentationWriterTest.java
@@ -0,0 +1,866 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.documentation.xml;
+
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.DeprecationNotice;
+import org.apache.nifi.annotation.documentation.SeeAlso;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.components.AllowableValue;
+import org.apache.nifi.components.ConfigVerificationResult;
+import org.apache.nifi.components.connector.AbstractConnector;
+import org.apache.nifi.components.connector.ConfigurationStep;
+import org.apache.nifi.components.connector.Connector;
+import org.apache.nifi.components.connector.ConnectorPropertyDescriptor;
+import org.apache.nifi.components.connector.ConnectorPropertyGroup;
+import org.apache.nifi.components.connector.PropertyType;
+import org.apache.nifi.components.connector.components.FlowContext;
+import org.apache.nifi.documentation.ExtensionType;
+import org.apache.nifi.flow.VersionedExternalFlow;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.junit.jupiter.MockitoExtension;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamWriter;
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+@ExtendWith(MockitoExtension.class)
+class XmlConnectorDocumentationWriterTest {
+
+    @Test
+    void testWriteMinimalConnector() throws Exception {
+        final Connector connector = new MinimalConnector();
+        final Document document = writeDocumentation(connector);
+
+        assertExtensionNameTypeFound(connector, ExtensionType.CONNECTOR, document);
+    }
+
+    @Test
+    void testWriteConnectorWithDescription() throws Exception {
+        final Connector connector = new DescribedConnector();
+        final Document document = writeDocumentation(connector);
+
+        assertExtensionNameTypeFound(connector, ExtensionType.CONNECTOR, document);
+
+        final Node descriptionNode = findNode("/extension/description", document);
+        assertNotNull(descriptionNode);
+        assertEquals("A connector with a description", descriptionNode.getTextContent());
+    }
+
+    @Test
+    void testWriteConnectorWithTags() throws Exception {
+        final Connector connector = new TaggedConnector();
+        final Document document = writeDocumentation(connector);
+
+        assertExtensionNameTypeFound(connector, ExtensionType.CONNECTOR, document);
+
+        final Node tagsNode = findNode("/extension/tags", document);
+        assertNotNull(tagsNode);
+
+        final List<String> tagValues = new ArrayList<>();
+        final NodeList tagNodes = tagsNode.getChildNodes();
+        for (int i = 0; i < tagNodes.getLength(); i++) {
+            final Node tagNode = tagNodes.item(i);
+            assertEquals("tag", tagNode.getNodeName());
+            tagValues.add(tagNode.getTextContent());
+        }
+
+        assertEquals(List.of("test", "documentation", "connector"), tagValues);
+    }
+
+    @Test
+    void testWriteDeprecatedConnector() throws Exception {
+        final Connector connector = new DeprecatedConnector();
+        final Document document = writeDocumentation(connector);
+
+        assertExtensionNameTypeFound(connector, ExtensionType.CONNECTOR, document);
+
+        final Node deprecationNoticeNode = findNode("/extension/deprecationNotice", document);
+        assertNotNull(deprecationNoticeNode);
+
+        final Node reasonNode = findNode("/extension/deprecationNotice/reason", document);
+        assertNotNull(reasonNode);
+        assertEquals("Use a different connector", reasonNode.getTextContent());
+    }
+
+    @Test
+    void testWriteConnectorWithSeeAlso() throws Exception {
+        final Connector connector = new SeeAlsoConnector();
+        final Document document = writeDocumentation(connector);
+
+        assertExtensionNameTypeFound(connector, ExtensionType.CONNECTOR, document);
+
+        final Node seeAlsoNode = findNode("/extension/seeAlso", document);
+        assertNotNull(seeAlsoNode);
+
+        final List<String> seeAlsoValues = new ArrayList<>();
+        final NodeList seeNodes = seeAlsoNode.getChildNodes();
+        for (int i = 0; i < seeNodes.getLength(); i++) {
+            final Node seeNode = seeNodes.item(i);
+            assertEquals("see", seeNode.getNodeName());
+            seeAlsoValues.add(seeNode.getTextContent());
+        }
+
+        assertEquals(1, seeAlsoValues.size());
+        assertEquals("org.apache.nifi.documentation.xml.XmlConnectorDocumentationWriterTest$MinimalConnector", seeAlsoValues.getFirst());
+    }
+
+    @Test
+    void testWriteConnectorWithConfigurationSteps() throws Exception {
+        final Connector connector = new ConnectorWithConfigurationSteps();
+        final Document document = writeDocumentation(connector);
+
+        assertExtensionNameTypeFound(connector, ExtensionType.CONNECTOR, document);
+
+        final Node configStepsNode = findNode("/extension/configurationSteps", document);
+        assertNotNull(configStepsNode);
+
+        final Node firstStepNode = findNode("/extension/configurationSteps/configurationStep[name='Step One']", document);
+        assertNotNull(firstStepNode);
+
+        final Node stepNameNode = findNode("/extension/configurationSteps/configurationStep/name", document);
+        assertNotNull(stepNameNode);
+        assertEquals("Step One", stepNameNode.getTextContent());
+
+        final Node stepDescriptionNode = findNode("/extension/configurationSteps/configurationStep/description", document);
+        assertNotNull(stepDescriptionNode);
+        assertEquals("First configuration step", stepDescriptionNode.getTextContent());
+    }
+
+    @Test
+    void testWriteConnectorWithConfigurationStepWithoutDescription() throws Exception {
+        final Connector connector = new ConnectorWithStepWithoutDescription();
+        final Document document = writeDocumentation(connector);
+
+        assertExtensionNameTypeFound(connector, ExtensionType.CONNECTOR, document);
+
+        final Node stepNameNode = findNode("/extension/configurationSteps/configurationStep/name", document);
+        assertNotNull(stepNameNode);
+        assertEquals("Minimal Step", stepNameNode.getTextContent());
+
+        // Step description is optional - should not be present when not provided
+        final Node stepDescriptionNode = findNode("/extension/configurationSteps/configurationStep/description", document);
+        assertNull(stepDescriptionNode);
+    }
+
+    @Test
+    void testWriteConnectorWithPropertyGroups() throws Exception {
+        final Connector connector = new ConnectorWithPropertyGroups();
+        final Document document = writeDocumentation(connector);
+
+        assertExtensionNameTypeFound(connector, ExtensionType.CONNECTOR, document);
+
+        final Node propertyGroupsNode = findNode("/extension/configurationSteps/configurationStep/propertyGroups", document);
+        assertNotNull(propertyGroupsNode);
+
+        final Node propertyGroupNode = findNode("/extension/configurationSteps/configurationStep/propertyGroups/propertyGroup", document);
+        assertNotNull(propertyGroupNode);
+
+        final Node groupNameNode = findNode("/extension/configurationSteps/configurationStep/propertyGroups/propertyGroup/name", document);
+        assertNotNull(groupNameNode);
+        assertEquals("Connection Settings", groupNameNode.getTextContent());
+    }
+
+    @Test
+    void testWriteConnectorWithProperties() throws Exception {
+        final Connector connector = new ConnectorWithProperties();
+        final Document document = writeDocumentation(connector);
+
+        assertExtensionNameTypeFound(connector, ExtensionType.CONNECTOR, document);
+
+        final Node propertiesNode = findNode("/extension/configurationSteps/configurationStep/propertyGroups/propertyGroup/properties", document);
+        assertNotNull(propertiesNode);
+
+        final Node propertyNode = findNode("/extension/configurationSteps/configurationStep/propertyGroups/propertyGroup/properties/property", document);
+        assertNotNull(propertyNode);
+
+        final Node propertyNameNode = findNode("/extension/configurationSteps/configurationStep/propertyGroups/propertyGroup/properties/property/name", document);
+        assertNotNull(propertyNameNode);
+        assertEquals("Hostname", propertyNameNode.getTextContent());
+
+        final Node propertyDescriptionNode = findNode("/extension/configurationSteps/configurationStep/propertyGroups/propertyGroup/properties/property/description", document);
+        assertNotNull(propertyDescriptionNode);
+        assertEquals("The hostname to connect to", propertyDescriptionNode.getTextContent());
+
+        final Node propertyRequiredNode = findNode("/extension/configurationSteps/configurationStep/propertyGroups/propertyGroup/properties/property/required", document);
+        assertNotNull(propertyRequiredNode);
+        assertEquals("true", propertyRequiredNode.getTextContent());
+
+        final Node propertyTypeNode = findNode("/extension/configurationSteps/configurationStep/propertyGroups/propertyGroup/properties/property/propertyType", document);
+        assertNotNull(propertyTypeNode);
+        assertEquals("STRING", propertyTypeNode.getTextContent());
+    }
+
+    @Test
+    void testWriteConnectorWithPropertyDefaultValue() throws Exception {
+        final Connector connector = new ConnectorWithPropertyDefaultValue();
+        final Document document = writeDocumentation(connector);
+
+        final Node defaultValueNode = findNode("/extension/configurationSteps/configurationStep/propertyGroups/propertyGroup/properties/property/defaultValue", document);
+        assertNotNull(defaultValueNode);
+        assertEquals("localhost", defaultValueNode.getTextContent());
+    }
+
+    @Test
+    void testWriteConnectorWithAllowableValues() throws Exception {
+        final Connector connector = new ConnectorWithAllowableValues();
+        final Document document = writeDocumentation(connector);
+
+        final Node allowableValuesNode = findNode("/extension/configurationSteps/configurationStep/propertyGroups/propertyGroup/properties/property/allowableValues", document);
+        assertNotNull(allowableValuesNode);
+
+        final List<String> allowableValues = new ArrayList<>();
+        final NodeList valueNodes = allowableValuesNode.getChildNodes();
+        for (int i = 0; i < valueNodes.getLength(); i++) {
+            final Node valueNode = valueNodes.item(i);
+            if ("allowableValue".equals(valueNode.getNodeName())) {
+                final Node valueTextNode = findNode("value", valueNode);
+                if (valueTextNode != null) {
+                    allowableValues.add(valueTextNode.getTextContent());
+                }
+            }
+        }
+
+        assertEquals(List.of("TCP", "UDP"), allowableValues);
+    }
+
+    @Test
+    void testWriteConnectorWithPropertyDependencies() throws Exception {
+        final Connector connector = new ConnectorWithPropertyDependencies();
+        final Document document = writeDocumentation(connector);
+
+        final Node dependenciesNode = findNode("/extension/configurationSteps/configurationStep/propertyGroups/propertyGroup/properties/property[name='Port']/dependencies", document);
+        assertNotNull(dependenciesNode);
+
+        final Node dependencyNode = findNode("/extension/configurationSteps/configurationStep/propertyGroups/propertyGroup/properties/property[name='Port']/dependencies/dependency", document);
+        assertNotNull(dependencyNode);
+
+        final Node dependencyPropertyNameNode = findNode(
+                "/extension/configurationSteps/configurationStep/propertyGroups/propertyGroup/properties/property[name='Port']/dependencies/dependency/propertyName",
+                document);
+        assertNotNull(dependencyPropertyNameNode);
+        assertEquals("Hostname", dependencyPropertyNameNode.getTextContent());
+    }
+
+    @Test
+    void testWriteConnectorWithStepDependencies() throws Exception {
+        final Connector connector = new ConnectorWithStepDependencies();
+        final Document document = writeDocumentation(connector);
+
+        final Node stepDependenciesNode = findNode("/extension/configurationSteps/configurationStep[name='Step Two']/stepDependencies", document);
+        assertNotNull(stepDependenciesNode);
+
+        final Node stepDependencyNode = findNode("/extension/configurationSteps/configurationStep[name='Step Two']/stepDependencies/stepDependency", document);
+        assertNotNull(stepDependencyNode);
+
+        final Node stepNameNode = findNode("/extension/configurationSteps/configurationStep[name='Step Two']/stepDependencies/stepDependency/stepName", document);
+        assertNotNull(stepNameNode);
+        assertEquals("Step One", stepNameNode.getTextContent());
+
+        final Node propertyNameNode = findNode("/extension/configurationSteps/configurationStep[name='Step Two']/stepDependencies/stepDependency/propertyName", document);
+        assertNotNull(propertyNameNode);
+        assertEquals("Enable Advanced", propertyNameNode.getTextContent());
+    }
+
+    @Test
+    void testWriteConnectorWithFetchableAllowableValues() throws Exception {
+        final Connector connector = new ConnectorWithFetchableAllowableValues();
+        final Document document = writeDocumentation(connector);
+
+        final Node allowableValuesFetchableNode = findNode("/extension/configurationSteps/configurationStep/propertyGroups/propertyGroup/properties/property/allowableValuesFetchable", document);
+        assertNotNull(allowableValuesFetchableNode);
+        assertEquals("true", allowableValuesFetchableNode.getTextContent());
+    }
+
+    @Test
+    void testWriteConnectorWithNoDescription() throws Exception {
+        final Connector connector = new MinimalConnector();
+        final Document document = writeDocumentation(connector);
+
+        final Node descriptionNode = findNode("/extension/description", document);
+        assertNull(descriptionNode);
+    }
+
+    @Test
+    void testWriteConnectorWithNoTags() throws Exception {
+        final Connector connector = new MinimalConnector();
+        final Document document = writeDocumentation(connector);
+
+        final Node tagsNode = findNode("/extension/tags", document);
+        assertNull(tagsNode);
+    }
+
+    @Test
+    void testWriteConnectorWithPropertyDependencyValues() throws Exception {
+        final Connector connector = new ConnectorWithPropertyDependencyValues();
+        final Document document = writeDocumentation(connector);
+
+        final String xpath = "/extension/configurationSteps/configurationStep/propertyGroups/propertyGroup"
+            + "/properties/property[name='Advanced Setting']/dependencies/dependency/dependentValues";
+        final Node dependentValuesNode = findNode(xpath, document);
+        assertNotNull(dependentValuesNode);
+
+        final List<String> dependentValues = new ArrayList<>();
+        final NodeList valueNodes = dependentValuesNode.getChildNodes();
+        for (int i = 0; i < valueNodes.getLength(); i++) {
+            final Node valueNode = valueNodes.item(i);
+            if ("dependentValue".equals(valueNode.getNodeName())) {
+                dependentValues.add(valueNode.getTextContent());
+            }
+        }
+
+        assertEquals(2, dependentValues.size());
+        assertTrue(dependentValues.contains("advanced"));
+        assertTrue(dependentValues.contains("expert"));
+    }
+
+    @Test
+    void testWriteConnectorWithStepDependencyValues() throws Exception {
+        final Connector connector = new ConnectorWithStepDependencyValues();
+        final Document document = writeDocumentation(connector);
+
+        final Node dependentValuesNode = findNode("/extension/configurationSteps/configurationStep[name='Step Two']/stepDependencies/stepDependency/dependentValues", document);
+        assertNotNull(dependentValuesNode);
+
+        final List<String> dependentValues = new ArrayList<>();
+        final NodeList valueNodes = dependentValuesNode.getChildNodes();
+        for (int i = 0; i < valueNodes.getLength(); i++) {
+            final Node valueNode = valueNodes.item(i);
+            if ("dependentValue".equals(valueNode.getNodeName())) {
+                dependentValues.add(valueNode.getTextContent());
+            }
+        }
+
+        assertEquals(1, dependentValues.size());
+        assertEquals("true", dependentValues.getFirst());
+    }
+
+    @Test
+    void testWriteConnectorWithMultipleConfigurationSteps() throws Exception {
+        final Connector connector = new ConnectorWithMultipleSteps();
+        final Document document = writeDocumentation(connector);
+
+        final Node configStepsNode = findNode("/extension/configurationSteps", document);
+        assertNotNull(configStepsNode);
+
+        final List<String> stepNames = new ArrayList<>();
+        final NodeList stepNodes = configStepsNode.getChildNodes();
+        for (int i = 0; i < stepNodes.getLength(); i++) {
+            final Node stepNode = stepNodes.item(i);
+            if ("configurationStep".equals(stepNode.getNodeName())) {
+                final Node nameNode = findNode("name", stepNode);
+                if (nameNode != null) {
+                    stepNames.add(nameNode.getTextContent());
+                }
+            }
+        }
+
+        assertEquals(List.of("Connection", "Authentication", "Advanced"), stepNames);
+    }
+
+    @Test
+    void testWriteConnectorWithIntegerPropertyType() throws Exception {
+        final Connector connector = new ConnectorWithIntegerProperty();
+        final Document document = writeDocumentation(connector);
+
+        final Node propertyTypeNode = findNode("/extension/configurationSteps/configurationStep/propertyGroups/propertyGroup/properties/property/propertyType", document);
+        assertNotNull(propertyTypeNode);
+        assertEquals("INTEGER", propertyTypeNode.getTextContent());
+    }
+
+    @Test
+    void testWriteConnectorWithBooleanPropertyType() throws Exception {
+        final Connector connector = new ConnectorWithBooleanProperty();
+        final Document document = writeDocumentation(connector);
+
+        final Node propertyTypeNode = findNode("/extension/configurationSteps/configurationStep/propertyGroups/propertyGroup/properties/property/propertyType", document);
+        assertNotNull(propertyTypeNode);
+        assertEquals("BOOLEAN", propertyTypeNode.getTextContent());
+    }
+
+    private Node findNode(final String expression, final Node node) throws XPathExpressionException {
+        final XPathFactory factory = XPathFactory.newInstance();
+        final XPath path = factory.newXPath();
+
+        return path.evaluateExpression(expression, node, Node.class);
+    }
+
+    private void assertExtensionNameTypeFound(final Connector connector, final ExtensionType expectedExtensionType, final Document document) {
+        assertNotNull(document);
+
+        final Node extensionNode = document.getFirstChild();
+        assertEquals("extension", extensionNode.getNodeName());
+
+        final Node nameNode = extensionNode.getFirstChild();
+        assertEquals("name", nameNode.getNodeName());
+        assertEquals(connector.getClass().getName(), nameNode.getTextContent());
+
+        final Node typeNode = nameNode.getNextSibling();
+        assertEquals("type", typeNode.getNodeName());
+        assertEquals(expectedExtensionType.name(), typeNode.getTextContent());
+    }
+
+    private Document writeDocumentation(final Connector connector) throws Exception {
+        final XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
+        final DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+        final DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
+        final Document document = documentBuilder.newDocument();
+
+        final DOMResult result = new DOMResult(document);
+        final XMLStreamWriter streamWriter = outputFactory.createXMLStreamWriter(result);
+
+        final XmlConnectorDocumentationWriter documentationWriter = new XmlConnectorDocumentationWriter(streamWriter);
+
+        try {
+            documentationWriter.initialize(connector);
+            documentationWriter.write(connector);
+        } finally {
+            streamWriter.close();
+        }
+
+        return document;
+    }
+
+    // Test Connector implementations
+
+    private static class MinimalConnector extends AbstractConnector {
+        @Override
+        public VersionedExternalFlow getInitialFlow() {
+            return null;
+        }
+
+        @Override
+        public List<ConfigurationStep> getConfigurationSteps() {
+            return Collections.emptyList();
+        }
+
+        @Override
+        protected void onStepConfigured(final String stepName, final FlowContext workingContext) {
+        }
+
+        @Override
+        public void applyUpdate(final FlowContext workingFlowContext, final FlowContext activeFlowContext) {
+        }
+
+        @Override
+        public List<ConfigVerificationResult> verifyConfigurationStep(final String stepName, final Map<String, String> overrides, final FlowContext flowContext) {
+            return Collections.emptyList();
+        }
+    }
+
+    @CapabilityDescription("A connector with a description")
+    private static class DescribedConnector extends MinimalConnector {
+    }
+
+    @Tags({"test", "documentation", "connector"})
+    private static class TaggedConnector extends MinimalConnector {
+    }
+
+    @DeprecationNotice(reason = "Use a different connector")
+    private static class DeprecatedConnector extends MinimalConnector {
+    }
+
+    @SeeAlso(classNames = "org.apache.nifi.documentation.xml.XmlConnectorDocumentationWriterTest$MinimalConnector")
+    private static class SeeAlsoConnector extends MinimalConnector {
+    }
+
+    private static class ConnectorWithConfigurationSteps extends MinimalConnector {
+        @Override
+        public List<ConfigurationStep> getConfigurationSteps() {
+            return List.of(
+                new ConfigurationStep.Builder()
+                    .name("Step One")
+                    .description("First configuration step")
+                    .build()
+            );
+        }
+    }
+
+    private static class ConnectorWithStepWithoutDescription extends MinimalConnector {
+        @Override
+        public List<ConfigurationStep> getConfigurationSteps() {
+            return List.of(
+                new ConfigurationStep.Builder()
+                    .name("Minimal Step")
+                    .build()
+            );
+        }
+    }
+
+    private static class ConnectorWithPropertyGroups extends MinimalConnector {
+        @Override
+        public List<ConfigurationStep> getConfigurationSteps() {
+            final ConnectorPropertyGroup group = ConnectorPropertyGroup.builder()
+                .name("Connection Settings")
+                .description("Settings for connection")
+                .build();
+
+            return List.of(
+                new ConfigurationStep.Builder()
+                    .name("Connection Step")
+                    .propertyGroups(List.of(group))
+                    .build()
+            );
+        }
+    }
+
+    private static class ConnectorWithProperties extends MinimalConnector {
+        @Override
+        public List<ConfigurationStep> getConfigurationSteps() {
+            final ConnectorPropertyDescriptor property = new ConnectorPropertyDescriptor.Builder()
+                .name("Hostname")
+                .description("The hostname to connect to")
+                .required(true)
+                .type(PropertyType.STRING)
+                .build();
+
+            final ConnectorPropertyGroup group = ConnectorPropertyGroup.builder()
+                .name("Connection Settings")
+                .addProperty(property)
+                .build();
+
+            return List.of(
+                new ConfigurationStep.Builder()
+                    .name("Connection Step")
+                    .propertyGroups(List.of(group))
+                    .build()
+            );
+        }
+    }
+
+    private static class ConnectorWithPropertyDefaultValue extends MinimalConnector {
+        @Override
+        public List<ConfigurationStep> getConfigurationSteps() {
+            final ConnectorPropertyDescriptor property = new ConnectorPropertyDescriptor.Builder()
+                .name("Hostname")
+                .description("The hostname to connect to")
+                .defaultValue("localhost")
+                .type(PropertyType.STRING)
+                .build();
+
+            final ConnectorPropertyGroup group = ConnectorPropertyGroup.builder()
+                .name("Connection Settings")
+                .addProperty(property)
+                .build();
+
+            return List.of(
+                new ConfigurationStep.Builder()
+                    .name("Connection Step")
+                    .propertyGroups(List.of(group))
+                    .build()
+            );
+        }
+    }
+
+    private static class ConnectorWithAllowableValues extends MinimalConnector {
+        @Override
+        public List<ConfigurationStep> getConfigurationSteps() {
+            final ConnectorPropertyDescriptor property = new ConnectorPropertyDescriptor.Builder()
+                .name("Protocol")
+                .description("The protocol to use")
+                .allowableValues(
+                    new AllowableValue("TCP", "TCP", "Transmission Control Protocol"),
+                    new AllowableValue("UDP", "UDP", "User Datagram Protocol")
+                )
+                .type(PropertyType.STRING)
+                .build();
+
+            final ConnectorPropertyGroup group = ConnectorPropertyGroup.builder()
+                .name("Protocol Settings")
+                .addProperty(property)
+                .build();
+
+            return List.of(
+                new ConfigurationStep.Builder()
+                    .name("Protocol Step")
+                    .propertyGroups(List.of(group))
+                    .build()
+            );
+        }
+    }
+
+    private static class ConnectorWithPropertyDependencies extends MinimalConnector {
+        @Override
+        public List<ConfigurationStep> getConfigurationSteps() {
+            final ConnectorPropertyDescriptor hostnameProperty = new ConnectorPropertyDescriptor.Builder()
+                .name("Hostname")
+                .description("The hostname to connect to")
+                .type(PropertyType.STRING)
+                .build();
+
+            final ConnectorPropertyDescriptor portProperty = new ConnectorPropertyDescriptor.Builder()
+                .name("Port")
+                .description("The port to connect to")
+                .type(PropertyType.INTEGER)
+                .dependsOn(hostnameProperty)
+                .build();
+
+            final ConnectorPropertyGroup group = ConnectorPropertyGroup.builder()
+                .name("Connection Settings")
+                .addProperty(hostnameProperty)
+                .addProperty(portProperty)
+                .build();
+
+            return List.of(
+                new ConfigurationStep.Builder()
+                    .name("Connection Step")
+                    .propertyGroups(List.of(group))
+                    .build()
+            );
+        }
+    }
+
+    private static class ConnectorWithStepDependencies extends MinimalConnector {
+        @Override
+        public List<ConfigurationStep> getConfigurationSteps() {
+            final ConnectorPropertyDescriptor enableAdvanced = new ConnectorPropertyDescriptor.Builder()
+                .name("Enable Advanced")
+                .description("Enable advanced settings")
+                .type(PropertyType.BOOLEAN)
+                .build();
+
+            final ConnectorPropertyGroup group1 = ConnectorPropertyGroup.builder()
+                .name("Basic Settings")
+                .addProperty(enableAdvanced)
+                .build();
+
+            final ConfigurationStep step1 = new ConfigurationStep.Builder()
+                .name("Step One")
+                .propertyGroups(List.of(group1))
+                .build();
+
+            final ConnectorPropertyDescriptor advancedProperty = new ConnectorPropertyDescriptor.Builder()
+                .name("Advanced Setting")
+                .description("An advanced setting")
+                .type(PropertyType.STRING)
+                .build();
+
+            final ConnectorPropertyGroup group2 = ConnectorPropertyGroup.builder()
+                .name("Advanced Settings")
+                .addProperty(advancedProperty)
+                .build();
+
+            final ConfigurationStep step2 = new ConfigurationStep.Builder()
+                .name("Step Two")
+                .propertyGroups(List.of(group2))
+                .dependsOn(step1, enableAdvanced, "true")
+                .build();
+
+            return List.of(step1, step2);
+        }
+    }
+
+    private static class ConnectorWithFetchableAllowableValues extends MinimalConnector {
+        @Override
+        public List<ConfigurationStep> getConfigurationSteps() {
+            final ConnectorPropertyDescriptor property = new ConnectorPropertyDescriptor.Builder()
+                .name("Dynamic Options")
+                .description("Options that are fetched dynamically")
+                .allowableValuesFetchable(true)
+                .type(PropertyType.STRING)
+                .build();
+
+            final ConnectorPropertyGroup group = ConnectorPropertyGroup.builder()
+                .name("Dynamic Settings")
+                .addProperty(property)
+                .build();
+
+            return List.of(
+                new ConfigurationStep.Builder()
+                    .name("Dynamic Step")
+                    .propertyGroups(List.of(group))
+                    .build()
+            );
+        }
+    }
+
+    private static class ConnectorWithPropertyDependencyValues extends MinimalConnector {
+        @Override
+        public List<ConfigurationStep> getConfigurationSteps() {
+            final ConnectorPropertyDescriptor modeProperty = new ConnectorPropertyDescriptor.Builder()
+                .name("Mode")
+                .description("The mode of operation")
+                .type(PropertyType.STRING)
+                .allowableValues("basic", "advanced", "expert")
+                .build();
+
+            final ConnectorPropertyDescriptor advancedProperty = new ConnectorPropertyDescriptor.Builder()
+                .name("Advanced Setting")
+                .description("An advanced setting")
+                .type(PropertyType.STRING)
+                .dependsOn(modeProperty, "advanced", "expert")
+                .build();
+
+            final ConnectorPropertyGroup group = ConnectorPropertyGroup.builder()
+                .name("Settings")
+                .addProperty(modeProperty)
+                .addProperty(advancedProperty)
+                .build();
+
+            return List.of(
+                new ConfigurationStep.Builder()
+                    .name("Settings Step")
+                    .propertyGroups(List.of(group))
+                    .build()
+            );
+        }
+    }
+
+    private static class ConnectorWithStepDependencyValues extends MinimalConnector {
+        @Override
+        public List<ConfigurationStep> getConfigurationSteps() {
+            final ConnectorPropertyDescriptor enableAdvanced = new ConnectorPropertyDescriptor.Builder()
+                .name("Enable Advanced")
+                .description("Enable advanced settings")
+                .type(PropertyType.BOOLEAN)
+                .allowableValues("true", "false")
+                .defaultValue("false")
+                .build();
+
+            final ConnectorPropertyGroup group1 = ConnectorPropertyGroup.builder()
+                .name("Basic Settings")
+                .addProperty(enableAdvanced)
+                .build();
+
+            final ConfigurationStep step1 = new ConfigurationStep.Builder()
+                .name("Step One")
+                .propertyGroups(List.of(group1))
+                .build();
+
+            final ConnectorPropertyDescriptor advancedProperty = new ConnectorPropertyDescriptor.Builder()
+                .name("Advanced Setting")
+                .description("An advanced setting")
+                .type(PropertyType.STRING)
+                .build();
+
+            final ConnectorPropertyGroup group2 = ConnectorPropertyGroup.builder()
+                .name("Advanced Settings")
+                .addProperty(advancedProperty)
+                .build();
+
+            final ConfigurationStep step2 = new ConfigurationStep.Builder()
+                .name("Step Two")
+                .propertyGroups(List.of(group2))
+                .dependsOn(step1, enableAdvanced, "true")
+                .build();
+
+            return List.of(step1, step2);
+        }
+    }
+
+    private static class ConnectorWithMultipleSteps extends MinimalConnector {
+        @Override
+        public List<ConfigurationStep> getConfigurationSteps() {
+            final ConnectorPropertyGroup connectionGroup = ConnectorPropertyGroup.builder()
+                .name("Connection")
+                .build();
+
+            final ConnectorPropertyGroup authGroup = ConnectorPropertyGroup.builder()
+                .name("Auth")
+                .build();
+
+            final ConnectorPropertyGroup advancedGroup = ConnectorPropertyGroup.builder()
+                .name("Options")
+                .build();
+
+            return List.of(
+                new ConfigurationStep.Builder()
+                    .name("Connection")
+                    .description("Connection settings")
+                    .propertyGroups(List.of(connectionGroup))
+                    .build(),
+                new ConfigurationStep.Builder()
+                    .name("Authentication")
+                    .description("Authentication settings")
+                    .propertyGroups(List.of(authGroup))
+                    .build(),
+                new ConfigurationStep.Builder()
+                    .name("Advanced")
+                    .description("Advanced settings")
+                    .propertyGroups(List.of(advancedGroup))
+                    .build()
+            );
+        }
+    }
+
+    private static class ConnectorWithIntegerProperty extends MinimalConnector {
+        @Override
+        public List<ConfigurationStep> getConfigurationSteps() {
+            final ConnectorPropertyDescriptor property = new ConnectorPropertyDescriptor.Builder()
+                .name("Port")
+                .description("The port number")
+                .type(PropertyType.INTEGER)
+                .defaultValue("8080")
+                .build();
+
+            final ConnectorPropertyGroup group = ConnectorPropertyGroup.builder()
+                .name("Connection")
+                .addProperty(property)
+                .build();
+
+            return List.of(
+                new ConfigurationStep.Builder()
+                    .name("Connection Step")
+                    .propertyGroups(List.of(group))
+                    .build()
+            );
+        }
+    }
+
+    private static class ConnectorWithBooleanProperty extends MinimalConnector {
+        @Override
+        public List<ConfigurationStep> getConfigurationSteps() {
+            final ConnectorPropertyDescriptor property = new ConnectorPropertyDescriptor.Builder()
+                .name("Enabled")
+                .description("Whether the feature is enabled")
+                .type(PropertyType.BOOLEAN)
+                .defaultValue("true")
+                .build();
+
+            final ConnectorPropertyGroup group = ConnectorPropertyGroup.builder()
+                .name("Settings")
+                .addProperty(property)
+                .build();
+
+            return List.of(
+                new ConfigurationStep.Builder()
+                    .name("Settings Step")
+                    .propertyGroups(List.of(group))
+                    .build()
+            );
+        }
+    }
+}
+


(nifi-api) 26/27: NIFI-15557: Allow Connectors to enable a Controller Service using overridden property values (#63)

Posted by ma...@apache.org.
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-api.git

commit 9e809ade51fa1dd93a738e4be44a0dd716e5c57a
Author: Mark Payne <ma...@hotmail.com>
AuthorDate: Thu Feb 5 12:44:09 2026 -0500

    NIFI-15557: Allow Connectors to enable a Controller Service using overridden property values (#63)
---
 .../connector/components/ControllerServiceLifecycle.java      | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/main/java/org/apache/nifi/components/connector/components/ControllerServiceLifecycle.java b/src/main/java/org/apache/nifi/components/connector/components/ControllerServiceLifecycle.java
index 230391a..eca97b4 100644
--- a/src/main/java/org/apache/nifi/components/connector/components/ControllerServiceLifecycle.java
+++ b/src/main/java/org/apache/nifi/components/connector/components/ControllerServiceLifecycle.java
@@ -17,6 +17,7 @@
 
 package org.apache.nifi.components.connector.components;
 
+import java.util.Map;
 import java.util.concurrent.CompletableFuture;
 
 public interface ControllerServiceLifecycle {
@@ -25,6 +26,16 @@ public interface ControllerServiceLifecycle {
 
     CompletableFuture<Void> enable();
 
+    /**
+     * Enables the Controller Service using the provided property value overrides. The overrides are merged with
+     * the currently configured property values, with the overrides taking precedence. This allows enabling a service
+     * with temporary property value overrides without modifying the service's configuration.
+     *
+     * @param propertyValueOverrides the property value overrides to apply when enabling the service
+     * @return a CompletableFuture that completes when the service has been enabled
+     */
+    CompletableFuture<Void> enable(Map<String, String> propertyValueOverrides);
+
     CompletableFuture<Void> disable();
 
 }


(nifi-api) 25/27: NIFI-15480: Added DropFlowFileSummary, ability to drop FlowFiles from a ConnectionFacade / ProcessGroupFacade (#62)

Posted by ma...@apache.org.
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-api.git

commit 39aa9dcb790485fa599ed590b83a9026fe4eace8
Author: Mark Payne <ma...@hotmail.com>
AuthorDate: Tue Feb 3 17:06:51 2026 -0500

    NIFI-15480: Added DropFlowFileSummary, ability to drop FlowFiles from a ConnectionFacade / ProcessGroupFacade (#62)
---
 .../components/connector/DropFlowFileSummary.java  | 69 ++++++++++++++++++++++
 .../connector/components/ConnectionFacade.java     | 14 +++++
 .../connector/components/ProcessGroupFacade.java   | 14 +++++
 3 files changed, 97 insertions(+)

diff --git a/src/main/java/org/apache/nifi/components/connector/DropFlowFileSummary.java b/src/main/java/org/apache/nifi/components/connector/DropFlowFileSummary.java
new file mode 100644
index 0000000..f8abf0b
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/DropFlowFileSummary.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector;
+
+/**
+ * A summary of FlowFiles that were dropped from a FlowFile Queue.
+ * This class provides information about the number of FlowFiles dropped
+ * and the total aggregate size in bytes of those FlowFiles.
+ */
+public class DropFlowFileSummary {
+
+    private final int droppedCount;
+    private final long droppedBytes;
+
+    /**
+     * Creates a new DropFlowFileSummary with the given count and byte size.
+     *
+     * @param droppedCount the number of FlowFiles that were dropped
+     * @param droppedBytes the total size in bytes of all dropped FlowFiles
+     */
+    public DropFlowFileSummary(final int droppedCount, final long droppedBytes) {
+        this.droppedCount = droppedCount;
+        this.droppedBytes = droppedBytes;
+    }
+
+    /**
+     * @return the number of FlowFiles that were dropped
+     */
+    public int getDroppedCount() {
+        return droppedCount;
+    }
+
+    /**
+     * @return the total size in bytes of all dropped FlowFiles
+     */
+    public long getDroppedBytes() {
+        return droppedBytes;
+    }
+
+    /**
+     * Creates a new DropFlowFileSummary that represents the combination of this summary and the given summary.
+     *
+     * @param other the other summary to add to this one
+     * @return a new DropFlowFileSummary representing the combined totals
+     */
+    public DropFlowFileSummary add(final DropFlowFileSummary other) {
+        return new DropFlowFileSummary(this.droppedCount + other.droppedCount, this.droppedBytes + other.droppedBytes);
+    }
+
+    @Override
+    public String toString() {
+        return "DropFlowFileSummary[droppedCount=" + droppedCount + ", droppedBytes=" + droppedBytes + "]";
+    }
+}
diff --git a/src/main/java/org/apache/nifi/components/connector/components/ConnectionFacade.java b/src/main/java/org/apache/nifi/components/connector/components/ConnectionFacade.java
index 58cbac2..ff17d2b 100644
--- a/src/main/java/org/apache/nifi/components/connector/components/ConnectionFacade.java
+++ b/src/main/java/org/apache/nifi/components/connector/components/ConnectionFacade.java
@@ -17,8 +17,13 @@
 
 package org.apache.nifi.components.connector.components;
 
+import org.apache.nifi.components.connector.DropFlowFileSummary;
 import org.apache.nifi.controller.queue.QueueSize;
 import org.apache.nifi.flow.VersionedConnection;
+import org.apache.nifi.flowfile.FlowFile;
+
+import java.io.IOException;
+import java.util.function.Predicate;
 
 public interface ConnectionFacade {
 
@@ -35,4 +40,13 @@ public interface ConnectionFacade {
      */
     void purge();
 
+    /**
+     * Drops all FlowFiles from the connection that match the given predicate.
+     *
+     * @param predicate the predicate to use to determine which FlowFiles to drop
+     * @return a summary of the FlowFiles that were dropped
+     * @throws IOException if an I/O error occurs while dropping FlowFiles
+     */
+    DropFlowFileSummary dropFlowFiles(Predicate<FlowFile> predicate) throws IOException;
+
 }
diff --git a/src/main/java/org/apache/nifi/components/connector/components/ProcessGroupFacade.java b/src/main/java/org/apache/nifi/components/connector/components/ProcessGroupFacade.java
index 79655fd..f0b566c 100644
--- a/src/main/java/org/apache/nifi/components/connector/components/ProcessGroupFacade.java
+++ b/src/main/java/org/apache/nifi/components/connector/components/ProcessGroupFacade.java
@@ -17,10 +17,14 @@
 
 package org.apache.nifi.components.connector.components;
 
+import org.apache.nifi.components.connector.DropFlowFileSummary;
 import org.apache.nifi.controller.queue.QueueSize;
 import org.apache.nifi.flow.VersionedProcessGroup;
+import org.apache.nifi.flowfile.FlowFile;
 
+import java.io.IOException;
 import java.util.Set;
+import java.util.function.Predicate;
 
 public interface ProcessGroupFacade {
 
@@ -52,4 +56,14 @@ public interface ProcessGroupFacade {
 
     ProcessGroupLifecycle getLifecycle();
 
+    /**
+     * Drops all FlowFiles from all connections in this ProcessGroup and its child ProcessGroups
+     * that match the given predicate.
+     *
+     * @param predicate the predicate to test each FlowFile against
+     * @return a summary of the dropped FlowFiles
+     * @throws IOException if an I/O error occurs while dropping FlowFiles
+     */
+    DropFlowFileSummary dropFlowFiles(Predicate<FlowFile> predicate) throws IOException;
+
 }


(nifi-api) 03/27: NIFI-15322: Require all property descriptors within a PropertyGroup / ConfigurationStep are unique (#27)

Posted by ma...@apache.org.
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-api.git

commit f62bedf38727549170d9a188f9bed797af2d6317
Author: Mark Payne <ma...@hotmail.com>
AuthorDate: Wed Dec 10 15:52:33 2025 -0500

    NIFI-15322: Require all property descriptors within a PropertyGroup / ConfigurationStep are unique (#27)
    
    * Huge refactoring of Connectors to require that <Step Name, Property Name> tuple is unique. Requiring that is simple, but now that we enforce that, we can greatly simplify much of the code.
    * Added StepConfiguration to simplify API rather than using Map<String, ConnectorValueReference> in some places
    * Now that we enforce unique property names per step, introduced StepConfigurationContext to further reduce API complexity
    
    Signed-off-by: Kevin Doran <kd...@apache.org>
---
 .../components/connector/AbstractConnector.java    | 14 ++---
 .../components/connector/ConfigurationStep.java    | 12 +++++
 .../nifi/components/connector/Connector.java       |  7 +--
 .../connector/ConnectorConfigurationContext.java   | 62 +++++++++++++++++++---
 .../connector/ConnectorPropertyDescriptor.java     |  2 +-
 .../connector/ConnectorPropertyGroup.java          | 10 ++++
 .../connector/ConnectorValidationContext.java      |  2 +-
 .../connector/PropertyGroupConfiguration.java      | 55 -------------------
 .../nifi/components/connector/SecretsManager.java  |  3 ++
 .../components/connector/StepConfiguration.java    | 58 ++++++++++++++++++++
 .../connector/StepConfigurationContext.java        | 54 +++++++++++++++++++
 .../nifi/flow/VersionedConfigurationStep.java      | 12 ++---
 .../connector/TestAbstractConnector.java           | 27 +++++-----
 .../connector/TestConnectorPropertyDescriptor.java |  2 +-
 14 files changed, 227 insertions(+), 93 deletions(-)

diff --git a/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java b/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
index 1ff7304..4cfac54 100644
--- a/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
+++ b/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
@@ -275,7 +275,7 @@ public abstract class AbstractConnector implements Connector {
 
         final List<ConfigurationStep> configSteps = getConfigurationSteps(flowContext);
         for (final ConfigurationStep configStep : configSteps) {
-            final List<ConfigVerificationResult> stepResults = verifyConfigurationStep(configStep.getName(), List.of(), flowContext);
+            final List<ConfigVerificationResult> stepResults = verifyConfigurationStep(configStep.getName(), Map.of(), flowContext);
             results.addAll(stepResults);
         }
 
@@ -461,7 +461,7 @@ public abstract class AbstractConnector implements Connector {
             final Map<String, ConnectorPropertyDescriptor> descriptorMap = descriptors.stream()
                 .collect(Collectors.toMap(ConnectorPropertyDescriptor::getName, Function.identity()));
 
-            final Function<String, ConnectorPropertyValue> propertyValueLookup = name -> configurationContext.getProperty(stepName, propertyGroup.getName(), name);
+            final Function<String, ConnectorPropertyValue> propertyValueLookup = name -> configurationContext.getProperty(stepName, name);
 
             for (final ConnectorPropertyDescriptor descriptor : descriptors) {
                 final boolean dependencySatisfied = isDependencySatisfied(descriptor, descriptorMap::get, propertyValueLookup);
@@ -471,7 +471,7 @@ public abstract class AbstractConnector implements Connector {
                     continue;
                 }
 
-                final ConnectorPropertyValue propertyValue = configurationContext.getProperty(stepName, propertyGroup.getName(), descriptor.getName());
+                final ConnectorPropertyValue propertyValue = configurationContext.getProperty(stepName, descriptor.getName());
                 if (propertyValue == null || !propertyValue.isSet()) {
                     if (descriptor.isRequired()) {
                         final ValidationResult invalidResult = new ValidationResult.Builder()
@@ -564,13 +564,13 @@ public abstract class AbstractConnector implements Connector {
     }
 
     @Override
-    public List<AllowableValue> fetchAllowableValues(final String stepName, final String groupName, final String propertyName, final FlowContext flowContext) {
-        throw new UnsupportedOperationException("Property %s of Property Group %s in Configuration Step %s does not support fetching Allowable Values.".formatted(propertyName, groupName, stepName));
+    public List<AllowableValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext flowContext) {
+        throw new UnsupportedOperationException("Property %s in Configuration Step %s does not support fetching Allowable Values.".formatted(propertyName, stepName));
     }
 
     @Override
-    public List<AllowableValue> fetchAllowableValues(final String stepName, final String groupName, final String propertyName, final FlowContext flowContext, final String filter) {
-        final List<AllowableValue> allowableValues = fetchAllowableValues(stepName, groupName, propertyName, flowContext);
+    public List<AllowableValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext flowContext, final String filter) {
+        final List<AllowableValue> allowableValues = fetchAllowableValues(stepName, propertyName, flowContext);
         if (filter == null || filter.isEmpty()) {
             return allowableValues;
         } else {
diff --git a/src/main/java/org/apache/nifi/components/connector/ConfigurationStep.java b/src/main/java/org/apache/nifi/components/connector/ConfigurationStep.java
index 901bef0..6affd8e 100644
--- a/src/main/java/org/apache/nifi/components/connector/ConfigurationStep.java
+++ b/src/main/java/org/apache/nifi/components/connector/ConfigurationStep.java
@@ -19,7 +19,9 @@ package org.apache.nifi.components.connector;
 
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 
 public final class ConfigurationStep {
     private final String name;
@@ -70,6 +72,16 @@ public final class ConfigurationStep {
                 throw new IllegalStateException("Configuration Step's name must be provided");
             }
 
+            // Ensure that all Property Descriptor names are unique
+            final Set<String> propertyNames = new HashSet<>();
+            for (final ConnectorPropertyGroup propertyGroup : propertyGroups) {
+                for (final ConnectorPropertyDescriptor descriptor : propertyGroup.getProperties()) {
+                    if (!propertyNames.add(descriptor.getName())) {
+                        throw new IllegalStateException("All Property Descriptor names must be unique within a Configuration Step. Duplicate name found: " + descriptor.getName());
+                    }
+                }
+            }
+
             return new ConfigurationStep(this);
         }
     }
diff --git a/src/main/java/org/apache/nifi/components/connector/Connector.java b/src/main/java/org/apache/nifi/components/connector/Connector.java
index 62ba714..5de886a 100644
--- a/src/main/java/org/apache/nifi/components/connector/Connector.java
+++ b/src/main/java/org/apache/nifi/components/connector/Connector.java
@@ -24,6 +24,7 @@ import org.apache.nifi.components.connector.components.FlowContext;
 import org.apache.nifi.flow.VersionedExternalFlow;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * <p>
@@ -133,7 +134,7 @@ public interface Connector {
      * @return a list of ConfigVerificationResults, each of which may indicate a check that was performed and any associated explanation
      * as to why the configuration step verification succeeded, failed, or was skipped.
      */
-    List<ConfigVerificationResult> verifyConfigurationStep(String stepName, List<PropertyGroupConfiguration> propertyValueOverrides, FlowContext flowContext);
+    List<ConfigVerificationResult> verifyConfigurationStep(String stepName, Map<String, String> propertyValueOverrides, FlowContext flowContext);
 
     /**
      * Verifies the overall configuration of the Connector based on the configuration that has already been provided for the given Flow Context.
@@ -192,7 +193,7 @@ public interface Connector {
      */
     void applyUpdate(FlowContext workingFlowContext, FlowContext activeFlowContext) throws FlowUpdateException;
 
-    List<AllowableValue> fetchAllowableValues(String stepName, String groupName, String propertyName, FlowContext flowContext);
+    List<AllowableValue> fetchAllowableValues(String stepName, String propertyName, FlowContext flowContext);
 
-    List<AllowableValue> fetchAllowableValues(String stepName, String groupName, String propertyName, FlowContext flowContext, String filter);
+    List<AllowableValue> fetchAllowableValues(String stepName, String propertyName, FlowContext flowContext, String filter);
 }
diff --git a/src/main/java/org/apache/nifi/components/connector/ConnectorConfigurationContext.java b/src/main/java/org/apache/nifi/components/connector/ConnectorConfigurationContext.java
index 3ae9bc9..a64d533 100644
--- a/src/main/java/org/apache/nifi/components/connector/ConnectorConfigurationContext.java
+++ b/src/main/java/org/apache/nifi/components/connector/ConnectorConfigurationContext.java
@@ -17,21 +17,71 @@
 
 package org.apache.nifi.components.connector;
 
-import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 public interface ConnectorConfigurationContext extends Cloneable {
 
-    ConnectorPropertyValue getProperty(String configurationStepName, String groupName, String propertyName);
+    /**
+     * Returns the property value for the given property name in the specified configuration step.
+     * @param configurationStepName the name of the configuration step
+     * @param propertyName the name of the property
+     * @return the property value for the given property name in the specified configuration step
+     */
+    ConnectorPropertyValue getProperty(String configurationStepName, String propertyName);
+
+    /**
+     * Returns the property value for the given property descriptor in the specified configuration step.
+     * @param configurationStep the configuration step
+     * @param propertyDescriptor the property descriptor
+     * @return the property value for the given property descriptor in the specified configuration step
+     */
+    ConnectorPropertyValue getProperty(ConfigurationStep configurationStep, ConnectorPropertyDescriptor propertyDescriptor);
+
+    /**
+     * Returns a set of all property names for the specified configuration step.
+     * @param configurationStepName the name of the configuration step
+     * @return a set of all property names for the specified configuration step
+     */
+    Set<String> getPropertyNames(String configurationStepName);
+
+    /**
+     * Returns a set of all property names for the specified configuration step.
+     * @param configurationStep the configuration step
+     * @return a set of all property names for the specified configuration step
+     */
+    Set<String> getPropertyNames(ConfigurationStep configurationStep);
 
-    ConnectorPropertyValue getProperty(ConfigurationStep configurationStep, ConnectorPropertyGroup propertyGroup, ConnectorPropertyDescriptor propertyDescriptor);
+    /**
+     * Returns a view of this configuration context scoped to the provided step name.
+     * @param stepName the name of the configuration step
+     * @return a StepConfigurationContext scoped to the provided step name
+     */
+    StepConfigurationContext scopedToStep(String stepName);
 
     /**
-     * Creates a new ConnectorConfigurationContext based on this context's values but with the provided property overrides applied.
+     * Returns a view of this configuration context scoped to the provided configuration step.
+     * @param configurationStep the configuration step
+     * @return a StepConfigurationContext scoped to the provided configuration step
+     */
+    StepConfigurationContext scopedToStep(ConfigurationStep configurationStep);
+
+    /**
+     * Creates a new ConnectorConfigurationContext based on this context's values but with the
+     * values for the given step overridden. If the provided map of values does not override all properties
+     * for the step, the remaining properties will retain their existing values. Said another way, this is a
+     * "partial override" for the specified step. If the provided map contains a null value for a property,
+     * the returned context will have that property removed.
+     *
      * @param stepName the name of the configuration step for which the overrides should be applied
-     * @param groupConfigurations the list of PropertyGroupConfiguration objects containing the overrides
+     * @param propertyValues a map of property name to property value containing the overrides
      * @return a new ConnectorConfigurationContext with the overrides applied
      */
-    ConnectorConfigurationContext createWithOverrides(String stepName, List<PropertyGroupConfiguration> groupConfigurations);
+    ConnectorConfigurationContext createWithOverrides(String stepName, Map<String, String> propertyValues);
 
+    /**
+     * Creates a deep copy of this ConnectorConfigurationContext.
+     * @return a deep copy of this ConnectorConfigurationContext
+     */
     ConnectorConfigurationContext clone();
 }
diff --git a/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyDescriptor.java b/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyDescriptor.java
index b9304ac..f765d11 100644
--- a/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyDescriptor.java
+++ b/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyDescriptor.java
@@ -99,7 +99,7 @@ public final class ConnectorPropertyDescriptor {
         final List<DescribedValue> fetchedAllowableValues;
         if (isAllowableValuesFetchable()) {
             try {
-                fetchedAllowableValues = validationContext.fetchAllowableValues(stepName, groupName, getName());
+                fetchedAllowableValues = validationContext.fetchAllowableValues(stepName, getName());
             } catch (final Exception e) {
                 return new ValidationResult.Builder()
                     .subject(name)
diff --git a/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyGroup.java b/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyGroup.java
index fb0fb69..d0f3538 100644
--- a/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyGroup.java
+++ b/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyGroup.java
@@ -18,8 +18,10 @@
 package org.apache.nifi.components.connector;
 
 import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Objects;
+import java.util.Set;
 
 public final class ConnectorPropertyGroup {
     private final String name;
@@ -188,6 +190,14 @@ public final class ConnectorPropertyGroup {
                 throw new IllegalStateException("Property Group's name must be provided if a description is set");
             }
 
+            // Ensure that all Property Descriptor names are unique within this group
+            final Set<String> propertyNames = new HashSet<>();
+            for (final ConnectorPropertyDescriptor property : properties) {
+                if (!propertyNames.add(property.getName())) {
+                    throw new IllegalStateException("All Property Descriptor names must be unique within a Property Group. Duplicate name found: " + property.getName());
+                }
+            }
+
             return new ConnectorPropertyGroup(this);
         }
     }
diff --git a/src/main/java/org/apache/nifi/components/connector/ConnectorValidationContext.java b/src/main/java/org/apache/nifi/components/connector/ConnectorValidationContext.java
index bf67b81..842bb33 100644
--- a/src/main/java/org/apache/nifi/components/connector/ConnectorValidationContext.java
+++ b/src/main/java/org/apache/nifi/components/connector/ConnectorValidationContext.java
@@ -26,6 +26,6 @@ public interface ConnectorValidationContext {
 
     ValidationContext createValidationContext(String stepName, String groupName);
 
-    List<DescribedValue> fetchAllowableValues(String stepName, String groupName, String propertyName);
+    List<DescribedValue> fetchAllowableValues(String stepName, String propertyName);
 
 }
diff --git a/src/main/java/org/apache/nifi/components/connector/PropertyGroupConfiguration.java b/src/main/java/org/apache/nifi/components/connector/PropertyGroupConfiguration.java
deleted file mode 100644
index ffb4ca3..0000000
--- a/src/main/java/org/apache/nifi/components/connector/PropertyGroupConfiguration.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.nifi.components.connector;
-
-import java.util.Map;
-
-public record PropertyGroupConfiguration(String groupName, Map<String, ConnectorValueReference> propertyValues) {
-
-    /**
-     * Retrieves the raw string value for the given property. This method only returns a value
-     * for StringLiteralValue references; for other reference types, it returns null.
-     *
-     * @param propertyName the name of the property
-     * @return the String value of the property, or null if no value is set or if the reference is not a StringLiteralValue
-     */
-    public String getPropertyValue(final String propertyName) {
-        final ConnectorValueReference valueReference = propertyValues.get(propertyName);
-        if (valueReference instanceof StringLiteralValue stringLiteral) {
-            return stringLiteral.getValue();
-        }
-        return null;
-    }
-
-    /**
-     * Creates a PropertyGroupConfiguration from raw String values. This is a convenience method that
-     * converts String values to ConnectorValueReference objects with STRING_LITERAL type.
-     *
-     * @param groupName the name of the property group
-     * @param stringPropertyValues the property values as simple Strings
-     * @return a new PropertyGroupConfiguration with the values wrapped as ConnectorValueReference
-     */
-    public static PropertyGroupConfiguration fromStringValues(final String groupName, final Map<String, String> stringPropertyValues) {
-        final Map<String, ConnectorValueReference> referenceValues = new java.util.HashMap<>();
-        for (final Map.Entry<String, String> entry : stringPropertyValues.entrySet()) {
-            final String value = entry.getValue();
-            referenceValues.put(entry.getKey(), new StringLiteralValue(value));
-        }
-        return new PropertyGroupConfiguration(groupName, referenceValues);
-    }
-}
diff --git a/src/main/java/org/apache/nifi/components/connector/SecretsManager.java b/src/main/java/org/apache/nifi/components/connector/SecretsManager.java
index e4b7f60..564b717 100644
--- a/src/main/java/org/apache/nifi/components/connector/SecretsManager.java
+++ b/src/main/java/org/apache/nifi/components/connector/SecretsManager.java
@@ -19,10 +19,13 @@ package org.apache.nifi.components.connector;
 
 import java.io.IOException;
 import java.util.List;
+import java.util.Optional;
 import java.util.Set;
 
 public interface SecretsManager {
 
+    Optional<Secret> getSecret(SecretReference secretReference) throws IOException;
+
     List<Secret> getAllSecrets() throws IOException;
 
     Set<SecretProvider> getSecretProviders();
diff --git a/src/main/java/org/apache/nifi/components/connector/StepConfiguration.java b/src/main/java/org/apache/nifi/components/connector/StepConfiguration.java
new file mode 100644
index 0000000..ad31a78
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/StepConfiguration.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector;
+
+import java.util.Map;
+import java.util.Objects;
+
+public class StepConfiguration {
+    private final Map<String, ConnectorValueReference> propertyValues;
+
+    public StepConfiguration(final Map<String, ConnectorValueReference> propertyValues) {
+        this.propertyValues = propertyValues;
+    }
+
+    public Map<String, ConnectorValueReference> getPropertyValues() {
+        return propertyValues;
+    }
+
+    public ConnectorValueReference getPropertyValue(final String propertyName) {
+        return propertyValues.get(propertyName);
+    }
+
+    @Override
+    public String toString() {
+        return "StepConfiguration[" +
+               "propertyValues=" + propertyValues +
+               "]";
+    }
+
+    @Override
+    public boolean equals(final Object o) {
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        final StepConfiguration that = (StepConfiguration) o;
+        return Objects.equals(propertyValues, that.propertyValues);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hashCode(propertyValues);
+    }
+}
diff --git a/src/main/java/org/apache/nifi/components/connector/StepConfigurationContext.java b/src/main/java/org/apache/nifi/components/connector/StepConfigurationContext.java
new file mode 100644
index 0000000..23220e1
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/StepConfigurationContext.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector;
+
+import java.util.Map;
+
+/**
+ * A view of a ConnectorConfigurationContext scoped to a specific configuration step.
+ * Any changes to the underlying ConnectorConfigurationContext will be reflected in this context.
+ */
+public interface StepConfigurationContext {
+
+    /**
+     * Returns the value of the property with the given name.
+     * @param propertyName the name of the property
+     * @return the value of the property with the given name
+     */
+    ConnectorPropertyValue getProperty(String propertyName);
+
+    /**
+     * Returns the value of the property specified by the given descriptor.
+     * @param propertyDescriptor the property descriptor
+     * @return the value of the property specified by the given descriptor
+     */
+    ConnectorPropertyValue getProperty(ConnectorPropertyDescriptor propertyDescriptor);
+
+    /**
+     * Creates a new ConnectorConfigurationContext based on this context's values but with the provided property overrides applied.
+     * @param propertyValues a map of property name to property value containing the overrides
+     * @return a new ConnectorConfigurationContext with the overrides applied
+     */
+    StepConfigurationContext createWithOverrides(Map<String, String> propertyValues);
+
+    /**
+     * Returns a map of all property names to their corresponding values
+     * @return a map of all property names to their corresponding values
+     */
+    Map<String, ConnectorPropertyValue> getProperties();
+}
diff --git a/src/main/java/org/apache/nifi/flow/VersionedConfigurationStep.java b/src/main/java/org/apache/nifi/flow/VersionedConfigurationStep.java
index 1921020..f2c6bac 100644
--- a/src/main/java/org/apache/nifi/flow/VersionedConfigurationStep.java
+++ b/src/main/java/org/apache/nifi/flow/VersionedConfigurationStep.java
@@ -17,11 +17,11 @@
 
 package org.apache.nifi.flow;
 
-import java.util.List;
+import java.util.Map;
 
 public class VersionedConfigurationStep {
     private String name;
-    private List<VersionedConnectorPropertyGroup> propertyGroups;
+    private Map<String, VersionedConnectorValueReference> properties;
 
     public String getName() {
         return name;
@@ -31,11 +31,11 @@ public class VersionedConfigurationStep {
         this.name = name;
     }
 
-    public List<VersionedConnectorPropertyGroup> getPropertyGroups() {
-        return propertyGroups;
+    public Map<String, VersionedConnectorValueReference> getProperties() {
+        return properties;
     }
 
-    public void setPropertyGroups(final List<VersionedConnectorPropertyGroup> propertyGroups) {
-        this.propertyGroups = propertyGroups;
+    public void setProperties(final Map<String, VersionedConnectorValueReference> properties) {
+        this.properties = properties;
     }
 }
diff --git a/src/test/java/org/apache/nifi/components/connector/TestAbstractConnector.java b/src/test/java/org/apache/nifi/components/connector/TestAbstractConnector.java
index 7e3257f..c4d96bf 100644
--- a/src/test/java/org/apache/nifi/components/connector/TestAbstractConnector.java
+++ b/src/test/java/org/apache/nifi/components/connector/TestAbstractConnector.java
@@ -36,6 +36,7 @@ import org.mockito.quality.Strictness;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
+import java.util.Map;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
@@ -103,7 +104,7 @@ public class TestAbstractConnector {
             .build();
 
         connector.setConfigurationSteps(List.of(configStep));
-        when(configurationContext.getProperty("Test Step", "Test Group", "Required Property")).thenReturn(null);
+        when(configurationContext.getProperty("Test Step", "Required Property")).thenReturn(null);
 
         final List<ValidationResult> results = connector.validate(flowContext, validationContext);
 
@@ -135,7 +136,7 @@ public class TestAbstractConnector {
             .build();
 
         connector.setConfigurationSteps(List.of(configStep));
-        when(configurationContext.getProperty("Test Step", "Test Group", "Optional Property")).thenReturn(null);
+        when(configurationContext.getProperty("Test Step", "Optional Property")).thenReturn(null);
 
         final List<ValidationResult> results = connector.validate(flowContext, validationContext);
 
@@ -164,7 +165,7 @@ public class TestAbstractConnector {
 
         connector.setConfigurationSteps(List.of(configStep));
         when(mockPropertyValue.getValue()).thenReturn("");
-        when(configurationContext.getProperty("Test Step", "Test Group", "Validated Property")).thenReturn(mockPropertyValue);
+        when(configurationContext.getProperty("Test Step", "Validated Property")).thenReturn(mockPropertyValue);
 
         final List<ValidationResult> results = connector.validate(flowContext, validationContext);
 
@@ -197,7 +198,7 @@ public class TestAbstractConnector {
         connector.setConfigurationSteps(List.of(configStep));
         when(mockPropertyValue.getValue()).thenReturn("valid-value");
         when(mockPropertyValue.isSet()).thenReturn(true);
-        when(configurationContext.getProperty("Test Step", "Test Group", "Valid Property")).thenReturn(mockPropertyValue);
+        when(configurationContext.getProperty("Test Step", "Valid Property")).thenReturn(mockPropertyValue);
 
         final List<ValidationResult> results = connector.validate(flowContext, validationContext);
 
@@ -233,7 +234,7 @@ public class TestAbstractConnector {
 
         connector.setConfigurationSteps(List.of(configStep));
         when(mockPropertyValue.getValue()).thenReturn("Wrong Value");
-        when(configurationContext.getProperty("Test Step", "Test Group", "Dependency Property")).thenReturn(mockPropertyValue);
+        when(configurationContext.getProperty("Test Step", "Dependency Property")).thenReturn(mockPropertyValue);
 
         final List<ValidationResult> results = connector.validate(flowContext, validationContext);
 
@@ -270,8 +271,8 @@ public class TestAbstractConnector {
         connector.setConfigurationSteps(List.of(configStep));
         final ConnectorPropertyValue dependencyValue = mock(ConnectorPropertyValue.class);
         when(dependencyValue.getValue()).thenReturn("Required Value");
-        when(configurationContext.getProperty("Test Step", "Test Group", "Dependency Property")).thenReturn(dependencyValue);
-        when(configurationContext.getProperty("Test Step", "Test Group", "Dependent Property")).thenReturn(null);
+        when(configurationContext.getProperty("Test Step", "Dependency Property")).thenReturn(dependencyValue);
+        when(configurationContext.getProperty("Test Step", "Dependent Property")).thenReturn(null);
 
         final List<ValidationResult> results = connector.validate(flowContext, validationContext);
 
@@ -324,8 +325,8 @@ public class TestAbstractConnector {
         final ConnectorPropertyValue invalidValue = mock(ConnectorPropertyValue.class);
         when(invalidValue.getValue()).thenReturn("");
         when(invalidValue.isSet()).thenReturn(true);
-        when(configurationContext.getProperty("Step One", "Group One", "Property One")).thenReturn(validValue);
-        when(configurationContext.getProperty("Step Two", "Group Two", "Property Two")).thenReturn(invalidValue);
+        when(configurationContext.getProperty("Step One", "Property One")).thenReturn(validValue);
+        when(configurationContext.getProperty("Step Two", "Property Two")).thenReturn(invalidValue);
 
         final List<ValidationResult> results = connector.validate(flowContext, validationContext);
 
@@ -420,8 +421,8 @@ public class TestAbstractConnector {
         when(value1.getValue()).thenReturn("Value One");
         final ConnectorPropertyValue value2 = mock(ConnectorPropertyValue.class);
         when(value2.getValue()).thenReturn("Value Two");
-        when(configurationContext.getProperty("Test Step", "Group One", "Property One")).thenReturn(value1);
-        when(configurationContext.getProperty("Test Step", "Group Two", "Property Two")).thenReturn(value2);
+        when(configurationContext.getProperty("Test Step", "Property One")).thenReturn(value1);
+        when(configurationContext.getProperty("Test Step", "Property Two")).thenReturn(value2);
 
         final List<ValidationResult> results = connector.validate(flowContext, validationContext);
 
@@ -475,7 +476,7 @@ public class TestAbstractConnector {
         }
 
         @Override
-        public List<ConfigVerificationResult> verifyConfigurationStep(final String stepName, final List<PropertyGroupConfiguration> overrides, final FlowContext flowContext) {
+        public List<ConfigVerificationResult> verifyConfigurationStep(final String stepName, final Map<String, String> overrides, final FlowContext flowContext) {
             return Collections.emptyList();
         }
 
@@ -516,7 +517,7 @@ public class TestAbstractConnector {
         }
 
         @Override
-        public List<DescribedValue> fetchAllowableValues(final String stepName, final String groupName, final String propertyName) {
+        public List<DescribedValue> fetchAllowableValues(final String stepName, final String propertyName) {
             // Return empty list as we don't need to fetch dynamic allowable values in these tests
             return Collections.emptyList();
         }
diff --git a/src/test/java/org/apache/nifi/components/connector/TestConnectorPropertyDescriptor.java b/src/test/java/org/apache/nifi/components/connector/TestConnectorPropertyDescriptor.java
index d9aaaa4..823c3ef 100644
--- a/src/test/java/org/apache/nifi/components/connector/TestConnectorPropertyDescriptor.java
+++ b/src/test/java/org/apache/nifi/components/connector/TestConnectorPropertyDescriptor.java
@@ -221,7 +221,7 @@ public class TestConnectorPropertyDescriptor {
         }
 
         @Override
-        public List<DescribedValue> fetchAllowableValues(final String stepName, final String groupName, final String propertyName) {
+        public List<DescribedValue> fetchAllowableValues(final String stepName, final String propertyName) {
             // Return empty list as we don't need to fetch dynamic allowable values in these tests
             return Collections.emptyList();
         }


(nifi-api) 22/27: NIFI-15536: Change Connector API to use DescribedValue vs AllowableValue (#60)

Posted by ma...@apache.org.
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-api.git

commit d553fcd6f526d754cc668724fb9ec719cc2fced6
Author: Bob Paulin <bo...@bobpaulin.com>
AuthorDate: Mon Feb 2 14:51:28 2026 -0600

    NIFI-15536: Change Connector API to use DescribedValue vs AllowableValue (#60)
---
 .../org/apache/nifi/components/connector/AbstractConnector.java   | 8 ++++----
 src/main/java/org/apache/nifi/components/connector/Connector.java | 6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java b/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
index 6b71fa6..d837f7b 100644
--- a/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
+++ b/src/main/java/org/apache/nifi/components/connector/AbstractConnector.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.ConnectionFacade;
 import org.apache.nifi.components.connector.components.ControllerServiceFacade;
@@ -665,13 +665,13 @@ public abstract class AbstractConnector 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) {
         throw new UnsupportedOperationException("Property %s in Configuration Step %s does not support fetching Allowable Values.".formatted(propertyName, stepName));
     }
 
     @Override
-    public List<AllowableValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext flowContext, final String filter) {
-        final List<AllowableValue> allowableValues = fetchAllowableValues(stepName, propertyName, flowContext);
+    public List<DescribedValue> fetchAllowableValues(final String stepName, final String propertyName, final FlowContext flowContext, final String filter) {
+        final List<DescribedValue> allowableValues = fetchAllowableValues(stepName, propertyName, flowContext);
         if (filter == null || filter.isEmpty()) {
             return allowableValues;
         } else {
diff --git a/src/main/java/org/apache/nifi/components/connector/Connector.java b/src/main/java/org/apache/nifi/components/connector/Connector.java
index c0dd957..f1cbd3c 100644
--- a/src/main/java/org/apache/nifi/components/connector/Connector.java
+++ b/src/main/java/org/apache/nifi/components/connector/Connector.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;
@@ -193,9 +193,9 @@ public interface Connector {
      */
     void applyUpdate(FlowContext workingFlowContext, FlowContext activeFlowContext) throws FlowUpdateException;
 
-    List<AllowableValue> fetchAllowableValues(String stepName, String propertyName, FlowContext flowContext);
+    List<DescribedValue> fetchAllowableValues(String stepName, String propertyName, FlowContext flowContext);
 
-    List<AllowableValue> fetchAllowableValues(String stepName, String propertyName, FlowContext flowContext, String filter);
+    List<DescribedValue> fetchAllowableValues(String stepName, String propertyName, FlowContext flowContext, String filter);
 
     /**
      * Drains any in-flight FlowFiles from the flow associated with the given Flow Context by processing the existing data


(nifi-api) 23/27: NIFI-15514: Bug fix - ensure that when AbstractConnector is started, it includes all components, not just processors and controller services; code cleanup (#57)

Posted by ma...@apache.org.
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-api.git

commit 8541f0f8d3b1beda69d7cfeabd6d17c5cc18517b
Author: Mark Payne <ma...@hotmail.com>
AuthorDate: Tue Feb 3 10:22:32 2026 -0500

    NIFI-15514: Bug fix - ensure that when AbstractConnector is started, it includes all components, not just processors and controller services; code cleanup (#57)
---
 .../components/connector/AbstractConnector.java    | 161 +++++++++++----------
 1 file changed, 81 insertions(+), 80 deletions(-)

diff --git a/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java b/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
index d837f7b..7689858 100644
--- a/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
+++ b/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
@@ -87,14 +87,7 @@ public abstract class AbstractConnector implements Connector {
     @Override
     public void start(final FlowContext context) throws FlowUpdateException {
         final ProcessGroupLifecycle lifecycle = context.getRootGroup().getLifecycle();
-
-        try {
-            lifecycle.enableControllerServices(ControllerServiceReferenceScope.INCLUDE_REFERENCED_SERVICES_ONLY, ControllerServiceReferenceHierarchy.INCLUDE_CHILD_GROUPS).get();
-        } catch (final Exception e) {
-            throw new FlowUpdateException("Failed to enable Controller Services", e);
-        }
-
-        lifecycle.startProcessors();
+        lifecycle.start(ControllerServiceReferenceScope.INCLUDE_REFERENCED_SERVICES_ONLY);
     }
 
     @Override
@@ -129,7 +122,7 @@ public abstract class AbstractConnector implements Connector {
                 }
             });
 
-        return stopProcessorsFuture.thenRun(() -> {
+        return stopProcessorsFuture.thenRunAsync(() -> {
             try {
                 lifecycle.disableControllerServices(ControllerServiceReferenceHierarchy.INCLUDE_CHILD_GROUPS).get();
             } catch (final Exception e) {
@@ -171,32 +164,8 @@ public abstract class AbstractConnector implements Connector {
 
         final CompletableFuture<Void> stopProcessorsFuture = stopSourceProcessors(flowContext);
 
-        final CompletableFuture<Void> startNonSourceFuture = stopProcessorsFuture.thenRun(() -> {
-            if (result.isDone()) {
-                return;
-            }
-
-            final CompletableFuture<Void> enableServices = flowContext.getRootGroup().getLifecycle().enableControllerServices(
-                ControllerServiceReferenceScope.INCLUDE_REFERENCED_SERVICES_ONLY,
-                ControllerServiceReferenceHierarchy.INCLUDE_CHILD_GROUPS);
-
-            try {
-                // Wait for all referenced services to be enabled.
-                enableServices.get();
-
-                if (!result.isDone()) {
-                    getLogger().info("Starting all non-source processors to facilitate drainage of FlowFiles");
-                    startNonSourceProcessors(flowContext).get();
-                }
-            } catch (final Exception e) {
-                try {
-                    flowContext.getRootGroup().getLifecycle().disableControllerServices(ControllerServiceReferenceHierarchy.INCLUDE_CHILD_GROUPS).get();
-                } catch (final Exception e1) {
-                    e.addSuppressed(e1);
-                }
-
-                result.completeExceptionally(new RuntimeException("Failed to start non-source processors while draining FlowFiles", e.getCause()));
-            }
+        final CompletableFuture<Void> startNonSourceFuture = stopProcessorsFuture.thenRunAsync(() -> {
+            startNonSourceProcessors(result, flowContext);
         }).exceptionally(throwable -> {
             if (!result.isDone()) {
                 result.completeExceptionally(new RuntimeException("Failed to stop source processors while draining FlowFiles", throwable));
@@ -205,68 +174,100 @@ public abstract class AbstractConnector implements Connector {
         });
 
         startNonSourceFuture.thenRunAsync(() -> {
-            try {
-                ensureDrainageUnblocked();
-            } catch (final Exception e) {
-                getLogger().warn("Failed to ensure drainage is unblocked when draining FlowFiles", e);
+            completeDrain(result, flowContext, initialQueueSize);
+        }).exceptionally(throwable -> {
+            if (!result.isDone()) {
+                result.completeExceptionally(new RuntimeException("Failed while draining FlowFiles", throwable));
             }
+            return null;
+        });
 
-            Exception failureReason = null;
-            int iterations = 0;
-            while (!isGroupDrained(flowContext.getRootGroup())) {
-                if (result.isDone()) {
-                    getLogger().info("Drainage has been cancelled; will no longer wait for FlowFiles to drain");
-                    break;
-                }
+        return result;
+    }
 
-                // Log the current queue size every 10 seconds (20 iterations of 500ms) so that it's clear
-                // whether or not progress is being made.
-                if (iterations++ % 20 == 0) {
-                    final QueueSize queueSize = flowContext.getRootGroup().getQueueSize();
-                    getLogger().info("Waiting for {} FlowFiles ({} bytes) to drain",
-                        queueSize.getObjectCount(), NumberFormat.getNumberInstance().format(queueSize.getByteCount()));
-                }
+    private void completeDrain(final CompletableFuture<Void> result, final FlowContext flowContext, final QueueSize initialQueueSize) {
+        try {
+            ensureDrainageUnblocked();
+        } catch (final Exception e) {
+            getLogger().warn("Failed to ensure drainage is unblocked when draining FlowFiles", e);
+        }
 
-                try {
-                    Thread.sleep(500);
-                } catch (final InterruptedException e) {
-                    Thread.currentThread().interrupt();
-                    failureReason = e;
-                    break;
-                }
+        Exception failureReason = null;
+        int iterations = 0;
+        while (!isGroupDrained(flowContext.getRootGroup())) {
+            if (result.isDone()) {
+                getLogger().info("Drainage has been cancelled; will no longer wait for FlowFiles to drain");
+                break;
             }
 
-            // Log completion unless the result was completed exceptionally or cancelled.
-            if (!result.isDone()) {
-                getLogger().info("All {} FlowFiles have drained from Connector", initialQueueSize.getObjectCount());
+            // Log the current queue size every 10 seconds (20 iterations of 500ms) so that it's clear
+            // whether or not progress is being made.
+            if (iterations++ % 20 == 0) {
+                final QueueSize queueSize = flowContext.getRootGroup().getQueueSize();
+                getLogger().info("Waiting for {} FlowFiles ({} bytes) to drain",
+                    queueSize.getObjectCount(), NumberFormat.getNumberInstance().format(queueSize.getByteCount()));
             }
 
             try {
-                stop(flowContext);
-            } catch (final Exception e) {
-                getLogger().warn("Failed to stop source Processors after draining FlowFiles", e);
-                if (failureReason == null) {
-                    failureReason = e;
-                } else {
-                    failureReason.addSuppressed(e);
-                }
+                Thread.sleep(500);
+            } catch (final InterruptedException e) {
+                Thread.currentThread().interrupt();
+                failureReason = e;
+                break;
             }
+        }
+
+        // Log completion unless the result was completed exceptionally or cancelled.
+        if (!result.isDone()) {
+            getLogger().info("All {} FlowFiles have drained from Connector", initialQueueSize.getObjectCount());
+        }
 
-            if (failureReason != null && !result.isDone()) {
-                result.completeExceptionally(new RuntimeException("Interrupted while waiting for " + AbstractConnector.this + " to drain", failureReason));
+        try {
+            stop(flowContext);
+        } catch (final Exception e) {
+            getLogger().warn("Failed to stop source Processors after draining FlowFiles", e);
+            if (failureReason == null) {
+                failureReason = e;
+            } else {
+                failureReason.addSuppressed(e);
             }
+        }
+
+        if (failureReason != null && !result.isDone()) {
+            result.completeExceptionally(new RuntimeException("Interrupted while waiting for " + AbstractConnector.this + " to drain", failureReason));
+        }
+
+        if (!result.isDone()) {
+            result.complete(null);
+        }
+    }
+
+    private void startNonSourceProcessors(final CompletableFuture<Void> result, final FlowContext flowContext) {
+        if (result.isDone()) {
+            return;
+        }
+
+        final CompletableFuture<Void> enableServices = flowContext.getRootGroup().getLifecycle().enableControllerServices(
+            ControllerServiceReferenceScope.INCLUDE_REFERENCED_SERVICES_ONLY,
+            ControllerServiceReferenceHierarchy.INCLUDE_CHILD_GROUPS);
+
+        try {
+            // Wait for all referenced services to be enabled.
+            enableServices.get();
 
             if (!result.isDone()) {
-                result.complete(null);
+                getLogger().info("Starting all non-source processors to facilitate drainage of FlowFiles");
+                startNonSourceProcessors(flowContext).get();
             }
-        }).exceptionally(throwable -> {
-            if (!result.isDone()) {
-                result.completeExceptionally(new RuntimeException("Failed while draining FlowFiles", throwable));
+        } catch (final Exception e) {
+            try {
+                flowContext.getRootGroup().getLifecycle().disableControllerServices(ControllerServiceReferenceHierarchy.INCLUDE_CHILD_GROUPS).get();
+            } catch (final Exception e1) {
+                e.addSuppressed(e1);
             }
-            return null;
-        });
 
-        return result;
+            result.completeExceptionally(new RuntimeException("Failed to start non-source processors while draining FlowFiles", e.getCause()));
+        }
     }
 
     /**


(nifi-api) 14/27: NIFI-15428: If non-existent property value is set, connector should be invalid. (#43)

Posted by ma...@apache.org.
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-api.git

commit 635a439e54cd0efb87dec43cbc8656a261952bd5
Author: Mark Payne <ma...@hotmail.com>
AuthorDate: Tue Jan 6 12:05:35 2026 -0500

    NIFI-15428: If non-existent property value is set, connector should be invalid. (#43)
---
 .../components/connector/AbstractConnector.java    | 27 ++++++++++-
 .../connector/TestAbstractConnector.java           | 56 +++++++++++++++++++++-
 2 files changed, 81 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java b/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
index 49d8059..8045bc6 100644
--- a/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
+++ b/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
@@ -156,7 +156,7 @@ public abstract class AbstractConnector implements Connector {
      * @param flowContext the FlowContext to use for drainage
      * @return a CompletableFuture that will be completed when drainage is complete
      */
-    protected CompletableFuture<Void> drainFlowFiles(final FlowContext flowContext) {
+    public CompletableFuture<Void> drainFlowFiles(final FlowContext flowContext) {
         final CompletableFuture<Void> result = new CompletableFuture<>();
         final QueueSize initialQueueSize = flowContext.getRootGroup().getQueueSize();
         if (initialQueueSize.getObjectCount() == 0) {
@@ -454,7 +454,32 @@ public abstract class AbstractConnector implements Connector {
         final String stepName = configurationStep.getName();
         final List<ValidationResult> results = new ArrayList<>();
 
+        // Build a set of all valid property names defined by this configuration step
         final List<ConnectorPropertyGroup> propertyGroups = configurationStep.getPropertyGroups();
+        final Set<String> validPropertyNames = new HashSet<>();
+        for (final ConnectorPropertyGroup propertyGroup : propertyGroups) {
+            final List<ConnectorPropertyDescriptor> descriptors = propertyGroup.getProperties();
+            for (final ConnectorPropertyDescriptor descriptor : descriptors) {
+                validPropertyNames.add(descriptor.getName());
+            }
+        }
+
+        // Check for any properties that have been set but are not defined by this configuration step
+        final Set<String> configuredPropertyNames = configurationContext.getPropertyNames(stepName);
+        for (final String configuredPropertyName : configuredPropertyNames) {
+            if (!validPropertyNames.contains(configuredPropertyName)) {
+                final String configuredValue = configurationContext.getProperty(stepName, configuredPropertyName).getValue();
+
+                final ValidationResult invalidResult = new ValidationResult.Builder()
+                    .valid(false)
+                    .input(configuredValue)
+                    .subject(configuredPropertyName)
+                    .explanation("Property '" + configuredPropertyName + "' is not defined by Connector for Configuration Step '" + stepName + "'")
+                    .build();
+                results.add(invalidResult);
+            }
+        }
+
         for (final ConnectorPropertyGroup propertyGroup : propertyGroups) {
             final List<ConnectorPropertyDescriptor> descriptors = propertyGroup.getProperties();
             final Map<String, ConnectorPropertyDescriptor> descriptorMap = descriptors.stream()
diff --git a/src/test/java/org/apache/nifi/components/connector/TestAbstractConnector.java b/src/test/java/org/apache/nifi/components/connector/TestAbstractConnector.java
index bb77976..20d0534 100644
--- a/src/test/java/org/apache/nifi/components/connector/TestAbstractConnector.java
+++ b/src/test/java/org/apache/nifi/components/connector/TestAbstractConnector.java
@@ -38,6 +38,7 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
@@ -838,10 +839,63 @@ public class TestAbstractConnector {
 
         final List<ValidationResult> results = connector.validate(flowContext, validationContext);
 
-        assertTrue(results.isEmpty(), "Step 2 should be skipped because Property With Default has a default value");
+        assertTrue(results.isEmpty(), "Step 2 should be skipped because Property 'With Default' has a default value");
         assertTrue(connector.isCustomValidateCalled());
     }
 
+    @Test
+    void testValidateWithUndefinedPropertiesConfigured() {
+        final ConnectorPropertyDescriptor validProperty = new ConnectorPropertyDescriptor.Builder()
+            .name("Valid Property")
+            .description("A valid property")
+            .required(true)
+            .build();
+
+        final ConnectorPropertyGroup propertyGroup = ConnectorPropertyGroup.builder()
+            .name("Test Group")
+            .addProperty(validProperty)
+            .build();
+
+        final ConfigurationStep configStep = new ConfigurationStep.Builder()
+            .name("Test Step")
+            .propertyGroups(List.of(propertyGroup))
+            .build();
+
+        connector.setConfigurationSteps(List.of(configStep));
+
+        // Mock the configuration context to return property names including multiple undefined properties
+        when(configurationContext.getPropertyNames("Test Step"))
+            .thenReturn(Set.of("Valid Property", "undefined.one", "undefined.two"));
+
+        final ConnectorPropertyValue validValue = mock(ConnectorPropertyValue.class);
+        when(validValue.getValue()).thenReturn("valid-value");
+        when(validValue.isSet()).thenReturn(true);
+        when(configurationContext.getProperty("Test Step", "Valid Property")).thenReturn(validValue);
+
+        final ConnectorPropertyValue undefinedValue = mock(ConnectorPropertyValue.class);
+        when(undefinedValue.getValue()).thenReturn("some-value");
+        when(undefinedValue.isSet()).thenReturn(true);
+        when(configurationContext.getProperty("Test Step", "undefined.one")).thenReturn(undefinedValue);
+        when(configurationContext.getProperty("Test Step", "undefined.two")).thenReturn(undefinedValue);
+
+        final List<ValidationResult> results = connector.validate(flowContext, validationContext);
+
+        assertEquals(2, results.size());
+
+        // Verify both undefined properties are reported as invalid
+        final List<String> invalidSubjects = results.stream()
+            .map(ValidationResult::getSubject)
+            .toList();
+        assertTrue(invalidSubjects.contains("undefined.one"));
+        assertTrue(invalidSubjects.contains("undefined.two"));
+
+        for (final ValidationResult result : results) {
+            assertFalse(result.isValid());
+        }
+
+        assertFalse(connector.isCustomValidateCalled());
+    }
+
     private static class TestableAbstractConnector extends AbstractConnector {
         private List<ConfigurationStep> configurationSteps = Collections.emptyList();
         private Collection<ValidationResult> customValidationResults = Collections.emptyList();


(nifi-api) 08/27: NIFI-15352: Added getFullyQualifiedName to secret, to encapsulate the… (#35)

Posted by ma...@apache.org.
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-api.git

commit de2d6ce56fcd7d383e0648043f63cf9943acacb8
Author: Mark Payne <ma...@hotmail.com>
AuthorDate: Wed Dec 17 11:20:26 2025 -0500

    NIFI-15352: Added getFullyQualifiedName to secret, to encapsulate the… (#35)
    
    * NIFI-15352: Added getFullyQualifiedName to secret, to encapsulate the combination of group and name
    
    * NIFI-15352: Added getFullyQualifiedName to SecretReference
---
 .../org/apache/nifi/components/connector/Secret.java |  2 ++
 .../nifi/components/connector/SecretReference.java   | 20 +++++++++++++++-----
 .../nifi/flow/VersionedConnectorValueReference.java  | 16 +++++++++++++---
 .../org/apache/nifi/parameter/ParameterProvider.java |  2 +-
 4 files changed, 31 insertions(+), 9 deletions(-)

diff --git a/src/main/java/org/apache/nifi/components/connector/Secret.java b/src/main/java/org/apache/nifi/components/connector/Secret.java
index 6ac3f00..c11598a 100644
--- a/src/main/java/org/apache/nifi/components/connector/Secret.java
+++ b/src/main/java/org/apache/nifi/components/connector/Secret.java
@@ -31,4 +31,6 @@ public interface Secret {
 
     String getValue();
 
+    String getFullyQualifiedName();
+
 }
diff --git a/src/main/java/org/apache/nifi/components/connector/SecretReference.java b/src/main/java/org/apache/nifi/components/connector/SecretReference.java
index 8b5bd11..d4c29b4 100644
--- a/src/main/java/org/apache/nifi/components/connector/SecretReference.java
+++ b/src/main/java/org/apache/nifi/components/connector/SecretReference.java
@@ -27,11 +27,13 @@ public final class SecretReference implements ConnectorValueReference {
     private final String providerId;
     private final String providerName;
     private final String secretName;
+    private final String fullyQualifiedName;
 
-    public SecretReference(final String providerId, final String providerName, final String secretName) {
+    public SecretReference(final String providerId, final String providerName, final String secretName, final String fullyQualifiedName) {
         this.providerId = providerId;
         this.providerName = providerName;
         this.secretName = secretName;
+        this.fullyQualifiedName = fullyQualifiedName;
     }
 
     /**
@@ -53,14 +55,22 @@ public final class SecretReference implements ConnectorValueReference {
     }
 
     /**
-     * Returns the secret name.
+     * Returns the simple secret name.
      *
-     * @return the secret name
+     * @return the simple secret name
      */
     public String getSecretName() {
         return secretName;
     }
 
+    /**
+     * Returns the fully qualified name of the secret.
+     * @return the fully qualified name
+     */
+    public String getFullyQualifiedName() {
+        return fullyQualifiedName;
+    }
+
     @Override
     public ConnectorValueType getValueType() {
         return ConnectorValueType.SECRET_REFERENCE;
@@ -76,12 +86,12 @@ public final class SecretReference implements ConnectorValueReference {
         }
         final SecretReference that = (SecretReference) object;
         return Objects.equals(providerId, that.providerId) && Objects.equals(providerName, that.providerName)
-               && Objects.equals(secretName, that.secretName);
+               && Objects.equals(secretName, that.secretName) && Objects.equals(fullyQualifiedName, that.fullyQualifiedName);
     }
 
     @Override
     public int hashCode() {
-        return Objects.hash(providerId, providerName, secretName);
+        return Objects.hash(providerId, providerName, secretName, fullyQualifiedName);
     }
 
     @Override
diff --git a/src/main/java/org/apache/nifi/flow/VersionedConnectorValueReference.java b/src/main/java/org/apache/nifi/flow/VersionedConnectorValueReference.java
index 4748508..e9e881c 100644
--- a/src/main/java/org/apache/nifi/flow/VersionedConnectorValueReference.java
+++ b/src/main/java/org/apache/nifi/flow/VersionedConnectorValueReference.java
@@ -31,6 +31,7 @@ public class VersionedConnectorValueReference {
     private String providerId;
     private String providerName;
     private String secretName;
+    private String fullyQualifiedSecretName;
 
     public String getValueType() {
         return valueType;
@@ -80,6 +81,14 @@ public class VersionedConnectorValueReference {
         this.secretName = secretName;
     }
 
+    public String getFullyQualifiedSecretName() {
+        return fullyQualifiedSecretName;
+    }
+
+    public void setFullyQualifiedSecretName(final String fullyQualifiedSecretName) {
+        this.fullyQualifiedSecretName = fullyQualifiedSecretName;
+    }
+
     @Override
     public boolean equals(final Object obj) {
         if (this == obj) {
@@ -92,17 +101,18 @@ public class VersionedConnectorValueReference {
                && Objects.equals(value, other.value)
                && Objects.equals(assetId, other.assetId)
                && Objects.equals(providerId, other.providerId)
-               && Objects.equals(secretName, other.secretName);
+               && Objects.equals(secretName, other.secretName)
+               && Objects.equals(fullyQualifiedSecretName, other.fullyQualifiedSecretName);
     }
 
     @Override
     public int hashCode() {
-        return Objects.hash(valueType, value, assetId, providerId, secretName);
+        return Objects.hash(valueType, value, assetId, providerId, secretName, fullyQualifiedSecretName);
     }
 
     @Override
     public String toString() {
         return "VersionedConnectorValueReference[valueType=" + valueType + ", value=" + value
-               + ", assetId=" + assetId + ", providerId=" + providerId + ", secretName=" + secretName + "]";
+               + ", assetId=" + assetId + ", providerId=" + providerId + ", fullyQualifiedSecretName=" + fullyQualifiedSecretName + "]";
     }
 }
diff --git a/src/main/java/org/apache/nifi/parameter/ParameterProvider.java b/src/main/java/org/apache/nifi/parameter/ParameterProvider.java
index a2f3dd0..c1a6caf 100644
--- a/src/main/java/org/apache/nifi/parameter/ParameterProvider.java
+++ b/src/main/java/org/apache/nifi/parameter/ParameterProvider.java
@@ -117,7 +117,7 @@ public interface ParameterProvider extends ConfigurableComponent {
      * @return A list of fetched Parameter groups containing only the specified parameters
      * @throws IOException if there is an I/O problem while fetching the Parameters
      */
-    default List<ParameterGroup> fetchParameters(ConfigurationContext context, List<String> fullyQualifiedParameterNames) throws IOException {
+    default List<ParameterGroup> fetchParameters(final ConfigurationContext context, final List<String> fullyQualifiedParameterNames) throws IOException {
         final List<ParameterGroup> allGroups = fetchParameters(context);
         final List<ParameterGroup> filteredGroups = new ArrayList<>();
 


(nifi-api) 24/27: NIFI-15538: When starting/stopping components allow specifying whether or not the action should be recursive; code cleanup and simplification to use a Virtual Thread to execute code sequentially instead of chaining CompletableFutures. (#61)

Posted by ma...@apache.org.
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-api.git

commit 50012d9b62e99e8fec58a784b1f5c9fd9b5af8d3
Author: Mark Payne <ma...@hotmail.com>
AuthorDate: Tue Feb 3 14:16:49 2026 -0500

    NIFI-15538: When starting/stopping components allow specifying whether or not the action should be recursive; code cleanup and simplification to use a Virtual Thread to execute code sequentially instead of chaining CompletableFutures. (#61)
    
    Co-authored-by: Mark Payne <ma...@snowflake.com>
---
 .../components/connector/AbstractConnector.java    | 138 ++++++++++++++-------
 .../components/ProcessGroupLifecycle.java          |  16 ++-
 2 files changed, 107 insertions(+), 47 deletions(-)

diff --git a/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java b/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
index 7689858..c1c6326 100644
--- a/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
+++ b/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
@@ -43,6 +43,7 @@ import java.util.Map;
 import java.util.Objects;
 import java.util.Set;
 import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.function.Consumer;
@@ -54,6 +55,7 @@ public abstract class AbstractConnector implements Connector {
     private volatile ConnectorInitializationContext initializationContext;
     private volatile ComponentLog logger;
     private volatile CompletableFuture<Void> prepareUpdateFuture;
+    private String description; // effectively final
 
     protected abstract void onStepConfigured(final String stepName, final FlowContext workingContext) throws FlowUpdateException;
 
@@ -62,6 +64,7 @@ public abstract class AbstractConnector implements Connector {
     public final void initialize(final ConnectorInitializationContext context) {
         this.initializationContext = context;
         this.logger = context.getLogger();
+        this.description = getClass().getSimpleName() + "[id=" + context.getIdentifier() + "]";
 
         init();
     }
@@ -87,7 +90,30 @@ public abstract class AbstractConnector implements Connector {
     @Override
     public void start(final FlowContext context) throws FlowUpdateException {
         final ProcessGroupLifecycle lifecycle = context.getRootGroup().getLifecycle();
-        lifecycle.start(ControllerServiceReferenceScope.INCLUDE_REFERENCED_SERVICES_ONLY);
+        final CompletableFuture<Void> enableServicesFuture = lifecycle.enableControllerServices(
+            ControllerServiceReferenceScope.INCLUDE_REFERENCED_SERVICES_ONLY,
+            ControllerServiceReferenceHierarchy.INCLUDE_CHILD_GROUPS);
+
+        try {
+            enableServicesFuture.get();
+        } catch (final Exception e) {
+            lifecycle.disableControllerServices(ControllerServiceReferenceHierarchy.INCLUDE_CHILD_GROUPS);
+            throw new FlowUpdateException("Failed to enable Controller Services while starting Connector", e);
+        }
+
+        try {
+            lifecycle.startProcessors(true).get();
+            lifecycle.startPorts(true).get();
+            lifecycle.startStatelessGroups(true).get();
+            lifecycle.startRemoteProcessGroups(true).get();
+        } catch (final Exception e) {
+            logger.error("Failed to start components for {}", this, e);
+            try {
+                stop(context);
+            } catch (final Exception stopException) {
+                e.addSuppressed(new FlowUpdateException("Failed to stop Connector cleanly", stopException));
+            }
+        }
     }
 
     @Override
@@ -100,13 +126,16 @@ public abstract class AbstractConnector implements Connector {
     }
 
     private CompletableFuture<Void> stopAsync(final FlowContext context) {
-        final ProcessGroupFacade rootGroup = context.getRootGroup();
-        final ProcessGroupLifecycle lifecycle = rootGroup.getLifecycle();
+        final CompletableFuture<Void> result = new CompletableFuture<>();
 
-        final CompletableFuture<Void> stopProcessorsFuture = lifecycle.stopProcessors()
-            .orTimeout(1, TimeUnit.MINUTES)
-            .exceptionally(throwable -> {
-                if (throwable instanceof TimeoutException || throwable.getCause() instanceof TimeoutException) {
+        Thread.startVirtualThread(() -> {
+            try {
+                final ProcessGroupFacade rootGroup = context.getRootGroup();
+                final ProcessGroupLifecycle lifecycle = rootGroup.getLifecycle();
+
+                try {
+                    lifecycle.stopProcessors(true).get(1, TimeUnit.MINUTES);
+                } catch (final TimeoutException e) {
                     final List<ProcessorFacade> running = findProcessors(rootGroup, processor ->
                         processor.getLifecycle().getState() != ProcessorState.STOPPED && processor.getLifecycle().getState() != ProcessorState.DISABLED);
 
@@ -114,21 +143,22 @@ public abstract class AbstractConnector implements Connector {
                         getLogger().warn("After waiting 60 seconds for all Processors to stop, {} are still running. Terminating now.", running.size());
                         running.forEach(processor -> processor.getLifecycle().terminate());
                     }
-
-                    // Continue with the chain after handling timeout
-                    return null;
-                } else {
-                    throw new RuntimeException("Failed to stop all Processors", throwable);
+                } catch (final ExecutionException e) {
+                    throw new RuntimeException("Failed to stop all Processors", e.getCause());
                 }
-            });
 
-        return stopProcessorsFuture.thenRunAsync(() -> {
-            try {
-                lifecycle.disableControllerServices(ControllerServiceReferenceHierarchy.INCLUDE_CHILD_GROUPS).get();
+                lifecycle.stopPorts(true).get(1, TimeUnit.MINUTES);
+                lifecycle.stopRemoteProcessGroups(true).get(1, TimeUnit.MINUTES);
+                lifecycle.stopStatelessGroups(true).get(2, TimeUnit.MINUTES);
+                lifecycle.disableControllerServices(ControllerServiceReferenceHierarchy.INCLUDE_CHILD_GROUPS).get(2, TimeUnit.MINUTES);
+
+                result.complete(null);
             } catch (final Exception e) {
-                throw new RuntimeException("Failed to complete disabling of all Controller Services", e);
+                result.completeExceptionally(e);
             }
         });
+
+        return result;
     }
 
     @Override
@@ -162,24 +192,19 @@ public abstract class AbstractConnector implements Connector {
         getLogger().info("Draining {} FlowFiles ({} bytes) from Connector",
             initialQueueSize.getObjectCount(), NumberFormat.getNumberInstance().format(initialQueueSize.getByteCount()));
 
-        final CompletableFuture<Void> stopProcessorsFuture = stopSourceProcessors(flowContext);
-
-        final CompletableFuture<Void> startNonSourceFuture = stopProcessorsFuture.thenRunAsync(() -> {
-            startNonSourceProcessors(result, flowContext);
-        }).exceptionally(throwable -> {
-            if (!result.isDone()) {
-                result.completeExceptionally(new RuntimeException("Failed to stop source processors while draining FlowFiles", throwable));
-            }
-            return null;
-        });
+        Thread.startVirtualThread(() -> {
+            try {
+                stopSourceComponents(flowContext).get();
+                startNonSourceComponents(result, flowContext);
 
-        startNonSourceFuture.thenRunAsync(() -> {
-            completeDrain(result, flowContext, initialQueueSize);
-        }).exceptionally(throwable -> {
-            if (!result.isDone()) {
-                result.completeExceptionally(new RuntimeException("Failed while draining FlowFiles", throwable));
+                if (!result.isDone()) {
+                    completeDrain(result, flowContext, initialQueueSize);
+                }
+            } catch (final Exception e) {
+                if (!result.isDone()) {
+                    result.completeExceptionally(new RuntimeException("Failed while draining FlowFiles", e));
+                }
             }
-            return null;
         });
 
         return result;
@@ -242,7 +267,7 @@ public abstract class AbstractConnector implements Connector {
         }
     }
 
-    private void startNonSourceProcessors(final CompletableFuture<Void> result, final FlowContext flowContext) {
+    private void startNonSourceComponents(final CompletableFuture<Void> result, final FlowContext flowContext) {
         if (result.isDone()) {
             return;
         }
@@ -256,8 +281,8 @@ public abstract class AbstractConnector implements Connector {
             enableServices.get();
 
             if (!result.isDone()) {
-                getLogger().info("Starting all non-source processors to facilitate drainage of FlowFiles");
-                startNonSourceProcessors(flowContext).get();
+                getLogger().info("Starting all non-source components to facilitate drainage of FlowFiles");
+                startNonSourceComponents(flowContext).get();
             }
         } catch (final Exception e) {
             try {
@@ -266,7 +291,7 @@ public abstract class AbstractConnector implements Connector {
                 e.addSuppressed(e1);
             }
 
-            result.completeExceptionally(new RuntimeException("Failed to start non-source processors while draining FlowFiles", e.getCause()));
+            result.completeExceptionally(new RuntimeException("Failed to start non-source components while draining FlowFiles", e.getCause()));
         }
     }
 
@@ -380,25 +405,44 @@ public abstract class AbstractConnector implements Connector {
         return group.getQueueSize().getObjectCount() == 0;
     }
 
-    protected CompletableFuture<Void> stopSourceProcessors(final FlowContext context) {
-        final List<ProcessorFacade> sourceProcessors = getSourceProcessors(context.getRootGroup());
+    protected CompletableFuture<Void> stopSourceComponents(final FlowContext context) {
+        return stopSourceComponents(context.getRootGroup());
+    }
 
+    private CompletableFuture<Void> stopSourceComponents(final ProcessGroupFacade group) {
         final List<CompletableFuture<Void>> stopFutures = new ArrayList<>();
+
+        final List<ProcessorFacade> sourceProcessors = getSourceProcessors(group);
         for (final ProcessorFacade sourceProcessor : sourceProcessors) {
-            final CompletableFuture<Void> stopFuture = sourceProcessor.getLifecycle().stop();
-            stopFutures.add(stopFuture);
+            stopFutures.add(sourceProcessor.getLifecycle().stop());
+        }
+
+        for (final ProcessGroupFacade childGroup : group.getProcessGroups()) {
+            stopFutures.add(stopSourceComponents(childGroup));
         }
 
         return CompletableFuture.allOf(stopFutures.toArray(new CompletableFuture[0]));
     }
 
-    protected CompletableFuture<Void> startNonSourceProcessors(final FlowContext flowContext) {
-        final List<ProcessorFacade> nonSourceProcessors = getNonSourceProcessors(flowContext.getRootGroup());
+    protected CompletableFuture<Void> startNonSourceComponents(final FlowContext flowContext) {
+        return startNonSourceComponents(flowContext.getRootGroup());
+    }
 
+    private CompletableFuture<Void> startNonSourceComponents(final ProcessGroupFacade group) {
         final List<CompletableFuture<Void>> startFutures = new ArrayList<>();
+
+        final List<ProcessorFacade> nonSourceProcessors = getNonSourceProcessors(group);
         for (final ProcessorFacade nonSourceProcessor : nonSourceProcessors) {
-            final CompletableFuture<Void> startFuture = nonSourceProcessor.getLifecycle().start();
-            startFutures.add(startFuture);
+            startFutures.add(nonSourceProcessor.getLifecycle().start());
+        }
+
+        final ProcessGroupLifecycle lifecycle = group.getLifecycle();
+        startFutures.add(lifecycle.startPorts(false));
+        startFutures.add(lifecycle.startRemoteProcessGroups(false));
+        startFutures.add(lifecycle.startStatelessGroups(false));
+
+        for (final ProcessGroupFacade childGroup : group.getProcessGroups()) {
+            startFutures.add(startNonSourceComponents(childGroup));
         }
 
         return CompletableFuture.allOf(startFutures.toArray(new CompletableFuture[0]));
@@ -693,4 +737,8 @@ public abstract class AbstractConnector implements Connector {
         return Collections.emptyList();
     }
 
+    @Override
+    public String toString() {
+        return description;
+    }
 }
diff --git a/src/main/java/org/apache/nifi/components/connector/components/ProcessGroupLifecycle.java b/src/main/java/org/apache/nifi/components/connector/components/ProcessGroupLifecycle.java
index 8cc3ebb..144094a 100644
--- a/src/main/java/org/apache/nifi/components/connector/components/ProcessGroupLifecycle.java
+++ b/src/main/java/org/apache/nifi/components/connector/components/ProcessGroupLifecycle.java
@@ -30,13 +30,25 @@ public interface ProcessGroupLifecycle {
 
     CompletableFuture<Void> disableControllerServices(Collection<String> serviceIdentifiers);
 
-    CompletableFuture<Void> startProcessors();
+    CompletableFuture<Void> startProcessors(boolean recursive);
 
     CompletableFuture<Void> start(ControllerServiceReferenceScope serviceReferenceScope);
 
     CompletableFuture<Void> stop();
 
-    CompletableFuture<Void> stopProcessors();
+    CompletableFuture<Void> stopProcessors(boolean recursive);
+
+    CompletableFuture<Void> startPorts(boolean recursive);
+
+    CompletableFuture<Void> stopPorts(boolean recursive);
+
+    CompletableFuture<Void> startRemoteProcessGroups(boolean recursive);
+
+    CompletableFuture<Void> stopRemoteProcessGroups(boolean recursive);
+
+    CompletableFuture<Void> startStatelessGroups(boolean recursive);
+
+    CompletableFuture<Void> stopStatelessGroups(boolean recursive);
 
     int getActiveThreadCount();
 }


(nifi-api) 27/27: NIFI-15565: Code cleanup (#64)

Posted by ma...@apache.org.
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-api.git

commit b6e4d8223c1cee55485a55d1bccc6cdb9a5f672d
Author: Mark Payne <ma...@hotmail.com>
AuthorDate: Tue Feb 10 09:45:38 2026 -0500

    NIFI-15565: Code cleanup (#64)
---
 .../components/connector/ConfigurationStep.java    | 23 ++++++++++++++++++++
 .../connector/ConnectorPropertyDependency.java     | 23 ++++++++++++++++++++
 .../connector/components/ParameterValue.java       | 25 ++++++++++++++++------
 .../nifi/flow/VersionedConfigurationStep.java      |  5 +++++
 4 files changed, 70 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/apache/nifi/components/connector/ConfigurationStep.java b/src/main/java/org/apache/nifi/components/connector/ConfigurationStep.java
index d840b12..abbd84d 100644
--- a/src/main/java/org/apache/nifi/components/connector/ConfigurationStep.java
+++ b/src/main/java/org/apache/nifi/components/connector/ConfigurationStep.java
@@ -25,6 +25,7 @@ import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
+import java.util.Objects;
 import java.util.Set;
 import java.util.stream.Collectors;
 
@@ -60,6 +61,28 @@ public final class ConfigurationStep {
         return dependencies;
     }
 
+    @Override
+    public String toString() {
+        return "ConfigurationStep[name=" + name + "]";
+    }
+
+    @Override
+    public boolean equals(final Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        final ConfigurationStep that = (ConfigurationStep) o;
+        return Objects.equals(name, that.name);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hashCode(name);
+    }
+
     public static final class Builder {
         private String name;
         private String description;
diff --git a/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyDependency.java b/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyDependency.java
index 0f2d1e2..d2ecb79 100644
--- a/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyDependency.java
+++ b/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyDependency.java
@@ -17,6 +17,7 @@
 
 package org.apache.nifi.components.connector;
 
+import java.util.Objects;
 import java.util.Set;
 
 public final class ConnectorPropertyDependency {
@@ -40,4 +41,26 @@ public final class ConnectorPropertyDependency {
     public Set<String> getDependentValues() {
         return dependentValues;
     }
+
+    @Override
+    public String toString() {
+        return "ConnectorPropertyDependency[propertyName=" + propertyName + ", dependentValues=" + dependentValues + "]";
+    }
+
+    @Override
+    public boolean equals(final Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        final ConnectorPropertyDependency that = (ConnectorPropertyDependency) o;
+        return Objects.equals(propertyName, that.propertyName) && Objects.equals(dependentValues, that.dependentValues);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(propertyName, dependentValues);
+    }
 }
diff --git a/src/main/java/org/apache/nifi/components/connector/components/ParameterValue.java b/src/main/java/org/apache/nifi/components/connector/components/ParameterValue.java
index 6a77467..0671af0 100644
--- a/src/main/java/org/apache/nifi/components/connector/components/ParameterValue.java
+++ b/src/main/java/org/apache/nifi/components/connector/components/ParameterValue.java
@@ -22,6 +22,7 @@ import org.apache.nifi.asset.Asset;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
+import java.util.Objects;
 
 public class ParameterValue {
     private final String name;
@@ -54,12 +55,24 @@ public class ParameterValue {
 
     @Override
     public String toString() {
-        return "ParameterValue{" +
-                "name=" + name +
-                ", value=" + (sensitive ? "****" : value) +
-                ", sensitive=" + sensitive +
-                ", assets=" + assets +
-                '}';
+        return "ParameterValue[name=" + name + ", value=" + (sensitive ? "****" : value) + ", sensitive=" + sensitive + ", assets=" + assets + "]";
+    }
+
+    @Override
+    public boolean equals(final Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        final ParameterValue that = (ParameterValue) o;
+        return Objects.equals(name, that.name);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hashCode(name);
     }
 
     public static class Builder {
diff --git a/src/main/java/org/apache/nifi/flow/VersionedConfigurationStep.java b/src/main/java/org/apache/nifi/flow/VersionedConfigurationStep.java
index f2c6bac..ac9a824 100644
--- a/src/main/java/org/apache/nifi/flow/VersionedConfigurationStep.java
+++ b/src/main/java/org/apache/nifi/flow/VersionedConfigurationStep.java
@@ -38,4 +38,9 @@ public class VersionedConfigurationStep {
     public void setProperties(final Map<String, VersionedConnectorValueReference> properties) {
         this.properties = properties;
     }
+
+    @Override
+    public String toString() {
+        return "VersionedConfigurationStep[name=" + name + "]";
+    }
 }


(nifi-api) 04/27: NIFI-15326: Adding support for connector configuration step documentation. (#28)

Posted by ma...@apache.org.
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-api.git

commit 8b4a93b7caecfa44ab586ffef99e85ac272bc746
Author: Matt Gilman <ma...@gmail.com>
AuthorDate: Thu Dec 11 09:24:13 2025 -0500

    NIFI-15326: Adding support for connector configuration step documentation. (#28)
---
 .../nifi/components/connector/ConfigurationStep.java   | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/src/main/java/org/apache/nifi/components/connector/ConfigurationStep.java b/src/main/java/org/apache/nifi/components/connector/ConfigurationStep.java
index 6affd8e..585e74c 100644
--- a/src/main/java/org/apache/nifi/components/connector/ConfigurationStep.java
+++ b/src/main/java/org/apache/nifi/components/connector/ConfigurationStep.java
@@ -27,11 +27,13 @@ public final class ConfigurationStep {
     private final String name;
     private final String description;
     private final List<ConnectorPropertyGroup> propertyGroups;
+    private final String documentation;
 
     private ConfigurationStep(final Builder builder) {
         this.name = builder.name;
         this.description = builder.description;
         this.propertyGroups = Collections.unmodifiableList(builder.propertyGroups);
+        this.documentation = builder.documentation;
     }
 
     public String getName() {
@@ -46,11 +48,18 @@ public final class ConfigurationStep {
         return propertyGroups;
     }
 
+    /**
+     * @return the configuration step documentation in markdown
+     */
+    public String getDocumentation() {
+        return documentation;
+    }
 
     public static final class Builder {
         private String name;
         private String description;
         private List<ConnectorPropertyGroup> propertyGroups = Collections.emptyList();
+        private String documentation;
 
         public Builder name(String name) {
             this.name = name;
@@ -67,6 +76,15 @@ public final class ConfigurationStep {
             return this;
         }
 
+        /**
+         * @param documentation the documentation for this configuration step in markdown
+         * @return this builder
+         */
+        public Builder documentation(String documentation) {
+            this.documentation = documentation;
+            return this;
+        }
+
         public ConfigurationStep build() {
             if (name == null) {
                 throw new IllegalStateException("Configuration Step's name must be provided");


(nifi-api) 06/27: NIFI-15343: Adding providerId to Secret. (#30)

Posted by ma...@apache.org.
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-api.git

commit 910bd9b284c9b9a2d42a1287cefaf368eca940d4
Author: Matt Gilman <ma...@gmail.com>
AuthorDate: Mon Dec 15 16:27:17 2025 -0500

    NIFI-15343: Adding providerId to Secret. (#30)
---
 src/main/java/org/apache/nifi/components/connector/Secret.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/main/java/org/apache/nifi/components/connector/Secret.java b/src/main/java/org/apache/nifi/components/connector/Secret.java
index 5b50ea4..6ac3f00 100644
--- a/src/main/java/org/apache/nifi/components/connector/Secret.java
+++ b/src/main/java/org/apache/nifi/components/connector/Secret.java
@@ -19,6 +19,8 @@ package org.apache.nifi.components.connector;
 
 public interface Secret {
 
+    String getProviderId();
+
     String getProviderName();
 
     String getGroupName();


(nifi-api) 19/27: NIFI-15451: Provide ability for Connectors to lookup Bundles available for a given component type (#46)

Posted by ma...@apache.org.
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-api.git

commit 86b0a89bd85bbad1e414b9d298163c46b5166a98
Author: Mark Payne <ma...@hotmail.com>
AuthorDate: Wed Jan 21 12:25:20 2026 -0500

    NIFI-15451: Provide ability for Connectors to lookup Bundles available for a given component type (#46)
---
 .../connector/ComponentBundleLookup.java           | 33 ++++++++++++++++++++++
 .../connector/ConnectorInitializationContext.java  |  7 +++++
 ...ocumentationConnectorInitializationContext.java | 10 ++++++-
 3 files changed, 49 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/nifi/components/connector/ComponentBundleLookup.java b/src/main/java/org/apache/nifi/components/connector/ComponentBundleLookup.java
new file mode 100644
index 0000000..7abe996
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/ComponentBundleLookup.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector;
+
+import org.apache.nifi.flow.Bundle;
+
+import java.util.List;
+
+public interface ComponentBundleLookup {
+
+    /**
+     * Determines which bundles are available for the given component type.
+     * @param componentType the component type
+     * @return the list of available bundles that contain the component type
+     */
+    List<Bundle> getAvailableBundles(String componentType);
+
+}
diff --git a/src/main/java/org/apache/nifi/components/connector/ConnectorInitializationContext.java b/src/main/java/org/apache/nifi/components/connector/ConnectorInitializationContext.java
index 3626a47..88880f9 100644
--- a/src/main/java/org/apache/nifi/components/connector/ConnectorInitializationContext.java
+++ b/src/main/java/org/apache/nifi/components/connector/ConnectorInitializationContext.java
@@ -51,6 +51,13 @@ public interface ConnectorInitializationContext {
      */
     ComponentLog getLogger();
 
+    /**
+     * Returns the ComponentBundleLookup that can be used to determine which bundles are available
+     * for a given component type.
+     * @return the ComponentBundleLookup
+     */
+    ComponentBundleLookup getComponentBundleLookup();
+
     /**
      * <p>
      *   Updates the Connector's flow to the given VersionedExternalFlow. This may be a long-running process, as it involves
diff --git a/src/main/java/org/apache/nifi/documentation/init/DocumentationConnectorInitializationContext.java b/src/main/java/org/apache/nifi/documentation/init/DocumentationConnectorInitializationContext.java
index 3529a9f..75bc7e0 100644
--- a/src/main/java/org/apache/nifi/documentation/init/DocumentationConnectorInitializationContext.java
+++ b/src/main/java/org/apache/nifi/documentation/init/DocumentationConnectorInitializationContext.java
@@ -16,13 +16,16 @@
  */
 package org.apache.nifi.documentation.init;
 
-import java.util.UUID;
+import org.apache.nifi.components.connector.ComponentBundleLookup;
 import org.apache.nifi.components.connector.ConnectorInitializationContext;
 import org.apache.nifi.components.connector.FlowUpdateException;
 import org.apache.nifi.components.connector.components.FlowContext;
 import org.apache.nifi.flow.VersionedExternalFlow;
 import org.apache.nifi.logging.ComponentLog;
 
+import java.util.List;
+import java.util.UUID;
+
 /**
  * A ConnectorInitializationContext implementation for use during documentation generation.
  * This context provides minimal functionality needed to initialize a Connector for the purposes
@@ -46,6 +49,11 @@ public class DocumentationConnectorInitializationContext implements ConnectorIni
         return new NopComponentLog();
     }
 
+    @Override
+    public ComponentBundleLookup getComponentBundleLookup() {
+        return componentType -> List.of();
+    }
+
     @Override
     public void updateFlow(final FlowContext flowContext, final VersionedExternalFlow versionedExternalFlow) throws FlowUpdateException {
         // No-op for documentation purposes - we don't actually update any flows


(nifi-api) 09/27: NIFI-15315 Add support for assets in Connectors (#31)

Posted by ma...@apache.org.
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-api.git

commit 39c3c15dd04935e67aacf9ab3837c41d2179dd93
Author: Bryan Bende <bb...@gmail.com>
AuthorDate: Wed Dec 17 16:28:41 2025 -0500

    NIFI-15315 Add support for assets in Connectors (#31)
    
    - Add ownerIdentifier in Asset and deprecate parameterContextIdentifier
    - Add ASSET and ASSET_LIST types for Connector properties and update validation
    - Support multiple asset references
    
    Signed-off-by: Kevin Doran <kd...@apache.org>
---
 src/main/java/org/apache/nifi/asset/Asset.java     |   9 ++
 .../nifi/components/connector/AssetReference.java  |  25 +++--
 .../connector/ConnectorPropertyDescriptor.java     |  53 ++++++++--
 .../nifi/components/connector/PropertyType.java    |   4 +-
 .../flow/VersionedConnectorValueReference.java     |  25 ++---
 .../connector/TestConnectorPropertyDescriptor.java | 114 ++++++++++++++++++++-
 .../org/apache/nifi/parameter/TestParameter.java   |   5 +
 7 files changed, 203 insertions(+), 32 deletions(-)

diff --git a/src/main/java/org/apache/nifi/asset/Asset.java b/src/main/java/org/apache/nifi/asset/Asset.java
index 3e8c026..2ea52b2 100644
--- a/src/main/java/org/apache/nifi/asset/Asset.java
+++ b/src/main/java/org/apache/nifi/asset/Asset.java
@@ -37,9 +37,18 @@ public interface Asset {
      * Returns the identifier of the parameter context the Asset belongs to
      *
      * @return Parameter Context Identifier
+     * @deprecated Use {@link #getOwnerIdentifier()} instead
      */
+    @Deprecated
     String getParameterContextIdentifier();
 
+    /**
+     * Returns the identifier of the resource the Asset belongs to
+     *
+     * @return Owner Identifier
+     */
+    String getOwnerIdentifier();
+
     /**
      * Returns the name of the Asset
      *
diff --git a/src/main/java/org/apache/nifi/components/connector/AssetReference.java b/src/main/java/org/apache/nifi/components/connector/AssetReference.java
index 13abf73..1115745 100644
--- a/src/main/java/org/apache/nifi/components/connector/AssetReference.java
+++ b/src/main/java/org/apache/nifi/components/connector/AssetReference.java
@@ -17,26 +17,29 @@
 
 package org.apache.nifi.components.connector;
 
+import java.util.Collections;
+import java.util.HashSet;
 import java.util.Objects;
+import java.util.Set;
 
 /**
- * A ConnectorValueReference implementation representing a reference to an asset.
+ * A ConnectorValueReference implementation representing a reference to one or more assets.
  */
 public final class AssetReference implements ConnectorValueReference {
 
-    private final String assetIdentifier;
+    private final Set<String> assetIdentifiers;
 
-    public AssetReference(final String assetIdentifier) {
-        this.assetIdentifier = assetIdentifier;
+    public AssetReference(final Set<String> assetIdentifiers) {
+        this.assetIdentifiers = assetIdentifiers == null ? Collections.emptySet() : new HashSet<>(assetIdentifiers);
     }
 
     /**
-     * Returns the asset identifier.
+     * Returns the asset identifiers.
      *
-     * @return the asset identifier
+     * @return the asset identifiers
      */
-    public String getAssetIdentifier() {
-        return assetIdentifier;
+    public Set<String> getAssetIdentifiers() {
+        return assetIdentifiers;
     }
 
     @Override
@@ -53,16 +56,16 @@ public final class AssetReference implements ConnectorValueReference {
             return false;
         }
         final AssetReference that = (AssetReference) object;
-        return Objects.equals(assetIdentifier, that.assetIdentifier);
+        return Objects.equals(assetIdentifiers, that.assetIdentifiers);
     }
 
     @Override
     public int hashCode() {
-        return Objects.hashCode(assetIdentifier);
+        return Objects.hashCode(assetIdentifiers);
     }
 
     @Override
     public String toString() {
-        return "AssetReference[assetId=" + assetIdentifier + "]";
+        return "AssetReference[assetIds=" + assetIdentifiers + "]";
     }
 }
diff --git a/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyDescriptor.java b/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyDescriptor.java
index 209039b..8debeb4 100644
--- a/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyDescriptor.java
+++ b/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyDescriptor.java
@@ -22,6 +22,7 @@ import org.apache.nifi.components.DescribedValue;
 import org.apache.nifi.components.ValidationResult;
 import org.apache.nifi.components.Validator;
 
+import java.io.File;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -113,19 +114,23 @@ public final class ConnectorPropertyDescriptor {
             fetchedAllowableValues = null;
         }
 
-        if (type != PropertyType.STRING_LIST) {
-            return validateIndividual(stepName, groupName, value, validationContext, fetchedAllowableValues);
-        }
-
         if (required && value == null) {
             return new ValidationResult.Builder()
                 .subject(name)
-                .input(value)
+                .input(null)
                 .valid(false)
                 .explanation("Property is required but no value was specified")
                 .build();
         }
 
+        if (type == PropertyType.ASSET || type == PropertyType.ASSET_LIST) {
+            return validateAssets(value);
+        }
+
+        if (type != PropertyType.STRING_LIST) {
+            return validateIndividual(stepName, groupName, value, validationContext, fetchedAllowableValues);
+        }
+
         final String[] values = value.split(",");
         for (final String individualValue : values) {
             final ValidationResult result = validateIndividual(stepName, groupName, individualValue.trim(), validationContext, fetchedAllowableValues);
@@ -190,10 +195,9 @@ public final class ConnectorPropertyDescriptor {
         return false;
     }
 
-
     private ValidationResult validateType(final String value) {
         final String explanation = switch (type) {
-            case SECRET, STRING, STRING_LIST -> null;
+            case SECRET, STRING, STRING_LIST, ASSET, ASSET_LIST -> null;
             case BOOLEAN -> BOOLEAN_PATTERN.matcher(value).matches() ? null : "Value must be true or false";
             case INTEGER -> INTEGER_PATTERN.matcher(value).matches() ? null : "Value must be an integer";
             case DOUBLE, FLOAT -> DOUBLE_PATTERN.matcher(value).matches() ? null : "Value must be a floating point number";
@@ -211,6 +215,41 @@ public final class ConnectorPropertyDescriptor {
             .build();
     }
 
+    private ValidationResult validateAssets(final String value) {
+        final String[] values = value.split(",");
+        if (type == PropertyType.ASSET && values.length > 1) {
+            return new ValidationResult.Builder()
+                .subject(name)
+                .input(value)
+                .valid(false)
+                .explanation("Property only supports a single asset, but " + values.length + " assets were specified")
+                .build();
+        }
+
+        final List<String> nonExistentAssets = new ArrayList<>();
+        for (final String assetValue : values) {
+            final File assetFile = new File(assetValue);
+            if (!assetFile.exists() || !assetFile.canRead()) {
+                nonExistentAssets.add(assetValue);
+            }
+        }
+
+        if (!nonExistentAssets.isEmpty()) {
+            return new ValidationResult.Builder()
+                .subject(name)
+                .input(value)
+                .valid(false)
+                .explanation("The specified resource(s) do not exist or could not be accessed: " + nonExistentAssets)
+                .build();
+        }
+
+        return new ValidationResult.Builder()
+            .subject(name)
+            .input(value)
+            .valid(true)
+            .build();
+    }
+
     @Override
     public boolean equals(final Object o) {
         if (o == null || getClass() != o.getClass()) {
diff --git a/src/main/java/org/apache/nifi/components/connector/PropertyType.java b/src/main/java/org/apache/nifi/components/connector/PropertyType.java
index f01a91e..945b492 100644
--- a/src/main/java/org/apache/nifi/components/connector/PropertyType.java
+++ b/src/main/java/org/apache/nifi/components/connector/PropertyType.java
@@ -24,5 +24,7 @@ public enum PropertyType {
     FLOAT,
     DOUBLE,
     STRING_LIST,
-    SECRET
+    SECRET,
+    ASSET,
+    ASSET_LIST
 }
diff --git a/src/main/java/org/apache/nifi/flow/VersionedConnectorValueReference.java b/src/main/java/org/apache/nifi/flow/VersionedConnectorValueReference.java
index e9e881c..7bdc3b5 100644
--- a/src/main/java/org/apache/nifi/flow/VersionedConnectorValueReference.java
+++ b/src/main/java/org/apache/nifi/flow/VersionedConnectorValueReference.java
@@ -18,6 +18,7 @@
 package org.apache.nifi.flow;
 
 import java.util.Objects;
+import java.util.Set;
 
 /**
  * Represents a property value reference for a Connector in a versioned flow.
@@ -27,11 +28,11 @@ import java.util.Objects;
 public class VersionedConnectorValueReference {
     private String valueType;
     private String value;
-    private String assetId;
     private String providerId;
     private String providerName;
     private String secretName;
     private String fullyQualifiedSecretName;
+    private Set<String> assetIds;
 
     public String getValueType() {
         return valueType;
@@ -49,14 +50,6 @@ public class VersionedConnectorValueReference {
         this.value = value;
     }
 
-    public String getAssetId() {
-        return assetId;
-    }
-
-    public void setAssetId(final String assetId) {
-        this.assetId = assetId;
-    }
-
     public String getProviderId() {
         return providerId;
     }
@@ -89,6 +82,14 @@ public class VersionedConnectorValueReference {
         this.fullyQualifiedSecretName = fullyQualifiedSecretName;
     }
 
+    public Set<String> getAssetIds() {
+        return assetIds;
+    }
+
+    public void setAssetIds(final Set<String> assetIds) {
+        this.assetIds = assetIds;
+    }
+
     @Override
     public boolean equals(final Object obj) {
         if (this == obj) {
@@ -99,7 +100,7 @@ public class VersionedConnectorValueReference {
         }
         return Objects.equals(valueType, other.valueType)
                && Objects.equals(value, other.value)
-               && Objects.equals(assetId, other.assetId)
+               && Objects.equals(assetIds, other.assetIds)
                && Objects.equals(providerId, other.providerId)
                && Objects.equals(secretName, other.secretName)
                && Objects.equals(fullyQualifiedSecretName, other.fullyQualifiedSecretName);
@@ -107,12 +108,12 @@ public class VersionedConnectorValueReference {
 
     @Override
     public int hashCode() {
-        return Objects.hash(valueType, value, assetId, providerId, secretName, fullyQualifiedSecretName);
+        return Objects.hash(valueType, value, assetIds, providerId, secretName, fullyQualifiedSecretName);
     }
 
     @Override
     public String toString() {
         return "VersionedConnectorValueReference[valueType=" + valueType + ", value=" + value
-               + ", assetId=" + assetId + ", providerId=" + providerId + ", fullyQualifiedSecretName=" + fullyQualifiedSecretName + "]";
+               + ", assetIds=" + assetIds + ", providerId=" + providerId + ", fullyQualifiedSecretName=" + fullyQualifiedSecretName + "]";
     }
 }
diff --git a/src/test/java/org/apache/nifi/components/connector/TestConnectorPropertyDescriptor.java b/src/test/java/org/apache/nifi/components/connector/TestConnectorPropertyDescriptor.java
index 823c3ef..ec6da58 100644
--- a/src/test/java/org/apache/nifi/components/connector/TestConnectorPropertyDescriptor.java
+++ b/src/test/java/org/apache/nifi/components/connector/TestConnectorPropertyDescriptor.java
@@ -21,7 +21,14 @@ import org.apache.nifi.components.DescribedValue;
 import org.apache.nifi.components.ValidationContext;
 import org.apache.nifi.components.ValidationResult;
 import org.junit.jupiter.api.Test;
-
+import org.junit.jupiter.api.io.TempDir;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Path;
 import java.util.Collections;
 import java.util.List;
 
@@ -34,6 +41,18 @@ public class TestConnectorPropertyDescriptor {
     private static final String TEST_STEP_NAME = "test-step";
     private static final String TEST_GROUP_NAME = "test-group";
 
+    @Test
+    void testRequiredProperty() {
+        final ConnectorPropertyDescriptor descriptor = new ConnectorPropertyDescriptor.Builder()
+            .name("Required Property")
+            .type(PropertyType.STRING)
+            .required(true)
+            .build();
+
+        final ConnectorValidationContext context = new TestConnectorValidationContext();
+        assertFalse(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, null, context).isValid());
+    }
+
     @Test
     void testValidateStringType() {
         final ConnectorPropertyDescriptor descriptor = new ConnectorPropertyDescriptor.Builder()
@@ -210,6 +229,99 @@ public class TestConnectorPropertyDescriptor {
         assertFalse(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, ".123", context).isValid());
     }
 
+    @Test
+    void testValidateAssetTypeWithExistingAsset(@TempDir final Path tempDir) throws IOException {
+        final File assetFile = createAssetFile(tempDir, "asset1.txt");
+
+        final ConnectorPropertyDescriptor descriptor = new ConnectorPropertyDescriptor.Builder()
+            .name("Asset Property")
+            .type(PropertyType.ASSET)
+            .build();
+
+        final ConnectorValidationContext context = new TestConnectorValidationContext();
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, assetFile.getAbsolutePath(), context).isValid());
+    }
+
+    @Test
+    void testValidateAssetTypeWithMissingAsset(@TempDir final Path tempDir) throws IOException {
+        final File assetFile = new File(tempDir.toFile(), "asset1.txt");
+
+        final ConnectorPropertyDescriptor descriptor = new ConnectorPropertyDescriptor.Builder()
+            .name("Asset Property")
+            .type(PropertyType.ASSET)
+            .build();
+
+        final ConnectorValidationContext context = new TestConnectorValidationContext();
+        assertFalse(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, assetFile.getAbsolutePath(), context).isValid());
+    }
+
+    @Test
+    void testValidateAssetTypeWithMultipleAssets(@TempDir final Path tempDir) throws IOException {
+        final File assetFile1 = new File(tempDir.toFile(), "asset1.txt");
+        final File assetFile2 = new File(tempDir.toFile(), "asset2.txt");
+        final String multipleAssetValue = assetFile1.getAbsolutePath() + "," + assetFile2.getAbsolutePath();
+
+        final ConnectorPropertyDescriptor descriptor = new ConnectorPropertyDescriptor.Builder()
+            .name("Asset Property")
+            .type(PropertyType.ASSET)
+            .build();
+
+        final ConnectorValidationContext context = new TestConnectorValidationContext();
+        assertFalse(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, multipleAssetValue, context).isValid());
+    }
+
+    @Test
+    void testValidateAssetListTypeWithSingleExistingAsset(@TempDir final Path tempDir) throws IOException {
+        final File assetFile1 = createAssetFile(tempDir, "asset1.txt");
+
+        final ConnectorPropertyDescriptor descriptor = new ConnectorPropertyDescriptor.Builder()
+            .name("Asset List Property")
+            .type(PropertyType.ASSET_LIST)
+            .build();
+
+        final ConnectorValidationContext context = new TestConnectorValidationContext();
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, assetFile1.getAbsolutePath(), context).isValid());
+    }
+
+    @Test
+    void testValidateAssetListTypeWithMultipleExistingAssets(@TempDir final Path tempDir) throws IOException {
+        final File assetFile1 = createAssetFile(tempDir, "asset1.txt");
+        final File assetFile2 = createAssetFile(tempDir, "asset2.txt");
+        final String multipleAssetValue = assetFile1.getAbsolutePath() + "," + assetFile2.getAbsolutePath();
+
+        final ConnectorPropertyDescriptor descriptor = new ConnectorPropertyDescriptor.Builder()
+            .name("Asset List Property")
+            .type(PropertyType.ASSET_LIST)
+            .build();
+
+        final ConnectorValidationContext context = new TestConnectorValidationContext();
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, multipleAssetValue, context).isValid());
+    }
+
+    @Test
+    void testValidateAssetListTypeWithSomeMissingAssets(@TempDir final Path tempDir) throws IOException {
+        final File assetFile1 = createAssetFile(tempDir, "asset1.txt");
+        final File assetFile2 = new File(tempDir.toFile(), "asset2.txt"); // Never created
+        final String multipleAssetValue = assetFile1.getAbsolutePath() + "," + assetFile2.getAbsolutePath();
+
+        final ConnectorPropertyDescriptor descriptor = new ConnectorPropertyDescriptor.Builder()
+            .name("Asset List Property")
+            .type(PropertyType.ASSET_LIST)
+            .build();
+
+        final ConnectorValidationContext context = new TestConnectorValidationContext();
+        assertFalse(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, multipleAssetValue, context).isValid());
+    }
+
+    private File createAssetFile(final Path parentDir, final String name) throws IOException {
+        final File assetFile = new File(parentDir.toFile(), name);
+        try (final OutputStream outputStream = new FileOutputStream(assetFile)) {
+            outputStream.write(name.getBytes(StandardCharsets.UTF_8));
+            outputStream.flush();
+        }
+        return assetFile;
+    }
+
     /**
      * Simple test implementation of ConnectorValidationContext for unit testing.
      */
diff --git a/src/test/java/org/apache/nifi/parameter/TestParameter.java b/src/test/java/org/apache/nifi/parameter/TestParameter.java
index 018d589..a7d62fb 100644
--- a/src/test/java/org/apache/nifi/parameter/TestParameter.java
+++ b/src/test/java/org/apache/nifi/parameter/TestParameter.java
@@ -253,6 +253,11 @@ public class TestParameter {
             return parameterContextIdentifier;
         }
 
+        @Override
+        public String getOwnerIdentifier() {
+            return parameterContextIdentifier;
+        }
+
         @Override
         public String getName() {
             return name;


(nifi-api) 07/27: NIFI-15258: Enable Custom UI to retrieve connector with flow contexts (#33)

Posted by ma...@apache.org.
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-api.git

commit 0c153a9f1a847caf53330013034331e34cd88f7b
Author: Bob Paulin <bo...@bobpaulin.com>
AuthorDate: Tue Dec 16 15:11:53 2025 -0600

    NIFI-15258: Enable Custom UI to retrieve connector with flow contexts (#33)
---
 .../apache/nifi/web/NiFiConnectorWebContext.java   | 23 ++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/apache/nifi/web/NiFiConnectorWebContext.java b/src/main/java/org/apache/nifi/web/NiFiConnectorWebContext.java
index 5bebf42..4fdfeb1 100644
--- a/src/main/java/org/apache/nifi/web/NiFiConnectorWebContext.java
+++ b/src/main/java/org/apache/nifi/web/NiFiConnectorWebContext.java
@@ -16,6 +16,8 @@
  */
 package org.apache.nifi.web;
 
+import org.apache.nifi.components.connector.components.FlowContext;
+
 /**
  * NiFi web context providing access to Connector instances for
  * connector custom UIs.
@@ -23,15 +25,28 @@ package org.apache.nifi.web;
 public interface NiFiConnectorWebContext {
 
     /**
-     * Returns the Connector instance for the given connector ID.
+     * Returns the Connector Web Context for the given connector ID.
      * The returned Connector can be cast to a connector-specific interface
      * if the custom UI's classloader has visibility to that interface
-     * (typically through the NAR classloader hierarchy).
+     * (typically through the NAR classloader hierarchy). Active and
+     * working flow context are provided for invoking connector methods
+     * on components within each of those flow contexts.
      *
      * @param <T> the expected type of the Connector
      * @param connectorId the ID of the connector to retrieve
-     * @return the Connector instance
+     * @return the ConnectorWebContext instance
      * @throws IllegalArgumentException if the connector does not exist
      */
-    <T> T getConnector(String connectorId) throws IllegalArgumentException;
+    <T> ConnectorWebContext<T> getConnectorWebContext(String connectorId) throws IllegalArgumentException;
+
+    /**
+     * Hold the context needed to work with the Connector within a custom ui
+     *
+     * @param <T> the expected type of the Connector
+     * @param connector the Connector instance
+     * @param workingFlowContext the working {@link FlowContext} for the connector instance
+     * @param activeFlowContext the active {@link FlowContext} for the connector instance
+     */
+    record ConnectorWebContext<T>(T connector, FlowContext workingFlowContext, FlowContext activeFlowContext) {
+    }
 }


(nifi-api) 18/27: NIFI-15461: Fixed bug that caused system tests to fail (#48)

Posted by ma...@apache.org.
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-api.git

commit 997f413da87b543d7362df0807104d05634cdfc1
Author: Mark Payne <ma...@hotmail.com>
AuthorDate: Wed Jan 21 10:38:37 2026 -0500

    NIFI-15461: Fixed bug that caused system tests to fail (#48)
---
 .../java/org/apache/nifi/components/connector/AbstractConnector.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java b/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
index d965699..6b71fa6 100644
--- a/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
+++ b/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
@@ -204,7 +204,7 @@ public abstract class AbstractConnector implements Connector {
             return null;
         });
 
-        startNonSourceFuture.thenRun(() -> {
+        startNonSourceFuture.thenRunAsync(() -> {
             try {
                 ensureDrainageUnblocked();
             } catch (final Exception e) {


(nifi-api) 16/27: NIFI-15440: Implementation of ConnectorActions (#47)

Posted by ma...@apache.org.
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-api.git

commit 93df0817ba7375afff3a38e52b98f08256b81364
Author: Mark Payne <ma...@hotmail.com>
AuthorDate: Mon Jan 12 14:13:36 2026 -0500

    NIFI-15440: Implementation of ConnectorActions (#47)
---
 .../nifi/components/connector/components/ProcessGroupLifecycle.java      | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/main/java/org/apache/nifi/components/connector/components/ProcessGroupLifecycle.java b/src/main/java/org/apache/nifi/components/connector/components/ProcessGroupLifecycle.java
index 963643c..8cc3ebb 100644
--- a/src/main/java/org/apache/nifi/components/connector/components/ProcessGroupLifecycle.java
+++ b/src/main/java/org/apache/nifi/components/connector/components/ProcessGroupLifecycle.java
@@ -38,4 +38,5 @@ public interface ProcessGroupLifecycle {
 
     CompletableFuture<Void> stopProcessors();
 
+    int getActiveThreadCount();
 }


(nifi-api) 17/27: NIFI-15446: Updated JavaDocs to clarify how invocations of Connector Methods work (#45)

Posted by ma...@apache.org.
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-api.git

commit 6a7f7ff5549fa16763753013cb2151f6294b76fa
Author: Mark Payne <ma...@hotmail.com>
AuthorDate: Thu Jan 15 11:08:31 2026 -0500

    NIFI-15446: Updated JavaDocs to clarify how invocations of Connector Methods work (#45)
---
 .../components/ControllerServiceFacade.java        | 29 ++++++++++++++++++++++
 .../connector/components/ProcessorFacade.java      | 29 ++++++++++++++++++++++
 2 files changed, 58 insertions(+)

diff --git a/src/main/java/org/apache/nifi/components/connector/components/ControllerServiceFacade.java b/src/main/java/org/apache/nifi/components/connector/components/ControllerServiceFacade.java
index b0eae11..288bcdc 100644
--- a/src/main/java/org/apache/nifi/components/connector/components/ControllerServiceFacade.java
+++ b/src/main/java/org/apache/nifi/components/connector/components/ControllerServiceFacade.java
@@ -43,8 +43,37 @@ public interface ControllerServiceFacade {
 
     List<ConfigVerificationResult> verify(VersionedExternalFlow versionedExternalFlow, Map<String, String> variables);
 
+    /**
+     * <p>
+     * Invokes the {@link ConnectorMethod} with the given name, passing in the provided arguments. The arguments Map will be
+     * serialized into JSON. This provides the ability to pass complex data structures but means that arbitrary objects that
+     * contain methods will not be provided as-is. This is necessary due to ClassLoader isolation.
+     * </p>
+     * <p>
+     * Likewise, the return value will be deserialized from JSON into a standard Java object. Depending on the value returned,
+     * the returned object may be a primitive, a String, List, Map, etc. Complex objects will be represented as Maps of property names to values.
+     * </p>
+     *
+     * @param methodName the name of the ConnectorMethod to invoke
+     * @param arguments the arguments to pass to the method
+     * @return the result of the method invocation, deserialized from JSON
+     * @throws InvocationFailedException if unable to invoke the method
+     */
     Object invokeConnectorMethod(String methodName, Map<String, Object> arguments) throws InvocationFailedException;
 
+    /**
+     * Invokes the {@link ConnectorMethod} with the given name, passing in the provided arguments. The arguments
+     * Map will be serialized into JSON. This provides the ability to pass complex data structures but means that
+     * arbitrary objects that contain methods will not be provided as-is. This is necessary due to ClassLoader
+     * isolation.
+     *
+     * @param methodName the name of the ConnectorMethod to invoke
+     * @param arguments the arguments to pass to the method
+     * @param returnType the expected return type
+     * @return the result of the method invocation, deserialized from JSON into the specified return type
+     * @param <T> the expected return type
+     * @throws InvocationFailedException if unable to invoke the method
+     */
     <T> T invokeConnectorMethod(String methodName, Map<String, Object> arguments, Class<T> returnType) throws InvocationFailedException;
 
 }
diff --git a/src/main/java/org/apache/nifi/components/connector/components/ProcessorFacade.java b/src/main/java/org/apache/nifi/components/connector/components/ProcessorFacade.java
index bfa32b8..bb57e3f 100644
--- a/src/main/java/org/apache/nifi/components/connector/components/ProcessorFacade.java
+++ b/src/main/java/org/apache/nifi/components/connector/components/ProcessorFacade.java
@@ -43,7 +43,36 @@ public interface ProcessorFacade {
 
     List<ConfigVerificationResult> verify(VersionedExternalFlow versionedExternalFlow, Map<String, String> attributes);
 
+    /**
+     * <p>
+     * Invokes the {@link ConnectorMethod} with the given name, passing in the provided arguments. The arguments Map will be
+     * serialized into JSON. This provides the ability to pass complex data structures but means that arbitrary objects that
+     * contain methods will not be provided as-is. This is necessary due to ClassLoader isolation.
+     * </p>
+     * <p>
+     * Likewise, the return value will be deserialized from JSON into a standard Java object. Depending on the value returned,
+     * the returned object may be a primitive, a String, List, Map, etc. Complex objects will be represented as Maps of property names to values.
+     * </p>
+     *
+     * @param methodName the name of the ConnectorMethod to invoke
+     * @param arguments the arguments to pass to the method
+     * @return the result of the method invocation, deserialized from JSON
+     * @throws InvocationFailedException if unable to invoke the method
+     */
     Object invokeConnectorMethod(String methodName, Map<String, Object> arguments) throws InvocationFailedException;
 
+    /**
+     * Invokes the {@link ConnectorMethod} with the given name, passing in the provided arguments. The arguments
+     * Map will be serialized into JSON. This provides the ability to pass complex data structures but means that
+     * arbitrary objects that contain methods will not be provided as-is. This is necessary due to ClassLoader
+     * isolation.
+     *
+     * @param methodName the name of the ConnectorMethod to invoke
+     * @param arguments the arguments to pass to the method
+     * @param returnType the expected return type
+     * @return the result of the method invocation, deserialized from JSON into the specified return type
+     * @param <T> the expected return type
+     * @throws InvocationFailedException if unable to invoke the method
+     */
     <T> T invokeConnectorMethod(String methodName, Map<String, Object> arguments, Class<T> returnType) throws InvocationFailedException;
 }


(nifi-api) 15/27: NIFI-15427: Added drainFlowFiles(FlowContext) method to Connector (#42)

Posted by ma...@apache.org.
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-api.git

commit a63bc4e80276f52e5f5da024b5be6655d51818a9
Author: Mark Payne <ma...@hotmail.com>
AuthorDate: Fri Jan 9 13:01:26 2026 -0500

    NIFI-15427: Added drainFlowFiles(FlowContext) method to Connector (#42)
    
    * NIFI-15427: Added drainFlowFiles(FlowContext) method to Connector
    
    * NIFI-15427: Added missing @Override annotation
    
    * NIFI-15427: Ensured proper error handling when draining FlowFiles
---
 .../apache/nifi/components/connector/AbstractConnector.java   | 11 +++++++++++
 .../java/org/apache/nifi/components/connector/Connector.java  |  9 +++++++++
 2 files changed, 20 insertions(+)

diff --git a/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java b/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
index 8045bc6..d965699 100644
--- a/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
+++ b/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
@@ -156,6 +156,7 @@ public abstract class AbstractConnector implements Connector {
      * @param flowContext the FlowContext to use for drainage
      * @return a CompletableFuture that will be completed when drainage is complete
      */
+    @Override
     public CompletableFuture<Void> drainFlowFiles(final FlowContext flowContext) {
         final CompletableFuture<Void> result = new CompletableFuture<>();
         final QueueSize initialQueueSize = flowContext.getRootGroup().getQueueSize();
@@ -196,6 +197,11 @@ public abstract class AbstractConnector implements Connector {
 
                 result.completeExceptionally(new RuntimeException("Failed to start non-source processors while draining FlowFiles", e.getCause()));
             }
+        }).exceptionally(throwable -> {
+            if (!result.isDone()) {
+                result.completeExceptionally(new RuntimeException("Failed to stop source processors while draining FlowFiles", throwable));
+            }
+            return null;
         });
 
         startNonSourceFuture.thenRun(() -> {
@@ -253,6 +259,11 @@ public abstract class AbstractConnector implements Connector {
             if (!result.isDone()) {
                 result.complete(null);
             }
+        }).exceptionally(throwable -> {
+            if (!result.isDone()) {
+                result.completeExceptionally(new RuntimeException("Failed while draining FlowFiles", throwable));
+            }
+            return null;
         });
 
         return result;
diff --git a/src/main/java/org/apache/nifi/components/connector/Connector.java b/src/main/java/org/apache/nifi/components/connector/Connector.java
index ce88079..c0dd957 100644
--- a/src/main/java/org/apache/nifi/components/connector/Connector.java
+++ b/src/main/java/org/apache/nifi/components/connector/Connector.java
@@ -25,6 +25,7 @@ import org.apache.nifi.flow.VersionedExternalFlow;
 
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.CompletableFuture;
 
 /**
  * <p>
@@ -195,4 +196,12 @@ public interface Connector {
     List<AllowableValue> fetchAllowableValues(String stepName, String propertyName, FlowContext flowContext);
 
     List<AllowableValue> fetchAllowableValues(String stepName, String propertyName, FlowContext flowContext, String filter);
+
+    /**
+     * Drains any in-flight FlowFiles from the flow associated with the given Flow Context by processing the existing data
+     * but not accepting any new data.
+     * @param flowContext the flow context
+     * @return a Future that will be completed when the draining is complete
+     */
+    CompletableFuture<Void> drainFlowFiles(FlowContext flowContext);
 }


(nifi-api) 10/27: NIFI-15361: Removing documentation from ConfigurationStep. (#38)

Posted by ma...@apache.org.
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-api.git

commit e3fa975b6b186bcd9bcdd4405ad59432d4035f2b
Author: Matt Gilman <ma...@gmail.com>
AuthorDate: Thu Dec 18 16:50:45 2025 -0500

    NIFI-15361: Removing documentation from ConfigurationStep. (#38)
---
 .../nifi/components/connector/ConfigurationStep.java  | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/src/main/java/org/apache/nifi/components/connector/ConfigurationStep.java b/src/main/java/org/apache/nifi/components/connector/ConfigurationStep.java
index 585e74c..6393484 100644
--- a/src/main/java/org/apache/nifi/components/connector/ConfigurationStep.java
+++ b/src/main/java/org/apache/nifi/components/connector/ConfigurationStep.java
@@ -27,13 +27,11 @@ public final class ConfigurationStep {
     private final String name;
     private final String description;
     private final List<ConnectorPropertyGroup> propertyGroups;
-    private final String documentation;
 
     private ConfigurationStep(final Builder builder) {
         this.name = builder.name;
         this.description = builder.description;
         this.propertyGroups = Collections.unmodifiableList(builder.propertyGroups);
-        this.documentation = builder.documentation;
     }
 
     public String getName() {
@@ -48,18 +46,10 @@ public final class ConfigurationStep {
         return propertyGroups;
     }
 
-    /**
-     * @return the configuration step documentation in markdown
-     */
-    public String getDocumentation() {
-        return documentation;
-    }
-
     public static final class Builder {
         private String name;
         private String description;
         private List<ConnectorPropertyGroup> propertyGroups = Collections.emptyList();
-        private String documentation;
 
         public Builder name(String name) {
             this.name = name;
@@ -76,15 +66,6 @@ public final class ConfigurationStep {
             return this;
         }
 
-        /**
-         * @param documentation the documentation for this configuration step in markdown
-         * @return this builder
-         */
-        public Builder documentation(String documentation) {
-            this.documentation = documentation;
-            return this;
-        }
-
         public ConfigurationStep build() {
             if (name == null) {
                 throw new IllegalStateException("Configuration Step's name must be provided");


(nifi-api) 01/27: NIFI-15258: Initial API for Connectors

Posted by ma...@apache.org.
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-api.git

commit 2c0363bb30db2ad597906537bc6fc9efd0f7ad30
Author: Mark Payne <ma...@snowflake.com>
AuthorDate: Thu Jul 24 12:38:58 2025 -0400

    NIFI-15258: Initial API for Connectors
---
 .../java/org/apache/nifi/action/Component.java     |   4 +-
 .../apache/nifi/annotation/lifecycle/OnAdded.java  |   7 +-
 .../nifi/components/ConfigVerificationResult.java  |  13 +
 .../components/connector/AbstractConnector.java    | 594 +++++++++++++++++++++
 .../nifi/components/connector/AssetReference.java  |  68 +++
 .../components/connector/ConfigurationStep.java    |  76 +++
 .../nifi/components/connector/Connector.java       | 198 +++++++
 .../connector/ConnectorConfigurationContext.java   |  37 ++
 .../connector/ConnectorConfigurationManager.java}  |  30 +-
 .../connector/ConnectorInitializationContext.java  |  83 +++
 .../connector/ConnectorParameter.java}             |  34 +-
 .../connector/ConnectorParameterContext.java}      |  30 +-
 .../connector/ConnectorPropertyDependency.java}    |  47 +-
 .../connector/ConnectorPropertyDescriptor.java     | 434 +++++++++++++++
 .../connector/ConnectorPropertyGroup.java          | 194 +++++++
 .../connector/ConnectorPropertyValue.java          | 105 ++++
 .../connector/ConnectorValidationContext.java}     |  35 +-
 .../connector/ConnectorValueReference.java}        |  32 +-
 .../connector/ConnectorValueType.java}             |  39 +-
 .../connector/FlowUpdateException.java}            |  36 +-
 .../connector/InvocationFailedException.java}      |  38 +-
 .../connector/PropertyGroupConfiguration.java      |  55 ++
 .../connector/PropertyType.java}                   |  32 +-
 .../connector/Secret.java}                         |  34 +-
 .../connector/SecretProvider.java}                 |  39 +-
 .../nifi/components/connector/SecretReference.java |  91 ++++
 .../connector/SecretsManager.java}                 |  34 +-
 .../components/connector/StringLiteralValue.java   |  73 +++
 .../connector/components/ComponentState.java       |  47 ++
 .../connector/components/ConnectionFacade.java}    |  42 +-
 .../connector/components/ConnectorMethod.java      | 105 ++++
 .../components/ControllerServiceFacade.java        |  50 ++
 .../components/ControllerServiceLifecycle.java}    |  34 +-
 .../ControllerServiceReferenceHierarchy.java}      |  35 +-
 .../ControllerServiceReferenceScope.java}          |  36 +-
 .../components/ControllerServiceState.java}        |  33 +-
 .../connector/components/FlowContext.java}         |  46 +-
 .../connector/components/FlowContextType.java}     |  29 +-
 .../connector/components/MethodArgument.java}      |  33 +-
 .../components/ParameterContextFacade.java         |  68 +++
 .../connector/components/ParameterValue.java       | 101 ++++
 .../connector/components/ProcessGroupFacade.java   |  55 ++
 .../components/ProcessGroupLifecycle.java          |  41 ++
 .../connector/components/ProcessorFacade.java      |  49 ++
 .../connector/components/ProcessorLifecycle.java}  |  44 +-
 .../connector/components/ProcessorState.java}      |  34 +-
 .../components/StatelessGroupLifecycle.java}       |  34 +-
 .../connector/components/StatelessGroupState.java} |  38 +-
 .../java/org/apache/nifi/flow/ComponentType.java   |   3 +-
 .../VersionedConfigurationStep.java}               |  45 +-
 .../org/apache/nifi/flow/VersionedConnector.java   |  86 +++
 .../VersionedConnectorPropertyGroup.java}          |  45 +-
 .../flow/VersionedConnectorValueReference.java     | 108 ++++
 .../org/apache/nifi/reporting/ComponentType.java   |   7 +-
 .../connector/TestAbstractConnector.java           | 525 ++++++++++++++++++
 .../connector/TestConnectorPropertyDescriptor.java | 230 ++++++++
 56 files changed, 3868 insertions(+), 627 deletions(-)

diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/action/Component.java
index 9a65185..085e37f 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/action/Component.java
@@ -38,5 +38,7 @@ public enum Component {
     AccessPolicy,
     User,
     UserGroup,
-    Label;
+    Label,
+    Connector;
+
 }
diff --git a/src/main/java/org/apache/nifi/annotation/lifecycle/OnAdded.java b/src/main/java/org/apache/nifi/annotation/lifecycle/OnAdded.java
index 4933a38..7656f87 100644
--- a/src/main/java/org/apache/nifi/annotation/lifecycle/OnAdded.java
+++ b/src/main/java/org/apache/nifi/annotation/lifecycle/OnAdded.java
@@ -29,9 +29,10 @@ import java.lang.annotation.Target;
  * {@link org.apache.nifi.controller.ControllerService ControllerService},
  * {@link org.apache.nifi.registry.flow.FlowRegistryClient FlowRegistryClient},
  * {@link org.apache.nifi.parameter.ParameterProvider ParameterProvider},
- * {@link org.apache.nifi.flowanalysis.FlowAnalysisRule FlowAnalysisRule}, or
- * {@link org.apache.nifi.reporting.ReportingTask ReportingTask} implementation
- * can use to indicate a method should be called whenever the component is added
+ * {@link org.apache.nifi.flowanalysis.FlowAnalysisRule FlowAnalysisRule},
+ * {@link org.apache.nifi.reporting.ReportingTask ReportingTask}, or
+ * {@link org.apache.nifi.components.connector.Connector Connector}
+ * implementation can use to indicate a method should be called whenever the component is added
  * to the flow. This method will be called once for the entire life of a
  * component instance.
  * </p>
diff --git a/src/main/java/org/apache/nifi/components/ConfigVerificationResult.java b/src/main/java/org/apache/nifi/components/ConfigVerificationResult.java
index 9f2ab77..6c39db2 100644
--- a/src/main/java/org/apache/nifi/components/ConfigVerificationResult.java
+++ b/src/main/java/org/apache/nifi/components/ConfigVerificationResult.java
@@ -20,11 +20,13 @@ package org.apache.nifi.components;
 public class ConfigVerificationResult {
     private final Outcome outcome;
     private final String verificationStepName;
+    private final String subject;
     private final String explanation;
 
     private ConfigVerificationResult(final Builder builder) {
         outcome = builder.outcome;
         verificationStepName = builder.verificationStepName;
+        subject = builder.subject;
         explanation = builder.explanation;
     }
 
@@ -36,6 +38,10 @@ public class ConfigVerificationResult {
         return verificationStepName;
     }
 
+    public String getSubject() {
+        return subject;
+    }
+
     public String getExplanation() {
         return explanation;
     }
@@ -44,6 +50,7 @@ public class ConfigVerificationResult {
     public String toString() {
         return "ConfigVerificationResult[" +
             "outcome=" + outcome +
+            ", subject=" + (subject == null ? "null" : "'" + subject + "'") +
             ", verificationStepName='" + verificationStepName + "'" +
             ", explanation='" + explanation + "']";
     }
@@ -51,6 +58,7 @@ public class ConfigVerificationResult {
     public static class Builder {
         private Outcome outcome = Outcome.SKIPPED;
         private String verificationStepName = "Unknown Step Name";
+        private String subject;
         private String explanation;
 
         public Builder outcome(final Outcome outcome) {
@@ -63,6 +71,11 @@ public class ConfigVerificationResult {
             return this;
         }
 
+        public Builder subject(final String subject) {
+            this.subject = subject;
+            return this;
+        }
+
         public Builder explanation(final String explanation) {
             this.explanation = explanation;
             return this;
diff --git a/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java b/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
new file mode 100644
index 0000000..1ff7304
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
@@ -0,0 +1,594 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector;
+
+import org.apache.nifi.components.AllowableValue;
+import org.apache.nifi.components.ConfigVerificationResult;
+import org.apache.nifi.components.ValidationResult;
+import org.apache.nifi.components.connector.components.ConnectionFacade;
+import org.apache.nifi.components.connector.components.ControllerServiceFacade;
+import org.apache.nifi.components.connector.components.ControllerServiceReferenceHierarchy;
+import org.apache.nifi.components.connector.components.ControllerServiceReferenceScope;
+import org.apache.nifi.components.connector.components.FlowContext;
+import org.apache.nifi.components.connector.components.ProcessGroupFacade;
+import org.apache.nifi.components.connector.components.ProcessGroupLifecycle;
+import org.apache.nifi.components.connector.components.ProcessorFacade;
+import org.apache.nifi.components.connector.components.ProcessorState;
+import org.apache.nifi.controller.queue.QueueSize;
+import org.apache.nifi.flow.VersionedConnection;
+import org.apache.nifi.logging.ComponentLog;
+
+import java.text.NumberFormat;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.function.Consumer;
+import java.util.function.Function;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
+
+public abstract class AbstractConnector implements Connector {
+    private volatile ConnectorInitializationContext initializationContext;
+    private volatile ComponentLog logger;
+    private volatile CompletableFuture<Void> prepareUpdateFuture;
+
+    protected abstract void onStepConfigured(final String stepName, final FlowContext workingContext) throws FlowUpdateException;
+
+
+    @Override
+    public final void initialize(final ConnectorInitializationContext context) {
+        this.initializationContext = context;
+        this.logger = context.getLogger();
+
+        init();
+    }
+
+    /**
+     * No-op method for subclasses to override to perform any initialization logic
+     */
+    protected void init() {
+    }
+
+    protected final ComponentLog getLogger() {
+        return logger;
+    }
+
+    protected final ConnectorInitializationContext getInitializationContext() {
+        if (initializationContext == null) {
+            throw new IllegalStateException("Connector has not been initialized");
+        }
+
+        return initializationContext;
+    }
+
+    @Override
+    public void start(final FlowContext context) throws FlowUpdateException {
+        final ProcessGroupLifecycle lifecycle = context.getRootGroup().getLifecycle();
+
+        try {
+            lifecycle.enableControllerServices(ControllerServiceReferenceScope.INCLUDE_REFERENCED_SERVICES_ONLY, ControllerServiceReferenceHierarchy.INCLUDE_CHILD_GROUPS).get();
+        } catch (final Exception e) {
+            throw new FlowUpdateException("Failed to enable Controller Services", e);
+        }
+
+        lifecycle.startProcessors();
+    }
+
+    @Override
+    public void stop(final FlowContext context) throws FlowUpdateException {
+        try {
+            stopAsync(context).get();
+        } catch (final Exception e) {
+            throw new FlowUpdateException("Failed to stop Connector", e);
+        }
+    }
+
+    private CompletableFuture<Void> stopAsync(final FlowContext context) {
+        final ProcessGroupFacade rootGroup = context.getRootGroup();
+        final ProcessGroupLifecycle lifecycle = rootGroup.getLifecycle();
+
+        final CompletableFuture<Void> stopProcessorsFuture = lifecycle.stopProcessors()
+            .orTimeout(1, TimeUnit.MINUTES)
+            .exceptionally(throwable -> {
+                if (throwable instanceof TimeoutException || throwable.getCause() instanceof TimeoutException) {
+                    final List<ProcessorFacade> running = findProcessors(rootGroup, processor ->
+                        processor.getLifecycle().getState() != ProcessorState.STOPPED && processor.getLifecycle().getState() != ProcessorState.DISABLED);
+
+                    if (!running.isEmpty()) {
+                        getLogger().warn("After waiting 60 seconds for all Processors to stop, {} are still running. Terminating now.", running.size());
+                        running.forEach(processor -> processor.getLifecycle().terminate());
+                    }
+
+                    // Continue with the chain after handling timeout
+                    return null;
+                } else {
+                    throw new RuntimeException("Failed to stop all Processors", throwable);
+                }
+            });
+
+        return stopProcessorsFuture.thenRun(() -> {
+            try {
+                lifecycle.disableControllerServices(ControllerServiceReferenceHierarchy.INCLUDE_CHILD_GROUPS).get();
+            } catch (final Exception e) {
+                throw new RuntimeException("Failed to complete disabling of all Controller Services", e);
+            }
+        });
+    }
+
+    @Override
+    public void prepareForUpdate(final FlowContext workingContext, final FlowContext activeContext) throws FlowUpdateException {
+        final CompletableFuture<Void> future = stopAsync(activeContext);
+        prepareUpdateFuture = future;
+
+        try {
+            future.get();
+        } catch (final Exception e) {
+            throw new FlowUpdateException("Failed to prepare Connector for update", e);
+        }
+    }
+
+    /**
+     * Drains all FlowFiles from the Connector instance.
+     *
+     * @param flowContext the FlowContext to use for drainage
+     * @return a CompletableFuture that will be completed when drainage is complete
+     */
+    protected CompletableFuture<Void> drainFlowFiles(final FlowContext flowContext) {
+        final CompletableFuture<Void> result = new CompletableFuture<>();
+        final QueueSize initialQueueSize = flowContext.getRootGroup().getQueueSize();
+        if (initialQueueSize.getObjectCount() == 0) {
+            getLogger().debug("No FlowFiles to drain from Connector");
+            result.complete(null);
+            return result;
+        }
+
+        getLogger().info("Draining {} FlowFiles ({} bytes) from Connector",
+            initialQueueSize.getObjectCount(), NumberFormat.getNumberInstance().format(initialQueueSize.getByteCount()));
+
+        final CompletableFuture<Void> stopProcessorsFuture = stopSourceProcessors(flowContext);
+
+        final CompletableFuture<Void> startNonSourceFuture = stopProcessorsFuture.thenRun(() -> {
+            if (result.isDone()) {
+                return;
+            }
+
+            final CompletableFuture<Void> enableServices = flowContext.getRootGroup().getLifecycle().enableControllerServices(
+                ControllerServiceReferenceScope.INCLUDE_REFERENCED_SERVICES_ONLY,
+                ControllerServiceReferenceHierarchy.INCLUDE_CHILD_GROUPS);
+
+            try {
+                // Wait for all referenced services to be enabled.
+                enableServices.get();
+
+                if (!result.isDone()) {
+                    getLogger().info("Starting all non-source processors to facilitate drainage of FlowFiles");
+                    startNonSourceProcessors(flowContext).get();
+                }
+            } catch (final Exception e) {
+                try {
+                    flowContext.getRootGroup().getLifecycle().disableControllerServices(ControllerServiceReferenceHierarchy.INCLUDE_CHILD_GROUPS).get();
+                } catch (final Exception e1) {
+                    e.addSuppressed(e1);
+                }
+
+                result.completeExceptionally(new RuntimeException("Failed to start non-source processors while draining FlowFiles", e.getCause()));
+            }
+        });
+
+        startNonSourceFuture.thenRun(() -> {
+            try {
+                ensureDrainageUnblocked();
+            } catch (final Exception e) {
+                getLogger().warn("Failed to ensure drainage is unblocked when draining FlowFiles", e);
+            }
+
+            Exception failureReason = null;
+            int iterations = 0;
+            while (!isGroupDrained(flowContext.getRootGroup())) {
+                if (result.isDone()) {
+                    getLogger().info("Drainage has been cancelled; will no longer wait for FlowFiles to drain");
+                    break;
+                }
+
+                // Log the current queue size every 10 seconds (20 iterations of 500ms) so that it's clear
+                // whether or not progress is being made.
+                if (iterations++ % 20 == 0) {
+                    final QueueSize queueSize = flowContext.getRootGroup().getQueueSize();
+                    getLogger().info("Waiting for {} FlowFiles ({} bytes) to drain",
+                        queueSize.getObjectCount(), NumberFormat.getNumberInstance().format(queueSize.getByteCount()));
+                }
+
+                try {
+                    Thread.sleep(500);
+                } catch (final InterruptedException e) {
+                    Thread.currentThread().interrupt();
+                    failureReason = e;
+                    break;
+                }
+            }
+
+            // Log completion unless the result was completed exceptionally or cancelled.
+            if (!result.isDone()) {
+                getLogger().info("All {} FlowFiles have drained from Connector", initialQueueSize.getObjectCount());
+            }
+
+            try {
+                stop(flowContext);
+            } catch (final Exception e) {
+                getLogger().warn("Failed to stop source Processors after draining FlowFiles", e);
+                if (failureReason == null) {
+                    failureReason = e;
+                } else {
+                    failureReason.addSuppressed(e);
+                }
+            }
+
+            if (failureReason != null && !result.isDone()) {
+                result.completeExceptionally(new RuntimeException("Interrupted while waiting for " + AbstractConnector.this + " to drain", failureReason));
+            }
+
+            if (!result.isDone()) {
+                result.complete(null);
+            }
+        });
+
+        return result;
+    }
+
+    /**
+     * <p>
+     *     A method designed to be overridden by subclasses that need to ensure that any
+     *     blockages to FlowFile drainage are removed. The default implementation is a no-op.
+     *     Typical use cases include notifying Processors that block until a certain amount of data is queued up,
+     *     or until certain conditions are met, that they should immediately allow data to flow through.
+     * </p>
+     */
+    protected void ensureDrainageUnblocked() throws InvocationFailedException {
+    }
+
+    @Override
+    public List<ConfigVerificationResult> verify(final FlowContext flowContext) {
+        final List<ConfigVerificationResult> results = new ArrayList<>();
+
+        final List<ConfigurationStep> configSteps = getConfigurationSteps(flowContext);
+        for (final ConfigurationStep configStep : configSteps) {
+            final List<ConfigVerificationResult> stepResults = verifyConfigurationStep(configStep.getName(), List.of(), flowContext);
+            results.addAll(stepResults);
+        }
+
+        return results;
+    }
+
+    @Override
+    public List<ValidationResult> validate(final FlowContext context, final ConnectorValidationContext validationContext) {
+        final List<ValidationResult> validationResults = new ArrayList<>();
+        validate(context, context.getRootGroup(), validationContext, validationResults);
+        return validationResults;
+    }
+
+    private void validate(final FlowContext context, final ProcessGroupFacade group, final ConnectorValidationContext validationContext, final List<ValidationResult> validationResults) {
+        final List<ValidationResult> connectorPropertiesResults = validate(context, context.getConfigurationContext(), validationContext);
+        if (!connectorPropertiesResults.isEmpty()) {
+            connectorPropertiesResults.stream()
+                .filter(result -> !result.isValid())
+                .forEach(validationResults::add);
+
+            // If any invalid results on the connector configuration itself, do not proceed with further validation of components
+            if (!validationResults.isEmpty()) {
+                return;
+            }
+        }
+
+        for (final ProcessorFacade processor : group.getProcessors()) {
+            final List<ValidationResult> processorResults = processor.validate();
+            for (final ValidationResult result : processorResults) {
+                if (result.isValid()) {
+                    continue;
+                }
+
+                validationResults.add(new ValidationResult.Builder()
+                    .valid(false)
+                    .subject(result.getSubject())
+                    .input(result.getInput())
+                    .explanation("Processor [%s] is invalid: %s".formatted(processor.getDefinition().getName(), result.getExplanation()))
+                    .build());
+            }
+        }
+
+        final Set<ControllerServiceFacade> referencedServices = group.getControllerServices(
+            ControllerServiceReferenceScope.INCLUDE_REFERENCED_SERVICES_ONLY,
+            ControllerServiceReferenceHierarchy.DIRECT_SERVICES_ONLY);
+
+        for (final ControllerServiceFacade service : referencedServices) {
+            final List<ValidationResult> serviceResults = service.validate();
+            for (final ValidationResult result : serviceResults) {
+                if (result.isValid()) {
+                    continue;
+                }
+
+                validationResults.add(new ValidationResult.Builder()
+                    .valid(false)
+                    .subject(result.getSubject())
+                    .input(result.getInput())
+                    .explanation("Controller Service [%s] is invalid: %s".formatted(service.getDefinition().getName(), result.getExplanation()))
+                    .build());
+            }
+        }
+
+        for (final ProcessGroupFacade childGroup : group.getProcessGroups()) {
+            validate(context, childGroup, validationContext, validationResults);
+        }
+    }
+
+    protected boolean isGroupDrained(final ProcessGroupFacade group) {
+        return group.getQueueSize().getObjectCount() == 0;
+    }
+
+    protected CompletableFuture<Void> stopSourceProcessors(final FlowContext context) {
+        final List<ProcessorFacade> sourceProcessors = getSourceProcessors(context.getRootGroup());
+
+        final List<CompletableFuture<Void>> stopFutures = new ArrayList<>();
+        for (final ProcessorFacade sourceProcessor : sourceProcessors) {
+            final CompletableFuture<Void> stopFuture = sourceProcessor.getLifecycle().stop();
+            stopFutures.add(stopFuture);
+        }
+
+        return CompletableFuture.allOf(stopFutures.toArray(new CompletableFuture[0]));
+    }
+
+    protected CompletableFuture<Void> startNonSourceProcessors(final FlowContext flowContext) {
+        final List<ProcessorFacade> nonSourceProcessors = getNonSourceProcessors(flowContext.getRootGroup());
+
+        final List<CompletableFuture<Void>> startFutures = new ArrayList<>();
+        for (final ProcessorFacade nonSourceProcessor : nonSourceProcessors) {
+            final CompletableFuture<Void> startFuture = nonSourceProcessor.getLifecycle().start();
+            startFutures.add(startFuture);
+        }
+
+        return CompletableFuture.allOf(startFutures.toArray(new CompletableFuture[0]));
+    }
+
+    protected List<ProcessorFacade> getSourceProcessors(final ProcessGroupFacade group) {
+        final Set<String> nonSourceIds = getNonSourceProcessorIds(group);
+
+        return findProcessors(group, processor -> !nonSourceIds.contains(processor.getDefinition().getIdentifier()));
+    }
+
+    protected List<ProcessorFacade> getNonSourceProcessors(final ProcessGroupFacade group) {
+        final Set<String> nonSourceIds = getNonSourceProcessorIds(group);
+
+        return findProcessors(group, processor -> nonSourceIds.contains(processor.getDefinition().getIdentifier()));
+    }
+
+    protected Set<String> getNonSourceProcessorIds(final ProcessGroupFacade group) {
+        final Set<String> destinationIds = new HashSet<>();
+        forEachConnection(group, conn -> {
+            final VersionedConnection definition = conn.getDefinition();
+            final String sourceId = definition.getSource().getId();
+            final String destinationId = definition.getDestination().getId();
+            if (!Objects.equals(sourceId, destinationId)) {
+                destinationIds.add(destinationId);
+            }
+        });
+
+        return destinationIds;
+    }
+
+    protected List<ProcessorFacade> findProcessors(final ProcessGroupFacade group, final Predicate<ProcessorFacade> filter) {
+        final List<ProcessorFacade> matching = new ArrayList<>();
+        findProcessors(group, filter, matching);
+        return matching;
+    }
+
+    private void findProcessors(final ProcessGroupFacade group, final Predicate<ProcessorFacade> filter, final List<ProcessorFacade> found) {
+        for (final ProcessorFacade processor : group.getProcessors()) {
+            if (filter.test(processor)) {
+                found.add(processor);
+            }
+        }
+
+        for (final ProcessGroupFacade childGroup : group.getProcessGroups()) {
+            findProcessors(childGroup, filter, found);
+        }
+    }
+
+    private void forEachConnection(final ProcessGroupFacade group, final Consumer<ConnectionFacade> connectionConsumer) {
+        for (final ConnectionFacade connection : group.getConnections()) {
+            connectionConsumer.accept(connection);
+        }
+
+        for (final ProcessGroupFacade childGroup : group.getProcessGroups()) {
+            forEachConnection(childGroup, connectionConsumer);
+        }
+    }
+
+    private List<ValidationResult> validate(final FlowContext workingContext, final ConnectorConfigurationContext context, final ConnectorValidationContext validationContext) {
+        final List<ValidationResult> results = new ArrayList<>();
+        final List<ConfigurationStep> configurationSteps = getConfigurationSteps(workingContext);
+
+        for (final ConfigurationStep configurationStep : configurationSteps) {
+            results.addAll(validateConfigurationStep(configurationStep, context, validationContext));
+        }
+
+        // only run customValidate if regular validation is successful. This allows Processor developers to not have to check
+        // if values are null or invalid so that they can focus only on the interaction between the properties, etc.
+        if (results.isEmpty()) {
+            final Collection<ValidationResult> customResults = customValidate(context);
+            if (customResults != null) {
+                for (final ValidationResult result : customResults) {
+                    if (!result.isValid()) {
+                        results.add(result);
+                    }
+                }
+            }
+        }
+
+        return results;
+    }
+
+    @Override
+    public List<ValidationResult> validateConfigurationStep(final ConfigurationStep configurationStep, final ConnectorConfigurationContext configurationContext,
+        final ConnectorValidationContext validationContext) {
+        final String stepName = configurationStep.getName();
+        final List<ValidationResult> results = new ArrayList<>();
+
+        final List<ConnectorPropertyGroup> propertyGroups = configurationStep.getPropertyGroups();
+        for (final ConnectorPropertyGroup propertyGroup : propertyGroups) {
+            final List<ConnectorPropertyDescriptor> descriptors = propertyGroup.getProperties();
+            final Map<String, ConnectorPropertyDescriptor> descriptorMap = descriptors.stream()
+                .collect(Collectors.toMap(ConnectorPropertyDescriptor::getName, Function.identity()));
+
+            final Function<String, ConnectorPropertyValue> propertyValueLookup = name -> configurationContext.getProperty(stepName, propertyGroup.getName(), name);
+
+            for (final ConnectorPropertyDescriptor descriptor : descriptors) {
+                final boolean dependencySatisfied = isDependencySatisfied(descriptor, descriptorMap::get, propertyValueLookup);
+
+                // If the property descriptor's dependency is not satisfied, the property does not need to be considered, as it's not relevant to the
+                if (!dependencySatisfied) {
+                    continue;
+                }
+
+                final ConnectorPropertyValue propertyValue = configurationContext.getProperty(stepName, propertyGroup.getName(), descriptor.getName());
+                if (propertyValue == null || !propertyValue.isSet()) {
+                    if (descriptor.isRequired()) {
+                        final ValidationResult invalidResult = new ValidationResult.Builder()
+                            .valid(false)
+                            .input(null)
+                            .subject(descriptor.getName())
+                            .explanation(descriptor.getName() + " is required")
+                            .build();
+                        results.add(invalidResult);
+                    }
+
+                    continue;
+                }
+
+                final ValidationResult result = descriptor.validate(stepName, propertyGroup.getName(), propertyValue.getValue(), validationContext);
+                if (!result.isValid()) {
+                    results.add(result);
+                }
+            }
+        }
+
+        return results;
+    }
+
+    private boolean isDependencySatisfied(final ConnectorPropertyDescriptor propertyDescriptor, final Function<String, ConnectorPropertyDescriptor> propertyDescriptorLookup,
+            final Function<String, ConnectorPropertyValue> propertyValueLookup) {
+
+        return isDependencySatisfied(propertyDescriptor, propertyDescriptorLookup, propertyValueLookup, new HashSet<>());
+    }
+
+    private boolean isDependencySatisfied(final ConnectorPropertyDescriptor propertyDescriptor, final Function<String, ConnectorPropertyDescriptor> propertyDescriptorLookup,
+            final Function<String, ConnectorPropertyValue> propertyValueLookup, final Set<String> propertiesSeen) {
+
+        final Set<ConnectorPropertyDependency> dependencies = propertyDescriptor.getDependencies();
+        if (dependencies.isEmpty()) {
+            return true;
+        }
+
+        final boolean added = propertiesSeen.add(propertyDescriptor.getName());
+        if (!added) {
+            return false;
+        }
+
+        try {
+            for (final ConnectorPropertyDependency dependency : dependencies) {
+                final String dependencyName = dependency.getPropertyName();
+
+                // Check if the property being depended upon has its dependencies satisfied.
+                final ConnectorPropertyDescriptor dependencyDescriptor = propertyDescriptorLookup.apply(dependencyName);
+                if (dependencyDescriptor == null) {
+                    return false;
+                }
+
+                final ConnectorPropertyValue propertyValue = propertyValueLookup.apply(dependencyDescriptor.getName());
+                final String dependencyValue = propertyValue == null ? dependencyDescriptor.getDefaultValue() : propertyValue.getValue();
+                if (dependencyValue == null) {
+                    return false;
+                }
+
+                final boolean transitiveDependencySatisfied = isDependencySatisfied(dependencyDescriptor, propertyDescriptorLookup, propertyValueLookup, propertiesSeen);
+                if (!transitiveDependencySatisfied) {
+                    return false;
+                }
+
+                // Check if the property being depended upon is set to one of the values that satisfies this dependency.
+                // If the dependency has no dependent values, then any non-null value satisfies the dependency.
+                // The value is already known to be non-null due to the check above.
+                final Set<String> dependentValues = dependency.getDependentValues();
+                if (dependentValues != null && !dependentValues.contains(dependencyValue)) {
+                    return false;
+                }
+            }
+
+            return true;
+        } finally {
+            propertiesSeen.remove(propertyDescriptor.getName());
+        }
+    }
+
+    @Override
+    public final void onConfigurationStepConfigured(final String stepName, final FlowContext workingContext) throws FlowUpdateException {
+        onStepConfigured(stepName, workingContext);
+    }
+
+    @Override
+    public void abortUpdate(final FlowContext workingContext, final Throwable throwable) {
+        if (prepareUpdateFuture != null && !prepareUpdateFuture.isDone()) {
+            prepareUpdateFuture.completeExceptionally(throwable);
+        }
+    }
+
+    @Override
+    public List<AllowableValue> fetchAllowableValues(final String stepName, final String groupName, final String propertyName, final FlowContext flowContext) {
+        throw new UnsupportedOperationException("Property %s of Property Group %s in Configuration Step %s does not support fetching Allowable Values.".formatted(propertyName, groupName, stepName));
+    }
+
+    @Override
+    public List<AllowableValue> fetchAllowableValues(final String stepName, final String groupName, final String propertyName, final FlowContext flowContext, final String filter) {
+        final List<AllowableValue> allowableValues = fetchAllowableValues(stepName, groupName, propertyName, flowContext);
+        if (filter == null || filter.isEmpty()) {
+            return allowableValues;
+        } else {
+            return allowableValues.stream()
+                .filter(value -> value.getValue().toLowerCase().contains(filter.toLowerCase()) || value.getValue().toUpperCase().contains(filter.toUpperCase()))
+                .toList();
+        }
+    }
+
+
+    /**
+     * No-op implementation that allows concrete subclasses to perform validation of property configuration
+     *
+     * @param context the context that should be used for validation
+     * @return a collection of validation results indicating any problems with the configuration.
+     */
+    protected Collection<ValidationResult> customValidate(final ConnectorConfigurationContext context) {
+        return Collections.emptyList();
+    }
+
+}
diff --git a/src/main/java/org/apache/nifi/components/connector/AssetReference.java b/src/main/java/org/apache/nifi/components/connector/AssetReference.java
new file mode 100644
index 0000000..13abf73
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/AssetReference.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector;
+
+import java.util.Objects;
+
+/**
+ * A ConnectorValueReference implementation representing a reference to an asset.
+ */
+public final class AssetReference implements ConnectorValueReference {
+
+    private final String assetIdentifier;
+
+    public AssetReference(final String assetIdentifier) {
+        this.assetIdentifier = assetIdentifier;
+    }
+
+    /**
+     * Returns the asset identifier.
+     *
+     * @return the asset identifier
+     */
+    public String getAssetIdentifier() {
+        return assetIdentifier;
+    }
+
+    @Override
+    public ConnectorValueType getValueType() {
+        return ConnectorValueType.ASSET_REFERENCE;
+    }
+
+    @Override
+    public boolean equals(final Object object) {
+        if (this == object) {
+            return true;
+        }
+        if (object == null || getClass() != object.getClass()) {
+            return false;
+        }
+        final AssetReference that = (AssetReference) object;
+        return Objects.equals(assetIdentifier, that.assetIdentifier);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hashCode(assetIdentifier);
+    }
+
+    @Override
+    public String toString() {
+        return "AssetReference[assetId=" + assetIdentifier + "]";
+    }
+}
diff --git a/src/main/java/org/apache/nifi/components/connector/ConfigurationStep.java b/src/main/java/org/apache/nifi/components/connector/ConfigurationStep.java
new file mode 100644
index 0000000..901bef0
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/ConfigurationStep.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+public final class ConfigurationStep {
+    private final String name;
+    private final String description;
+    private final List<ConnectorPropertyGroup> propertyGroups;
+
+    private ConfigurationStep(final Builder builder) {
+        this.name = builder.name;
+        this.description = builder.description;
+        this.propertyGroups = Collections.unmodifiableList(builder.propertyGroups);
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public List<ConnectorPropertyGroup> getPropertyGroups() {
+        return propertyGroups;
+    }
+
+
+    public static final class Builder {
+        private String name;
+        private String description;
+        private List<ConnectorPropertyGroup> propertyGroups = Collections.emptyList();
+
+        public Builder name(String name) {
+            this.name = name;
+            return this;
+        }
+
+        public Builder description(String description) {
+            this.description = description;
+            return this;
+        }
+
+        public Builder propertyGroups(final List<ConnectorPropertyGroup> propertyGroups) {
+            this.propertyGroups = new ArrayList<>(propertyGroups);
+            return this;
+        }
+
+        public ConfigurationStep build() {
+            if (name == null) {
+                throw new IllegalStateException("Configuration Step's name must be provided");
+            }
+
+            return new ConfigurationStep(this);
+        }
+    }
+}
diff --git a/src/main/java/org/apache/nifi/components/connector/Connector.java b/src/main/java/org/apache/nifi/components/connector/Connector.java
new file mode 100644
index 0000000..62ba714
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/Connector.java
@@ -0,0 +1,198 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector;
+
+import org.apache.nifi.components.AllowableValue;
+import org.apache.nifi.components.ConfigVerificationResult;
+import org.apache.nifi.components.ValidationResult;
+import org.apache.nifi.components.connector.components.FlowContext;
+import org.apache.nifi.flow.VersionedExternalFlow;
+
+import java.util.List;
+
+/**
+ * <p>
+ *     A Connector is a component that encapsulates and manages a NiFi flow, in such a way that the flow
+ *     can be treated as a single component. The Connector is responsible for managing the lifecycle of the flow,
+ *     including starting and stopping the flow, as well as validating that the flow is correctly configured.
+ *     The Connector exposes a single holistic configuration that is encapsulates the configuration of the
+ *     sources, sinks, transformations, routing logic, and any other components that make up the flow.
+ * </p>
+ *
+ * <p>
+ *     Importantly, a Connector represents a higher-level abstraction and is capable of manipulating the associated
+ *     dataflow, including adding, removing, and configuring components within the flow. This allows a single entity to
+ *     be provided such that configuring properties can result in a flow being dynamically reconfigured (e.g., using a
+ *     different Controller Service implementation).
+ * </p>
+ *
+ * <p>
+ *     When a flow definition is created and shared in NiFi, it can be easily instantiated in another NiFi instance.
+ *     The new instance can then be configured via Parameters. However, if more complex configuration is required, such as
+ *     choosing which Controller Service to use, or enabling or disabling a particular transformation step, the user must
+ *     understand how to manipulate the flow directly. Connectors provide the ability to encapsulate such complexity behind
+ *     a higher-level abstraction, allowing users to configure the flow via a guided configuration experience.
+ * </p>
+ *
+ * <p>
+ *     The Connector API makes use of a {@link FlowContext} abstraction in order to provide effectively two separate instances
+ *     of a flow: the Active flow that can be stopped and started in order to process and move data, and a Working flow that
+ *     can be used to verify configuration in order to ensure that when the configuration is applied to the Active flow, it will
+ *     function as desired.
+ * </p>
+ *
+ * <b>Implementation Note:</b> This API is currently experimental, as it is under very active development. As such,
+ * it is subject to change without notice between minor releases.
+ */
+public interface Connector {
+
+    /**
+     * Initializes the Connector instance, providing it the necessary context that it needs to operate.
+     * @param context the context for initialization
+     */
+    void initialize(ConnectorInitializationContext context);
+
+    /**
+     * Provides the initial version of the flow that this Connector manages. The Active Flow Context will be
+     * updated to reflect this flow when the Connector is first added to the NiFi instance but not when the Connector
+     * is reinitialized upon restart of NiFi.
+     *
+     * @return the initial version of the flow
+     */
+    VersionedExternalFlow getInitialFlow();
+
+    // FIXME: Consider adding two subclasses to FlowContext: ActiveFlowContext and WorkingFlowContext
+    //       They would have no methods, but would serve as markers to make it more clear which context is being used
+    /**
+     * Starts the Connector instance.
+     * @throws FlowUpdateException if there is an error starting the Connector
+     * @param activeFlowContext the active flow context
+     */
+    void start(FlowContext activeFlowContext) throws FlowUpdateException;
+
+    /**
+     * Stops the Connector instance.
+     * @throws FlowUpdateException if there is an error stopping the Connector
+     * @param activeFlowContext the active flow context
+     */
+    void stop(FlowContext activeFlowContext) throws FlowUpdateException;
+
+    /**
+     * Validates that the Connector is valid according to its current configuration. Validity of a Connector may be
+     * defined simply as the all components being valid, or it may encompass more complex validation logic, such
+     * as ensuring that a Source Processor is able to connect to a remote system, or that a Sink Processor
+     * is able to write to a remote system.
+     *
+     * @param activeFlowContext the active flow context
+     * @param validationContext the context for validation
+     *
+     * @return a list of ValidationResults, each of which may indicate a check that was performed and any associated explanations
+     * as to why the Connector is valid or invalid.
+     */
+    List<ValidationResult> validate(FlowContext activeFlowContext, ConnectorValidationContext validationContext);
+
+    /**
+     * Validates the configuration for a specific configuration step. This allows the Connector to indicate any
+     * issues with syntactic configuration issues but is not as comprehensive as the overall validation provided
+     * by {@link #validate(FlowContext, ConnectorValidationContext)} due to the fact that it does not have access
+     * to the full configuration of the Connector. This provides immediate feedback to users
+     * as they are configuring each step.
+     *
+     * @param configurationStep the configuration step being validated
+     * @param configurationContext the context for the configuration
+     * @param validationContext the context for validation
+     * @return a list of ValidationResults, each of which may indicate a check that was performed and any associated explanations
+     * as to why the configuration step is valid or invalid.
+     */
+    // TODO: Should look at making verifyConfigurationStep / validateConfigurationStep more consistent in arguments.
+    List<ValidationResult> validateConfigurationStep(ConfigurationStep configurationStep, ConnectorConfigurationContext configurationContext, ConnectorValidationContext validationContext);
+
+    /**
+     * Verifies the configuration for a specific configuration step. This allows the Connector to perform
+     * more comprehensive verification of the configuration for a step than does validation, such as attempting to connect to
+     * remote systems, sample data and ensure that it can be parsed correctly, etc.
+     *
+     * @param stepName the name of the configuration step being verified
+     * @param propertyValueOverrides any overrides to the currently configured property values that should be used for verification
+     * @param flowContext the flow context that is being used for the verification
+     * @return a list of ConfigVerificationResults, each of which may indicate a check that was performed and any associated explanation
+     * as to why the configuration step verification succeeded, failed, or was skipped.
+     */
+    List<ConfigVerificationResult> verifyConfigurationStep(String stepName, List<PropertyGroupConfiguration> propertyValueOverrides, FlowContext flowContext);
+
+    /**
+     * Verifies the overall configuration of the Connector based on the configuration that has already been provided for the given Flow Context.
+     *
+     * @param flowContext the flow context that houses the configuration being used to drive the verification
+     * @return a list of ConfigVerificationResults, each of which may indicate a check that was performed and any associated explanation
+     * as to why the configuration verification succeeded, failed, or was skipped.
+     */
+    List<ConfigVerificationResult> verify(FlowContext flowContext);
+
+    /**
+     * Returns the list of configuration steps that define the configuration of this Connector. Each step
+     * represents a logical grouping of properties that should be configured together. The order of the steps
+     * in the list represents the order in which the steps should be configured.
+     *
+     * @param flowContext the flow context that houses the configuration being used to drive the available configuration steps
+     * @return the list of configuration steps
+     */
+    List<ConfigurationStep> getConfigurationSteps(FlowContext flowContext);
+
+    /**
+     * Called whenever a specific configuration step has been configured. This allows the Connector to perform any necessary
+     * actions specific to that step, such as updating parameter values, updating the flow, etc.
+     *
+     * @param stepName the name of the step
+     * @param workingFlowContext the working flow context that is being used for the update
+     */
+    void onConfigurationStepConfigured(String stepName, FlowContext workingFlowContext) throws FlowUpdateException;
+
+    /**
+     * Called before any updates to the Connector's configuration are applied. This allows the Connector to perform any necessary
+     * preparation work before the configuration is changed, such as stopping the flow, draining queues, etc.
+     *
+     * @param workingFlowContext the working flow context that has been created for the update
+     * @param activeFlowContext the active flow context that is currently in use
+     */
+    void prepareForUpdate(FlowContext workingFlowContext, FlowContext activeFlowContext) throws FlowUpdateException;
+
+    /**
+     * Called if the update preparation (i.e., {@link #prepareForUpdate(FlowContext, FlowContext)}) fails or is cancelled.
+     * This allows the Connector to perform any necessary
+     * cleanup work after a failed preparation, such as cancelling any in-progress operations, etc.
+     *
+     * @param workingFlowContext the working flow context that was being used for the update preparation
+     * @param cause the cause for the update preparation to be aborted
+     */
+    void abortUpdate(FlowContext workingFlowContext, Throwable cause);
+
+    /**
+     * Applies the configuration of the working FlowContext to the active flow. Once the active FlowContext has been updated,
+     * the existing working FlowContext is destroyed, along with any components that are part of the flow and any FlowFiles that
+     * might be queued up as part of the flow. A new working FlowContext is then created that reflects the newly updated active flow.
+     *
+     * @param workingFlowContext the working flow context that represents the updated configuration
+     * @param activeFlowContext the flow context that represents the active flow
+     */
+    void applyUpdate(FlowContext workingFlowContext, FlowContext activeFlowContext) throws FlowUpdateException;
+
+    List<AllowableValue> fetchAllowableValues(String stepName, String groupName, String propertyName, FlowContext flowContext);
+
+    List<AllowableValue> fetchAllowableValues(String stepName, String groupName, String propertyName, FlowContext flowContext, String filter);
+}
diff --git a/src/main/java/org/apache/nifi/components/connector/ConnectorConfigurationContext.java b/src/main/java/org/apache/nifi/components/connector/ConnectorConfigurationContext.java
new file mode 100644
index 0000000..3ae9bc9
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/ConnectorConfigurationContext.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector;
+
+import java.util.List;
+
+public interface ConnectorConfigurationContext extends Cloneable {
+
+    ConnectorPropertyValue getProperty(String configurationStepName, String groupName, String propertyName);
+
+    ConnectorPropertyValue getProperty(ConfigurationStep configurationStep, ConnectorPropertyGroup propertyGroup, ConnectorPropertyDescriptor propertyDescriptor);
+
+    /**
+     * Creates a new ConnectorConfigurationContext based on this context's values but with the provided property overrides applied.
+     * @param stepName the name of the configuration step for which the overrides should be applied
+     * @param groupConfigurations the list of PropertyGroupConfiguration objects containing the overrides
+     * @return a new ConnectorConfigurationContext with the overrides applied
+     */
+    ConnectorConfigurationContext createWithOverrides(String stepName, List<PropertyGroupConfiguration> groupConfigurations);
+
+    ConnectorConfigurationContext clone();
+}
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/components/connector/ConnectorConfigurationManager.java
similarity index 65%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/components/connector/ConnectorConfigurationManager.java
index 9a65185..98d5904 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/components/connector/ConnectorConfigurationManager.java
@@ -14,29 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
 
-/**
- * Defines possible components for a given action.
- */
-public enum Component {
+package org.apache.nifi.components.connector;
+
+import java.util.Map;
+
+public interface ConnectorConfigurationManager {
+
+    void setProperties(Map<String, String> properties);
 
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
 }
diff --git a/src/main/java/org/apache/nifi/components/connector/ConnectorInitializationContext.java b/src/main/java/org/apache/nifi/components/connector/ConnectorInitializationContext.java
new file mode 100644
index 0000000..3626a47
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/ConnectorInitializationContext.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector;
+
+import org.apache.nifi.components.connector.components.FlowContext;
+import org.apache.nifi.flow.VersionedExternalFlow;
+import org.apache.nifi.logging.ComponentLog;
+
+/**
+ * <p>
+ *     The ConnectorInitializationContext provides context about how the connector is being run.
+ *     This includes the identifier and name of Connector as well as access to the crucial components that
+ *     it may need to interact with in order to perform its tasks.
+ * </p>
+ */
+public interface ConnectorInitializationContext {
+
+    /**
+     * Returns the identifier of the Connector.
+     * @return the identifier of the Connector
+     */
+    String getIdentifier();
+
+    /**
+     * Returns the name of the Connector.
+     * @return the name of the Connector
+     */
+    String getName();
+
+    /**
+     * Returns the ComponentLog that can be used for logging. Use of the ComponentLog is preferred
+     * over directly constructing a Logger because it integrates with NiFi's logging system to create bulletins
+     * as well as delegating to the underlying logging framework.
+     *
+     * @return the ComponentLog for logging
+     */
+    ComponentLog getLogger();
+
+    /**
+     * <p>
+     *   Updates the Connector's flow to the given VersionedExternalFlow. This may be a long-running process, as it involves
+     *   several steps, to include:
+     * </p>
+     * <ul>
+     *   <li>Identifying which elements in the flow have changed</li>
+     *   <li>Stopping affected Processors and Controller Services, waiting for them to stop fully</li>
+     *   <li>Applying necessary changes, to include changing component configuration, adding, and removing components</li>
+     *   <li>Restarting all components</li>
+     * </ul>
+     *
+     *
+     * <p>
+     *     Depending on the changes required in order to update the flow to the provided VersionedProcessGroup, this
+     *     could also result in stopping source processors and waiting for queues to drain, etc.
+     * </p>
+     *
+     * <p>
+     *   This method will block until the update is complete. Note that this could result in the associated flow becoming
+     *   invalid if not properly configured. Otherwise, if the Connector is running, any newly added components will also
+     *   be started.
+     * </p>
+     *
+     * @param flowContext the context of the flow to be updated
+     * @param versionedExternalFlow the new representation of the flow
+     */
+    void updateFlow(FlowContext flowContext, VersionedExternalFlow versionedExternalFlow) throws FlowUpdateException;
+
+}
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/components/connector/ConnectorParameter.java
similarity index 65%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/components/connector/ConnectorParameter.java
index 9a65185..ec2a985 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/components/connector/ConnectorParameter.java
@@ -14,29 +14,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
 
-/**
- * Defines possible components for a given action.
- */
-public enum Component {
+package org.apache.nifi.components.connector;
+
+public interface ConnectorParameter {
+
+    String getName();
+
+    String getDescription();
+
+    String getDefaultValue();
+
+    boolean isSensitive();
 
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
 }
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/components/connector/ConnectorParameterContext.java
similarity index 65%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/components/connector/ConnectorParameterContext.java
index 9a65185..7ef3884 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/components/connector/ConnectorParameterContext.java
@@ -14,29 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
 
-/**
- * Defines possible components for a given action.
- */
-public enum Component {
+package org.apache.nifi.components.connector;
+
+import java.util.Map;
+
+public interface ConnectorParameterContext {
+
+    Map<ConnectorParameter, String> getParameters();
 
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
 }
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyDependency.java
similarity index 52%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/components/connector/ConnectorPropertyDependency.java
index 9a65185..0f2d1e2 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyDependency.java
@@ -14,29 +14,30 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
 
-/**
- * Defines possible components for a given action.
- */
-public enum Component {
+package org.apache.nifi.components.connector;
+
+import java.util.Set;
+
+public final class ConnectorPropertyDependency {
+    private final String propertyName;
+    private final Set<String> dependentValues;
+
+    public ConnectorPropertyDependency(final String propertyName, final Set<String> dependentValues) {
+        this.propertyName = propertyName;
+        this.dependentValues = Set.copyOf(dependentValues);
+    }
+
+    public ConnectorPropertyDependency(final String propertyName) {
+        this.propertyName = propertyName;
+        this.dependentValues = null;
+    }
+
+    public String getPropertyName() {
+        return propertyName;
+    }
 
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
+    public Set<String> getDependentValues() {
+        return dependentValues;
+    }
 }
diff --git a/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyDescriptor.java b/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyDescriptor.java
new file mode 100644
index 0000000..b9304ac
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyDescriptor.java
@@ -0,0 +1,434 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector;
+
+import org.apache.nifi.components.AllowableValue;
+import org.apache.nifi.components.DescribedValue;
+import org.apache.nifi.components.ValidationResult;
+import org.apache.nifi.components.Validator;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
+
+public final class ConnectorPropertyDescriptor {
+    private static final Pattern INTEGER_PATTERN = Pattern.compile("^-?\\d+$");
+    private static final Pattern DOUBLE_PATTERN = Pattern.compile("^-?\\d+(\\.\\d+)?$");
+    private static final Pattern BOOLEAN_PATTERN = Pattern.compile("^(?i)(true|false)$");
+
+    private final String name;
+    private final String description;
+    private final String defaultValue;
+    private final boolean required;
+    private final PropertyType type;
+    private final List<DescribedValue> allowableValues;
+    private final boolean allowableValuesFetchable;
+    private final List<Validator> validators;
+    private final Set<ConnectorPropertyDependency> dependencies;
+
+    private ConnectorPropertyDescriptor(final Builder builder) {
+        this.name = builder.name;
+        this.description = builder.description;
+        this.defaultValue = builder.defaultValue;
+        this.required = builder.required;
+        this.type = builder.type;
+        this.allowableValues = builder.allowableValues == null ? null : Collections.unmodifiableList(builder.allowableValues);
+        this.allowableValuesFetchable = builder.allowableValuesFetchable;
+        this.validators = List.copyOf(builder.validators);
+        this.dependencies = Collections.unmodifiableSet(builder.dependencies);
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public String getDefaultValue() {
+        return defaultValue;
+    }
+
+    public boolean isRequired() {
+        return required;
+    }
+
+    public PropertyType getType() {
+        return type;
+    }
+
+    public List<DescribedValue> getAllowableValues() {
+        return allowableValues;
+    }
+
+    public boolean isAllowableValuesFetchable() {
+        return allowableValuesFetchable;
+    }
+
+    public Set<ConnectorPropertyDependency> getDependencies() {
+        return dependencies;
+    }
+
+    public List<Validator> getValidators() {
+        return validators;
+    }
+
+    public ValidationResult validate(final String stepName, final String groupName, final String value, final ConnectorValidationContext validationContext) {
+        final List<DescribedValue> fetchedAllowableValues;
+        if (isAllowableValuesFetchable()) {
+            try {
+                fetchedAllowableValues = validationContext.fetchAllowableValues(stepName, groupName, getName());
+            } catch (final Exception e) {
+                return new ValidationResult.Builder()
+                    .subject(name)
+                    .input(value)
+                    .valid(false)
+                    .explanation("Failed to fetch allowable values: " + e.getMessage())
+                    .build();
+            }
+        } else {
+            fetchedAllowableValues = null;
+        }
+
+        if (type != PropertyType.STRING_LIST) {
+            return validateIndividual(stepName, groupName, value, validationContext, fetchedAllowableValues);
+        }
+
+        if (required && value == null) {
+            return new ValidationResult.Builder()
+                .subject(name)
+                .input(value)
+                .valid(false)
+                .explanation("Property is required but no value was specified")
+                .build();
+        }
+
+        final String[] values = value.split(",");
+        for (final String individualValue : values) {
+            final ValidationResult result = validateIndividual(stepName, groupName, individualValue.trim(), validationContext, fetchedAllowableValues);
+            if (!result.isValid()) {
+                return result;
+            }
+        }
+
+        return new ValidationResult.Builder()
+            .subject(name)
+            .input(value)
+            .valid(true)
+            .build();
+    }
+
+    private ValidationResult validateIndividual(final String stepName, final String groupName, final String value,
+                final ConnectorValidationContext validationContext, final List<DescribedValue> fetchedAllowableValues) {
+
+        if (!isValueAllowed(value, allowableValues) || !isValueAllowed(value, fetchedAllowableValues)) {
+            return new ValidationResult.Builder()
+                .subject(name)
+                .input(value)
+                .valid(false)
+                .explanation("Value is not one of the allowable values")
+                .build();
+        }
+
+        final ValidationResult invalidResult = validateType(value);
+        if (invalidResult != null) {
+            return invalidResult;
+        }
+
+        for (final Validator validator : validators) {
+            final ValidationResult result = validator.validate(name, value, validationContext.createValidationContext(stepName, groupName));
+            if (!result.isValid()) {
+                return result;
+            }
+        }
+
+        return new ValidationResult.Builder()
+            .subject(name)
+            .input(value)
+            .valid(true)
+            .build();
+    }
+
+    private boolean isValueAllowed(final String value, final List<? extends DescribedValue> allowableValues) {
+        if (allowableValues == null || allowableValues.isEmpty()) {
+            // If no allowable values are explicitly specified, consider all values to be allowable
+            return true;
+        }
+        if (value == null) {
+            return false;
+        }
+
+        for (final DescribedValue describedValue : allowableValues) {
+            if (value.equalsIgnoreCase(describedValue.getValue())) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+
+    private ValidationResult validateType(final String value) {
+        final String explanation = switch (type) {
+            case SECRET, STRING, STRING_LIST -> null;
+            case BOOLEAN -> BOOLEAN_PATTERN.matcher(value).matches() ? null : "Value must be true or false";
+            case INTEGER -> INTEGER_PATTERN.matcher(value).matches() ? null : "Value must be an integer";
+            case DOUBLE, FLOAT -> DOUBLE_PATTERN.matcher(value).matches() ? null : "Value must be a floating point number";
+        };
+
+        if (explanation == null) {
+            return null;
+        }
+
+        return new ValidationResult.Builder()
+            .subject(name)
+            .input(value)
+            .valid(false)
+            .explanation(explanation)
+            .build();
+    }
+
+
+    public static final class Builder {
+        private String name;
+        private String description;
+        private String defaultValue = null;
+        private boolean required = false;
+        private PropertyType type = PropertyType.STRING;
+        private List<DescribedValue> allowableValues = null;
+        private boolean allowableValuesFetchable = false;
+        private final List<Validator> validators = new ArrayList<>();
+        private final Set<ConnectorPropertyDependency> dependencies = new HashSet<>();
+
+        public Builder from(final ConnectorPropertyDescriptor other) {
+            this.name = other.name;
+            this.description = other.description;
+            this.defaultValue = other.defaultValue;
+            this.required = other.required;
+            this.type = other.type;
+            this.allowableValues = other.allowableValues == null ? null : new ArrayList<>(other.allowableValues);
+            this.allowableValuesFetchable = other.allowableValuesFetchable;
+            this.validators.clear();
+            this.validators.addAll(other.validators);
+            this.dependencies.clear();
+            this.dependencies.addAll(other.dependencies);
+            return this;
+        }
+
+        public Builder name(final String name) {
+            this.name = name;
+            return this;
+        }
+
+        public Builder description(final String description) {
+            this.description = description;
+            return this;
+        }
+
+        public Builder defaultValue(final String defaultValue) {
+            this.defaultValue = defaultValue;
+            return this;
+        }
+
+        public Builder defaultValue(final DescribedValue defaultValue) {
+            return defaultValue(defaultValue == null ? null : defaultValue.getValue());
+        }
+
+        public Builder required(final boolean required) {
+            this.required = required;
+            return this;
+        }
+
+        public Builder type(final PropertyType type) {
+            this.type = type;
+            return this;
+        }
+
+        public Builder allowableValuesFetchable(final boolean fetchable) {
+            this.allowableValuesFetchable = fetchable;
+            return this;
+        }
+
+        public Builder allowableValues(final DescribedValue... values) {
+            this.allowableValues = Arrays.stream(values)
+                .map(Builder::describedValue)
+                .toList();
+
+            return this;
+        }
+
+        public <E extends Enum<E>> Builder allowableValues(final E[] values) {
+            if (values == null || values.length == 0) {
+                this.allowableValues = null;
+            } else {
+                this.allowableValues = Arrays.stream(values)
+                    .map(enumValue -> enumValue instanceof DescribedValue describedValue
+                        ? AllowableValue.fromDescribedValue(describedValue) : new AllowableValue(enumValue.name()))
+                    .map(av -> (DescribedValue) av)
+                    .toList();
+            }
+
+            return this;
+        }
+
+        public <E extends Enum<E>> Builder allowableValues(final EnumSet<E> enumValues) {  //NOPMD
+            if (enumValues == null || enumValues.isEmpty()) {
+                this.allowableValues = null;
+            } else {
+                this.allowableValues = enumValues.stream()
+                    .map(enumValue -> enumValue instanceof DescribedValue describedValue
+                        ? AllowableValue.fromDescribedValue(describedValue) : new AllowableValue(enumValue.name()))
+                    .map(av -> (DescribedValue) av)
+                    .toList();
+            }
+
+            return this;
+        }
+
+        public Builder allowableValues(final String... allowableValues) {
+            if (allowableValues == null || allowableValues.length == 0) {
+                this.allowableValues = null;
+            } else {
+                this.allowableValues = Arrays.stream(allowableValues)
+                    .map(Builder::describedValue)
+                    .toList();
+            }
+
+            return this;
+        }
+
+        public Builder allowableValues(final List<String> allowableValues) {
+            if (allowableValues == null || allowableValues.isEmpty()) {
+                this.allowableValues = null;
+            } else {
+                this.allowableValues = allowableValues.stream()
+                    .map(Builder::describedValue)
+                    .toList();
+            }
+
+            return this;
+        }
+
+        /**
+         * Adds a validator for this property
+         *
+         * @param validator the validator to add
+         * @return this Builder for method chaining
+         */
+        public Builder addValidator(final Validator validator) {
+            if (validator != null) {
+                this.validators.add(validator);
+            }
+            return this;
+        }
+
+        /**
+         * Removes all validators for this property
+         *
+         * @return this Builder for method chaining
+         */
+        public Builder clearValidators() {
+            this.validators.clear();
+            return this;
+        }
+
+        /**
+         * Sets the validators for this property, replacing any previously added validators
+         *
+         * @param validators the validators to set
+         * @return this Builder for method chaining
+         */
+        public Builder validators(final Validator... validators) {
+            this.validators.clear();
+
+            if (validators != null) {
+                for (final Validator validator : validators) {
+                    if (validator != null) {
+                        this.validators.add(validator);
+                    }
+                }
+            }
+
+            return this;
+        }
+
+        public Builder dependsOn(final ConnectorPropertyDescriptor descriptor, final List<DescribedValue> dependentValues) {
+            if (dependentValues == null || dependentValues.isEmpty()) {
+                dependencies.add(new ConnectorPropertyDependency(descriptor.getName()));
+            } else {
+                final Set<String> dependentValueSet = dependentValues.stream()
+                    .map(DescribedValue::getValue)
+                    .collect(Collectors.toSet());
+
+                dependencies.add(new ConnectorPropertyDependency(descriptor.getName(), dependentValueSet));
+            }
+
+            return this;
+        }
+
+        public Builder dependsOn(final ConnectorPropertyDescriptor descriptor, final DescribedValue firstDependentValue, final DescribedValue... additionalDependentValues) {
+            final List<DescribedValue> dependentValues = new ArrayList<>();
+            dependentValues.add(firstDependentValue);
+            dependentValues.addAll(Arrays.asList(additionalDependentValues));
+            return dependsOn(descriptor, dependentValues);
+        }
+
+        public Builder dependsOn(final ConnectorPropertyDescriptor descriptor, final String... dependentValues) {
+            final List<DescribedValue> describedValues = Arrays.stream(dependentValues)
+                    .map(Builder::describedValue)
+                    .toList();
+
+            return dependsOn(descriptor, describedValues);
+        }
+
+        private static DescribedValue describedValue(final String value) {
+            if (value == null) {
+                return null;
+            }
+
+            // Otherwise, return a generic DescribedValue with no display name or description
+            return new AllowableValue(value);
+        }
+
+        private static DescribedValue describedValue(final DescribedValue describedValue) {
+            if (describedValue == null) {
+                return null;
+            }
+
+            return new AllowableValue(describedValue.getValue(), describedValue.getDisplayName(), describedValue.getDescription());
+        }
+
+        public ConnectorPropertyDescriptor build() {
+            if (name == null || name.isEmpty()) {
+                throw new IllegalStateException("Property name must be specified");
+            }
+            if (allowableValues != null && allowableValuesFetchable) {
+                throw new IllegalStateException("Property cannot have both fetchable allowable values and a static list of allowable values");
+            }
+
+            return new ConnectorPropertyDescriptor(this);
+        }
+    }
+}
diff --git a/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyGroup.java b/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyGroup.java
new file mode 100644
index 0000000..fb0fb69
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyGroup.java
@@ -0,0 +1,194 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+public final class ConnectorPropertyGroup {
+    private final String name;
+    private final String description;
+    private final List<ConnectorPropertyDescriptor> properties;
+
+    private ConnectorPropertyGroup(final Builder builder) {
+        this.name = builder.name;
+        this.description = builder.description;
+        this.properties = List.copyOf(builder.properties);
+    }
+
+    /**
+     * Returns the name of the property sub-group.
+     *
+     * @return the name of the sub-group
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Returns the description of the property sub-group.
+     *
+     * @return the description of the sub-group
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Returns the properties defined in this sub-group.
+     *
+     * @return the properties in this sub-group
+     */
+    public List<ConnectorPropertyDescriptor> getProperties() {
+        return properties;
+    }
+
+    /**
+     * Creates a new Builder for constructing ConnectorPropertySubGroup instances.
+     *
+     * @return a new Builder
+     */
+    public static Builder builder() {
+        return new Builder();
+    }
+
+    /**
+     * Creates a new Builder initialized with values from an existing ConnectorPropertySubGroup.
+     *
+     * @param subGroup the sub-group to copy values from
+     * @return a new Builder with copied values
+     */
+    public static Builder builder(final ConnectorPropertyGroup subGroup) {
+        return new Builder()
+                .name(subGroup.getName())
+                .description(subGroup.getDescription())
+                .properties(subGroup.getProperties());
+    }
+
+    @Override
+    public boolean equals(final Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+
+        ConnectorPropertyGroup that = (ConnectorPropertyGroup) o;
+        return Objects.equals(name, that.name) &&
+               Objects.equals(description, that.description) &&
+               Objects.equals(properties, that.properties);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(name, description, properties);
+    }
+
+    @Override
+    public String toString() {
+        return "ConnectorPropertyGroup[" +
+               "name='" + name + '\'' +
+               ", description='" + description + '\'' +
+               ", properties=" + properties +
+               "]";
+    }
+
+    public static class Builder {
+        private String name;
+        private String description;
+        private final List<ConnectorPropertyDescriptor> properties = new ArrayList<>();
+
+        /**
+         * Sets the name of the property sub-group.
+         *
+         * @param name the name of the sub-group
+         * @return this Builder for method chaining
+         */
+        public Builder name(final String name) {
+            this.name = name;
+            return this;
+        }
+
+        /**
+         * Sets the description of the property sub-group.
+         *
+         * @param description the description of the sub-group
+         * @return this Builder for method chaining
+         */
+        public Builder description(final String description) {
+            this.description = description;
+            return this;
+        }
+
+        /**
+         * Adds a property to the sub-group.
+         *
+         * @param property the property to add
+         * @return this Builder for method chaining
+         */
+        public Builder addProperty(final ConnectorPropertyDescriptor property) {
+            if (property != null) {
+                this.properties.add(property);
+            }
+            return this;
+        }
+
+        /**
+         * Sets the properties for the sub-group, replacing any previously added properties.
+         *
+         * @param properties the properties to set
+         * @return this Builder for method chaining
+         */
+        public Builder properties(final List<ConnectorPropertyDescriptor> properties) {
+            this.properties.clear();
+            if (properties != null) {
+                this.properties.addAll(properties);
+            }
+            return this;
+        }
+
+        /**
+         * Adds multiple properties to the sub-group.
+         *
+         * @param properties the properties to add
+         * @return this Builder for method chaining
+         */
+        public Builder addProperties(final List<ConnectorPropertyDescriptor> properties) {
+            if (properties != null) {
+                this.properties.addAll(properties);
+            }
+            return this;
+        }
+
+        /**
+         * Builds and returns a new ConnectorPropertySubGroup instance.
+         *
+         * @return a new ConnectorPropertySubGroup
+         * @throws IllegalStateException if required fields are not set
+         */
+        public ConnectorPropertyGroup build() {
+            if (description != null && (name == null || name.isBlank())) {
+                throw new IllegalStateException("Property Group's name must be provided if a description is set");
+            }
+
+            return new ConnectorPropertyGroup(this);
+        }
+    }
+}
diff --git a/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyValue.java b/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyValue.java
new file mode 100644
index 0000000..71d6121
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/ConnectorPropertyValue.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector;
+
+import org.apache.nifi.processor.DataUnit;
+
+import java.time.Duration;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+public interface ConnectorPropertyValue {
+
+    /**
+     * @return the raw property value as a string
+     */
+    String getValue();
+
+    /**
+     * @return an integer representation of the property value, or
+     * <code>null</code> if not set
+     * @throws NumberFormatException if not able to parse
+     */
+    Integer asInteger();
+
+    /**
+     * @return a Long representation of the property value, or <code>null</code>
+     * if not set
+     * @throws NumberFormatException if not able to parse
+     */
+    Long asLong();
+
+    /**
+     * @return a Boolean representation of the property value, or
+     * <code>null</code> if not set
+     */
+    Boolean asBoolean();
+
+    /**
+     * @return a Float representation of the property value, or
+     * <code>null</code> if not set
+     * @throws NumberFormatException if not able to parse
+     */
+    Float asFloat();
+
+    /**
+     * @return a Double representation of the property value, of
+     * <code>null</code> if not set
+     * @throws NumberFormatException if not able to parse
+     */
+    Double asDouble();
+
+    /**
+     * @param timeUnit specifies the TimeUnit to convert the time duration into
+     * @return a Long value representing the value of the configured time period
+     * in terms of the specified TimeUnit; if the property is not set, returns
+     * <code>null</code>
+     */
+    Long asTimePeriod(TimeUnit timeUnit);
+
+    /**
+     * Returns the value as a Duration
+     *
+     * @return a Duration representing the value, or <code>null</code> if the value is unset
+     */
+    Duration asDuration();
+
+    /**
+     *
+     * @param dataUnit specifies the DataUnit to convert the data size into
+     * @return a Long value representing the value of the configured data size
+     * in terms of the specified DataUnit; if hte property is not set, returns
+     * <code>null</code>
+     */
+    Double asDataSize(DataUnit dataUnit);
+
+    /**
+     * Returns the value as a comma-separated list of values. Leading and trailing
+     * whitespace is trimmed from each value.
+     * @return the property value as a List of Strings
+     */
+    List<String> asList();
+
+    /**
+     * @return <code>true</code> if the user has configured a value, or if the
+     * {@link ConnectorPropertyDescriptor} for the associated property has a default
+     * value, <code>false</code> otherwise
+     */
+    boolean isSet();
+
+}
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/components/connector/ConnectorValidationContext.java
similarity index 65%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/components/connector/ConnectorValidationContext.java
index 9a65185..bf67b81 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/components/connector/ConnectorValidationContext.java
@@ -14,29 +14,18 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
 
-/**
- * Defines possible components for a given action.
- */
-public enum Component {
+package org.apache.nifi.components.connector;
+
+import org.apache.nifi.components.DescribedValue;
+import org.apache.nifi.components.ValidationContext;
+
+import java.util.List;
+
+public interface ConnectorValidationContext {
+
+    ValidationContext createValidationContext(String stepName, String groupName);
+
+    List<DescribedValue> fetchAllowableValues(String stepName, String groupName, String propertyName);
 
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
 }
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/components/connector/ConnectorValueReference.java
similarity index 64%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/components/connector/ConnectorValueReference.java
index 9a65185..fe01441 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/components/connector/ConnectorValueReference.java
@@ -14,29 +14,19 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
+
+package org.apache.nifi.components.connector;
 
 /**
- * Defines possible components for a given action.
+ * Represents a value reference for a connector property. A value can be a string literal,
+ * a reference to an asset, or a reference to a secret.
  */
-public enum Component {
+public sealed interface ConnectorValueReference permits StringLiteralValue, AssetReference, SecretReference {
 
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
+    /**
+     * Returns the type of value reference.
+     *
+     * @return the value type
+     */
+    ConnectorValueType getValueType();
 }
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/components/connector/ConnectorValueType.java
similarity index 65%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/components/connector/ConnectorValueType.java
index 9a65185..2bf2eb4 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/components/connector/ConnectorValueType.java
@@ -14,29 +14,22 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
 
-/**
- * Defines possible components for a given action.
- */
-public enum Component {
+package org.apache.nifi.components.connector;
+
+public enum ConnectorValueType {
+    /**
+     * The value is a string literal.
+     */
+    STRING_LITERAL,
+
+    /**
+     * The value identifies an Asset
+     */
+    ASSET_REFERENCE,
 
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
+    /**
+     * The value identifies a Secret.
+     */
+    SECRET_REFERENCE
 }
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/components/connector/FlowUpdateException.java
similarity index 65%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/components/connector/FlowUpdateException.java
index 9a65185..3d2c4e5 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/components/connector/FlowUpdateException.java
@@ -14,29 +14,19 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
 
-/**
- * Defines possible components for a given action.
- */
-public enum Component {
+package org.apache.nifi.components.connector;
+
+public class FlowUpdateException extends Exception {
+    public FlowUpdateException(final String message) {
+        super(message);
+    }
+
+    public FlowUpdateException(final String message, final Throwable cause) {
+        super(message, cause);
+    }
 
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
+    public FlowUpdateException(final Throwable cause) {
+        super(cause);
+    }
 }
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/components/connector/InvocationFailedException.java
similarity index 65%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/components/connector/InvocationFailedException.java
index 9a65185..276df7f 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/components/connector/InvocationFailedException.java
@@ -14,29 +14,21 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
 
-/**
- * Defines possible components for a given action.
- */
-public enum Component {
+package org.apache.nifi.components.connector;
+
+public class InvocationFailedException extends Exception {
+
+    public InvocationFailedException(final String message) {
+        super(message);
+    }
+
+    public InvocationFailedException(final String message, final Throwable cause) {
+        super(message, cause);
+    }
+
+    public InvocationFailedException(final Throwable cause) {
+        super(cause);
+    }
 
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
 }
diff --git a/src/main/java/org/apache/nifi/components/connector/PropertyGroupConfiguration.java b/src/main/java/org/apache/nifi/components/connector/PropertyGroupConfiguration.java
new file mode 100644
index 0000000..ffb4ca3
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/PropertyGroupConfiguration.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector;
+
+import java.util.Map;
+
+public record PropertyGroupConfiguration(String groupName, Map<String, ConnectorValueReference> propertyValues) {
+
+    /**
+     * Retrieves the raw string value for the given property. This method only returns a value
+     * for StringLiteralValue references; for other reference types, it returns null.
+     *
+     * @param propertyName the name of the property
+     * @return the String value of the property, or null if no value is set or if the reference is not a StringLiteralValue
+     */
+    public String getPropertyValue(final String propertyName) {
+        final ConnectorValueReference valueReference = propertyValues.get(propertyName);
+        if (valueReference instanceof StringLiteralValue stringLiteral) {
+            return stringLiteral.getValue();
+        }
+        return null;
+    }
+
+    /**
+     * Creates a PropertyGroupConfiguration from raw String values. This is a convenience method that
+     * converts String values to ConnectorValueReference objects with STRING_LITERAL type.
+     *
+     * @param groupName the name of the property group
+     * @param stringPropertyValues the property values as simple Strings
+     * @return a new PropertyGroupConfiguration with the values wrapped as ConnectorValueReference
+     */
+    public static PropertyGroupConfiguration fromStringValues(final String groupName, final Map<String, String> stringPropertyValues) {
+        final Map<String, ConnectorValueReference> referenceValues = new java.util.HashMap<>();
+        for (final Map.Entry<String, String> entry : stringPropertyValues.entrySet()) {
+            final String value = entry.getValue();
+            referenceValues.put(entry.getKey(), new StringLiteralValue(value));
+        }
+        return new PropertyGroupConfiguration(groupName, referenceValues);
+    }
+}
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/components/connector/PropertyType.java
similarity index 65%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/components/connector/PropertyType.java
index 9a65185..f01a91e 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/components/connector/PropertyType.java
@@ -14,29 +14,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
 
-/**
- * Defines possible components for a given action.
- */
-public enum Component {
+package org.apache.nifi.components.connector;
 
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
+public enum PropertyType {
+    STRING,
+    INTEGER,
+    BOOLEAN,
+    FLOAT,
+    DOUBLE,
+    STRING_LIST,
+    SECRET
 }
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/components/connector/Secret.java
similarity index 65%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/components/connector/Secret.java
index 9a65185..4d6e8c5 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/components/connector/Secret.java
@@ -14,29 +14,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
 
-/**
- * Defines possible components for a given action.
- */
-public enum Component {
+package org.apache.nifi.components.connector;
+
+public interface Secret {
+
+    String getProviderName();
+
+    String getGroupName();
+
+    String getName();
+
+    String getValue();
 
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
 }
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/components/connector/SecretProvider.java
similarity index 65%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/components/connector/SecretProvider.java
index 9a65185..22849a5 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/components/connector/SecretProvider.java
@@ -14,29 +14,20 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
 
-/**
- * Defines possible components for a given action.
- */
-public enum Component {
-
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
+package org.apache.nifi.components.connector;
+
+import java.io.IOException;
+import java.util.List;
+
+public interface SecretProvider {
+
+    String getProviderId();
+
+    String getProviderName();
+
+    List<Secret> getAllSecrets() throws IOException;
+
+    List<Secret> getSecrets(List<String> fullyQualifiedSecretNames) throws IOException;
+
 }
diff --git a/src/main/java/org/apache/nifi/components/connector/SecretReference.java b/src/main/java/org/apache/nifi/components/connector/SecretReference.java
new file mode 100644
index 0000000..8b5bd11
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/SecretReference.java
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector;
+
+import java.util.Objects;
+
+/**
+ * A ConnectorValueReference implementation representing a reference to a secret.
+ */
+public final class SecretReference implements ConnectorValueReference {
+
+    private final String providerId;
+    private final String providerName;
+    private final String secretName;
+
+    public SecretReference(final String providerId, final String providerName, final String secretName) {
+        this.providerId = providerId;
+        this.providerName = providerName;
+        this.secretName = secretName;
+    }
+
+    /**
+     * Returns the identifier of the secret provider.
+     *
+     * @return the provider identifier
+     */
+    public String getProviderId() {
+        return providerId;
+    }
+
+    /**
+     * Returns the name of the secret provider.
+     *
+     * @return the provider name
+     */
+    public String getProviderName() {
+        return providerName;
+    }
+
+    /**
+     * Returns the secret name.
+     *
+     * @return the secret name
+     */
+    public String getSecretName() {
+        return secretName;
+    }
+
+    @Override
+    public ConnectorValueType getValueType() {
+        return ConnectorValueType.SECRET_REFERENCE;
+    }
+
+    @Override
+    public boolean equals(final Object object) {
+        if (this == object) {
+            return true;
+        }
+        if (object == null || getClass() != object.getClass()) {
+            return false;
+        }
+        final SecretReference that = (SecretReference) object;
+        return Objects.equals(providerId, that.providerId) && Objects.equals(providerName, that.providerName)
+               && Objects.equals(secretName, that.secretName);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(providerId, providerName, secretName);
+    }
+
+    @Override
+    public String toString() {
+        return "SecretReference[providerId=" + providerId + ", providerName=" + providerName + ", secretName=" + secretName + "]";
+    }
+}
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/components/connector/SecretsManager.java
similarity index 65%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/components/connector/SecretsManager.java
index 9a65185..e4b7f60 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/components/connector/SecretsManager.java
@@ -14,29 +14,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
 
-/**
- * Defines possible components for a given action.
- */
-public enum Component {
+package org.apache.nifi.components.connector;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Set;
+
+public interface SecretsManager {
+
+    List<Secret> getAllSecrets() throws IOException;
+
+    Set<SecretProvider> getSecretProviders();
 
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
 }
diff --git a/src/main/java/org/apache/nifi/components/connector/StringLiteralValue.java b/src/main/java/org/apache/nifi/components/connector/StringLiteralValue.java
new file mode 100644
index 0000000..8a9de1d
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/StringLiteralValue.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector;
+
+import java.util.Objects;
+
+/**
+ * A ConnectorValueReference implementation representing a string literal value.
+ */
+public final class StringLiteralValue implements ConnectorValueReference {
+
+    /**
+     * An empty value reference, represented as a StringLiteralValue with a null value.
+     */
+    public static final StringLiteralValue EMPTY = new StringLiteralValue(null);
+
+    private final String value;
+
+    public StringLiteralValue(final String value) {
+        this.value = value;
+    }
+
+    /**
+     * Returns the string literal value.
+     *
+     * @return the string literal value
+     */
+    public String getValue() {
+        return value;
+    }
+
+    @Override
+    public ConnectorValueType getValueType() {
+        return ConnectorValueType.STRING_LITERAL;
+    }
+
+    @Override
+    public boolean equals(final Object object) {
+        if (this == object) {
+            return true;
+        }
+        if (object == null || getClass() != object.getClass()) {
+            return false;
+        }
+        final StringLiteralValue that = (StringLiteralValue) object;
+        return Objects.equals(value, that.value);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hashCode(value);
+    }
+
+    @Override
+    public String toString() {
+        return "StringLiteralValue[value=" + value + "]";
+    }
+}
diff --git a/src/main/java/org/apache/nifi/components/connector/components/ComponentState.java b/src/main/java/org/apache/nifi/components/connector/components/ComponentState.java
new file mode 100644
index 0000000..b5220cc
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/components/ComponentState.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector.components;
+
+public enum ComponentState {
+    /**
+     * State in which a Processor is disabled. Note that Controller Services' notions of Disabled and Enabled
+     * are different than Processors' notions of Disabled and Enabled. For Controller Services,
+     * Component States of STOPPED, RUNNING are mapped to Controller Services' DISABLED, ENABLED states respectively.
+     */
+    PROCESSOR_DISABLED,
+
+    /**
+     * Processor is stopped or Controller Service is disabled
+     */
+    STOPPED,
+
+    /**
+     * Processor is starting or Controller Service is enabling
+     */
+    STARTING,
+
+    /**
+     * Processor is running or Controller Service is enabled
+     */
+    RUNNING,
+
+    /**
+     * Processor is stopping or Controller Service is disabling
+     */
+    STOPPING;
+}
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/components/connector/components/ConnectionFacade.java
similarity index 63%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/components/connector/components/ConnectionFacade.java
index 9a65185..58cbac2 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/components/connector/components/ConnectionFacade.java
@@ -14,29 +14,25 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
 
-/**
- * Defines possible components for a given action.
- */
-public enum Component {
+package org.apache.nifi.components.connector.components;
+
+import org.apache.nifi.controller.queue.QueueSize;
+import org.apache.nifi.flow.VersionedConnection;
+
+public interface ConnectionFacade {
+
+    VersionedConnection getDefinition();
+
+    /**
+     * Returns the size of the Connection's queue.
+     * @return the size of the Connection's queue
+     */
+    QueueSize getQueueSize();
+
+    /**
+     * Purges all data from the connection.
+     */
+    void purge();
 
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
 }
diff --git a/src/main/java/org/apache/nifi/components/connector/components/ConnectorMethod.java b/src/main/java/org/apache/nifi/components/connector/components/ConnectorMethod.java
new file mode 100644
index 0000000..e58e0b4
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/components/ConnectorMethod.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector.components;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * <p>
+ * Annotation that can be added to a method in a Processor or ControllerService in order
+ * to expose the method to connectors for invocation. The method must be public and
+ * not static. The method may return a value. However, the value that is returned will
+ * be converted into a JSON object and that JSON object will be returned to the caller.
+ * </p>
+ *
+ * <p>
+ * The following example shows a method that is exposed to connectors:
+ * </p>
+ *
+ <pre>
+ * {@code
+ * @ConnectorMethod(
+ *     name = "echo",
+ *     description = "Returns the provided text after concatenating it the specified number of times.",
+ *     allowedStates = {ComponentState.STOPPED, ComponentState.STOPPING, ComponentState.STARTING, ComponentState.RUNNING},
+ *     arguments = {
+ *         @MethodArgument(name = "text", type = String.class, description = "The text to echo", required = true),
+ *         @MethodArgument(name = "iterations", type = int.class, description = "The number of iterations to echo the text", required = false)
+ *     }
+ * )
+ * public String echo(Map<String, Object> arguments) {
+ *     final StringBuilder sb = new StringBuilder();
+ *     final String text = (String) arguments.get("text");
+ *     final int iterations = (int) arguments.getOrDefault("iterations", 2);
+ *     for (int i = 0; i < iterations; i++) {
+ *       sb.append(text);
+ *
+ *       if (i < (iterations - 1)) {
+ *         sb.append("\n");
+ *       }
+ *     }
+ *
+ *     return sb.toString();
+ * }
+ * }
+ * </pre>
+ */
+@Documented
+@Target({ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+@Inherited
+public @interface ConnectorMethod {
+    /**
+     * The name of the method as it will be exposed to connectors.
+     * @return the method name
+     */
+    String name();
+
+    /**
+     * A description of the method
+     * @return the method description
+     */
+    String description() default "";
+
+    /**
+     * The states in which the component that defines the method is allowed to be in
+     * when the method is invoked. If the Processor or ControllerService is not in one of these states,
+     * any attempt to invoke the method will result in an error. The default states include all but PROCESSOR_DISABLED.
+     *
+     * @return the states in which the component that defines the method is allowed to be in when the method is invoked
+     */
+    ComponentState[] allowedStates() default {
+        ComponentState.STOPPED,
+        ComponentState.STOPPING,
+        ComponentState.STARTING,
+        ComponentState.RUNNING
+    };
+
+    /**
+     * The arguments that the method accepts. Each argument is described by a MethodArgument annotation.
+     * If no arguments are required, this can be left empty.
+     *
+     * @return the method arguments
+     */
+    MethodArgument[] arguments() default {};
+}
diff --git a/src/main/java/org/apache/nifi/components/connector/components/ControllerServiceFacade.java b/src/main/java/org/apache/nifi/components/connector/components/ControllerServiceFacade.java
new file mode 100644
index 0000000..b0eae11
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/components/ControllerServiceFacade.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector.components;
+
+import org.apache.nifi.components.ConfigVerificationResult;
+import org.apache.nifi.components.ValidationResult;
+import org.apache.nifi.components.connector.InvocationFailedException;
+import org.apache.nifi.flow.VersionedControllerService;
+import org.apache.nifi.flow.VersionedExternalFlow;
+import org.apache.nifi.flow.VersionedParameterContext;
+
+import java.util.List;
+import java.util.Map;
+
+public interface ControllerServiceFacade {
+
+    VersionedControllerService getDefinition();
+
+    ControllerServiceLifecycle getLifecycle();
+
+    List<ValidationResult> validate();
+
+    List<ValidationResult> validate(Map<String, String> propertyValues);
+
+    List<ConfigVerificationResult> verify(Map<String, String> propertyValues, Map<String, String> variables);
+
+    List<ConfigVerificationResult> verify(Map<String, String> propertyValues, VersionedParameterContext parameterContext, Map<String, String> variables);
+
+    List<ConfigVerificationResult> verify(VersionedExternalFlow versionedExternalFlow, Map<String, String> variables);
+
+    Object invokeConnectorMethod(String methodName, Map<String, Object> arguments) throws InvocationFailedException;
+
+    <T> T invokeConnectorMethod(String methodName, Map<String, Object> arguments, Class<T> returnType) throws InvocationFailedException;
+
+}
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/components/connector/components/ControllerServiceLifecycle.java
similarity index 65%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/components/connector/components/ControllerServiceLifecycle.java
index 9a65185..230391a 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/components/connector/components/ControllerServiceLifecycle.java
@@ -14,29 +14,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
 
-/**
- * Defines possible components for a given action.
- */
-public enum Component {
+package org.apache.nifi.components.connector.components;
+
+import java.util.concurrent.CompletableFuture;
+
+public interface ControllerServiceLifecycle {
+
+    ControllerServiceState getState();
+
+    CompletableFuture<Void> enable();
+
+    CompletableFuture<Void> disable();
 
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
 }
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/components/connector/components/ControllerServiceReferenceHierarchy.java
similarity index 65%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/components/connector/components/ControllerServiceReferenceHierarchy.java
index 9a65185..d9b2b80 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/components/connector/components/ControllerServiceReferenceHierarchy.java
@@ -14,29 +14,18 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
 
-/**
- * Defines possible components for a given action.
- */
-public enum Component {
+package org.apache.nifi.components.connector.components;
+
+public enum ControllerServiceReferenceHierarchy {
+
+    /**
+     * Interact only with Controller Services that are directly within the Process Group.
+     */
+    DIRECT_SERVICES_ONLY,
 
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
+    /**
+     * Interact with Controller Services within the Process Group and all child Process Groups, recursively.
+     */
+    INCLUDE_CHILD_GROUPS;
 }
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/components/connector/components/ControllerServiceReferenceScope.java
similarity index 62%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/components/connector/components/ControllerServiceReferenceScope.java
index 9a65185..22edd2f 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/components/connector/components/ControllerServiceReferenceScope.java
@@ -14,29 +14,19 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
 
-/**
- * Defines possible components for a given action.
- */
-public enum Component {
+package org.apache.nifi.components.connector.components;
+
+public enum ControllerServiceReferenceScope {
+
+    /**
+     * Enable all Controller Services in this Process Group and all child Process Groups.
+     */
+    INCLUDE_ALL,
 
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
+    /**
+     * Enable only those Controller Services that are directly referenced by Processors in this group and
+     * Controller Services that are referenced by those Controller Services, recursively.
+     */
+    INCLUDE_REFERENCED_SERVICES_ONLY;
 }
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/components/connector/components/ControllerServiceState.java
similarity index 65%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/components/connector/components/ControllerServiceState.java
index 9a65185..25d3484 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/components/connector/components/ControllerServiceState.java
@@ -14,29 +14,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
 
-/**
- * Defines possible components for a given action.
- */
-public enum Component {
+package org.apache.nifi.components.connector.components;
+
+public enum ControllerServiceState {
+    DISABLED,
+
+    DISABLING,
+
+    ENABLED,
+
+    ENABLING;
 
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
 }
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/components/connector/components/FlowContext.java
similarity index 57%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/components/connector/components/FlowContext.java
index 9a65185..214d2d7 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/components/connector/components/FlowContext.java
@@ -14,29 +14,27 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
 
-/**
- * Defines possible components for a given action.
- */
-public enum Component {
-
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
+package org.apache.nifi.components.connector.components;
+
+import org.apache.nifi.components.connector.ConnectorConfigurationContext;
+import org.apache.nifi.flow.Bundle;
+
+public interface FlowContext {
+
+    ProcessGroupFacade getRootGroup();
+
+    ParameterContextFacade getParameterContext();
+
+    ConnectorConfigurationContext getConfigurationContext();
+
+    FlowContextType getType();
+
+    /**
+     * Returns the bundle that indicates the version/coordinates that were used to create the
+     * configuration represented by this FlowContext.
+     *
+     * @return the bundle
+     */
+    Bundle getBundle();
 }
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/components/connector/components/FlowContextType.java
similarity index 65%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/components/connector/components/FlowContextType.java
index 9a65185..c668a13 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/components/connector/components/FlowContextType.java
@@ -14,29 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
 
-/**
- * Defines possible components for a given action.
- */
-public enum Component {
+package org.apache.nifi.components.connector.components;
+
+public enum FlowContextType {
+
+    ACTIVE,
 
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
+    WORKING;
 }
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/components/connector/components/MethodArgument.java
similarity index 62%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/components/connector/components/MethodArgument.java
index 9a65185..5e6a4af 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/components/connector/components/MethodArgument.java
@@ -14,29 +14,20 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
+
+package org.apache.nifi.components.connector.components;
 
 /**
- * Defines possible components for a given action.
+ * Annotation that can be provided as part of a {@link ConnectorMethod} definition to describe the arguments
+ * that the method accepts. This annotation is used to provide metadata about the method's arguments
+ * to facilitate dynamic invocation and documentation generation.
  */
-public enum Component {
+public @interface MethodArgument {
+    String name();
+
+    Class<?> type();
+
+    String description() default "";
 
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
+    boolean required() default true;
 }
diff --git a/src/main/java/org/apache/nifi/components/connector/components/ParameterContextFacade.java b/src/main/java/org/apache/nifi/components/connector/components/ParameterContextFacade.java
new file mode 100644
index 0000000..eb0b02d
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/components/ParameterContextFacade.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector.components;
+
+import org.apache.nifi.asset.Asset;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Collection;
+import java.util.Set;
+
+public interface ParameterContextFacade {
+
+    /**
+     * Updates the parameters in the Parameter Context with the given collection of ParameterValue objects.
+     * If a parameter does not already exist, it will be created. If it does exist, its value will be updated.
+     * If any parameter already exists but is not included in the given collection, it will remain unchanged.
+     *
+     * @param parameterValues the collection of ParameterValue objects to set or update in the Parameter Context
+     * @throws IllegalArgumentException if the sensitivity of a parameter does not match the existing parameter's sensitivity
+     */
+    void updateParameters(Collection<ParameterValue> parameterValues);
+
+    /**
+     * Gets the value of a parameter from the Parameter Context.
+     * @param parameterName the name of the parameter to retrieve
+     * @return the value of the parameter, or null if it is not set
+     */
+    String getValue(String parameterName);
+
+    /**
+     * Returns the names of all parameters that have been set in the Parameter Context.
+     * @return the names of all parameters that have been set in the Parameter Context.
+     */
+    Set<String> getDefinedParameterNames();
+
+    /**
+     * Checks if a parameter is marked as sensitive in the Parameter Context.
+     * @param parameterName the name of the parameter to check
+     * @return true if the parameter is marked as sensitive, false if it is not sensitive or is not known
+     */
+    boolean isSensitive(String parameterName);
+
+    /**
+     * Creates an asset whose contents are provided by the given InputStream. The asset may then be associated with a parameter
+     * by creating a ParameterValue that references the asset and updating parameters via updateParameters(Collection).
+     *
+     * @param inputStream the InputStream containing the asset contents
+     * @throws IOException if an error occurs while reading from the InputStream or storing the asset
+     * @return the asset that was created
+     */
+    Asset createAsset(InputStream inputStream) throws IOException;
+}
diff --git a/src/main/java/org/apache/nifi/components/connector/components/ParameterValue.java b/src/main/java/org/apache/nifi/components/connector/components/ParameterValue.java
new file mode 100644
index 0000000..6a77467
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/components/ParameterValue.java
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector.components;
+
+import org.apache.nifi.asset.Asset;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+public class ParameterValue {
+    private final String name;
+    private final String value;
+    private final boolean sensitive;
+    private final List<Asset> assets;
+
+    private ParameterValue(final Builder builder) {
+        this.name = builder.name;
+        this.value = builder.value;
+        this.sensitive = builder.sensitive;
+        this.assets = Collections.unmodifiableList(builder.referencedAssets);
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public boolean isSensitive() {
+        return sensitive;
+    }
+
+    public List<Asset> getAssets() {
+        return assets;
+    }
+
+    @Override
+    public String toString() {
+        return "ParameterValue{" +
+                "name=" + name +
+                ", value=" + (sensitive ? "****" : value) +
+                ", sensitive=" + sensitive +
+                ", assets=" + assets +
+                '}';
+    }
+
+    public static class Builder {
+        private String name;
+        private String value;
+        private boolean sensitive;
+        private final List<Asset> referencedAssets = new ArrayList<>();
+
+        public Builder name(final String name) {
+            this.name = name;
+            return this;
+        }
+
+        public Builder value(final String value) {
+            this.value = value;
+            return this;
+        }
+
+        public Builder sensitive(final boolean sensitive) {
+            this.sensitive = sensitive;
+            return this;
+        }
+
+        public Builder addReferencedAsset(final Asset asset) {
+            this.referencedAssets.add(asset);
+            return this;
+        }
+
+        public ParameterValue build() {
+            if (name == null || name.isEmpty()) {
+                throw new IllegalStateException("Parameter name must be provided");
+            }
+            if (value != null && !referencedAssets.isEmpty()) {
+                throw new IllegalStateException("Parameter cannot have both a value and referenced assets");
+            }
+            return new ParameterValue(this);
+        }
+    }
+}
diff --git a/src/main/java/org/apache/nifi/components/connector/components/ProcessGroupFacade.java b/src/main/java/org/apache/nifi/components/connector/components/ProcessGroupFacade.java
new file mode 100644
index 0000000..79655fd
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/components/ProcessGroupFacade.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector.components;
+
+import org.apache.nifi.controller.queue.QueueSize;
+import org.apache.nifi.flow.VersionedProcessGroup;
+
+import java.util.Set;
+
+public interface ProcessGroupFacade {
+
+    VersionedProcessGroup getDefinition();
+
+    ProcessorFacade getProcessor(String id);
+
+    Set<ProcessorFacade> getProcessors();
+
+    ControllerServiceFacade getControllerService(String id);
+
+    Set<ControllerServiceFacade> getControllerServices();
+
+    Set<ControllerServiceFacade> getControllerServices(ControllerServiceReferenceScope referenceScope, ControllerServiceReferenceHierarchy hierarchy);
+
+    ConnectionFacade getConnection(String id);
+
+    Set<ConnectionFacade> getConnections();
+
+    ProcessGroupFacade getProcessGroup(String id);
+
+    Set<ProcessGroupFacade> getProcessGroups();
+
+    QueueSize getQueueSize();
+
+    boolean isFlowEmpty();
+
+    StatelessGroupLifecycle getStatelessLifecycle();
+
+    ProcessGroupLifecycle getLifecycle();
+
+}
diff --git a/src/main/java/org/apache/nifi/components/connector/components/ProcessGroupLifecycle.java b/src/main/java/org/apache/nifi/components/connector/components/ProcessGroupLifecycle.java
new file mode 100644
index 0000000..963643c
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/components/ProcessGroupLifecycle.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector.components;
+
+import java.util.Collection;
+import java.util.concurrent.CompletableFuture;
+
+public interface ProcessGroupLifecycle {
+
+    CompletableFuture<Void> enableControllerServices(ControllerServiceReferenceScope scope, ControllerServiceReferenceHierarchy hierarchy);
+
+    CompletableFuture<Void> enableControllerServices(Collection<String> serviceIdentifiers);
+
+    CompletableFuture<Void> disableControllerServices(ControllerServiceReferenceHierarchy hierarchy);
+
+    CompletableFuture<Void> disableControllerServices(Collection<String> serviceIdentifiers);
+
+    CompletableFuture<Void> startProcessors();
+
+    CompletableFuture<Void> start(ControllerServiceReferenceScope serviceReferenceScope);
+
+    CompletableFuture<Void> stop();
+
+    CompletableFuture<Void> stopProcessors();
+
+}
diff --git a/src/main/java/org/apache/nifi/components/connector/components/ProcessorFacade.java b/src/main/java/org/apache/nifi/components/connector/components/ProcessorFacade.java
new file mode 100644
index 0000000..bfa32b8
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/components/ProcessorFacade.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector.components;
+
+import org.apache.nifi.components.ConfigVerificationResult;
+import org.apache.nifi.components.ValidationResult;
+import org.apache.nifi.components.connector.InvocationFailedException;
+import org.apache.nifi.flow.VersionedExternalFlow;
+import org.apache.nifi.flow.VersionedParameterContext;
+import org.apache.nifi.flow.VersionedProcessor;
+
+import java.util.List;
+import java.util.Map;
+
+public interface ProcessorFacade {
+
+    VersionedProcessor getDefinition();
+
+    ProcessorLifecycle getLifecycle();
+
+    List<ValidationResult> validate();
+
+    List<ValidationResult> validate(Map<String, String> propertyValues);
+
+    List<ConfigVerificationResult> verify(Map<String, String> propertyValues, Map<String, String> attributes);
+
+    List<ConfigVerificationResult> verify(Map<String, String> propertyValues, VersionedParameterContext parameterContext, Map<String, String> attributes);
+
+    List<ConfigVerificationResult> verify(VersionedExternalFlow versionedExternalFlow, Map<String, String> attributes);
+
+    Object invokeConnectorMethod(String methodName, Map<String, Object> arguments) throws InvocationFailedException;
+
+    <T> T invokeConnectorMethod(String methodName, Map<String, Object> arguments, Class<T> returnType) throws InvocationFailedException;
+}
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/components/connector/components/ProcessorLifecycle.java
similarity index 65%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/components/connector/components/ProcessorLifecycle.java
index 9a65185..92ef6f7 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/components/connector/components/ProcessorLifecycle.java
@@ -14,29 +14,25 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
 
-/**
- * Defines possible components for a given action.
- */
-public enum Component {
-
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
+package org.apache.nifi.components.connector.components;
+
+import java.util.concurrent.CompletableFuture;
+
+public interface ProcessorLifecycle {
+
+    ProcessorState getState();
+
+    int getActiveThreadCount();
+
+    void terminate();
+
+    CompletableFuture<Void> stop();
+
+    CompletableFuture<Void> start();
+
+    void disable();
+
+    void enable();
+
 }
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/components/connector/components/ProcessorState.java
similarity index 65%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/components/connector/components/ProcessorState.java
index 9a65185..b0dee6e 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/components/connector/components/ProcessorState.java
@@ -14,29 +14,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
 
-/**
- * Defines possible components for a given action.
- */
-public enum Component {
+package org.apache.nifi.components.connector.components;
+
+public enum ProcessorState {
+    DISABLED,
+
+    STOPPING,
+
+    STOPPED,
+
+    RUNNING,
 
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
+    STARTING;
 }
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/components/connector/components/StatelessGroupLifecycle.java
similarity index 65%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/components/connector/components/StatelessGroupLifecycle.java
index 9a65185..d1b606a 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/components/connector/components/StatelessGroupLifecycle.java
@@ -14,29 +14,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
 
-/**
- * Defines possible components for a given action.
- */
-public enum Component {
+package org.apache.nifi.components.connector.components;
+
+import java.util.concurrent.CompletableFuture;
+
+public interface StatelessGroupLifecycle {
+
+    CompletableFuture<Void> start();
+
+    CompletableFuture<Void> stop();
+
+    CompletableFuture<Void> terminate();
 
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
 }
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/components/connector/components/StatelessGroupState.java
similarity index 65%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/components/connector/components/StatelessGroupState.java
index 9a65185..0762056 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/components/connector/components/StatelessGroupState.java
@@ -14,29 +14,19 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
 
-/**
- * Defines possible components for a given action.
- */
-public enum Component {
-
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
+package org.apache.nifi.components.connector.components;
+
+public enum StatelessGroupState {
+
+    STARTING,
+
+    RUNNING,
+
+    STOPPING,
+
+    STOPPED,
+
+    DISABLED;
+
 }
diff --git a/src/main/java/org/apache/nifi/flow/ComponentType.java b/src/main/java/org/apache/nifi/flow/ComponentType.java
index 23b2ef3..25f25f3 100644
--- a/src/main/java/org/apache/nifi/flow/ComponentType.java
+++ b/src/main/java/org/apache/nifi/flow/ComponentType.java
@@ -34,7 +34,8 @@ public enum ComponentType {
     FLOW_ANALYSIS_RULE("Flow Analysis Rule"),
     PARAMETER_CONTEXT("Parameter Context"),
     PARAMETER_PROVIDER("Parameter Provider"),
-    FLOW_REGISTRY_CLIENT("Flow Registry Client");
+    FLOW_REGISTRY_CLIENT("Flow Registry Client"),
+    CONNECTOR("Connector");
 
 
     private final String typeName;
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/flow/VersionedConfigurationStep.java
similarity index 58%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/flow/VersionedConfigurationStep.java
index 9a65185..1921020 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/flow/VersionedConfigurationStep.java
@@ -14,29 +14,28 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
 
-/**
- * Defines possible components for a given action.
- */
-public enum Component {
+package org.apache.nifi.flow;
+
+import java.util.List;
+
+public class VersionedConfigurationStep {
+    private String name;
+    private List<VersionedConnectorPropertyGroup> propertyGroups;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    public List<VersionedConnectorPropertyGroup> getPropertyGroups() {
+        return propertyGroups;
+    }
 
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
+    public void setPropertyGroups(final List<VersionedConnectorPropertyGroup> propertyGroups) {
+        this.propertyGroups = propertyGroups;
+    }
 }
diff --git a/src/main/java/org/apache/nifi/flow/VersionedConnector.java b/src/main/java/org/apache/nifi/flow/VersionedConnector.java
new file mode 100644
index 0000000..96dad34
--- /dev/null
+++ b/src/main/java/org/apache/nifi/flow/VersionedConnector.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.flow;
+
+import java.util.List;
+
+public class VersionedConnector {
+    private String instanceIdentifier;
+    private String name;
+    private ScheduledState scheduledState;
+    private List<VersionedConfigurationStep> activeFlowConfiguration;
+    private List<VersionedConfigurationStep> workingFlowConfiguration;
+    private String type;
+    private Bundle bundle;
+
+    public String getInstanceIdentifier() {
+        return instanceIdentifier;
+    }
+
+    public void setInstanceIdentifier(final String instanceIdentifier) {
+        this.instanceIdentifier = instanceIdentifier;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    public ScheduledState getScheduledState() {
+        return scheduledState;
+    }
+
+    public void setScheduledState(final ScheduledState scheduledState) {
+        this.scheduledState = scheduledState;
+    }
+
+    public List<VersionedConfigurationStep> getActiveFlowConfiguration() {
+        return activeFlowConfiguration;
+    }
+
+    public void setActiveFlowConfiguration(final List<VersionedConfigurationStep> configurationSteps) {
+        this.activeFlowConfiguration = configurationSteps;
+    }
+
+    public List<VersionedConfigurationStep> getWorkingFlowConfiguration() {
+        return workingFlowConfiguration;
+    }
+
+    public void setWorkingFlowConfiguration(final List<VersionedConfigurationStep> workingFlowConfiguration) {
+        this.workingFlowConfiguration = workingFlowConfiguration;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(final String type) {
+        this.type = type;
+    }
+
+    public Bundle getBundle() {
+        return bundle;
+    }
+
+    public void setBundle(final Bundle bundle) {
+        this.bundle = bundle;
+    }
+}
diff --git a/src/main/java/org/apache/nifi/action/Component.java b/src/main/java/org/apache/nifi/flow/VersionedConnectorPropertyGroup.java
similarity index 58%
copy from src/main/java/org/apache/nifi/action/Component.java
copy to src/main/java/org/apache/nifi/flow/VersionedConnectorPropertyGroup.java
index 9a65185..dcf1722 100644
--- a/src/main/java/org/apache/nifi/action/Component.java
+++ b/src/main/java/org/apache/nifi/flow/VersionedConnectorPropertyGroup.java
@@ -14,29 +14,28 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.nifi.action;
 
-/**
- * Defines possible components for a given action.
- */
-public enum Component {
+package org.apache.nifi.flow;
+
+import java.util.Map;
+
+public class VersionedConnectorPropertyGroup {
+    private String name;
+    private Map<String, VersionedConnectorValueReference> properties;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    public Map<String, VersionedConnectorValueReference> getProperties() {
+        return properties;
+    }
 
-    Controller,
-    Processor,
-    InputPort,
-    OutputPort,
-    ProcessGroup,
-    RemoteProcessGroup,
-    Funnel,
-    Connection,
-    ControllerService,
-    ReportingTask,
-    FlowAnalysisRule,
-    FlowRegistryClient,
-    ParameterContext,
-    ParameterProvider,
-    AccessPolicy,
-    User,
-    UserGroup,
-    Label;
+    public void setProperties(final Map<String, VersionedConnectorValueReference> properties) {
+        this.properties = properties;
+    }
 }
diff --git a/src/main/java/org/apache/nifi/flow/VersionedConnectorValueReference.java b/src/main/java/org/apache/nifi/flow/VersionedConnectorValueReference.java
new file mode 100644
index 0000000..4748508
--- /dev/null
+++ b/src/main/java/org/apache/nifi/flow/VersionedConnectorValueReference.java
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.flow;
+
+import java.util.Objects;
+
+/**
+ * Represents a property value reference for a Connector in a versioned flow.
+ * This class is used for serialization/deserialization of connector property values
+ * that may reference different types of values (literals, assets, secrets).
+ */
+public class VersionedConnectorValueReference {
+    private String valueType;
+    private String value;
+    private String assetId;
+    private String providerId;
+    private String providerName;
+    private String secretName;
+
+    public String getValueType() {
+        return valueType;
+    }
+
+    public void setValueType(final String valueType) {
+        this.valueType = valueType;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(final String value) {
+        this.value = value;
+    }
+
+    public String getAssetId() {
+        return assetId;
+    }
+
+    public void setAssetId(final String assetId) {
+        this.assetId = assetId;
+    }
+
+    public String getProviderId() {
+        return providerId;
+    }
+
+    public void setProviderId(final String providerId) {
+        this.providerId = providerId;
+    }
+
+    public String getProviderName() {
+        return providerName;
+    }
+
+    public void setProviderName(final String providerName) {
+        this.providerName = providerName;
+    }
+
+    public String getSecretName() {
+        return secretName;
+    }
+
+    public void setSecretName(final String secretName) {
+        this.secretName = secretName;
+    }
+
+    @Override
+    public boolean equals(final Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (!(obj instanceof VersionedConnectorValueReference other)) {
+            return false;
+        }
+        return Objects.equals(valueType, other.valueType)
+               && Objects.equals(value, other.value)
+               && Objects.equals(assetId, other.assetId)
+               && Objects.equals(providerId, other.providerId)
+               && Objects.equals(secretName, other.secretName);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(valueType, value, assetId, providerId, secretName);
+    }
+
+    @Override
+    public String toString() {
+        return "VersionedConnectorValueReference[valueType=" + valueType + ", value=" + value
+               + ", assetId=" + assetId + ", providerId=" + providerId + ", secretName=" + secretName + "]";
+    }
+}
diff --git a/src/main/java/org/apache/nifi/reporting/ComponentType.java b/src/main/java/org/apache/nifi/reporting/ComponentType.java
index 95cec81..df02961 100644
--- a/src/main/java/org/apache/nifi/reporting/ComponentType.java
+++ b/src/main/java/org/apache/nifi/reporting/ComponentType.java
@@ -74,5 +74,10 @@ public enum ComponentType {
     /**
      * Bulletin is associated with a Flow Registry Client
      */
-    FLOW_REGISTRY_CLIENT;
+    FLOW_REGISTRY_CLIENT,
+
+    /**
+     * Bulletin is associated with a Connector
+     */
+    CONNECTOR;
 }
diff --git a/src/test/java/org/apache/nifi/components/connector/TestAbstractConnector.java b/src/test/java/org/apache/nifi/components/connector/TestAbstractConnector.java
new file mode 100644
index 0000000..7e3257f
--- /dev/null
+++ b/src/test/java/org/apache/nifi/components/connector/TestAbstractConnector.java
@@ -0,0 +1,525 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector;
+
+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;
+import org.apache.nifi.components.connector.components.FlowContext;
+import org.apache.nifi.components.connector.components.ProcessGroupFacade;
+import org.apache.nifi.flow.VersionedExternalFlow;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.Mock;
+import org.mockito.junit.jupiter.MockitoExtension;
+import org.mockito.junit.jupiter.MockitoSettings;
+import org.mockito.quality.Strictness;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+@ExtendWith(MockitoExtension.class)
+@MockitoSettings(strictness = Strictness.LENIENT)
+public class TestAbstractConnector {
+
+    @Mock
+    private FlowContext flowContext;
+
+    @Mock
+    private ConnectorConfigurationContext configurationContext;
+
+    @Mock
+    private ConnectorPropertyValue mockPropertyValue;
+
+    private TestableAbstractConnector connector;
+    private ConnectorValidationContext validationContext;
+
+
+    @BeforeEach
+    void setUp() {
+        connector = new TestableAbstractConnector();
+        validationContext = new TestConnectorValidationContext();
+        when(flowContext.getConfigurationContext()).thenReturn(configurationContext);
+        final ProcessGroupFacade rootGroupFacade = mock(ProcessGroupFacade.class);
+        when(rootGroupFacade.getProcessors()).thenReturn(Collections.emptySet());
+        when(rootGroupFacade.getProcessGroups()).thenReturn(Collections.emptySet());
+        when(rootGroupFacade.getControllerServices()).thenReturn(Collections.emptySet());
+        when(rootGroupFacade.getConnections()).thenReturn(Collections.emptySet());
+        when(flowContext.getRootGroup()).thenReturn(rootGroupFacade);
+    }
+
+    @Test
+    void testValidateWithEmptyConfigurationSteps() {
+        connector.setConfigurationSteps(Collections.emptyList());
+
+        final List<ValidationResult> results = connector.validate(flowContext, validationContext);
+
+        assertTrue(results.isEmpty());
+        assertTrue(connector.isCustomValidateCalled());
+    }
+
+    @Test
+    void testValidateWithRequiredPropertyMissing() {
+        final ConnectorPropertyDescriptor requiredProperty = new ConnectorPropertyDescriptor.Builder()
+            .name("Required Property")
+            .description("A required property")
+            .required(true)
+            .build();
+
+        final ConnectorPropertyGroup propertyGroup = ConnectorPropertyGroup.builder()
+            .name("Test Group")
+            .addProperty(requiredProperty)
+            .build();
+
+        final ConfigurationStep configStep = new ConfigurationStep.Builder()
+            .name("Test Step")
+            .propertyGroups(List.of(propertyGroup))
+            .build();
+
+        connector.setConfigurationSteps(List.of(configStep));
+        when(configurationContext.getProperty("Test Step", "Test Group", "Required Property")).thenReturn(null);
+
+        final List<ValidationResult> results = connector.validate(flowContext, validationContext);
+
+        assertEquals(1, results.size());
+        final ValidationResult result = results.getFirst();
+        assertFalse(result.isValid());
+        assertEquals("Required Property", result.getSubject());
+        assertNull(result.getInput());
+        assertEquals("Required Property is required", result.getExplanation());
+        assertFalse(connector.isCustomValidateCalled());
+    }
+
+    @Test
+    void testValidateWithOptionalPropertyMissing() {
+        final ConnectorPropertyDescriptor optionalProperty = new ConnectorPropertyDescriptor.Builder()
+            .name("Optional Property")
+            .description("An optional property")
+            .required(false)
+            .build();
+
+        final ConnectorPropertyGroup propertyGroup = ConnectorPropertyGroup.builder()
+            .name("Test Group")
+            .addProperty(optionalProperty)
+            .build();
+
+        final ConfigurationStep configStep = new ConfigurationStep.Builder()
+            .name("Test Step")
+            .propertyGroups(List.of(propertyGroup))
+            .build();
+
+        connector.setConfigurationSteps(List.of(configStep));
+        when(configurationContext.getProperty("Test Step", "Test Group", "Optional Property")).thenReturn(null);
+
+        final List<ValidationResult> results = connector.validate(flowContext, validationContext);
+
+        assertTrue(results.isEmpty());
+        assertTrue(connector.isCustomValidateCalled());
+    }
+
+    @Test
+    void testValidateWithInvalidPropertyValue() {
+        final ConnectorPropertyDescriptor propertyWithValidator = new ConnectorPropertyDescriptor.Builder()
+            .name("Validated Property")
+            .description("A property with validation")
+            .required(true)
+            .addValidator(NON_EMPTY_VALIDATOR)
+            .build();
+
+        final ConnectorPropertyGroup propertyGroup = ConnectorPropertyGroup.builder()
+            .name("Test Group")
+            .addProperty(propertyWithValidator)
+            .build();
+
+        final ConfigurationStep configStep = new ConfigurationStep.Builder()
+            .name("Test Step")
+            .propertyGroups(List.of(propertyGroup))
+            .build();
+
+        connector.setConfigurationSteps(List.of(configStep));
+        when(mockPropertyValue.getValue()).thenReturn("");
+        when(configurationContext.getProperty("Test Step", "Test Group", "Validated Property")).thenReturn(mockPropertyValue);
+
+        final List<ValidationResult> results = connector.validate(flowContext, validationContext);
+
+        assertEquals(1, results.size());
+        final ValidationResult result = results.getFirst();
+        assertFalse(result.isValid());
+        assertEquals("Validated Property", result.getSubject());
+        assertFalse(connector.isCustomValidateCalled());
+    }
+
+    @Test
+    void testValidateWithValidPropertyValue() {
+        final ConnectorPropertyDescriptor validProperty = new ConnectorPropertyDescriptor.Builder()
+            .name("Valid Property")
+            .description("A valid property")
+            .required(true)
+            .addValidator(NON_EMPTY_VALIDATOR)
+            .build();
+
+        final ConnectorPropertyGroup propertyGroup = ConnectorPropertyGroup.builder()
+            .name("Test Group")
+            .addProperty(validProperty)
+            .build();
+
+        final ConfigurationStep configStep = new ConfigurationStep.Builder()
+            .name("Test Step")
+            .propertyGroups(List.of(propertyGroup))
+            .build();
+
+        connector.setConfigurationSteps(List.of(configStep));
+        when(mockPropertyValue.getValue()).thenReturn("valid-value");
+        when(mockPropertyValue.isSet()).thenReturn(true);
+        when(configurationContext.getProperty("Test Step", "Test Group", "Valid Property")).thenReturn(mockPropertyValue);
+
+        final List<ValidationResult> results = connector.validate(flowContext, validationContext);
+
+        assertTrue(results.isEmpty());
+        assertTrue(connector.isCustomValidateCalled());
+    }
+
+    @Test
+    void testValidateWithPropertyDependencyNotSatisfied() {
+        final ConnectorPropertyDescriptor dependencyProperty = new ConnectorPropertyDescriptor.Builder()
+            .name("Dependency Property")
+            .description("The dependency property")
+            .required(false)
+            .build();
+
+        final ConnectorPropertyDescriptor dependentProperty = new ConnectorPropertyDescriptor.Builder()
+            .name("Dependent Property")
+            .description("Property that depends on another")
+            .required(true)
+            .dependsOn(dependencyProperty, "Required Value")
+            .build();
+
+        final ConnectorPropertyGroup propertyGroup = ConnectorPropertyGroup.builder()
+            .name("Test Group")
+            .addProperty(dependencyProperty)
+            .addProperty(dependentProperty)
+            .build();
+
+        final ConfigurationStep configStep = new ConfigurationStep.Builder()
+            .name("Test Step")
+            .propertyGroups(List.of(propertyGroup))
+            .build();
+
+        connector.setConfigurationSteps(List.of(configStep));
+        when(mockPropertyValue.getValue()).thenReturn("Wrong Value");
+        when(configurationContext.getProperty("Test Step", "Test Group", "Dependency Property")).thenReturn(mockPropertyValue);
+
+        final List<ValidationResult> results = connector.validate(flowContext, validationContext);
+
+        assertTrue(results.isEmpty());
+        assertTrue(connector.isCustomValidateCalled());
+    }
+
+    @Test
+    void testValidateWithPropertyDependencySatisfiedButMissingRequiredValue() {
+        final ConnectorPropertyDescriptor dependencyProperty = new ConnectorPropertyDescriptor.Builder()
+            .name("Dependency Property")
+            .description("The dependency property")
+            .required(false)
+            .build();
+
+        final ConnectorPropertyDescriptor dependentProperty = new ConnectorPropertyDescriptor.Builder()
+            .name("Dependent Property")
+            .description("Property that depends on another")
+            .required(true)
+            .dependsOn(dependencyProperty, "Required Value")
+            .build();
+
+        final ConnectorPropertyGroup propertyGroup = ConnectorPropertyGroup.builder()
+            .name("Test Group")
+            .addProperty(dependencyProperty)
+            .addProperty(dependentProperty)
+            .build();
+
+        final ConfigurationStep configStep = new ConfigurationStep.Builder()
+            .name("Test Step")
+            .propertyGroups(List.of(propertyGroup))
+            .build();
+
+        connector.setConfigurationSteps(List.of(configStep));
+        final ConnectorPropertyValue dependencyValue = mock(ConnectorPropertyValue.class);
+        when(dependencyValue.getValue()).thenReturn("Required Value");
+        when(configurationContext.getProperty("Test Step", "Test Group", "Dependency Property")).thenReturn(dependencyValue);
+        when(configurationContext.getProperty("Test Step", "Test Group", "Dependent Property")).thenReturn(null);
+
+        final List<ValidationResult> results = connector.validate(flowContext, validationContext);
+
+        assertEquals(1, results.size());
+        final ValidationResult result = results.getFirst();
+        assertFalse(result.isValid());
+        assertEquals("Dependent Property", result.getSubject());
+        assertEquals("Dependent Property is required", result.getExplanation());
+        assertFalse(connector.isCustomValidateCalled());
+    }
+
+    @Test
+    void testValidateWithMultipleConfigurationSteps() {
+        final ConnectorPropertyDescriptor prop1 = new ConnectorPropertyDescriptor.Builder()
+            .name("Property One")
+            .required(true)
+            .addValidator(NON_EMPTY_VALIDATOR)
+            .build();
+
+        final ConnectorPropertyDescriptor prop2 = new ConnectorPropertyDescriptor.Builder()
+            .name("Property Two")
+            .required(true)
+            .addValidator(NON_EMPTY_VALIDATOR)
+            .build();
+
+        final ConnectorPropertyGroup group1 = ConnectorPropertyGroup.builder()
+            .name("Group One")
+            .addProperty(prop1)
+            .build();
+
+        final ConnectorPropertyGroup group2 = ConnectorPropertyGroup.builder()
+            .name("Group Two")
+            .addProperty(prop2)
+            .build();
+
+        final ConfigurationStep step1 = new ConfigurationStep.Builder()
+            .name("Step One")
+            .propertyGroups(List.of(group1))
+            .build();
+
+        final ConfigurationStep step2 = new ConfigurationStep.Builder()
+            .name("Step Two")
+            .propertyGroups(List.of(group2))
+            .build();
+
+        connector.setConfigurationSteps(List.of(step1, step2));
+        final ConnectorPropertyValue validValue = mock(ConnectorPropertyValue.class);
+        when(validValue.getValue()).thenReturn("valid");
+        when(validValue.isSet()).thenReturn(true);
+        final ConnectorPropertyValue invalidValue = mock(ConnectorPropertyValue.class);
+        when(invalidValue.getValue()).thenReturn("");
+        when(invalidValue.isSet()).thenReturn(true);
+        when(configurationContext.getProperty("Step One", "Group One", "Property One")).thenReturn(validValue);
+        when(configurationContext.getProperty("Step Two", "Group Two", "Property Two")).thenReturn(invalidValue);
+
+        final List<ValidationResult> results = connector.validate(flowContext, validationContext);
+
+        assertEquals(1, results.size());
+        final ValidationResult result = results.getFirst();
+        assertFalse(result.isValid());
+        assertEquals("Property Two", result.getSubject());
+        assertFalse(connector.isCustomValidateCalled());
+    }
+
+    @Test
+    void testValidateWithCustomValidationErrors() {
+        connector.setConfigurationSteps(Collections.emptyList());
+        connector.setCustomValidationResults(List.of(
+            new ValidationResult.Builder()
+                .valid(false)
+                .subject("Custom Error")
+                .explanation("Custom validation failed")
+                .build()
+        ));
+
+        final List<ValidationResult> results = connector.validate(flowContext, validationContext);
+
+        assertEquals(1, results.size());
+        final ValidationResult result = results.getFirst();
+        assertFalse(result.isValid());
+        assertEquals("Custom Error", result.getSubject());
+        assertEquals("Custom validation failed", result.getExplanation());
+        assertTrue(connector.isCustomValidateCalled());
+    }
+
+    @Test
+    void testValidateWithCustomValidationReturningNull() {
+        connector.setConfigurationSteps(Collections.emptyList());
+        connector.setCustomValidationResults(null);
+
+        final List<ValidationResult> results = connector.validate(flowContext, validationContext);
+
+        assertTrue(results.isEmpty());
+        assertTrue(connector.isCustomValidateCalled());
+    }
+
+    @Test
+    void testValidateWithCustomValidationReturningValidResults() {
+        connector.setConfigurationSteps(Collections.emptyList());
+        connector.setCustomValidationResults(List.of(
+            new ValidationResult.Builder()
+                .valid(true)
+                .subject("Custom Check")
+                .explanation("Custom validation passed")
+                .build()
+        ));
+
+        final List<ValidationResult> results = connector.validate(flowContext, validationContext);
+
+        assertTrue(results.isEmpty());
+        assertTrue(connector.isCustomValidateCalled());
+    }
+
+    @Test
+    void testValidateWithCircularPropertyDependency() {
+        final ConnectorPropertyDescriptor prop1 = new ConnectorPropertyDescriptor.Builder()
+            .name("Property One")
+            .required(false)
+            .build();
+
+        final ConnectorPropertyDescriptor prop2 = new ConnectorPropertyDescriptor.Builder()
+            .name("Property Two")
+            .required(false)
+            .dependsOn(prop1, "Value One")
+            .build();
+
+        final ConnectorPropertyDescriptor circularProp1 = new ConnectorPropertyDescriptor.Builder()
+            .name("Property One")
+            .required(false)
+            .dependsOn(prop2, "Value Two")
+            .build();
+
+        final ConnectorPropertyGroup propertyGroup = ConnectorPropertyGroup.builder()
+            .name("Test Group")
+            .addProperty(circularProp1)
+            .addProperty(prop2)
+            .build();
+
+        final ConfigurationStep configStep = new ConfigurationStep.Builder()
+            .name("Test Step")
+            .propertyGroups(List.of(propertyGroup))
+            .build();
+
+        connector.setConfigurationSteps(List.of(configStep));
+        final ConnectorPropertyValue value1 = mock(ConnectorPropertyValue.class);
+        when(value1.getValue()).thenReturn("Value One");
+        final ConnectorPropertyValue value2 = mock(ConnectorPropertyValue.class);
+        when(value2.getValue()).thenReturn("Value Two");
+        when(configurationContext.getProperty("Test Step", "Group One", "Property One")).thenReturn(value1);
+        when(configurationContext.getProperty("Test Step", "Group Two", "Property Two")).thenReturn(value2);
+
+        final List<ValidationResult> results = connector.validate(flowContext, validationContext);
+
+        assertTrue(results.isEmpty());
+        assertTrue(connector.isCustomValidateCalled());
+    }
+
+    private static class TestableAbstractConnector extends AbstractConnector {
+        private List<ConfigurationStep> configurationSteps = Collections.emptyList();
+        private Collection<ValidationResult> customValidationResults = Collections.emptyList();
+        private boolean customValidateCalled = false;
+
+        public void setConfigurationSteps(final List<ConfigurationStep> steps) {
+            this.configurationSteps = steps;
+        }
+
+        public void setCustomValidationResults(final Collection<ValidationResult> results) {
+            this.customValidationResults = results;
+        }
+
+        public boolean isCustomValidateCalled() {
+            return customValidateCalled;
+        }
+
+        @Override
+        public VersionedExternalFlow getInitialFlow() {
+            return null;
+        }
+
+        @Override
+        public List<ConfigurationStep> getConfigurationSteps(final FlowContext workingContext) {
+            return configurationSteps;
+        }
+
+        @Override
+        protected Collection<ValidationResult> customValidate(final ConnectorConfigurationContext context) {
+            customValidateCalled = true;
+            return customValidationResults;
+        }
+
+        @Override
+        public void onStepConfigured(final String stepName, final FlowContext workingContext) {
+        }
+
+        @Override
+        public void prepareForUpdate(final FlowContext workingFlowContext, final FlowContext activeFlowContext) {
+        }
+
+        @Override
+        public void applyUpdate(final FlowContext workingFlowContext, final FlowContext activeFlowContext) {
+        }
+
+        @Override
+        public List<ConfigVerificationResult> verifyConfigurationStep(final String stepName, final List<PropertyGroupConfiguration> overrides, final FlowContext flowContext) {
+            return Collections.emptyList();
+        }
+
+        @Override
+        public List<ConfigVerificationResult> verify(final FlowContext flowContext) {
+            return List.of();
+        }
+    }
+
+    private static final Validator NON_EMPTY_VALIDATOR = new Validator() {
+        @Override
+        public ValidationResult validate(final String subject, final String input, final ValidationContext context) {
+            if (input == null || input.trim().isEmpty()) {
+                return new ValidationResult.Builder()
+                    .subject(subject)
+                    .input(input)
+                    .valid(false)
+                    .explanation(subject + " cannot be empty")
+                    .build();
+            }
+
+            return new ValidationResult.Builder()
+                .subject(subject)
+                .input(input)
+                .valid(true)
+                .build();
+        }
+    };
+
+    /**
+     * Simple test implementation of ConnectorValidationContext for unit testing.
+     */
+    private static class TestConnectorValidationContext implements ConnectorValidationContext {
+        @Override
+        public ValidationContext createValidationContext(final String stepName, final String groupName) {
+            // Return null as it's not needed for basic validation tests
+            return null;
+        }
+
+        @Override
+        public List<DescribedValue> fetchAllowableValues(final String stepName, final String groupName, final String propertyName) {
+            // Return empty list as we don't need to fetch dynamic allowable values in these tests
+            return Collections.emptyList();
+        }
+    }
+
+}
diff --git a/src/test/java/org/apache/nifi/components/connector/TestConnectorPropertyDescriptor.java b/src/test/java/org/apache/nifi/components/connector/TestConnectorPropertyDescriptor.java
new file mode 100644
index 0000000..d9aaaa4
--- /dev/null
+++ b/src/test/java/org/apache/nifi/components/connector/TestConnectorPropertyDescriptor.java
@@ -0,0 +1,230 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector;
+
+import org.apache.nifi.components.DescribedValue;
+import org.apache.nifi.components.ValidationContext;
+import org.apache.nifi.components.ValidationResult;
+import org.junit.jupiter.api.Test;
+
+import java.util.Collections;
+import java.util.List;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+public class TestConnectorPropertyDescriptor {
+
+    private static final String TEST_STEP_NAME = "test-step";
+    private static final String TEST_GROUP_NAME = "test-group";
+
+    @Test
+    void testValidateStringType() {
+        final ConnectorPropertyDescriptor descriptor = new ConnectorPropertyDescriptor.Builder()
+            .name("String Property")
+            .type(PropertyType.STRING)
+            .build();
+
+        final ConnectorValidationContext context = new TestConnectorValidationContext();
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "any string value", context).isValid());
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "!@#$%^&*()_+-=[]{}|;:',.<>?/~`", context).isValid());
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "", context).isValid());
+    }
+
+    @Test
+    void testValidatePasswordType() {
+        final ConnectorPropertyDescriptor descriptor = new ConnectorPropertyDescriptor.Builder()
+            .name("Password Property")
+            .type(PropertyType.SECRET)
+            .build();
+
+        final ConnectorValidationContext context = new TestConnectorValidationContext();
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "secretPassword123!", context).isValid());
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "", context).isValid());
+    }
+
+    @Test
+    void testValidateStringListType() {
+        final ConnectorPropertyDescriptor descriptor = new ConnectorPropertyDescriptor.Builder()
+            .name("String List Property")
+            .type(PropertyType.STRING_LIST)
+            .build();
+
+        final ConnectorValidationContext context = new TestConnectorValidationContext();
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "item1,item2,item3", context).isValid());
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "", context).isValid());
+    }
+
+    @Test
+    void testValidateBooleanTypeWithValidValues() {
+        final ConnectorPropertyDescriptor descriptor = new ConnectorPropertyDescriptor.Builder()
+            .name("Boolean Property")
+            .type(PropertyType.BOOLEAN)
+            .build();
+
+        final ConnectorValidationContext context = new TestConnectorValidationContext();
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "true", context).isValid());
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "false", context).isValid());
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "TRUE", context).isValid());
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "FALSE", context).isValid());
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "TrUe", context).isValid());
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "FaLsE", context).isValid());
+    }
+
+    @Test
+    void testValidateBooleanTypeWithInvalidValues() {
+        final ConnectorPropertyDescriptor descriptor = new ConnectorPropertyDescriptor.Builder()
+            .name("Boolean Property")
+            .type(PropertyType.BOOLEAN)
+            .build();
+
+        final ConnectorValidationContext context = new TestConnectorValidationContext();
+        ValidationResult result = descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "invalid", context);
+        assertFalse(result.isValid());
+        assertEquals("Boolean Property", result.getSubject());
+        assertEquals("invalid", result.getInput());
+        assertEquals("Value must be true or false", result.getExplanation());
+
+        assertFalse(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "1", context).isValid());
+        assertFalse(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "0", context).isValid());
+        assertFalse(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "yes", context).isValid());
+        assertFalse(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "no", context).isValid());
+        assertFalse(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "", context).isValid());
+    }
+
+    @Test
+    void testValidateIntegerTypeWithValidValues() {
+        final ConnectorPropertyDescriptor descriptor = new ConnectorPropertyDescriptor.Builder()
+            .name("Integer Property")
+            .type(PropertyType.INTEGER)
+            .build();
+
+        final ConnectorValidationContext context = new TestConnectorValidationContext();
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "12345", context).isValid());
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "-12345", context).isValid());
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "0", context).isValid());
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "00123", context).isValid());
+    }
+
+    @Test
+    void testValidateIntegerTypeWithInvalidValues() {
+        final ConnectorPropertyDescriptor descriptor = new ConnectorPropertyDescriptor.Builder()
+            .name("Integer Property")
+            .type(PropertyType.INTEGER)
+            .build();
+
+        final ConnectorValidationContext context = new TestConnectorValidationContext();
+        ValidationResult result = descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "123.45", context);
+        assertFalse(result.isValid());
+        assertEquals("Integer Property", result.getSubject());
+        assertEquals("123.45", result.getInput());
+        assertEquals("Value must be an integer", result.getExplanation());
+
+        assertFalse(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "not a number", context).isValid());
+        assertFalse(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, " 123 ", context).isValid());
+        assertFalse(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "+123", context).isValid());
+        assertFalse(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "0x1A3F", context).isValid());
+        assertFalse(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "", context).isValid());
+    }
+
+    @Test
+    void testValidateDoubleTypeWithValidValues() {
+        final ConnectorPropertyDescriptor descriptor = new ConnectorPropertyDescriptor.Builder()
+            .name("Double Property")
+            .type(PropertyType.DOUBLE)
+            .build();
+
+        final ConnectorValidationContext context = new TestConnectorValidationContext();
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "123", context).isValid());
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "123.456", context).isValid());
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "-123.456", context).isValid());
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "0.0", context).isValid());
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "0", context).isValid());
+    }
+
+    @Test
+    void testValidateDoubleTypeWithInvalidValues() {
+        final ConnectorPropertyDescriptor descriptor = new ConnectorPropertyDescriptor.Builder()
+            .name("Double Property")
+            .type(PropertyType.DOUBLE)
+            .build();
+
+        final ConnectorValidationContext context = new TestConnectorValidationContext();
+        ValidationResult result = descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "not a number", context);
+        assertFalse(result.isValid());
+        assertEquals("Double Property", result.getSubject());
+        assertEquals("not a number", result.getInput());
+        assertEquals("Value must be a floating point number", result.getExplanation());
+
+        assertFalse(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "123.456.789", context).isValid());
+        assertFalse(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "1.23e10", context).isValid());
+        assertFalse(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "123.", context).isValid());
+        assertFalse(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, ".123", context).isValid());
+    }
+
+    @Test
+    void testValidateFloatTypeWithValidValues() {
+        final ConnectorPropertyDescriptor descriptor = new ConnectorPropertyDescriptor.Builder()
+            .name("Float Property")
+            .type(PropertyType.FLOAT)
+            .build();
+
+        final ConnectorValidationContext context = new TestConnectorValidationContext();
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "123", context).isValid());
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "123.456", context).isValid());
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "-123.456", context).isValid());
+        assertTrue(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "0", context).isValid());
+    }
+
+    @Test
+    void testValidateFloatTypeWithInvalidValues() {
+        final ConnectorPropertyDescriptor descriptor = new ConnectorPropertyDescriptor.Builder()
+            .name("Float Property")
+            .type(PropertyType.FLOAT)
+            .build();
+
+        final ConnectorValidationContext context = new TestConnectorValidationContext();
+        ValidationResult result = descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "not a number", context);
+        assertFalse(result.isValid());
+        assertEquals("Float Property", result.getSubject());
+        assertEquals("not a number", result.getInput());
+        assertEquals("Value must be a floating point number", result.getExplanation());
+
+        assertFalse(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, "123.", context).isValid());
+        assertFalse(descriptor.validate(TEST_STEP_NAME, TEST_GROUP_NAME, ".123", context).isValid());
+    }
+
+    /**
+     * Simple test implementation of ConnectorValidationContext for unit testing.
+     */
+    private static class TestConnectorValidationContext implements ConnectorValidationContext {
+        @Override
+        public ValidationContext createValidationContext(final String stepName, final String groupName) {
+            // Return null as it's not needed for basic type validation tests
+            return null;
+        }
+
+        @Override
+        public List<DescribedValue> fetchAllowableValues(final String stepName, final String groupName, final String propertyName) {
+            // Return empty list as we don't need to fetch dynamic allowable values in these tests
+            return Collections.emptyList();
+        }
+    }
+}
+


(nifi-api) 11/27: NIFI-15369: Allow ConfigurationStep to depend on another (ConfigurationStep,Property) tuple (#39)

Posted by ma...@apache.org.
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-api.git

commit cee255f0a2323996132c901be422d55acd657ae8
Author: Mark Payne <ma...@hotmail.com>
AuthorDate: Fri Dec 19 14:23:39 2025 -0500

    NIFI-15369: Allow ConfigurationStep to depend on another (ConfigurationStep,Property) tuple (#39)
---
 .../org/apache/nifi/components/DescribedValue.java |  17 +
 .../components/connector/AbstractConnector.java    |  75 +++-
 .../components/connector/ConfigurationStep.java    |  88 ++++-
 .../connector/ConfigurationStepDependency.java     | 106 ++++++
 .../nifi/components/connector/Connector.java       |   3 +-
 .../connector/TestAbstractConnector.java           | 418 ++++++++++++++++++++-
 .../connector/TestConfigurationStep.java           | 325 ++++++++++++++++
 7 files changed, 1025 insertions(+), 7 deletions(-)

diff --git a/src/main/java/org/apache/nifi/components/DescribedValue.java b/src/main/java/org/apache/nifi/components/DescribedValue.java
index a8f1304..b9915a3 100644
--- a/src/main/java/org/apache/nifi/components/DescribedValue.java
+++ b/src/main/java/org/apache/nifi/components/DescribedValue.java
@@ -35,4 +35,21 @@ public interface DescribedValue {
      * @return the property description as a string
      */
     String getDescription();
+
+    DescribedValue NULL = new DescribedValue() {
+        @Override
+        public String getValue() {
+            return null;
+        }
+
+        @Override
+        public String getDisplayName() {
+            return "NULL";
+        }
+
+        @Override
+        public String getDescription() {
+            return "A null value";
+        }
+    };
 }
diff --git a/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java b/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
index 6db3acc..49d8059 100644
--- a/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
+++ b/src/main/java/org/apache/nifi/components/connector/AbstractConnector.java
@@ -273,7 +273,7 @@ public abstract class AbstractConnector implements Connector {
     public List<ConfigVerificationResult> verify(final FlowContext flowContext) {
         final List<ConfigVerificationResult> results = new ArrayList<>();
 
-        final List<ConfigurationStep> configSteps = getConfigurationSteps(flowContext);
+        final List<ConfigurationStep> configSteps = getConfigurationSteps();
         for (final ConfigurationStep configStep : configSteps) {
             final List<ConfigVerificationResult> stepResults = verifyConfigurationStep(configStep.getName(), Map.of(), flowContext);
             results.addAll(stepResults);
@@ -286,9 +286,14 @@ public abstract class AbstractConnector implements Connector {
     public List<ValidationResult> validate(final FlowContext flowContext, final ConnectorValidationContext validationContext) {
         final ConnectorConfigurationContext configContext = flowContext.getConfigurationContext();
         final List<ValidationResult> results = new ArrayList<>();
-        final List<ConfigurationStep> configurationSteps = getConfigurationSteps(flowContext);
+        final List<ConfigurationStep> configurationSteps = getConfigurationSteps();
 
         for (final ConfigurationStep configurationStep : configurationSteps) {
+            if (!isStepDependencySatisfied(configurationStep, configurationSteps, configContext)) {
+                getLogger().debug("Skipping validation for Configuration Step [{}] because its dependencies are not satisfied", configurationStep.getName());
+                continue;
+            }
+
             results.addAll(validateConfigurationStep(configurationStep, configContext, validationContext));
         }
 
@@ -545,6 +550,72 @@ public abstract class AbstractConnector implements Connector {
         }
     }
 
+    private boolean isStepDependencySatisfied(final ConfigurationStep step, final List<ConfigurationStep> allSteps,
+            final ConnectorConfigurationContext configContext) {
+
+        final Set<ConfigurationStepDependency> dependencies = step.getDependencies();
+        if (dependencies.isEmpty()) {
+            return true;
+        }
+
+        for (final ConfigurationStepDependency dependency : dependencies) {
+            final String dependentStepName = dependency.getStepName();
+            final String dependentPropertyName = dependency.getPropertyName();
+
+            final ConfigurationStep dependentStep = findStepByName(allSteps, dependentStepName);
+            if (dependentStep == null) {
+                getLogger().debug("Dependency of step {} is not satisfied because it depends on step {} which could not be found", step.getName(), dependentStepName);
+                return false;
+            }
+
+            final ConnectorPropertyDescriptor dependentProperty = findPropertyInStep(dependentStep, dependentPropertyName);
+            if (dependentProperty == null) {
+                getLogger().debug("Dependency of step {} is not satisfied because it depends on property {} in step {} which could not be found",
+                    step.getName(), dependentPropertyName, dependentStepName);
+                return false;
+            }
+
+            final ConnectorPropertyValue propertyValue = configContext.getProperty(dependentStepName, dependentPropertyName);
+            final String value = propertyValue == null ? dependentProperty.getDefaultValue() : propertyValue.getValue();
+
+            final Set<String> dependentValues = dependency.getDependentValues();
+            if (dependentValues == null) {
+                // Dependency is satisfied as long as the property has any value configured.
+                if (value == null) {
+                    return false;
+                }
+
+                continue;
+            }
+
+            if (!dependentValues.contains(value)) {
+                return false;
+            }
+        }
+
+        return true;
+    }
+
+    private ConfigurationStep findStepByName(final List<ConfigurationStep> steps, final String stepName) {
+        for (final ConfigurationStep step : steps) {
+            if (step.getName().equals(stepName)) {
+                return step;
+            }
+        }
+        return null;
+    }
+
+    private ConnectorPropertyDescriptor findPropertyInStep(final ConfigurationStep step, final String propertyName) {
+        for (final ConnectorPropertyGroup group : step.getPropertyGroups()) {
+            for (final ConnectorPropertyDescriptor descriptor : group.getProperties()) {
+                if (descriptor.getName().equals(propertyName)) {
+                    return descriptor;
+                }
+            }
+        }
+        return null;
+    }
+
     @Override
     public final void onConfigurationStepConfigured(final String stepName, final FlowContext workingContext) throws FlowUpdateException {
         onStepConfigured(stepName, workingContext);
diff --git a/src/main/java/org/apache/nifi/components/connector/ConfigurationStep.java b/src/main/java/org/apache/nifi/components/connector/ConfigurationStep.java
index 6393484..d840b12 100644
--- a/src/main/java/org/apache/nifi/components/connector/ConfigurationStep.java
+++ b/src/main/java/org/apache/nifi/components/connector/ConfigurationStep.java
@@ -17,21 +17,28 @@
 
 package org.apache.nifi.components.connector;
 
+import org.apache.nifi.components.AllowableValue;
+import org.apache.nifi.components.DescribedValue;
+
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
+import java.util.stream.Collectors;
 
 public final class ConfigurationStep {
     private final String name;
     private final String description;
     private final List<ConnectorPropertyGroup> propertyGroups;
+    private final Set<ConfigurationStepDependency> dependencies;
 
     private ConfigurationStep(final Builder builder) {
         this.name = builder.name;
         this.description = builder.description;
         this.propertyGroups = Collections.unmodifiableList(builder.propertyGroups);
+        this.dependencies = Collections.unmodifiableSet(builder.dependencies);
     }
 
     public String getName() {
@@ -46,17 +53,25 @@ public final class ConfigurationStep {
         return propertyGroups;
     }
 
+    /**
+     * @return the set of dependencies that this step has on other steps' properties
+     */
+    public Set<ConfigurationStepDependency> getDependencies() {
+        return dependencies;
+    }
+
     public static final class Builder {
         private String name;
         private String description;
         private List<ConnectorPropertyGroup> propertyGroups = Collections.emptyList();
+        private final Set<ConfigurationStepDependency> dependencies = new HashSet<>();
 
-        public Builder name(String name) {
+        public Builder name(final String name) {
             this.name = name;
             return this;
         }
 
-        public Builder description(String description) {
+        public Builder description(final String description) {
             this.description = description;
             return this;
         }
@@ -66,6 +81,75 @@ public final class ConfigurationStep {
             return this;
         }
 
+        /**
+         * Sets a dependency on another ConfigurationStep's property having some (any) value configured.
+         *
+         * @param step the ConfigurationStep that this step depends on
+         * @param property the property within the specified step that must have a value
+         * @return this Builder for method chaining
+         */
+        public Builder dependsOn(final ConfigurationStep step, final ConnectorPropertyDescriptor property) {
+            dependencies.add(new ConfigurationStepDependency(step.getName(), property.getName()));
+            return this;
+        }
+
+        /**
+         * Sets a dependency on another ConfigurationStep's property having one of the specified values.
+         *
+         * @param step the ConfigurationStep that this step depends on
+         * @param property the property within the specified step that must have one of the specified values
+         * @param dependentValues the list of values that satisfy this dependency
+         * @return this Builder for method chaining
+         */
+        public Builder dependsOn(final ConfigurationStep step, final ConnectorPropertyDescriptor property, final List<DescribedValue> dependentValues) {
+            if (dependentValues == null || dependentValues.isEmpty()) {
+                dependencies.add(new ConfigurationStepDependency(step.getName(), property.getName()));
+            } else {
+                final Set<String> dependentValueSet = dependentValues.stream()
+                    .map(DescribedValue::getValue)
+                    .collect(Collectors.toSet());
+
+                dependencies.add(new ConfigurationStepDependency(step.getName(), property.getName(), dependentValueSet));
+            }
+
+            return this;
+        }
+
+        /**
+         * Sets a dependency on another ConfigurationStep's property having one of the specified values.
+         *
+         * @param step the ConfigurationStep that this step depends on
+         * @param property the property within the specified step that must have one of the specified values
+         * @param firstDependentValue the first value that satisfies this dependency
+         * @param additionalDependentValues additional values that satisfy this dependency
+         * @return this Builder for method chaining
+         */
+        public Builder dependsOn(final ConfigurationStep step, final ConnectorPropertyDescriptor property,
+                final DescribedValue firstDependentValue, final DescribedValue... additionalDependentValues) {
+
+            final List<DescribedValue> dependentValues = new ArrayList<>();
+            dependentValues.add(firstDependentValue);
+            dependentValues.addAll(Arrays.asList(additionalDependentValues));
+            return dependsOn(step, property, dependentValues);
+        }
+
+        /**
+         * Sets a dependency on another ConfigurationStep's property having one of the specified string values.
+         *
+         * @param step the ConfigurationStep that this step depends on
+         * @param property the property within the specified step that must have one of the specified values
+         * @param dependentValues the string values that satisfy this dependency
+         * @return this Builder for method chaining
+         */
+        public Builder dependsOn(final ConfigurationStep step, final ConnectorPropertyDescriptor property, final String... dependentValues) {
+            final List<DescribedValue> describedValues = Arrays.stream(dependentValues)
+                .map(AllowableValue::new)
+                .map(DescribedValue.class::cast)
+                .toList();
+
+            return dependsOn(step, property, describedValues);
+        }
+
         public ConfigurationStep build() {
             if (name == null) {
                 throw new IllegalStateException("Configuration Step's name must be provided");
diff --git a/src/main/java/org/apache/nifi/components/connector/ConfigurationStepDependency.java b/src/main/java/org/apache/nifi/components/connector/ConfigurationStepDependency.java
new file mode 100644
index 0000000..f4e0ff9
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/ConfigurationStepDependency.java
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector;
+
+import java.util.HashSet;
+import java.util.Objects;
+import java.util.Set;
+
+/**
+ * Represents a dependency that a ConfigurationStep has on another ConfigurationStep's property.
+ * A ConfigurationStep can depend on a property of another step having some value (when dependentValues is null
+ * and requiresAbsence is false), having one of a specific set of values (when dependentValues is non-null),
+ * or requiring the property to be absent/null (when requiresAbsence is true).
+ */
+public final class ConfigurationStepDependency {
+    private final String stepName;
+    private final String propertyName;
+    private final Set<String> dependentValues;
+
+    /**
+     * Creates a dependency on the specified step and property having one of the specified values.
+     *
+     * @param stepName the name of the step that this dependency is on
+     * @param propertyName the name of the property that this dependency is on
+     * @param dependentValues the set of values that the property must have; if the property has any
+     *                        of these values, the dependency is satisfied
+     */
+    public ConfigurationStepDependency(final String stepName, final String propertyName, final Set<String> dependentValues) {
+        this.stepName = Objects.requireNonNull(stepName, "Step name is required");
+        this.propertyName = Objects.requireNonNull(propertyName, "Property name is required");
+        this.dependentValues = dependentValues == null ? null : new HashSet<>(dependentValues);
+    }
+
+    /**
+     * Creates a dependency on the specified step and property having some (any) value.
+     *
+     * @param stepName the name of the step that this dependency is on
+     * @param propertyName the name of the property that this dependency is on
+     */
+    public ConfigurationStepDependency(final String stepName, final String propertyName) {
+        this.stepName = Objects.requireNonNull(stepName, "Step name is required");
+        this.propertyName = Objects.requireNonNull(propertyName, "Property name is required");
+        this.dependentValues = null;
+    }
+
+    /**
+     * @return the name of the ConfigurationStep that this dependency references
+     */
+    public String getStepName() {
+        return stepName;
+    }
+
+    /**
+     * @return the name of the property within the referenced step that this dependency is on
+     */
+    public String getPropertyName() {
+        return propertyName;
+    }
+
+    /**
+     * @return the set of values that the referenced property must have for the dependency to be satisfied,
+     *         or null if the dependency is satisfied by the property having any value (or being absent if requiresAbsence is true)
+     */
+    public Set<String> getDependentValues() {
+        return dependentValues;
+    }
+
+
+    @Override
+    public boolean equals(final Object o) {
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        final ConfigurationStepDependency that = (ConfigurationStepDependency) o;
+        return Objects.equals(stepName, that.stepName)
+            && Objects.equals(propertyName, that.propertyName)
+            && Objects.equals(dependentValues, that.dependentValues);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(stepName, propertyName, dependentValues);
+    }
+
+    @Override
+    public String toString() {
+        return "ConfigurationStepDependency[stepName=" + stepName + ", propertyName=" + propertyName
+            + ", dependentValues=" + dependentValues + "]";
+    }
+}
+
diff --git a/src/main/java/org/apache/nifi/components/connector/Connector.java b/src/main/java/org/apache/nifi/components/connector/Connector.java
index 5de886a..ce88079 100644
--- a/src/main/java/org/apache/nifi/components/connector/Connector.java
+++ b/src/main/java/org/apache/nifi/components/connector/Connector.java
@@ -150,10 +150,9 @@ public interface Connector {
      * represents a logical grouping of properties that should be configured together. The order of the steps
      * in the list represents the order in which the steps should be configured.
      *
-     * @param flowContext the flow context that houses the configuration being used to drive the available configuration steps
      * @return the list of configuration steps
      */
-    List<ConfigurationStep> getConfigurationSteps(FlowContext flowContext);
+    List<ConfigurationStep> getConfigurationSteps();
 
     /**
      * Called whenever a specific configuration step has been configured. This allows the Connector to perform any necessary
diff --git a/src/test/java/org/apache/nifi/components/connector/TestAbstractConnector.java b/src/test/java/org/apache/nifi/components/connector/TestAbstractConnector.java
index c4d96bf..bb77976 100644
--- a/src/test/java/org/apache/nifi/components/connector/TestAbstractConnector.java
+++ b/src/test/java/org/apache/nifi/components/connector/TestAbstractConnector.java
@@ -25,6 +25,7 @@ import org.apache.nifi.components.Validator;
 import org.apache.nifi.components.connector.components.FlowContext;
 import org.apache.nifi.components.connector.components.ProcessGroupFacade;
 import org.apache.nifi.flow.VersionedExternalFlow;
+import org.apache.nifi.logging.ComponentLog;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.ExtendWith;
@@ -73,6 +74,11 @@ public class TestAbstractConnector {
         when(rootGroupFacade.getControllerServices()).thenReturn(Collections.emptySet());
         when(rootGroupFacade.getConnections()).thenReturn(Collections.emptySet());
         when(flowContext.getRootGroup()).thenReturn(rootGroupFacade);
+
+        final ConnectorInitializationContext initContext = mock(ConnectorInitializationContext.class);
+        final ComponentLog logger = mock(ComponentLog.class);
+        when(initContext.getLogger()).thenReturn(logger);
+        connector.initialize(initContext);
     }
 
     @Test
@@ -430,6 +436,412 @@ public class TestAbstractConnector {
         assertTrue(connector.isCustomValidateCalled());
     }
 
+    @Test
+    void testValidateStepWithUnsatisfiedDependencyIsSkipped() {
+        final ConnectorPropertyDescriptor enabledProperty = new ConnectorPropertyDescriptor.Builder()
+            .name("Enabled")
+            .type(PropertyType.STRING)
+            .required(false)
+            .build();
+
+        final ConnectorPropertyGroup step1Group = ConnectorPropertyGroup.builder()
+            .name("Settings")
+            .addProperty(enabledProperty)
+            .build();
+
+        final ConfigurationStep step1 = new ConfigurationStep.Builder()
+            .name("Step 1")
+            .propertyGroups(List.of(step1Group))
+            .build();
+
+        final ConnectorPropertyDescriptor requiredInStep2 = new ConnectorPropertyDescriptor.Builder()
+            .name("Required When Enabled")
+            .required(true)
+            .build();
+
+        final ConnectorPropertyGroup step2Group = ConnectorPropertyGroup.builder()
+            .name("Advanced Settings")
+            .addProperty(requiredInStep2)
+            .build();
+
+        final ConfigurationStep step2 = new ConfigurationStep.Builder()
+            .name("Step 2")
+            .propertyGroups(List.of(step2Group))
+            .dependsOn(step1, enabledProperty, "true")
+            .build();
+
+        connector.setConfigurationSteps(List.of(step1, step2));
+
+        final ConnectorPropertyValue enabledValue = mock(ConnectorPropertyValue.class);
+        when(enabledValue.getValue()).thenReturn("false");
+        when(configurationContext.getProperty("Step 1", "Enabled")).thenReturn(enabledValue);
+        when(configurationContext.getProperty("Step 2", "Required When Enabled")).thenReturn(null);
+
+        final List<ValidationResult> results = connector.validate(flowContext, validationContext);
+
+        assertTrue(results.isEmpty(), "Step 2 should be skipped because its dependency is not satisfied");
+        assertTrue(connector.isCustomValidateCalled());
+    }
+
+    @Test
+    void testValidateStepWithSatisfiedDependencyIsValidated() {
+        final ConnectorPropertyDescriptor enabledProperty = new ConnectorPropertyDescriptor.Builder()
+            .name("Enabled")
+            .type(PropertyType.STRING)
+            .required(false)
+            .build();
+
+        final ConnectorPropertyGroup step1Group = ConnectorPropertyGroup.builder()
+            .name("Settings")
+            .addProperty(enabledProperty)
+            .build();
+
+        final ConfigurationStep step1 = new ConfigurationStep.Builder()
+            .name("Step 1")
+            .propertyGroups(List.of(step1Group))
+            .build();
+
+        final ConnectorPropertyDescriptor requiredInStep2 = new ConnectorPropertyDescriptor.Builder()
+            .name("Required When Enabled")
+            .required(true)
+            .build();
+
+        final ConnectorPropertyGroup step2Group = ConnectorPropertyGroup.builder()
+            .name("Advanced Settings")
+            .addProperty(requiredInStep2)
+            .build();
+
+        final ConfigurationStep step2 = new ConfigurationStep.Builder()
+            .name("Step 2")
+            .propertyGroups(List.of(step2Group))
+            .dependsOn(step1, enabledProperty, "true")
+            .build();
+
+        connector.setConfigurationSteps(List.of(step1, step2));
+
+        final ConnectorPropertyValue enabledValue = mock(ConnectorPropertyValue.class);
+        when(enabledValue.getValue()).thenReturn("true");
+        when(configurationContext.getProperty("Step 1", "Enabled")).thenReturn(enabledValue);
+        when(configurationContext.getProperty("Step 2", "Required When Enabled")).thenReturn(null);
+
+        final List<ValidationResult> results = connector.validate(flowContext, validationContext);
+
+        assertEquals(1, results.size());
+        final ValidationResult result = results.getFirst();
+        assertFalse(result.isValid());
+        assertEquals("Required When Enabled", result.getSubject());
+        assertEquals("Required When Enabled is required", result.getExplanation());
+        assertFalse(connector.isCustomValidateCalled());
+    }
+
+    @Test
+    void testValidateStepWithDependencyOnAnyValueSatisfied() {
+        final ConnectorPropertyDescriptor connectionType = new ConnectorPropertyDescriptor.Builder()
+            .name("Connection Type")
+            .type(PropertyType.STRING)
+            .required(false)
+            .build();
+
+        final ConnectorPropertyGroup step1Group = ConnectorPropertyGroup.builder()
+            .name("Connection")
+            .addProperty(connectionType)
+            .build();
+
+        final ConfigurationStep step1 = new ConfigurationStep.Builder()
+            .name("Connection Step")
+            .propertyGroups(List.of(step1Group))
+            .build();
+
+        final ConnectorPropertyDescriptor requiredProperty = new ConnectorPropertyDescriptor.Builder()
+            .name("Additional Config")
+            .required(true)
+            .build();
+
+        final ConnectorPropertyGroup step2Group = ConnectorPropertyGroup.builder()
+            .name("Config")
+            .addProperty(requiredProperty)
+            .build();
+
+        final ConfigurationStep step2 = new ConfigurationStep.Builder()
+            .name("Additional Step")
+            .propertyGroups(List.of(step2Group))
+            .dependsOn(step1, connectionType)
+            .build();
+
+        connector.setConfigurationSteps(List.of(step1, step2));
+
+        final ConnectorPropertyValue connValue = mock(ConnectorPropertyValue.class);
+        when(connValue.getValue()).thenReturn("any-value");
+        when(configurationContext.getProperty("Connection Step", "Connection Type")).thenReturn(connValue);
+        when(configurationContext.getProperty("Additional Step", "Additional Config")).thenReturn(null);
+
+        final List<ValidationResult> results = connector.validate(flowContext, validationContext);
+
+        assertEquals(1, results.size());
+        assertFalse(results.getFirst().isValid());
+        assertEquals("Additional Config", results.getFirst().getSubject());
+    }
+
+    @Test
+    void testValidateStepWithDependencyOnAnyValueNotSatisfiedWhenNull() {
+        final ConnectorPropertyDescriptor connectionType = new ConnectorPropertyDescriptor.Builder()
+            .name("Connection Type")
+            .type(PropertyType.STRING)
+            .required(false)
+            .build();
+
+        final ConnectorPropertyGroup step1Group = ConnectorPropertyGroup.builder()
+            .name("Connection")
+            .addProperty(connectionType)
+            .build();
+
+        final ConfigurationStep step1 = new ConfigurationStep.Builder()
+            .name("Connection Step")
+            .propertyGroups(List.of(step1Group))
+            .build();
+
+        final ConnectorPropertyDescriptor requiredProperty = new ConnectorPropertyDescriptor.Builder()
+            .name("Additional Config")
+            .required(true)
+            .build();
+
+        final ConnectorPropertyGroup step2Group = ConnectorPropertyGroup.builder()
+            .name("Config")
+            .addProperty(requiredProperty)
+            .build();
+
+        final ConfigurationStep step2 = new ConfigurationStep.Builder()
+            .name("Additional Step")
+            .propertyGroups(List.of(step2Group))
+            .dependsOn(step1, connectionType)
+            .build();
+
+        connector.setConfigurationSteps(List.of(step1, step2));
+
+        when(configurationContext.getProperty("Connection Step", "Connection Type")).thenReturn(null);
+        when(configurationContext.getProperty("Additional Step", "Additional Config")).thenReturn(null);
+
+        final List<ValidationResult> results = connector.validate(flowContext, validationContext);
+
+        assertTrue(results.isEmpty(), "Step with dependency should be skipped when dependent property has no value but got validation results: " + results);
+        assertTrue(connector.isCustomValidateCalled());
+    }
+
+    @Test
+    void testValidateStepWithMultipleDependencies() {
+        final ConnectorPropertyDescriptor protocol = new ConnectorPropertyDescriptor.Builder()
+            .name("Protocol")
+            .type(PropertyType.STRING)
+            .required(false)
+            .build();
+
+        final ConnectorPropertyGroup step1Group = ConnectorPropertyGroup.builder()
+            .name("Protocol Settings")
+            .addProperty(protocol)
+            .build();
+
+        final ConfigurationStep step1 = new ConfigurationStep.Builder()
+            .name("Protocol Step")
+            .propertyGroups(List.of(step1Group))
+            .build();
+
+        final ConnectorPropertyDescriptor authEnabled = new ConnectorPropertyDescriptor.Builder()
+            .name("Auth Enabled")
+            .type(PropertyType.STRING)
+            .required(false)
+            .build();
+
+        final ConnectorPropertyGroup step2Group = ConnectorPropertyGroup.builder()
+            .name("Auth Settings")
+            .addProperty(authEnabled)
+            .build();
+
+        final ConfigurationStep step2 = new ConfigurationStep.Builder()
+            .name("Auth Step")
+            .propertyGroups(List.of(step2Group))
+            .build();
+
+        final ConnectorPropertyDescriptor credentialsProperty = new ConnectorPropertyDescriptor.Builder()
+            .name("Credentials")
+            .required(true)
+            .build();
+
+        final ConnectorPropertyGroup step3Group = ConnectorPropertyGroup.builder()
+            .name("Credentials")
+            .addProperty(credentialsProperty)
+            .build();
+
+        final ConfigurationStep step3 = new ConfigurationStep.Builder()
+            .name("Credentials Step")
+            .propertyGroups(List.of(step3Group))
+            .dependsOn(step1, protocol, "HTTPS")
+            .dependsOn(step2, authEnabled, "true")
+            .build();
+
+        connector.setConfigurationSteps(List.of(step1, step2, step3));
+
+        final ConnectorPropertyValue protocolValue = mock(ConnectorPropertyValue.class);
+        when(protocolValue.getValue()).thenReturn("HTTPS");
+        when(configurationContext.getProperty("Protocol Step", "Protocol")).thenReturn(protocolValue);
+
+        final ConnectorPropertyValue authValue = mock(ConnectorPropertyValue.class);
+        when(authValue.getValue()).thenReturn("false");
+        when(configurationContext.getProperty("Auth Step", "Auth Enabled")).thenReturn(authValue);
+
+        final List<ValidationResult> results = connector.validate(flowContext, validationContext);
+
+        assertTrue(results.isEmpty(), "Step 3 should be skipped because auth dependency is not satisfied");
+        assertTrue(connector.isCustomValidateCalled());
+
+        connector.resetCustomValidateCalled();
+        when(authValue.getValue()).thenReturn("true");
+
+        final List<ValidationResult> resultsWithAuthEnabled = connector.validate(flowContext, validationContext);
+
+        assertEquals(1, resultsWithAuthEnabled.size());
+        assertFalse(resultsWithAuthEnabled.getFirst().isValid());
+        assertEquals("Credentials", resultsWithAuthEnabled.getFirst().getSubject());
+    }
+
+    @Test
+    void testValidateStepWithAbsenceDependencySatisfiedWhenPropertyIsNull() {
+        final ConnectorPropertyDescriptor customConfig = new ConnectorPropertyDescriptor.Builder()
+            .name("Custom Config")
+            .type(PropertyType.STRING)
+            .required(false)
+            .build();
+
+        final ConnectorPropertyGroup step1Group = ConnectorPropertyGroup.builder()
+            .name("Custom Settings")
+            .addProperty(customConfig)
+            .build();
+
+        final ConfigurationStep step1 = new ConfigurationStep.Builder()
+            .name("Custom Step")
+            .propertyGroups(List.of(step1Group))
+            .build();
+
+        final ConnectorPropertyDescriptor defaultRequired = new ConnectorPropertyDescriptor.Builder()
+            .name("Default Required")
+            .required(true)
+            .build();
+
+        final ConnectorPropertyGroup step2Group = ConnectorPropertyGroup.builder()
+            .name("Default Settings")
+            .addProperty(defaultRequired)
+            .build();
+
+        final ConfigurationStep step2 = new ConfigurationStep.Builder()
+            .name("Default Step")
+            .propertyGroups(List.of(step2Group))
+            .dependsOn(step1, customConfig, DescribedValue.NULL)
+            .build();
+
+        connector.setConfigurationSteps(List.of(step1, step2));
+
+        when(configurationContext.getProperty("Custom Step", "Custom Config")).thenReturn(null);
+        when(configurationContext.getProperty("Default Step", "Default Required")).thenReturn(null);
+
+        final List<ValidationResult> results = connector.validate(flowContext, validationContext);
+
+        assertEquals(1, results.size());
+        assertFalse(results.getFirst().isValid());
+        assertEquals("Default Required", results.getFirst().getSubject());
+        assertFalse(connector.isCustomValidateCalled());
+    }
+
+    @Test
+    void testValidateStepWithAbsenceDependencyNotSatisfiedWhenPropertyHasValue() {
+        final ConnectorPropertyDescriptor customConfig = new ConnectorPropertyDescriptor.Builder()
+            .name("Custom Config")
+            .type(PropertyType.STRING)
+            .required(false)
+            .build();
+
+        final ConnectorPropertyGroup step1Group = ConnectorPropertyGroup.builder()
+            .name("Custom Settings")
+            .addProperty(customConfig)
+            .build();
+
+        final ConfigurationStep step1 = new ConfigurationStep.Builder()
+            .name("Custom Step")
+            .propertyGroups(List.of(step1Group))
+            .build();
+
+        final ConnectorPropertyDescriptor defaultRequired = new ConnectorPropertyDescriptor.Builder()
+            .name("Default Required")
+            .required(true)
+            .build();
+
+        final ConnectorPropertyGroup step2Group = ConnectorPropertyGroup.builder()
+            .name("Default Settings")
+            .addProperty(defaultRequired)
+            .build();
+
+        final ConfigurationStep step2 = new ConfigurationStep.Builder()
+            .name("Default Step")
+            .propertyGroups(List.of(step2Group))
+            .dependsOn(step1, customConfig, DescribedValue.NULL)
+            .build();
+
+        connector.setConfigurationSteps(List.of(step1, step2));
+
+        final ConnectorPropertyValue customValue = mock(ConnectorPropertyValue.class);
+        when(customValue.getValue()).thenReturn("some-custom-value");
+        when(configurationContext.getProperty("Custom Step", "Custom Config")).thenReturn(customValue);
+        when(configurationContext.getProperty("Default Step", "Default Required")).thenReturn(null);
+
+        final List<ValidationResult> results = connector.validate(flowContext, validationContext);
+
+        assertTrue(results.isEmpty(), "Default Step should be skipped because Custom Config has a value");
+        assertTrue(connector.isCustomValidateCalled());
+    }
+
+    @Test
+    void testValidateStepWithAbsenceDependencyUsesDefaultValue() {
+        final ConnectorPropertyDescriptor propertyWithDefault = new ConnectorPropertyDescriptor.Builder()
+            .name("Property With Default")
+            .type(PropertyType.STRING)
+            .defaultValue("default-value")
+            .required(false)
+            .build();
+
+        final ConnectorPropertyGroup step1Group = ConnectorPropertyGroup.builder()
+            .name("Settings")
+            .addProperty(propertyWithDefault)
+            .build();
+
+        final ConfigurationStep step1 = new ConfigurationStep.Builder()
+            .name("Step 1")
+            .propertyGroups(List.of(step1Group))
+            .build();
+
+        final ConnectorPropertyDescriptor requiredProperty = new ConnectorPropertyDescriptor.Builder()
+            .name("Required Property")
+            .required(true)
+            .build();
+
+        final ConnectorPropertyGroup step2Group = ConnectorPropertyGroup.builder()
+            .name("Dependent Settings")
+            .addProperty(requiredProperty)
+            .build();
+
+        final ConfigurationStep step2 = new ConfigurationStep.Builder()
+            .name("Step 2")
+            .propertyGroups(List.of(step2Group))
+            .dependsOn(step1, propertyWithDefault, DescribedValue.NULL)
+            .build();
+
+        connector.setConfigurationSteps(List.of(step1, step2));
+
+        when(configurationContext.getProperty("Step 1", "Property With Default")).thenReturn(null);
+
+        final List<ValidationResult> results = connector.validate(flowContext, validationContext);
+
+        assertTrue(results.isEmpty(), "Step 2 should be skipped because Property With Default has a default value");
+        assertTrue(connector.isCustomValidateCalled());
+    }
+
     private static class TestableAbstractConnector extends AbstractConnector {
         private List<ConfigurationStep> configurationSteps = Collections.emptyList();
         private Collection<ValidationResult> customValidationResults = Collections.emptyList();
@@ -447,13 +859,17 @@ public class TestAbstractConnector {
             return customValidateCalled;
         }
 
+        public void resetCustomValidateCalled() {
+            this.customValidateCalled = false;
+        }
+
         @Override
         public VersionedExternalFlow getInitialFlow() {
             return null;
         }
 
         @Override
-        public List<ConfigurationStep> getConfigurationSteps(final FlowContext workingContext) {
+        public List<ConfigurationStep> getConfigurationSteps() {
             return configurationSteps;
         }
 
diff --git a/src/test/java/org/apache/nifi/components/connector/TestConfigurationStep.java b/src/test/java/org/apache/nifi/components/connector/TestConfigurationStep.java
new file mode 100644
index 0000000..c32ce43
--- /dev/null
+++ b/src/test/java/org/apache/nifi/components/connector/TestConfigurationStep.java
@@ -0,0 +1,325 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector;
+
+import org.apache.nifi.components.AllowableValue;
+import org.apache.nifi.components.DescribedValue;
+import org.junit.jupiter.api.Test;
+
+import java.util.List;
+import java.util.Set;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+public class TestConfigurationStep {
+
+    @Test
+    void testDependsOnWithStepAndProperty() {
+        final ConnectorPropertyDescriptor connectionTypeProperty = new ConnectorPropertyDescriptor.Builder()
+            .name("Connection Type")
+            .type(PropertyType.STRING)
+            .build();
+
+        final ConfigurationStep connectionStep = new ConfigurationStep.Builder()
+            .name("Connection")
+            .description("Connection configuration")
+            .build();
+
+        final ConfigurationStep authenticationStep = new ConfigurationStep.Builder()
+            .name("Authentication")
+            .description("Authentication configuration")
+            .dependsOn(connectionStep, connectionTypeProperty)
+            .build();
+
+        final Set<ConfigurationStepDependency> dependencies = authenticationStep.getDependencies();
+        assertEquals(1, dependencies.size());
+
+        final ConfigurationStepDependency dependency = dependencies.iterator().next();
+        assertEquals("Connection", dependency.getStepName());
+        assertEquals("Connection Type", dependency.getPropertyName());
+        assertNull(dependency.getDependentValues());
+    }
+
+    @Test
+    void testDependsOnWithSpecificValues() {
+        final ConnectorPropertyDescriptor connectionTypeProperty = new ConnectorPropertyDescriptor.Builder()
+            .name("Connection Type")
+            .type(PropertyType.STRING)
+            .allowableValues("HTTP", "HTTPS", "FTP")
+            .build();
+
+        final ConfigurationStep connectionStep = new ConfigurationStep.Builder()
+            .name("Connection")
+            .description("Connection configuration")
+            .build();
+
+        final ConfigurationStep tlsStep = new ConfigurationStep.Builder()
+            .name("TLS Configuration")
+            .description("TLS settings")
+            .dependsOn(connectionStep, connectionTypeProperty, new AllowableValue("HTTPS"))
+            .build();
+
+        final Set<ConfigurationStepDependency> dependencies = tlsStep.getDependencies();
+        assertEquals(1, dependencies.size());
+
+        final ConfigurationStepDependency dependency = dependencies.iterator().next();
+        assertEquals("Connection", dependency.getStepName());
+        assertEquals("Connection Type", dependency.getPropertyName());
+        assertNotNull(dependency.getDependentValues());
+        assertEquals(Set.of("HTTPS"), dependency.getDependentValues());
+    }
+
+    @Test
+    void testDependsOnWithMultipleDescribedValues() {
+        final ConnectorPropertyDescriptor authTypeProperty = new ConnectorPropertyDescriptor.Builder()
+            .name("Auth Type")
+            .type(PropertyType.STRING)
+            .allowableValues("NONE", "BASIC", "OAUTH", "API_KEY")
+            .build();
+
+        final ConfigurationStep authStep = new ConfigurationStep.Builder()
+            .name("Authentication")
+            .build();
+
+        final ConfigurationStep credentialsStep = new ConfigurationStep.Builder()
+            .name("Credentials")
+            .description("Credential configuration")
+            .dependsOn(authStep, authTypeProperty, new AllowableValue("BASIC"), new AllowableValue("OAUTH"), new AllowableValue("API_KEY"))
+            .build();
+
+        final Set<ConfigurationStepDependency> dependencies = credentialsStep.getDependencies();
+        assertEquals(1, dependencies.size());
+
+        final ConfigurationStepDependency dependency = dependencies.iterator().next();
+        assertEquals("Authentication", dependency.getStepName());
+        assertEquals("Auth Type", dependency.getPropertyName());
+        assertNotNull(dependency.getDependentValues());
+        assertEquals(Set.of("BASIC", "OAUTH", "API_KEY"), dependency.getDependentValues());
+    }
+
+    @Test
+    void testDependsOnWithStringValues() {
+        final ConnectorPropertyDescriptor protocolProperty = new ConnectorPropertyDescriptor.Builder()
+            .name("Protocol")
+            .type(PropertyType.STRING)
+            .build();
+
+        final ConfigurationStep connectionStep = new ConfigurationStep.Builder()
+            .name("Connection")
+            .build();
+
+        final ConfigurationStep securityStep = new ConfigurationStep.Builder()
+            .name("Security")
+            .dependsOn(connectionStep, protocolProperty, "HTTPS", "SFTP")
+            .build();
+
+        final Set<ConfigurationStepDependency> dependencies = securityStep.getDependencies();
+        assertEquals(1, dependencies.size());
+
+        final ConfigurationStepDependency dependency = dependencies.iterator().next();
+        assertEquals("Connection", dependency.getStepName());
+        assertEquals("Protocol", dependency.getPropertyName());
+        assertNotNull(dependency.getDependentValues());
+        assertEquals(Set.of("HTTPS", "SFTP"), dependency.getDependentValues());
+    }
+
+    @Test
+    void testDependsOnWithDescribedValueList() {
+        final ConnectorPropertyDescriptor modeProperty = new ConnectorPropertyDescriptor.Builder()
+            .name("Mode")
+            .type(PropertyType.STRING)
+            .build();
+
+        final ConfigurationStep setupStep = new ConfigurationStep.Builder()
+            .name("Setup")
+            .build();
+
+        final ConfigurationStep advancedStep = new ConfigurationStep.Builder()
+            .name("Advanced")
+            .dependsOn(setupStep, modeProperty, List.of(new AllowableValue("advanced"), new AllowableValue("expert")))
+            .build();
+
+        final Set<ConfigurationStepDependency> dependencies = advancedStep.getDependencies();
+        assertEquals(1, dependencies.size());
+
+        final ConfigurationStepDependency dependency = dependencies.iterator().next();
+        assertEquals("Setup", dependency.getStepName());
+        assertEquals("Mode", dependency.getPropertyName());
+        assertEquals(Set.of("advanced", "expert"), dependency.getDependentValues());
+    }
+
+    @Test
+    void testMultipleDependencies() {
+        final ConnectorPropertyDescriptor enabledProperty = new ConnectorPropertyDescriptor.Builder()
+            .name("Enabled")
+            .type(PropertyType.BOOLEAN)
+            .build();
+
+        final ConnectorPropertyDescriptor modeProperty = new ConnectorPropertyDescriptor.Builder()
+            .name("Mode")
+            .type(PropertyType.STRING)
+            .build();
+
+        final ConfigurationStep step1 = new ConfigurationStep.Builder()
+            .name("Step 1")
+            .build();
+
+        final ConfigurationStep step2 = new ConfigurationStep.Builder()
+            .name("Step 2")
+            .build();
+
+        final ConfigurationStep step3 = new ConfigurationStep.Builder()
+            .name("Step 3")
+            .dependsOn(step1, enabledProperty, "true")
+            .dependsOn(step2, modeProperty, "advanced")
+            .build();
+
+        final Set<ConfigurationStepDependency> dependencies = step3.getDependencies();
+        assertEquals(2, dependencies.size());
+
+        boolean foundStep1Dependency = false;
+        boolean foundStep2Dependency = false;
+        for (final ConfigurationStepDependency dependency : dependencies) {
+            if ("Step 1".equals(dependency.getStepName())) {
+                assertEquals("Enabled", dependency.getPropertyName());
+                assertEquals(Set.of("true"), dependency.getDependentValues());
+                foundStep1Dependency = true;
+            } else if ("Step 2".equals(dependency.getStepName())) {
+                assertEquals("Mode", dependency.getPropertyName());
+                assertEquals(Set.of("advanced"), dependency.getDependentValues());
+                foundStep2Dependency = true;
+            }
+        }
+
+        assertTrue(foundStep1Dependency, "Expected dependency on Step 1 not found");
+        assertTrue(foundStep2Dependency, "Expected dependency on Step 2 not found");
+    }
+
+    @Test
+    void testNoDependencies() {
+        final ConfigurationStep step = new ConfigurationStep.Builder()
+            .name("Standalone Step")
+            .description("A step with no dependencies")
+            .build();
+
+        assertNotNull(step.getDependencies());
+        assertTrue(step.getDependencies().isEmpty());
+    }
+
+    @Test
+    void testDependsOnWithEmptyValueListTreatedAsAnyValue() {
+        final ConnectorPropertyDescriptor property = new ConnectorPropertyDescriptor.Builder()
+            .name("Some Property")
+            .type(PropertyType.STRING)
+            .build();
+
+        final ConfigurationStep step1 = new ConfigurationStep.Builder()
+            .name("Step 1")
+            .build();
+
+        final ConfigurationStep step2 = new ConfigurationStep.Builder()
+            .name("Step 2")
+            .dependsOn(step1, property, List.of())
+            .build();
+
+        final Set<ConfigurationStepDependency> dependencies = step2.getDependencies();
+        assertEquals(1, dependencies.size());
+
+        final ConfigurationStepDependency dependency = dependencies.iterator().next();
+        assertNull(dependency.getDependentValues());
+    }
+
+    @Test
+    void testDependsOnAbsence() {
+        final ConnectorPropertyDescriptor optionalProperty = new ConnectorPropertyDescriptor.Builder()
+            .name("Optional Feature")
+            .type(PropertyType.STRING)
+            .build();
+
+        final ConfigurationStep featureStep = new ConfigurationStep.Builder()
+            .name("Feature Configuration")
+            .build();
+
+        final ConfigurationStep alternativeStep = new ConfigurationStep.Builder()
+            .name("Alternative Configuration")
+            .description("Only shown when optional feature is not configured")
+            .dependsOn(featureStep, optionalProperty, DescribedValue.NULL)
+            .build();
+
+        final Set<ConfigurationStepDependency> dependencies = alternativeStep.getDependencies();
+        assertEquals(1, dependencies.size());
+
+        final ConfigurationStepDependency dependency = dependencies.iterator().next();
+        assertEquals("Feature Configuration", dependency.getStepName());
+        assertEquals("Optional Feature", dependency.getPropertyName());
+        assertNotNull(dependency.getDependentValues());
+        assertTrue(dependency.getDependentValues().contains(null));
+    }
+
+    @Test
+    void testDependsOnAbsenceWithRegularDependency() {
+        final ConnectorPropertyDescriptor modeProperty = new ConnectorPropertyDescriptor.Builder()
+            .name("Mode")
+            .type(PropertyType.STRING)
+            .build();
+
+        final ConnectorPropertyDescriptor customProperty = new ConnectorPropertyDescriptor.Builder()
+            .name("Custom Setting")
+            .type(PropertyType.STRING)
+            .build();
+
+        final ConfigurationStep modeStep = new ConfigurationStep.Builder()
+            .name("Mode Selection")
+            .build();
+
+        final ConfigurationStep customStep = new ConfigurationStep.Builder()
+            .name("Custom Configuration")
+            .build();
+
+        final ConfigurationStep defaultStep = new ConfigurationStep.Builder()
+            .name("Default Configuration")
+            .dependsOn(modeStep, modeProperty, "default")
+            .dependsOn(customStep, customProperty, DescribedValue.NULL)
+            .build();
+
+        final Set<ConfigurationStepDependency> dependencies = defaultStep.getDependencies();
+        assertEquals(2, dependencies.size());
+
+        boolean foundModeDependency = false;
+        boolean foundAbsenceDependency = false;
+        for (final ConfigurationStepDependency dependency : dependencies) {
+            if ("Mode Selection".equals(dependency.getStepName())) {
+                assertEquals("Mode", dependency.getPropertyName());
+                assertEquals(Set.of("default"), dependency.getDependentValues());
+                foundModeDependency = true;
+            } else if ("Custom Configuration".equals(dependency.getStepName())) {
+                assertEquals("Custom Setting", dependency.getPropertyName());
+                assertNotNull(dependency.getDependentValues());
+                assertTrue(dependency.getDependentValues().contains(null));
+                foundAbsenceDependency = true;
+            }
+        }
+
+        assertTrue(foundModeDependency, "Expected mode dependency not found");
+        assertTrue(foundAbsenceDependency, "Expected absence dependency not found");
+    }
+}
+


(nifi-api) 21/27: NIFI-15467: Allow Connectors to specify bundle compatability when upd… (#54)

Posted by ma...@apache.org.
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-api.git

commit 7d13e70144afe71452374901d6b1167b8c3a0486
Author: Mark Payne <ma...@hotmail.com>
AuthorDate: Tue Jan 27 09:03:52 2026 -0500

    NIFI-15467: Allow Connectors to specify bundle compatability when upd… (#54)
    
    * NIFI-15467: Allow Connectors to specify bundle compatability when updating flow
    
    * NIFI-15467: Have ComponentBundleLookup return Optional<Bundle> from getLatestBundle instead of a nullable Bundle
---
 .../components/connector/BundleCompatibility.java  | 47 ++++++++++++++++++++++
 .../connector/ComponentBundleLookup.java           | 36 +++++++++++++++++
 .../connector/ConnectorInitializationContext.java  | 28 ++++++++++++-
 ...ocumentationConnectorInitializationContext.java | 18 ++++++++-
 4 files changed, 125 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/apache/nifi/components/connector/BundleCompatibility.java b/src/main/java/org/apache/nifi/components/connector/BundleCompatibility.java
new file mode 100644
index 0000000..b17eb38
--- /dev/null
+++ b/src/main/java/org/apache/nifi/components/connector/BundleCompatibility.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nifi.components.connector;
+
+/**
+ * Specifies how bundle resolution should be handled when updating a flow with components
+ * whose specified bundles may not be available in the NiFi instance.
+ */
+public enum BundleCompatibility {
+
+    /**
+     * Requires the exact bundle specified in the flow. If the bundle is not available,
+     * a ghosted component will be created. This is the default behavior.
+     */
+    REQUIRE_EXACT_BUNDLE,
+
+    /**
+     * If the specified bundle is not available, checks what bundles are available for
+     * the given component type. If exactly one bundle is available, resolves to that bundle.
+     * If no bundles or multiple bundles are available, uses the specified bundle and
+     * creates a ghosted component.
+     */
+    RESOLVE_BUNDLE,
+
+    /**
+     * If the specified bundle is not available, checks what bundles are available for
+     * the given component type. If no bundles are available, uses the specified bundle
+     * and creates a ghosted component. Otherwise, uses the newest available bundle
+     * based on version comparison.
+     */
+    RESOLVE_NEWEST_BUNDLE
+}
diff --git a/src/main/java/org/apache/nifi/components/connector/ComponentBundleLookup.java b/src/main/java/org/apache/nifi/components/connector/ComponentBundleLookup.java
index 7abe996..84cba63 100644
--- a/src/main/java/org/apache/nifi/components/connector/ComponentBundleLookup.java
+++ b/src/main/java/org/apache/nifi/components/connector/ComponentBundleLookup.java
@@ -20,6 +20,7 @@ package org.apache.nifi.components.connector;
 import org.apache.nifi.flow.Bundle;
 
 import java.util.List;
+import java.util.Optional;
 
 public interface ComponentBundleLookup {
 
@@ -30,4 +31,39 @@ public interface ComponentBundleLookup {
      */
     List<Bundle> getAvailableBundles(String componentType);
 
+    /**
+     * Determines the latest bundle available for the given component type based on version comparison.
+     *
+     * <p>Version comparison follows these rules:</p>
+     * <ol>
+     *   <li>Versions are split by dots (e.g., "2.1.0" becomes ["2", "1", "0"]).
+     *       This also supports calendar-date formats (e.g., "2026.01.01").</li>
+     *   <li>Each part is compared numerically when possible; numeric parts are considered
+     *       newer than non-numeric parts (e.g., "2.0.0" &gt; "2.0.next")</li>
+     *   <li>When base versions are equal, qualifiers are compared with the following precedence
+     *       (highest to lowest):
+     *       <ul>
+     *         <li>Release (no qualifier)</li>
+     *         <li>RC (Release Candidate) - e.g., "-RC1", "-RC2"</li>
+     *         <li>M (Milestone) - e.g., "-M1", "-M2"</li>
+     *         <li>Other/unknown qualifiers</li>
+     *         <li>SNAPSHOT</li>
+     *       </ul>
+     *   </li>
+     *   <li>Within the same qualifier type, numeric suffixes are compared
+     *       (e.g., "2.0.0-RC2" &gt; "2.0.0-RC1", "2.0.0-M4" &gt; "2.0.0-M1")</li>
+     * </ol>
+     *
+     * <p>Examples of version ordering (highest to lowest):</p>
+     * <ul>
+     *   <li>3.0.0 &gt; 2.1.0 &gt; 2.0.0 &gt; 2.0.0-RC2 &gt; 2.0.0-RC1 &gt; 2.0.0-M4 &gt; 2.0.0-M1 &gt; 2.0.0-SNAPSHOT</li>
+     *   <li>2.1.0-SNAPSHOT &gt; 2.0.0 (higher base version wins)</li>
+     *   <li>2026.01.01 &gt; 2025.12.31 (calendar-date format)</li>
+     * </ul>
+     *
+     * @param componentType the component type
+     * @return an Optional containing the latest available bundle, or empty if no bundles are available
+     */
+    Optional<Bundle> getLatestBundle(String componentType);
+
 }
diff --git a/src/main/java/org/apache/nifi/components/connector/ConnectorInitializationContext.java b/src/main/java/org/apache/nifi/components/connector/ConnectorInitializationContext.java
index 88880f9..fa422b4 100644
--- a/src/main/java/org/apache/nifi/components/connector/ConnectorInitializationContext.java
+++ b/src/main/java/org/apache/nifi/components/connector/ConnectorInitializationContext.java
@@ -70,7 +70,6 @@ public interface ConnectorInitializationContext {
      *   <li>Restarting all components</li>
      * </ul>
      *
-     *
      * <p>
      *     Depending on the changes required in order to update the flow to the provided VersionedProcessGroup, this
      *     could also result in stopping source processors and waiting for queues to drain, etc.
@@ -82,9 +81,34 @@ public interface ConnectorInitializationContext {
      *   be started.
      * </p>
      *
+     * <p>
+     *   This method uses the Bundle Compatability strategy of {@link BundleCompatibility#RESOLVE_BUNDLE}.
+     * </p>
+     *
+     * @param flowContext the context of the flow to be updated
+     * @param versionedExternalFlow the new representation of the flow
+     */
+    default void updateFlow(FlowContext flowContext, VersionedExternalFlow versionedExternalFlow) throws FlowUpdateException {
+        updateFlow(flowContext, versionedExternalFlow, BundleCompatibility.RESOLVE_BUNDLE);
+    }
+
+    /**
+     * <p>
+     *   Updates the Connector's flow to the given VersionedExternalFlow with the specified bundle compatibility strategy.
+     *   This method behaves like {@link #updateFlow(FlowContext, VersionedExternalFlow)} but allows control over how
+     *   component bundles are resolved when the specified bundle is not available.
+     * </p>
+     *
+     * <p>
+     *    Note that if Bundle Compatability is not set to {@link BundleCompatibility#REQUIRE_EXACT_BUNDLE}, this method may update the provided
+     *    VersionedExternalFlow to represent the actual bundles used during the update.
+     * </p>
+     *
      * @param flowContext the context of the flow to be updated
      * @param versionedExternalFlow the new representation of the flow
+     * @param bundleCompatability the strategy to use when resolving component bundles
+     * @throws FlowUpdateException if the flow update fails
      */
-    void updateFlow(FlowContext flowContext, VersionedExternalFlow versionedExternalFlow) throws FlowUpdateException;
+    void updateFlow(FlowContext flowContext, VersionedExternalFlow versionedExternalFlow, BundleCompatibility bundleCompatability) throws FlowUpdateException;
 
 }
diff --git a/src/main/java/org/apache/nifi/documentation/init/DocumentationConnectorInitializationContext.java b/src/main/java/org/apache/nifi/documentation/init/DocumentationConnectorInitializationContext.java
index 75bc7e0..1eeb802 100644
--- a/src/main/java/org/apache/nifi/documentation/init/DocumentationConnectorInitializationContext.java
+++ b/src/main/java/org/apache/nifi/documentation/init/DocumentationConnectorInitializationContext.java
@@ -16,14 +16,17 @@
  */
 package org.apache.nifi.documentation.init;
 
+import org.apache.nifi.components.connector.BundleCompatibility;
 import org.apache.nifi.components.connector.ComponentBundleLookup;
 import org.apache.nifi.components.connector.ConnectorInitializationContext;
 import org.apache.nifi.components.connector.FlowUpdateException;
 import org.apache.nifi.components.connector.components.FlowContext;
+import org.apache.nifi.flow.Bundle;
 import org.apache.nifi.flow.VersionedExternalFlow;
 import org.apache.nifi.logging.ComponentLog;
 
 import java.util.List;
+import java.util.Optional;
 import java.util.UUID;
 
 /**
@@ -51,11 +54,22 @@ public class DocumentationConnectorInitializationContext implements ConnectorIni
 
     @Override
     public ComponentBundleLookup getComponentBundleLookup() {
-        return componentType -> List.of();
+        return new ComponentBundleLookup() {
+            @Override
+            public List<Bundle> getAvailableBundles(final String componentType) {
+                return List.of();
+            }
+
+            @Override
+            public Optional<Bundle> getLatestBundle(final String componentType) {
+                return Optional.empty();
+            }
+        };
     }
 
     @Override
-    public void updateFlow(final FlowContext flowContext, final VersionedExternalFlow versionedExternalFlow) throws FlowUpdateException {
+    public void updateFlow(final FlowContext flowContext, final VersionedExternalFlow versionedExternalFlow,
+                           final BundleCompatibility bundleCompatability) throws FlowUpdateException {
         // No-op for documentation purposes - we don't actually update any flows
     }
 }


(nifi-api) 12/27: NIFI-15356: Introducing the ConnectorWebMethod. (#37)

Posted by ma...@apache.org.
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-api.git

commit 75f3b4b2ac04c49520809dd37412c268bb8aef53
Author: Matt Gilman <ma...@gmail.com>
AuthorDate: Sun Dec 21 14:31:38 2025 -0500

    NIFI-15356: Introducing the ConnectorWebMethod. (#37)
---
 .../org/apache/nifi/web/ConnectorWebMethod.java    | 77 ++++++++++++++++++++++
 1 file changed, 77 insertions(+)

diff --git a/src/main/java/org/apache/nifi/web/ConnectorWebMethod.java b/src/main/java/org/apache/nifi/web/ConnectorWebMethod.java
new file mode 100644
index 0000000..8a64c34
--- /dev/null
+++ b/src/main/java/org/apache/nifi/web/ConnectorWebMethod.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.web;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Indicates that a method in a Connector interface requires specific authorization to be invoked.
+ * This annotation is used by the NiFi framework to enforce access control when custom UIs interact
+ * with Connector instances.
+ *
+ * <p>Methods without this annotation will be blocked by the framework, preventing their invocation
+ * through the Connector web context.</p>
+ *
+ * <p>Example Usage:</p>
+ * <pre>
+ * {@code
+ * import static org.apache.nifi.web.ConnectorWebMethod.AccessType;
+ *
+ * public interface MyConnector {
+ *     @ConnectorWebMethod(AccessType.READ)
+ *     List<String> getAvailableOptions();
+ *
+ *     @ConnectorWebMethod(AccessType.WRITE)
+ *     void applyConfiguration(Map<String, String> config);
+ *
+ *     // This method cannot be called through the web context - throws IllegalStateException
+ *     void internalMethod();
+ * }
+ * }
+ * </pre>
+ */
+@Documented
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+public @interface ConnectorWebMethod {
+    /**
+     * The type of access required to invoke this method.
+     * READ for read-only operations, WRITE for operations that modify state.
+     * @return the required access type
+     */
+    AccessType value();
+
+    /**
+     * Defines the type of access required for a connector method.
+     */
+    enum AccessType {
+        /**
+         * Indicates the method only reads data and does not modify state.
+         */
+        READ,
+
+        /**
+         * Indicates the method modifies state.
+         */
+        WRITE
+    }
+}
+