pvillard31 commented on code in PR #88:
URL: https://github.com/apache/nifi-api/pull/88#discussion_r3243494779


##########
src/main/java/org/apache/nifi/components/connector/Connector.java:
##########
@@ -78,6 +79,48 @@ public interface Connector {
      */
     VersionedExternalFlow getInitialFlow();
 
+    /**
+     * Indicates whether this Connector can be migrated from the provided 
source flow.
+     *
+     * <p>
+     * Implementations should inspect the source flow structure and metadata 
using {@link ConnectorMigrationContext#getSourceFlow()}
+     * and return quickly without mutating the Connector or the source flow. 
This method must not call
+     * {@link ConnectorMigrationContext#copyAssetFromSource(String)}.
+     * </p>
+     *
+     * @param context the migration context describing the source flow and 
target Connector
+     * @return {@code true} when this Connector can be migrated from the 
provided source flow
+     */
+    default boolean isMigrationSupported(ConnectorMigrationContext context) {

Review Comment:
   So I guess it depends how we see things happening in the future... do we 
imagine that we will always kind of first create flows before those get 
converted into connectors? or do we anticipate that connectors should 
eventually become the default? if the later, then I guess a separate interface 
is better? I really don't have a strong opinion on this and given this is 
experimental we could still change it I guess.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to