This is an automated email from the ASF dual-hosted git repository.
mcgilman pushed a commit to branch NIFI-15258
in repository https://gitbox.apache.org/repos/asf/nifi-api.git
The following commit(s) were added to refs/heads/NIFI-15258 by this push:
new 34e0a02 NIFI-15259: Adding web context interface for custom Connector
UIs.
34e0a02 is described below
commit 34e0a02c83d8d60a28b40a2cfcf1d8d033e8505b
Author: Matt Gilman <[email protected]>
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;
+}