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

pvillard31 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-api.git


The following commit(s) were added to refs/heads/main by this push:
     new 53c7236  NIFI-16038: Added setValueReference/setValueReferences 
methods to ConnectorMigrationContext (#99)
53c7236 is described below

commit 53c72368556ac55ea8aab64f1f566cc358d19d11
Author: Mark Payne <[email protected]>
AuthorDate: Thu Jun 25 09:47:38 2026 -0400

    NIFI-16038: Added setValueReference/setValueReferences methods to 
ConnectorMigrationContext (#99)
---
 .../migration/ConnectorMigrationContext.java       | 30 ++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git 
a/src/main/java/org/apache/nifi/components/connector/migration/ConnectorMigrationContext.java
 
b/src/main/java/org/apache/nifi/components/connector/migration/ConnectorMigrationContext.java
index 1594d27..6304790 100644
--- 
a/src/main/java/org/apache/nifi/components/connector/migration/ConnectorMigrationContext.java
+++ 
b/src/main/java/org/apache/nifi/components/connector/migration/ConnectorMigrationContext.java
@@ -20,6 +20,7 @@ package org.apache.nifi.components.connector.migration;
 import org.apache.nifi.components.connector.AssetReference;
 import org.apache.nifi.components.connector.ConfigurationStep;
 import org.apache.nifi.components.connector.ConnectorInitializationContext;
+import org.apache.nifi.components.connector.ConnectorValueReference;
 import org.apache.nifi.components.connector.components.FlowContext;
 import org.apache.nifi.flow.VersionedComponentState;
 import org.apache.nifi.flow.VersionedExternalFlow;
@@ -110,6 +111,35 @@ public interface ConnectorMigrationContext {
      */
     void replaceProperties(String stepName, Map<String, String> 
propertyValues);
 
+    /**
+     * Records a single property value reference to merge into the named 
{@link ConfigurationStep}. This allows a
+     * property to be set directly to a {@link ConnectorValueReference}, such 
as an {@link AssetReference} returned by
+     * {@link #copyAssetFromSource(String)}, rather than a plain string value. 
A {@code null} value reference removes
+     * the property.
+     *
+     * @param stepName configuration step name
+     * @param propertyName the name of the property to set
+     * @param valueReference the value reference to record, or {@code null} to 
remove the property
+     * @throws IllegalStateException when called outside {@code 
migrateConfiguration(...)}
+     */
+    default void setValueReference(final String stepName, final String 
propertyName, final ConnectorValueReference valueReference) {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * Records property value references to merge into the named {@link 
ConfigurationStep}. This allows properties to be
+     * set directly to {@link ConnectorValueReference}s, such as {@link 
AssetReference}s returned by
+     * {@link #copyAssetFromSource(String)}, rather than plain string values. 
A {@code null} value for a property
+     * removes that property.
+     *
+     * @param stepName configuration step name
+     * @param valueReferences the value references to record, keyed by 
property name
+     * @throws IllegalStateException when called outside {@code 
migrateConfiguration(...)}
+     */
+    default void setValueReferences(final String stepName, final Map<String, 
ConnectorValueReference> valueReferences) {
+        throw new UnsupportedOperationException();
+    }
+
     /**
      * Records the {@link VersionedComponentState} for a managed component.
      * Repeated calls for the same component replace prior recorded state; an 
empty state clears previously recorded state.

Reply via email to