markap14 commented on code in PR #88:
URL: https://github.com/apache/nifi-api/pull/88#discussion_r3243477803
##########
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:
I did consider it. I actually went back and forth a bit on it. Ultimately,
it was really a bit of a toss-up to me. Do you prefer a separate interface?
--
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]