You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by mc...@apache.org on 2015/03/23 14:49:47 UTC
[1/2] incubator-nifi git commit: NIFI-250: - More clean up post merge
with the data viewer.
Repository: incubator-nifi
Updated Branches:
refs/heads/NIFI-250 d19471d6d -> 1c96bd08f
NIFI-250:
- More clean up post merge with the data viewer.
Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/1de514ad
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/1de514ad
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/1de514ad
Branch: refs/heads/NIFI-250
Commit: 1de514adf7a3dacc51823932b70de3f8f64c369a
Parents: d19471d
Author: Matt Gilman <ma...@gmail.com>
Authored: Mon Mar 23 09:36:07 2015 -0400
Committer: Matt Gilman <ma...@gmail.com>
Committed: Mon Mar 23 09:36:07 2015 -0400
----------------------------------------------------------------------
.../org/apache/nifi/web/server/JettyServer.java | 73 ++++++++++----------
1 file changed, 37 insertions(+), 36 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/1de514ad/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java
index 941f25b..ccb7252 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java
@@ -108,8 +108,8 @@ public class JettyServer implements NiFiServer {
private Collection<WebAppContext> contentViewerWebContexts;
private final NiFiProperties props;
- private UiExtensionMapping uiExtensions;
- private Collection<WebAppContext> uiExtensionWebContexts;
+ private UiExtensionMapping componentUiExtensions;
+ private Collection<WebAppContext> componentUiExtensionWebContexts;
@Deprecated
private Collection<WebAppContext> customUiWebContexts;
@@ -221,7 +221,7 @@ public class JettyServer implements NiFiServer {
if (CollectionUtils.isNotEmpty(otherWars)) {
// hold onto to the web contexts for all ui extensions
customUiWebContexts = new ArrayList<>();
- uiExtensionWebContexts = new ArrayList<>();
+ componentUiExtensionWebContexts = new ArrayList<>();
contentViewerWebContexts = new ArrayList<>();
// ui extension organized by component type
@@ -235,11 +235,11 @@ public class JettyServer implements NiFiServer {
List<String> contentViewerMimeTypes = getWarExtensions(war, "META-INF/nifi-content-viewer");
// identify all known extension types in the war
- final Map<UiExtensionType, List<String>> uiExtensionInWar = new HashMap<>();
- identifyUiExtensions(uiExtensionInWar, war);
+ final Map<UiExtensionType, List<String>> componentUiExtensionInWar = new HashMap<>();
+ identifyUiExtensionsForComponents(componentUiExtensionInWar, war);
// only include wars that are for custom processor ui's
- if (!customUiProcessorTypes.isEmpty() || !uiExtensionInWar.isEmpty() || !contentViewerMimeTypes.isEmpty()) {
+ if (!customUiProcessorTypes.isEmpty() || !componentUiExtensionInWar.isEmpty() || !contentViewerMimeTypes.isEmpty()) {
// get the context path
String warName = StringUtils.substringBeforeLast(war.getName(), ".");
String warContextPath = String.format("/%s", warName);
@@ -262,11 +262,12 @@ public class JettyServer implements NiFiServer {
// record the mime type to web app mapping (need to handle type collision)
contentViewerWebContexts.add(extensionUiContext);
} else {
- uiExtensionWebContexts.add(extensionUiContext);
+ // record the ui extension
+ componentUiExtensionWebContexts.add(extensionUiContext);
}
// create the ui extensions
- for (final Map.Entry<UiExtensionType, List<String>> entry : uiExtensionInWar.entrySet()) {
+ for (final Map.Entry<UiExtensionType, List<String>> entry : componentUiExtensionInWar.entrySet()) {
final UiExtensionType extensionType = entry.getKey();
final List<String> componentTypes = entry.getValue();
@@ -296,6 +297,7 @@ public class JettyServer implements NiFiServer {
customUiMappings.put(customUiProcessorType, warContextPath);
}
for (final String contentViewerMimeType : contentViewerMimeTypes) {
+ // map the content type to the context path
mimeTypeMappings.put(contentViewerMimeType, warContextPath);
}
@@ -306,9 +308,9 @@ public class JettyServer implements NiFiServer {
}
// record all ui extensions
- uiExtensions = new UiExtensionMapping(uiExtensionsByType);
+ componentUiExtensions = new UiExtensionMapping(uiExtensionsByType);
} else {
- uiExtensions = new UiExtensionMapping(Collections.EMPTY_MAP);
+ componentUiExtensions = new UiExtensionMapping(Collections.EMPTY_MAP);
}
// load the web ui app
@@ -406,7 +408,7 @@ public class JettyServer implements NiFiServer {
* @param uiExtensions
* @param warFile
*/
- private void identifyUiExtensions(final Map<UiExtensionType, List<String>> uiExtensions, final File warFile) {
+ private void identifyUiExtensionsForComponents(final Map<UiExtensionType, List<String>> uiExtensions, final File warFile) {
try (final JarFile jarFile = new JarFile(warFile)) {
// locate the ui extensions
readUiExtensions(uiExtensions, UiExtensionType.ProcessorConfiguration, jarFile, jarFile.getJarEntry("META-INF/nifi-processor-configuration"));
@@ -680,8 +682,9 @@ public class JettyServer implements NiFiServer {
// ensure the appropriate wars deployed successfully before injecting the NiFi context and security filters -
// this must be done after starting the server (and ensuring there were no start up failures)
if (webApiContext != null) {
+ // give the web api the component ui extensions
final ServletContext webApiServletContext = webApiContext.getServletHandler().getServletContext();
- webApiServletContext.setAttribute("nifi-ui-extensions", uiExtensions);
+ webApiServletContext.setAttribute("nifi-ui-extensions", componentUiExtensions);
// get the application context
final WebApplicationContext webApplicationContext = WebApplicationContextUtils.getRequiredWebApplicationContext(webApiServletContext);
@@ -698,22 +701,40 @@ public class JettyServer implements NiFiServer {
// add the security filter to any custom ui wars
final FilterHolder securityFilter = webApiContext.getServletHandler().getFilter("springSecurityFilterChain");
if (securityFilter != null) {
- customUiContext.addFilter(securityFilter, "/*", EnumSet.of(DispatcherType.REQUEST));
+ customUiContext.addFilter(securityFilter, "/*", EnumSet.allOf(DispatcherType.class));
}
}
}
+ // component ui extensions
+ if (CollectionUtils.isNotEmpty(componentUiExtensionWebContexts)) {
+ final NiFiWebConfigurationContext configurationContext = webApplicationContext.getBean("nifiWebConfigurationContext", NiFiWebConfigurationContext.class);
+
+ for (final WebAppContext customUiContext : componentUiExtensionWebContexts) {
+ // set the NiFi context in each custom ui servlet context
+ final ServletContext customUiServletContext = customUiContext.getServletHandler().getServletContext();
+ customUiServletContext.setAttribute("nifi-web-configuration-context", configurationContext);
+
+ // add the security filter to any ui extensions wars
+ final FilterHolder securityFilter = webApiContext.getServletHandler().getFilter("springSecurityFilterChain");
+ if (securityFilter != null) {
+ customUiContext.addFilter(securityFilter, "/*", EnumSet.allOf(DispatcherType.class));
+ }
+ }
+ }
+
+ // content viewer extensions
if (CollectionUtils.isNotEmpty(contentViewerWebContexts)) {
for (final WebAppContext contentViewerContext : contentViewerWebContexts) {
// add the security filter to any content viewer wars
final FilterHolder securityFilter = webApiContext.getServletHandler().getFilter("springSecurityFilterChain");
if (securityFilter != null) {
- contentViewerContext.addFilter(securityFilter, "/*", EnumSet.of(DispatcherType.REQUEST, DispatcherType.FORWARD, DispatcherType.INCLUDE));
+ contentViewerContext.addFilter(securityFilter, "/*", EnumSet.allOf(DispatcherType.class));
}
}
}
- // ensure the web content viewer war was loaded
+ // content viewer controller
if (webContentViewerContext != null) {
final ContentAccess contentAccess = webApplicationContext.getBean("contentAccess", ContentAccess.class);
@@ -723,31 +744,11 @@ public class JettyServer implements NiFiServer {
final FilterHolder securityFilter = webApiContext.getServletHandler().getFilter("springSecurityFilterChain");
if (securityFilter != null) {
- webContentViewerContext.addFilter(securityFilter, "/*", EnumSet.of(DispatcherType.REQUEST, DispatcherType.FORWARD, DispatcherType.INCLUDE));
+ webContentViewerContext.addFilter(securityFilter, "/*", EnumSet.allOf(DispatcherType.class));
}
}
}
- // ensure the appropriate wars deployed successfully before injecting the NiFi context and security filters -
- // this must be done after starting the server (and ensuring there were no start up failures)
- if (webApiContext != null && CollectionUtils.isNotEmpty(uiExtensionWebContexts)) {
- final ServletContext webApiServletContext = webApiContext.getServletHandler().getServletContext();
- final WebApplicationContext webApplicationContext = WebApplicationContextUtils.getRequiredWebApplicationContext(webApiServletContext);
- final NiFiWebConfigurationContext configurationContext = webApplicationContext.getBean("nifiWebConfigurationContext", NiFiWebConfigurationContext.class);
-
- for (final WebAppContext customUiContext : uiExtensionWebContexts) {
- // set the NiFi context in each custom ui servlet context
- final ServletContext customUiServletContext = customUiContext.getServletHandler().getServletContext();
- customUiServletContext.setAttribute("nifi-web-configuration-context", configurationContext);
-
- // add the security filter to any ui extensions wars
- final FilterHolder securityFilter = webApiContext.getServletHandler().getFilter("springSecurityFilterChain");
- if (securityFilter != null) {
- customUiContext.addFilter(securityFilter, "/*", EnumSet.of(DispatcherType.REQUEST));
- }
- }
- }
-
// ensure the web document war was loaded and provide the extension mapping
if (webDocsContext != null) {
final ServletContext webDocsServletContext = webDocsContext.getServletHandler().getServletContext();
[2/2] incubator-nifi git commit: NIFI-250: - Removing unneeded
artifact.
Posted by mc...@apache.org.
NIFI-250:
- Removing unneeded artifact.
Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/1c96bd08
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/1c96bd08
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/1c96bd08
Branch: refs/heads/NIFI-250
Commit: 1c96bd08f7903f9acc845a542ccb7196f8a264c0
Parents: 1de514a
Author: Matt Gilman <ma...@gmail.com>
Authored: Mon Mar 23 09:49:18 2015 -0400
Committer: Matt Gilman <ma...@gmail.com>
Committed: Mon Mar 23 09:49:18 2015 -0400
----------------------------------------------------------------------
.../nifi-ui-extension-controller/pom.xml | 66 -----
.../extension/ConfigureComponentController.java | 254 -------------------
.../src/main/webapp/WEB-INF/web.xml | 26 --
3 files changed, 346 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/1c96bd08/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-ui-extension-controller/pom.xml
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-ui-extension-controller/pom.xml b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-ui-extension-controller/pom.xml
deleted file mode 100644
index ee2e22c..0000000
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-ui-extension-controller/pom.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <!--
- 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.
- -->
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>nifi-web</artifactId>
- <groupId>org.apache.nifi</groupId>
- <version>0.1.0-incubating-SNAPSHOT</version>
- </parent>
- <groupId>org.apache.nifi</groupId>
- <artifactId>nifi-ui-extension-controller</artifactId>
- <packaging>war</packaging>
- <dependencies>
- <dependency>
- <groupId>org.apache.nifi</groupId>
- <artifactId>nifi-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.nifi</groupId>
- <artifactId>nifi-user-actions</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.nifi</groupId>
- <artifactId>nifi-ui-extension</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-lang3</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>javax.servlet.jsp-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>javax.el-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp.jstl</groupId>
- <artifactId>javax.servlet.jsp.jstl-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/1c96bd08/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-ui-extension-controller/src/main/java/org/apache/nifi/ui/extension/ConfigureComponentController.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-ui-extension-controller/src/main/java/org/apache/nifi/ui/extension/ConfigureComponentController.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-ui-extension-controller/src/main/java/org/apache/nifi/ui/extension/ConfigureComponentController.java
deleted file mode 100644
index c876686..0000000
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-ui-extension-controller/src/main/java/org/apache/nifi/ui/extension/ConfigureComponentController.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- * 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.ui.extension;
-
-import org.apache.nifi.web.UiExtensionType;
-import org.apache.nifi.web.controller.UiExtensionControllerRequest;
-import org.apache.nifi.web.controller.UiExtensionControllerFacade;
-import java.io.IOException;
-import java.security.cert.X509Certificate;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.apache.nifi.action.Action;
-import org.apache.nifi.action.Component;
-import org.apache.nifi.action.Operation;
-import org.apache.nifi.action.component.details.ExtensionDetails;
-import org.apache.nifi.action.details.ConfigureDetails;
-import org.apache.nifi.controller.ControllerService;
-import org.apache.nifi.web.ClusterRequestException;
-import org.apache.nifi.web.ComponentDetails;
-import org.apache.nifi.web.ConfigurationAction;
-import org.apache.nifi.web.InvalidRevisionException;
-import org.apache.nifi.web.ResourceNotFoundException;
-import org.apache.nifi.web.Revision;
-import org.apache.nifi.web.UiExtensionRequestContext;
-
-
-/**
- *
- */
-public class ConfigureComponentController extends HttpServlet {
-
- public static final String ID_PARAM = "id";
- public static final String CLIENT_ID_PARAM = "clientId";
- public static final String VERSION_PARAM = "version";
-
- /**
- *
- * @param request servlet request
- * @param response servlet response
- * @throws ServletException if a servlet-specific error occurs
- * @throws IOException if an I/O error occurs
- */
- @Override
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- // get the content
- final ServletContext servletContext = request.getServletContext();
- final Object extensionMappings = (Object) servletContext.getAttribute("nifi-ui-extension-mapping");
- final UiExtensionControllerFacade controllerFacade = (UiExtensionControllerFacade) servletContext.getAttribute("nifi-ui-extension-controller-facade");
-
- // get the component type
- final String type = request.getParameter("type");
-
- // ensure the request has
- if (type == null) {
- response.getWriter().println("Request missing the component type.");
- return;
- }
-
- // change later
- final UiExtensionType extensionType = UiExtensionType.ProcessorConfiguration;
-
- // build the ui extension request context config
- final UiExtensionControllerRequest config = getRequestContextConig(extensionType, request);
-
- // get the initial component details
- final ComponentDetails details = controllerFacade.getComponentDetails(config);
-
- // lookup a viewer for the content
- final String uiExtensionUri = servletContext.getInitParameter(type);
-
- // ensure the registered viewer is found
- if (uiExtensionUri == null) {
- response.getWriter().println("No custom UI is registered for " + type);
- }
-
- // set the attribute for the custom ui to interact with nifi
- request.setAttribute(UiExtensionRequestContext.ATTRIBUTE_KEY, new UiExtensionRequestContext() {
- @Override
- public ControllerService getControllerService(final String serviceIdentifier) {
- return controllerFacade.getControllerService(serviceIdentifier);
- }
-
- @Override
- public void saveActions(Collection<ConfigurationAction> uiExtensionActions) {
- final Collection<Action> actions = new ArrayList<>();
-
- // conver the action models
- if (uiExtensionActions != null) {
- final Date now = new Date();
-
- // create the extension details
- ExtensionDetails extensionDetails = new ExtensionDetails();
- extensionDetails.setType(details.getType());
-
- for (final ConfigurationAction extensionAction : uiExtensionActions) {
- // create the action details
- final ConfigureDetails actionDetails = new ConfigureDetails();
- actionDetails.setName(extensionAction.getField());
- actionDetails.setValue(extensionAction.getValue());
- actionDetails.setPreviousValue(extensionAction.getPreviousValue());
-
- // create a configuration action
- Action configurationAction = new Action();
- configurationAction.setUserDn(getCurrentUserDn());
- configurationAction.setUserName(getCurrentUserName());
- configurationAction.setOperation(Operation.Configure);
- configurationAction.setTimestamp(now);
- configurationAction.setSourceId(details.getId());
- configurationAction.setSourceName(details.getName());
- configurationAction.setSourceType(Component.Processor);
- configurationAction.setComponentDetails(extensionDetails);
- configurationAction.setActionDetails(actionDetails);
-
- // add the action
- actions.add(configurationAction);
- }
- }
-
- // save the actions
- if (!actions.isEmpty()) {
- controllerFacade.saveActions(actions);
- }
- }
-
- @Override
- public String getCurrentUserDn() {
- return controllerFacade.getCurrentUserDn();
- }
-
- @Override
- public String getCurrentUserName() {
- return controllerFacade.getCurrentUserName();
- }
-
- @Override
- public ComponentDetails setAnnotationData(String annotationData) throws ClusterRequestException, InvalidRevisionException, ResourceNotFoundException{
- return controllerFacade.setAnnotationData(config, annotationData);
- }
-
- @Override
- public ComponentDetails getComponentDetails() throws ClusterRequestException, ResourceNotFoundException {
- return controllerFacade.getComponentDetails(config);
- }
- });
-
- // generate the content
- final ServletContext customUiContext = servletContext.getContext(uiExtensionUri);
- customUiContext.getRequestDispatcher("/configure").forward(request, response);
- }
-
- /**
- * Creates a UiExtensionRequestContextConfig from the specified request.
- *
- * @param request
- * @return
- */
- private UiExtensionControllerRequest getRequestContextConig(final UiExtensionType extensionType, final HttpServletRequest request) {
- return new UiExtensionControllerRequest() {
-
- @Override
- public UiExtensionType getExtensionType() {
- return extensionType;
- }
-
- @Override
- public String getScheme() {
- return request.getScheme();
- }
-
- @Override
- public String getId() {
- return request.getParameter(ID_PARAM);
- }
-
- @Override
- public Revision getRevision() {
- final String versionParamVal = request.getParameter(VERSION_PARAM);
- Long version;
- try {
- version = Long.parseLong(versionParamVal);
- } catch (final Exception ex) {
- version = null;
- }
-
- final String clientId = request.getParameter(CLIENT_ID_PARAM);
-
- return new Revision(version, clientId);
- }
-
- @Override
- public String getProxiedEntitiesChain() {
- String xProxiedEntitiesChain = request.getHeader("X-ProxiedEntitiesChain");
- final X509Certificate cert = extractClientCertificate(request);
- if (cert != null) {
- final String extractedPrincipal = extractPrincipal(cert);
- final String formattedPrincipal = formatProxyDn(extractedPrincipal);
- if (xProxiedEntitiesChain == null || xProxiedEntitiesChain.trim().isEmpty()) {
- xProxiedEntitiesChain = formattedPrincipal;
- } else {
- xProxiedEntitiesChain += formattedPrincipal;
- }
- }
-
- return xProxiedEntitiesChain;
- }
- };
- }
-
- /**
- * Utility methods that have been copied into this class to reduce the
- * dependency footprint of this artifact. These utility methods typically
- * live in web-utilities but that would pull in spring, jersey, jackson,
- * etc.
- */
-
- private X509Certificate extractClientCertificate(HttpServletRequest request) {
- X509Certificate[] certs = (X509Certificate[]) request.getAttribute("javax.servlet.request.X509Certificate");
-
- if (certs != null && certs.length > 0) {
- return certs[0];
- }
-
- return null;
- }
-
- private String extractPrincipal(X509Certificate cert) {
- return cert.getSubjectDN().getName().trim();
- }
-
- private String formatProxyDn(String dn) {
- return "<" + dn + ">";
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/1c96bd08/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-ui-extension-controller/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-ui-extension-controller/src/main/webapp/WEB-INF/web.xml b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-ui-extension-controller/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index a2e6a39..0000000
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-ui-extension-controller/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
- <display-name>nifi-ui-extension</display-name>
- <servlet>
- <servlet-name>configure-component-controller</servlet-name>
- <servlet-class>org.apache.nifi.ui.extension.ConfigureComponentController</servlet-class>
- </servlet>
- <servlet-mapping>
- <servlet-name>configure-component-controller</servlet-name>
- <url-pattern>/configure</url-pattern>
- </servlet-mapping>
-</web-app>