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/01/22 14:08:36 UTC

(nifi) 12/40: NIFI-15258: Enable Custom UI to retrieve connector with flow contexts (#10652)

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

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

commit 7f44f3a9d7d804ddbf91cdb8d054b89c30e0009c
Author: Bob Paulin <bo...@bobpaulin.com>
AuthorDate: Tue Dec 16 15:12:59 2025 -0600

    NIFI-15258: Enable Custom UI to retrieve connector with flow contexts (#10652)
---
 .../java/org/apache/nifi/web/StandardNiFiConnectorWebContext.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiConnectorWebContext.java b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiConnectorWebContext.java
index 0a51db60a8..67c011330a 100644
--- a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiConnectorWebContext.java
+++ b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiConnectorWebContext.java
@@ -29,12 +29,12 @@ public class StandardNiFiConnectorWebContext implements NiFiConnectorWebContext
 
     @Override
     @SuppressWarnings("unchecked")
-    public <T> T getConnector(final String connectorId) throws IllegalArgumentException {
+    public <T> ConnectorWebContext<T> getConnectorWebContext(final String connectorId) throws IllegalArgumentException {
         final ConnectorNode connectorNode = connectorDAO.getConnector(connectorId);
         if (connectorNode == null) {
             throw new IllegalArgumentException("Unable to find connector with id: " + connectorId);
         }
-        return (T) connectorNode.getConnector();
+        return new ConnectorWebContext<>((T) connectorNode.getConnector(), connectorNode.getWorkingFlowContext(), connectorNode.getActiveFlowContext());
     }
 
     public void setConnectorDAO(final ConnectorDAO connectorDAO) {