http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/ssl-context-bundle/ssl-context-service/src/main/resources/docs/org.apache.nifi.ssl.StandardSSLContextService/index.html ---------------------------------------------------------------------- diff --git a/nar-bundles/ssl-context-bundle/ssl-context-service/src/main/resources/docs/org.apache.nifi.ssl.StandardSSLContextService/index.html b/nar-bundles/ssl-context-bundle/ssl-context-service/src/main/resources/docs/org.apache.nifi.ssl.StandardSSLContextService/index.html deleted file mode 100644 index 0ce9aa4..0000000 --- a/nar-bundles/ssl-context-bundle/ssl-context-service/src/main/resources/docs/org.apache.nifi.ssl.StandardSSLContextService/index.html +++ /dev/null @@ -1,63 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> - <!-- - 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. - --> - <head> - <meta charset="utf-8" /> - <title>StandardSSLContextService</title> - - <link rel="stylesheet" href="../../css/component-usage.css" type="text/css" /> - </head> - - <body> - - <!-- Service Documentation ================================================== --> - <h2>Configuring the SSLContext Controller Service:</h2> - <p> - The SSLContext controller service is a mechanism for providing all the security properties that - allow for secure communications between NiFi extensions and other systems. NiFi extensions include - processors, reporting tasks, and other controller services. - </p> - - <p> - The <code>controller-services.xml</code> file is located in the NiFi <code>conf</code> - directory. The user may set up any number of controller services within this file. - </p> - - <p> - Below is an example of the template for a SSLContext controller service. Note that the identifier - in this example is <code>ssl-context</code>. If using this template to create your own SSLContext controller - service, replace the property values with values that are suitable for your system. Possible options for - <code>Keystore Type</code> and <code>Truststore Type</code> are <span style="font-style: italic;">JKS</span> - or <span style="font-style: italic;">PKCS12</span>. - </p> - - <pre> -<?xml version="1.0" encoding="UTF-8" ?> -<services> - <service> - <identifier>ssl-context</identifier> - <class>nifi.ssl.StandardSSLContextService</class> - <property name="Keystore Filename">C:/testpki/localtest-ks.jks</property> - <property name="Keystore Password">localtest</property> - <property name="Keystore Type">JKS</property> - <property name="Truststore Filename">C:/testpki/localtest-ts.jks</property> - <property name="Truststore Password">localtest</property> - <property name="Truststore Type">JKS</property> - </service> -</services> - </pre> - </body> -</html>
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/ssl-context-bundle/ssl-context-service/src/test/java/org/apache/nifi/ssl/SSLContextServiceTest.java ---------------------------------------------------------------------- diff --git a/nar-bundles/ssl-context-bundle/ssl-context-service/src/test/java/org/apache/nifi/ssl/SSLContextServiceTest.java b/nar-bundles/ssl-context-bundle/ssl-context-service/src/test/java/org/apache/nifi/ssl/SSLContextServiceTest.java deleted file mode 100644 index 5d583ca..0000000 --- a/nar-bundles/ssl-context-bundle/ssl-context-service/src/test/java/org/apache/nifi/ssl/SSLContextServiceTest.java +++ /dev/null @@ -1,197 +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.ssl; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import java.util.HashMap; - -import org.apache.nifi.controller.ControllerService; -import org.apache.nifi.reporting.InitializationException; -import org.apache.nifi.ssl.SSLContextService.ClientAuth; -import org.apache.nifi.util.TestRunner; -import org.apache.nifi.util.TestRunners; - -import org.junit.Assert; -import org.junit.Test; - -public class SSLContextServiceTest { - - @Test - public void testBad1() { - try { - TestRunner runner = TestRunners.newTestRunner(TestProcessor.class); - SSLContextService service = new StandardSSLContextService(); - HashMap<String, String> properties = new HashMap<String, String>(); - runner.addControllerService("test-bad1", service, properties); - Assert.fail("Should have thrown an Exception"); - } catch (InitializationException e) { - assertEquals( - "org.apache.nifi.reporting.InitializationException: SSLContextService[id=test-bad1] does not have the KeyStore or the TrustStore populated", - e.getCause().getCause().toString()); - } - } - - @Test - public void testBad2() { - try { - TestRunner runner = TestRunners.newTestRunner(TestProcessor.class); - SSLContextService service = new StandardSSLContextService(); - HashMap<String, String> properties = new HashMap<String, String>(); - properties.put(StandardSSLContextService.KEYSTORE.getName(), "src/test/resources/localhost-ks.jks"); - properties.put(StandardSSLContextService.KEYSTORE_PASSWORD.getName(), "localtest"); - runner.addControllerService("test-bad2", service, properties); - Assert.fail("Should have thrown an Exception"); - } catch (InitializationException e) { - assertEquals( - "org.apache.nifi.reporting.InitializationException: SSLContextService[id=test-bad2] is not valid due to:\n'Keystore Properties' is invalid because Must set either 0 or 3 properties for Keystore", - e.getCause().getCause().toString()); - } - } - - @Test - public void testBad3() { - try { - TestRunner runner = TestRunners.newTestRunner(TestProcessor.class); - SSLContextService service = new StandardSSLContextService(); - HashMap<String, String> properties = new HashMap<String, String>(); - properties.put(StandardSSLContextService.KEYSTORE.getName(), "src/test/resources/localhost-ks.jks"); - properties.put(StandardSSLContextService.KEYSTORE_PASSWORD.getName(), "localtest"); - properties.put(StandardSSLContextService.KEYSTORE_TYPE.getName(), "JKS"); - properties.put(StandardSSLContextService.TRUSTSTORE.getName(), "src/test/resources/localhost-ts.jks"); - runner.addControllerService("test-bad3", service, properties); - Assert.fail("Should have thrown an Exception"); - } catch (InitializationException e) { - assertEquals( - "org.apache.nifi.reporting.InitializationException: SSLContextService[id=test-bad3] is not valid due to:\n'Truststore Properties' is invalid because Must set either 0 or 3 properties for Truststore", - e.getCause().getCause().toString()); - } - } - - @Test - public void testBad4() { - try { - TestRunner runner = TestRunners.newTestRunner(TestProcessor.class); - SSLContextService service = new StandardSSLContextService(); - HashMap<String, String> properties = new HashMap<String, String>(); - properties.put(StandardSSLContextService.KEYSTORE.getName(), "src/test/resources/localhost-ks.jks"); - properties.put(StandardSSLContextService.KEYSTORE_PASSWORD.getName(), "wrongpassword"); - properties.put(StandardSSLContextService.KEYSTORE_TYPE.getName(), "PKCS12"); - properties.put(StandardSSLContextService.TRUSTSTORE.getName(), "src/test/resources/localhost-ts.jks"); - properties.put(StandardSSLContextService.TRUSTSTORE_PASSWORD.getName(), "wrongpassword"); - properties.put(StandardSSLContextService.TRUSTSTORE_TYPE.getName(), "JKS"); - runner.addControllerService("test-bad4", service, properties); - Assert.fail("Should have thrown an Exception"); - } catch (InitializationException e) { - assertEquals( - "org.apache.nifi.reporting.InitializationException: SSLContextService[id=test-bad4] is not valid due to:\n" - + "'Keystore Properties' is invalid because Invalid KeyStore Password or Type specified for file src/test/resources/localhost-ks.jks\n" - + "'Truststore Properties' is invalid because Invalid KeyStore Password or Type specified for file src/test/resources/localhost-ts.jks", - e.getCause().getCause().toString()); - } - } - - @Test - public void testBad5() { - try { - TestRunner runner = TestRunners.newTestRunner(TestProcessor.class); - SSLContextService service = new StandardSSLContextService(); - HashMap<String, String> properties = new HashMap<String, String>(); - properties.put(StandardSSLContextService.KEYSTORE.getName(), "src/test/resources/DOES-NOT-EXIST.jks"); - properties.put(StandardSSLContextService.KEYSTORE_PASSWORD.getName(), "localtest"); - properties.put(StandardSSLContextService.KEYSTORE_TYPE.getName(), "PKCS12"); - properties.put(StandardSSLContextService.TRUSTSTORE.getName(), "src/test/resources/localhost-ts.jks"); - properties.put(StandardSSLContextService.TRUSTSTORE_PASSWORD.getName(), "localtest"); - properties.put(StandardSSLContextService.TRUSTSTORE_TYPE.getName(), "JKS"); - runner.addControllerService("test-bad5", service, properties); - Assert.fail("Should have thrown an Exception"); - } catch (InitializationException e) { - assertTrue(e.getCause().getCause().toString().startsWith("org.apache.nifi.reporting.InitializationException: " - + "SSLContextService[id=test-bad5] is not valid due to:\n'Keystore Properties' is invalid " - + "because Cannot access file")); - } - } - - @Test - public void testGood() { - try { - TestRunner runner = TestRunners.newTestRunner(TestProcessor.class); - ControllerService service = new StandardSSLContextService(); - HashMap<String, String> properties = new HashMap<String, String>(); - properties.put(StandardSSLContextService.KEYSTORE.getName(), "src/test/resources/localhost-ks.jks"); - properties.put(StandardSSLContextService.KEYSTORE_PASSWORD.getName(), "localtest"); - properties.put(StandardSSLContextService.KEYSTORE_TYPE.getName(), "PKCS12"); - properties.put(StandardSSLContextService.TRUSTSTORE.getName(), "src/test/resources/localhost-ts.jks"); - properties.put(StandardSSLContextService.TRUSTSTORE_PASSWORD.getName(), "localtest"); - properties.put(StandardSSLContextService.TRUSTSTORE_TYPE.getName(), "JKS"); - runner.addControllerService("test-good1", service, properties); - runner.setProperty("SSL Context Svc ID", "test-good1"); - runner.assertValid(); - service = runner.getProcessContext().getControllerServiceLookup().getControllerService("test-good1"); - Assert.assertNotNull(service); - Assert.assertTrue(service instanceof StandardSSLContextService); - SSLContextService sslService = (SSLContextService) service; - sslService.createSSLContext(ClientAuth.REQUIRED); - sslService.createSSLContext(ClientAuth.WANT); - sslService.createSSLContext(ClientAuth.NONE); - } catch (InitializationException e) { - } - } - - @Test - public void testGoodTrustOnly() { - try { - TestRunner runner = TestRunners.newTestRunner(TestProcessor.class); - SSLContextService service = new StandardSSLContextService(); - HashMap<String, String> properties = new HashMap<String, String>(); - properties.put(StandardSSLContextService.TRUSTSTORE.getName(), "src/test/resources/localhost-ts.jks"); - properties.put(StandardSSLContextService.TRUSTSTORE_PASSWORD.getName(), "localtest"); - properties.put(StandardSSLContextService.TRUSTSTORE_TYPE.getName(), "JKS"); - runner.addControllerService("test-good2", service, properties); - runner.setProperty("SSL Context Svc ID", "test-good2"); - runner.assertValid(); - Assert.assertNotNull(service); - Assert.assertTrue(service instanceof StandardSSLContextService); - service.createSSLContext(ClientAuth.NONE); - } catch (InitializationException e) { - } - } - - @Test - public void testGoodKeyOnly() { - try { - TestRunner runner = TestRunners.newTestRunner(TestProcessor.class); - SSLContextService service = new StandardSSLContextService(); - HashMap<String, String> properties = new HashMap<String, String>(); - properties.put(StandardSSLContextService.KEYSTORE.getName(), "src/test/resources/localhost-ks.jks"); - properties.put(StandardSSLContextService.KEYSTORE_PASSWORD.getName(), "localtest"); - properties.put(StandardSSLContextService.KEYSTORE_TYPE.getName(), "JKS"); - runner.addControllerService("test-good3", service, properties); - runner.setProperty("SSL Context Svc ID", "test-good3"); - runner.assertValid(); - Assert.assertNotNull(service); - Assert.assertTrue(service instanceof StandardSSLContextService); - SSLContextService sslService = service; - sslService.createSSLContext(ClientAuth.NONE); - } catch (Exception e) { - System.out.println(e); - Assert.fail("Should not have thrown a exception " + e.getMessage()); - } - } - -} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/ssl-context-bundle/ssl-context-service/src/test/java/org/apache/nifi/ssl/TestProcessor.java ---------------------------------------------------------------------- diff --git a/nar-bundles/ssl-context-bundle/ssl-context-service/src/test/java/org/apache/nifi/ssl/TestProcessor.java b/nar-bundles/ssl-context-bundle/ssl-context-service/src/test/java/org/apache/nifi/ssl/TestProcessor.java deleted file mode 100644 index 6cb2fb6..0000000 --- a/nar-bundles/ssl-context-bundle/ssl-context-service/src/test/java/org/apache/nifi/ssl/TestProcessor.java +++ /dev/null @@ -1,47 +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.ssl; - -import org.apache.nifi.ssl.SSLContextService; -import java.util.ArrayList; -import java.util.List; - -import org.apache.nifi.components.PropertyDescriptor; -import org.apache.nifi.processor.AbstractProcessor; -import org.apache.nifi.processor.ProcessContext; -import org.apache.nifi.processor.ProcessSession; -import org.apache.nifi.processor.exception.ProcessException; -import org.apache.nifi.processor.util.StandardValidators; - -public class TestProcessor extends AbstractProcessor { - - @Override - public void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException { - } - - @Override - protected List<PropertyDescriptor> getSupportedPropertyDescriptors() { - List<PropertyDescriptor> propDescs = new ArrayList<>(); - propDescs.add(new PropertyDescriptor.Builder() - .name("SSL Context Svc ID") - .description("ID of SSL Context Svc") - .addValidator(StandardValidators.createControllerServiceExistsValidator(SSLContextService.class)) - .required(true) - .build()); - return propDescs; - } -} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/ssl-context-bundle/ssl-context-service/src/test/resources/localhost-ks.jks ---------------------------------------------------------------------- diff --git a/nar-bundles/ssl-context-bundle/ssl-context-service/src/test/resources/localhost-ks.jks b/nar-bundles/ssl-context-bundle/ssl-context-service/src/test/resources/localhost-ks.jks deleted file mode 100755 index 81be31d..0000000 Binary files a/nar-bundles/ssl-context-bundle/ssl-context-service/src/test/resources/localhost-ks.jks and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/ssl-context-bundle/ssl-context-service/src/test/resources/localhost-ts.jks ---------------------------------------------------------------------- diff --git a/nar-bundles/ssl-context-bundle/ssl-context-service/src/test/resources/localhost-ts.jks b/nar-bundles/ssl-context-bundle/ssl-context-service/src/test/resources/localhost-ts.jks deleted file mode 100755 index 820e1e1..0000000 Binary files a/nar-bundles/ssl-context-bundle/ssl-context-service/src/test/resources/localhost-ts.jks and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-bundle/jms-processors/pom.xml ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-bundle/jms-processors/pom.xml b/nar-bundles/standard-bundle/jms-processors/pom.xml index c29e5a5..7dae21d 100644 --- a/nar-bundles/standard-bundle/jms-processors/pom.xml +++ b/nar-bundles/standard-bundle/jms-processors/pom.xml @@ -38,21 +38,17 @@ <groupId>org.apache.nifi</groupId> <artifactId>nifi-stream-utils</artifactId> </dependency> - <dependency> <groupId>javax.jms</groupId> <artifactId>javax.jms-api</artifactId> - <version>2.0</version> </dependency> <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-client</artifactId> - <version>5.10.0</version> </dependency> <dependency> <groupId>org.hornetq</groupId> <artifactId>hornetq-jms-client</artifactId> - <version>2.4.5.Final</version> </dependency> <dependency> <groupId>org.apache.nifi</groupId> http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-bundle/nar/pom.xml ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-bundle/nar/pom.xml b/nar-bundles/standard-bundle/nar/pom.xml index 144588a..06f9727 100644 --- a/nar-bundles/standard-bundle/nar/pom.xml +++ b/nar-bundles/standard-bundle/nar/pom.xml @@ -22,6 +22,7 @@ </parent> <artifactId>nifi-standard-nar</artifactId> + <version>0.0.1-SNAPSHOT</version> <name>NiFi Standard NAR</name> <packaging>nar</packaging> <description>NiFi Standard Extensions NAR</description> @@ -35,27 +36,22 @@ <dependency> <groupId>org.apache.nifi</groupId> <artifactId>standard-processors</artifactId> - <version>${project.version}</version> </dependency> <dependency> <groupId>org.apache.nifi</groupId> <artifactId>standard-prioritizers</artifactId> - <version>${project.version}</version> </dependency> <dependency> <groupId>org.apache.nifi</groupId> <artifactId>standard-reporting-tasks</artifactId> - <version>${project.version}</version> </dependency> <dependency> <groupId>org.apache.nifi</groupId> <artifactId>standard-ganglia-reporter</artifactId> - <version>${project.version}</version> </dependency> <dependency> <groupId>org.apache.nifi</groupId> <artifactId>jms-processors</artifactId> - <version>${project.version}</version> </dependency> </dependencies> </project> http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-bundle/pom.xml ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-bundle/pom.xml b/nar-bundles/standard-bundle/pom.xml index 92c9e1d..9903666 100644 --- a/nar-bundles/standard-bundle/pom.xml +++ b/nar-bundles/standard-bundle/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.apache.nifi</groupId> - <artifactId>standard-services-api-bundle</artifactId> + <artifactId>nar-bundle-parent</artifactId> <version>0.0.1-SNAPSHOT</version> </parent> @@ -36,70 +36,36 @@ <module>standard-reporting-tasks</module> <module>nar</module> </modules> - - + <dependencyManagement> <dependencies> <dependency> <groupId>org.apache.nifi</groupId> - <artifactId>nifi-stream-utils</artifactId> - <version>0.0.1-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.nifi</groupId> - <artifactId>nifi-processor-utils</artifactId> - <version>0.0.1-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.nifi</groupId> - <artifactId>nifi-utils</artifactId> - <version>0.0.1-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.nifi</groupId> - <artifactId>flowfile-packager</artifactId> - <version>0.0.1-SNAPSHOT</version> + <artifactId>standard-processors</artifactId> + <version>${project.version}</version> </dependency> <dependency> <groupId>org.apache.nifi</groupId> - <artifactId>naive-search-ring-buffer</artifactId> - <version>0.0.1-SNAPSHOT</version> + <artifactId>standard-prioritizers</artifactId> + <version>${project.version}</version> </dependency> <dependency> <groupId>org.apache.nifi</groupId> - <artifactId>nifi-search-utils</artifactId> - <version>0.0.1-SNAPSHOT</version> + <artifactId>standard-reporting-tasks</artifactId> + <version>${project.version}</version> </dependency> - <dependency> <groupId>org.apache.nifi</groupId> - <artifactId>nifi-core-flowfile-attributes</artifactId> - <version>0.0.1-SNAPSHOT</version> + <artifactId>standard-ganglia-reporter</artifactId> + <version>${project.version}</version> </dependency> <dependency> <groupId>org.apache.nifi</groupId> - <artifactId>nifi-socket-utils</artifactId> - <version>0.0.1-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.nifi</groupId> - <artifactId>nifi-mock</artifactId> - <version>0.0.1-SNAPSHOT</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.nifi</groupId> - <artifactId>load-distribution-service</artifactId> - <version>0.0.1-SNAPSHOT</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.nifi</groupId> - <artifactId>distributed-cache-client-service</artifactId> - <version>[0.0.1-SNAPSHOT,1.0.0-SNAPSHOT)</version> - <scope>test</scope> - </dependency> + <artifactId>jms-processors</artifactId> + <version>${project.version}</version> + </dependency> </dependencies> </dependencyManagement> + </project> http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-bundle/standard-ganglia-reporter/pom.xml ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-bundle/standard-ganglia-reporter/pom.xml b/nar-bundles/standard-bundle/standard-ganglia-reporter/pom.xml index 07967de..4e7a5a2 100644 --- a/nar-bundles/standard-bundle/standard-ganglia-reporter/pom.xml +++ b/nar-bundles/standard-bundle/standard-ganglia-reporter/pom.xml @@ -42,7 +42,6 @@ <dependency> <groupId>com.yammer.metrics</groupId> <artifactId>metrics-ganglia</artifactId> - <version>2.2.0</version> </dependency> <dependency> <groupId>org.apache.nifi</groupId> http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-bundle/standard-processors/pom.xml ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-bundle/standard-processors/pom.xml b/nar-bundles/standard-bundle/standard-processors/pom.xml index e2fa165..244f524 100644 --- a/nar-bundles/standard-bundle/standard-processors/pom.xml +++ b/nar-bundles/standard-bundle/standard-processors/pom.xml @@ -63,46 +63,37 @@ <groupId>org.apache.nifi</groupId> <artifactId>distributed-cache-client-service-api</artifactId> </dependency> - <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> - <version>2.4</version> </dependency> <dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-client</artifactId> - <version>1.12</version> </dependency> <dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-server</artifactId> - <version>1.12</version> </dependency> <dependency> <groupId>commons-net</groupId> <artifactId>commons-net</artifactId> - <version>3.3</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-compress</artifactId> - <version>1.9</version> </dependency> <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>2.6</version> + <groupId>org.apache.commons</groupId> + <artifactId>commons-lang3</artifactId> </dependency> <dependency> <groupId>org.bouncycastle</groupId> <artifactId>bcprov-jdk16</artifactId> - <version>1.46</version> </dependency> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> - <version>1.10</version> </dependency> <dependency> <groupId>org.apache.nifi</groupId> @@ -111,12 +102,10 @@ <dependency> <groupId>com.jcraft</groupId> <artifactId>jsch</artifactId> - <version>0.1.51</version> </dependency> - <dependency> <!-- Required if using compression with SFTP --> + <dependency> <groupId>com.jcraft</groupId> <artifactId>jzlib</artifactId> - <version>1.1.1</version> </dependency> <dependency> <groupId>org.eclipse.jetty</groupId> @@ -129,27 +118,22 @@ <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> - <version>4.3.6</version> </dependency> <dependency> <groupId>javax.mail</groupId> <artifactId>mail</artifactId> - <version>1.4.7</version> </dependency> <dependency> <groupId>com.github.jponge</groupId> <artifactId>lzma-java</artifactId> - <version>1.3</version> </dependency> <dependency> <groupId>org.tukaani</groupId> <artifactId>xz</artifactId> - <version>1.5</version> </dependency> <dependency> <groupId>net.sf.saxon</groupId> <artifactId>Saxon-HE</artifactId> - <version>9.6.0-2</version> </dependency> <dependency> @@ -157,7 +141,6 @@ <artifactId>nifi-mock</artifactId> <scope>test</scope> </dependency> - <dependency> <groupId>org.apache.nifi</groupId> <artifactId>nifi-socket-utils</artifactId> @@ -166,26 +149,17 @@ <groupId>org.apache.nifi</groupId> <artifactId>load-distribution-service-api</artifactId> </dependency> - <!-- <dependency> - <groupId>org.apache.nifi</groupId> - <artifactId>load-distribution-service</artifactId> - <scope>test</scope> -</dependency> - --> <dependency> <groupId>org.apache.nifi</groupId> <artifactId>distributed-cache-client-service</artifactId> </dependency> - <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> - <version>2.5</version> </dependency> <dependency> <groupId>org.apache.nifi</groupId> <artifactId>ssl-context-service</artifactId> - <version>0.0.1-SNAPSHOT</version> <scope>test</scope> </dependency> </dependencies> http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/DetectDuplicate.java ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/DetectDuplicate.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/DetectDuplicate.java index 2d97bf1..1fea36d 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/DetectDuplicate.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/DetectDuplicate.java @@ -46,7 +46,7 @@ import org.apache.nifi.processor.annotation.Tags; import org.apache.nifi.processor.exception.ProcessException; import org.apache.nifi.processor.util.StandardValidators; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; @EventDriven @SupportsBatching http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/DistributeLoad.java ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/DistributeLoad.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/DistributeLoad.java index 2973756..a755b1a 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/DistributeLoad.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/DistributeLoad.java @@ -51,7 +51,7 @@ import org.apache.nifi.processor.annotation.Tags; import org.apache.nifi.processor.annotation.TriggerWhenAnyDestinationAvailable; import org.apache.nifi.processor.util.StandardValidators; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; @EventDriven @SideEffectFree http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateRegularExpression.java ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateRegularExpression.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateRegularExpression.java index ae4c20f..704ec33 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateRegularExpression.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateRegularExpression.java @@ -47,7 +47,7 @@ import org.apache.nifi.processor.annotation.Tags; import org.apache.nifi.processor.io.InputStreamCallback; import org.apache.nifi.processor.util.StandardValidators; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; @EventDriven @SideEffectFree http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ExecuteStreamCommand.java ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ExecuteStreamCommand.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ExecuteStreamCommand.java index a67a92e..f430199 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ExecuteStreamCommand.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ExecuteStreamCommand.java @@ -56,7 +56,7 @@ import org.apache.nifi.processor.io.OutputStreamCallback; import org.apache.nifi.processor.util.StandardValidators; import org.apache.commons.io.IOUtils; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; /** * <p> http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/HashAttribute.java ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/HashAttribute.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/HashAttribute.java index c899cf5..5fc7e5a 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/HashAttribute.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/HashAttribute.java @@ -45,7 +45,7 @@ import org.apache.nifi.processor.annotation.Tags; import org.apache.nifi.processor.util.StandardValidators; import org.apache.commons.codec.digest.DigestUtils; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; /** * <p> http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java index 7ed1bd4..febb37b 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java @@ -16,7 +16,7 @@ */ package org.apache.nifi.processors.standard; -import static org.apache.commons.lang.StringUtils.*; +import static org.apache.commons.lang3.StringUtils.*; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; @@ -62,7 +62,7 @@ import org.apache.nifi.processor.util.StandardValidators; import org.apache.nifi.ssl.SSLContextService; import org.apache.nifi.ssl.SSLContextService.ClientAuth; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormatter; http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ListenUDP.java ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ListenUDP.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ListenUDP.java index c4c4533..65b3c66 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ListenUDP.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ListenUDP.java @@ -69,7 +69,7 @@ import org.apache.nifi.processor.util.StandardValidators; import org.apache.nifi.processors.standard.util.UDPStreamConsumer; import org.apache.nifi.util.Tuple; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; /** * <p> http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/LogAttribute.java ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/LogAttribute.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/LogAttribute.java index ead786f..9708c49 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/LogAttribute.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/LogAttribute.java @@ -44,7 +44,7 @@ import org.apache.nifi.processor.io.InputStreamCallback; import org.apache.nifi.processor.util.StandardValidators; import org.apache.commons.io.IOUtils; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; @EventDriven @SideEffectFree http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ReplaceTextWithMapping.java ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ReplaceTextWithMapping.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ReplaceTextWithMapping.java index 2c1526b..0cce0f2 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ReplaceTextWithMapping.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/ReplaceTextWithMapping.java @@ -62,7 +62,7 @@ import org.apache.nifi.processor.io.StreamCallback; import org.apache.nifi.processor.util.StandardValidators; import org.apache.nifi.util.StopWatch; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; @EventDriven @SideEffectFree http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitXml.java ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitXml.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitXml.java index b51b7e9..5f0993f 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitXml.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/SplitXml.java @@ -49,7 +49,7 @@ import org.apache.nifi.processor.util.StandardValidators; import org.apache.nifi.processors.standard.util.XmlElementNotifier; import org.apache.nifi.util.BooleanHolder; -import org.apache.commons.lang.StringEscapeUtils; +import org.apache.commons.lang3.StringEscapeUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.xml.sax.Attributes; http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/servlets/ListenHTTPServlet.java ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/servlets/ListenHTTPServlet.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/servlets/ListenHTTPServlet.java index 2d4f445..d78c139 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/servlets/ListenHTTPServlet.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/servlets/ListenHTTPServlet.java @@ -58,7 +58,7 @@ import org.apache.nifi.util.FlowFileUnpackagerV2; import org.apache.nifi.util.FlowFileUnpackagerV3; import org.apache.commons.io.IOUtils; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; @Path(ListenHTTP.URI) public class ListenHTTPServlet extends HttpServlet { http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/util/UDPStreamConsumer.java ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/util/UDPStreamConsumer.java b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/util/UDPStreamConsumer.java index e8f9259..f0802a8 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/util/UDPStreamConsumer.java +++ b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/util/UDPStreamConsumer.java @@ -35,9 +35,9 @@ import org.apache.nifi.logging.ProcessorLog; import org.apache.nifi.processor.ProcessSession; import org.apache.nifi.processor.io.OutputStreamCallback; -import org.apache.commons.lang.builder.EqualsBuilder; -import org.apache.commons.lang.builder.HashCodeBuilder; -import org.apache.commons.lang.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; /** * http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-bundle/standard-processors/src/test/java/org/apache/nifi/processors/standard/TestDetectDuplicate.java ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-bundle/standard-processors/src/test/java/org/apache/nifi/processors/standard/TestDetectDuplicate.java b/nar-bundles/standard-bundle/standard-processors/src/test/java/org/apache/nifi/processors/standard/TestDetectDuplicate.java index 8ee22a1..4fae6ed 100644 --- a/nar-bundles/standard-bundle/standard-processors/src/test/java/org/apache/nifi/processors/standard/TestDetectDuplicate.java +++ b/nar-bundles/standard-bundle/standard-processors/src/test/java/org/apache/nifi/processors/standard/TestDetectDuplicate.java @@ -37,7 +37,7 @@ import org.apache.nifi.util.MockControllerServiceInitializationContext; import org.apache.nifi.util.TestRunner; import org.apache.nifi.util.TestRunners; -import org.apache.commons.lang.SerializationException; +import org.apache.commons.lang3.SerializationException; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-bundle/standard-reporting-tasks/pom.xml ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-bundle/standard-reporting-tasks/pom.xml b/nar-bundles/standard-bundle/standard-reporting-tasks/pom.xml index 924c64c..605614b 100644 --- a/nar-bundles/standard-bundle/standard-reporting-tasks/pom.xml +++ b/nar-bundles/standard-bundle/standard-reporting-tasks/pom.xml @@ -52,15 +52,8 @@ <scope>test</scope> </dependency> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.9</version> - <scope>test</scope> - </dependency> - <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-all</artifactId> - <version>1.9.5</version> <scope>test</scope> </dependency> </dependencies> http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/pom.xml ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/pom.xml b/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/pom.xml deleted file mode 100644 index 0f8040a..0000000 --- a/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/pom.xml +++ /dev/null @@ -1,36 +0,0 @@ -<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> - <groupId>org.apache.nifi</groupId> - <artifactId>standard-services-api-bundle</artifactId> - <version>0.0.1-SNAPSHOT</version> - </parent> - - <artifactId>distributed-cache-client-service-api</artifactId> - <packaging>jar</packaging> - - <name>Distributed Cache Client Service API</name> - <description>Provides an API for a Client that interfaces with a Distributed Cache</description> - - <dependencies> - <dependency> - <groupId>org.apache.nifi</groupId> - <artifactId>nifi-api</artifactId> - </dependency> - </dependencies> -</project> http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/Deserializer.java ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/Deserializer.java b/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/Deserializer.java deleted file mode 100644 index 017119f..0000000 --- a/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/Deserializer.java +++ /dev/null @@ -1,41 +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.distributed.cache.client; - -import java.io.IOException; - -import org.apache.nifi.distributed.cache.client.exception.DeserializationException; - -/** - * Provides an interface for deserializing an array of bytes into an Object - * - * @param <T> - */ -public interface Deserializer<T> { - - /** - * Deserializes the given byte array input an Object and returns that value. - * - * @param input - * @return - * @throws DeserializationException if a valid object cannot be deserialized - * from the given byte array - * @throws java.io.IOException - */ - T deserialize(byte[] input) throws DeserializationException, IOException; - -} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClient.java ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClient.java b/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClient.java deleted file mode 100644 index 5bead8c..0000000 --- a/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClient.java +++ /dev/null @@ -1,114 +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.distributed.cache.client; - -import java.io.IOException; - -import org.apache.nifi.controller.ControllerService; - -/** - * This interface defines an API that can be used for interacting with a - * Distributed Cache that functions similarly to a {@link java.util.Map Map}. - * - */ -public interface DistributedMapCacheClient extends ControllerService { - - /** - * Adds the specified key and value to the cache, if they are not already - * present, serializing the key and value with the given - * {@link Serializer}s. - * - * @param <K> - * @param <V> - * @param key the key for into the map - * @param value the value to add to the map if and only if the key is absent - * @param keySerializer - * @param valueSerializer - * @return true if the value was added to the cache, false if the value - * already existed in the cache - * - * @throws IOException if unable to communicate with the remote instance - */ - <K, V> boolean putIfAbsent(K key, V value, Serializer<K> keySerializer, Serializer<V> valueSerializer) throws IOException; - - /** - * Adds the specified key and value to the cache, if they are not already - * present, serializing the key and value with the given - * {@link Serializer}s. If a value already exists in the cache for the given - * key, the value associated with the key is returned, after being - * deserialized with the given valueDeserializer. - * - * @param <K> - * @param <V> - * @param key - * @param value - * @param keySerializer - * @param valueSerializer - * @param valueDeserializer - * @return - * @throws IOException - */ - <K, V> V getAndPutIfAbsent(K key, V value, Serializer<K> keySerializer, Serializer<V> valueSerializer, Deserializer<V> valueDeserializer) throws IOException; - - /** - * Determines if the given value is present in the cache and if so returns - * <code>true</code>, else returns <code>false</code> - * - * @param <K> - * @param key - * @param keySerializer - * @return - * - * @throws IOException if unable to communicate with the remote instance - */ - <K> boolean containsKey(K key, Serializer<K> keySerializer) throws IOException; - - /** - * Returns the value in the cache for the given key, if one exists; - * otherwise returns <code>null</code> - * - * @param <K> - * @param <V> - * @param key the key to lookup in the map - * @param keySerializer - * @param valueDeserializer - * - * @return - * @throws IOException - */ - <K, V> V get(K key, Serializer<K> keySerializer, Deserializer<V> valueDeserializer) throws IOException; - - /** - * Attempts to notify the server that we are finished communicating with it - * and cleans up resources - * @throws java.io.IOException - */ - void close() throws IOException; - - /** - * Removes the entry with the given key from the cache, if it is present. - * - * @param <K> - * @param key - * @param serializer - * @return <code>true</code> if the entry is removed, <code>false</code> if - * the key did not exist in the cache - * @throws IOException - */ - <K> boolean remove(K key, Serializer<K> serializer) throws IOException; - -} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/DistributedSetCacheClient.java ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/DistributedSetCacheClient.java b/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/DistributedSetCacheClient.java deleted file mode 100644 index 12aae3e..0000000 --- a/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/DistributedSetCacheClient.java +++ /dev/null @@ -1,74 +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.distributed.cache.client; - -import java.io.IOException; - -import org.apache.nifi.controller.ControllerService; - -/** - * This interface defines an API that can be used for interacting with a - * Distributed Cache that functions similarly to a {@link java.util.Set Set}. - */ -public interface DistributedSetCacheClient extends ControllerService { - - /** - * Adds the specified value to the cache, serializing the value with the - * given {@link Serializer}. - * - * @param <T> - * @param value - * @param serializer - * @return true if the value was added to the cache, false if the value - * already existed in the cache - * - * @throws IOException if unable to communicate with the remote instance - */ - <T> boolean addIfAbsent(T value, Serializer<T> serializer) throws IOException; - - /** - * Returns if the given value is present in the cache and if so returns - * <code>true</code>, else returns <code>false</code> - * - * @param <T> - * @param value - * @param serializer - * @return - * - * @throws IOException if unable to communicate with the remote instance - */ - <T> boolean contains(T value, Serializer<T> serializer) throws IOException; - - /** - * Removes the given value from the cache, if it is present. - * - * @param <T> - * @param value - * @param serializer - * @return <code>true</code> if the value is removed, <code>false</code> if - * the value did not exist in the cache - * @throws IOException - */ - <T> boolean remove(T value, Serializer<T> serializer) throws IOException; - - /** - * Attempts to notify the server that we are finished communicating with it - * and cleans up resources - * @throws java.io.IOException - */ - void close() throws IOException; -} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/Serializer.java ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/Serializer.java b/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/Serializer.java deleted file mode 100644 index f1896be..0000000 --- a/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/Serializer.java +++ /dev/null @@ -1,40 +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.distributed.cache.client; - -import java.io.IOException; -import java.io.OutputStream; - -import org.apache.nifi.distributed.cache.client.exception.SerializationException; - -/** - * Provides a mechanism by which a value can be serialized to a stream of bytes - * @param <T> - */ -public interface Serializer<T> { - - /** - * Serializes the given value to the {@link OutputStream} - * - * @param value - * @param output - * @throws SerializationException If unable to serialize the given value - * @throws java.io.IOException - */ - void serialize(T value, OutputStream output) throws SerializationException, IOException; - -} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/exception/DeserializationException.java ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/exception/DeserializationException.java b/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/exception/DeserializationException.java deleted file mode 100644 index bb2fcb2..0000000 --- a/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/exception/DeserializationException.java +++ /dev/null @@ -1,33 +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.distributed.cache.client.exception; - -public class DeserializationException extends RuntimeException { - - public DeserializationException(final Throwable cause) { - super(cause); - } - - public DeserializationException(final String message) { - super(message); - } - - public DeserializationException(final String message, final Throwable cause) { - super(message, cause); - } - -} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/exception/SerializationException.java ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/exception/SerializationException.java b/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/exception/SerializationException.java deleted file mode 100644 index aac59f5..0000000 --- a/nar-bundles/standard-services-api-bundle/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/exception/SerializationException.java +++ /dev/null @@ -1,33 +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.distributed.cache.client.exception; - -public class SerializationException extends RuntimeException { - - public SerializationException(final Throwable cause) { - super(cause); - } - - public SerializationException(final String message) { - super(message); - } - - public SerializationException(final String message, final Throwable cause) { - super(message, cause); - } - -} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-services-api-bundle/load-distribution-service-api/pom.xml ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-services-api-bundle/load-distribution-service-api/pom.xml b/nar-bundles/standard-services-api-bundle/load-distribution-service-api/pom.xml deleted file mode 100644 index df8a40c..0000000 --- a/nar-bundles/standard-services-api-bundle/load-distribution-service-api/pom.xml +++ /dev/null @@ -1,36 +0,0 @@ -<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> - <groupId>org.apache.nifi</groupId> - <artifactId>standard-services-api-bundle</artifactId> - <version>0.0.1-SNAPSHOT</version> - </parent> - - <artifactId>load-distribution-service-api</artifactId> - <packaging>jar</packaging> - - <name>Load Distribution Service API</name> - - <dependencies> - <dependency> - <groupId>org.apache.nifi</groupId> - <artifactId>nifi-api</artifactId> - </dependency> - </dependencies> - -</project> http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-services-api-bundle/load-distribution-service-api/src/main/java/org/apache/nifi/loading/LoadDistributionListener.java ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-services-api-bundle/load-distribution-service-api/src/main/java/org/apache/nifi/loading/LoadDistributionListener.java b/nar-bundles/standard-services-api-bundle/load-distribution-service-api/src/main/java/org/apache/nifi/loading/LoadDistributionListener.java deleted file mode 100644 index 656bf99..0000000 --- a/nar-bundles/standard-services-api-bundle/load-distribution-service-api/src/main/java/org/apache/nifi/loading/LoadDistributionListener.java +++ /dev/null @@ -1,24 +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.loading; - -import java.util.Map; - -public interface LoadDistributionListener { - - public void update(Map<String, Integer> loadInfo); -} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-services-api-bundle/load-distribution-service-api/src/main/java/org/apache/nifi/loading/LoadDistributionService.java ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-services-api-bundle/load-distribution-service-api/src/main/java/org/apache/nifi/loading/LoadDistributionService.java b/nar-bundles/standard-services-api-bundle/load-distribution-service-api/src/main/java/org/apache/nifi/loading/LoadDistributionService.java deleted file mode 100644 index c413975..0000000 --- a/nar-bundles/standard-services-api-bundle/load-distribution-service-api/src/main/java/org/apache/nifi/loading/LoadDistributionService.java +++ /dev/null @@ -1,33 +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.loading; - -import java.util.Map; -import java.util.Set; - -import org.apache.nifi.controller.ControllerService; - -/** - * A service that will provide a Map of Fully Qualified Domain Names (fqdn) with - * their respective weights (scale of 1 - 100). - */ -public interface LoadDistributionService extends ControllerService { - - public Map<String, Integer> getLoadDistribution(Set<String> fqdns); - - public Map<String, Integer> getLoadDistribution(Set<String> fqdns, LoadDistributionListener listener); -} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-services-api-bundle/pom.xml ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-services-api-bundle/pom.xml b/nar-bundles/standard-services-api-bundle/pom.xml deleted file mode 100644 index 27c0545..0000000 --- a/nar-bundles/standard-services-api-bundle/pom.xml +++ /dev/null @@ -1,74 +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. ---> -<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"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.nifi</groupId> - <artifactId>nar-container-common</artifactId> - <version>0.0.1-SNAPSHOT</version> - </parent> - - <artifactId>standard-services-api-bundle</artifactId> - <version>0.0.1-SNAPSHOT</version> - <packaging>pom</packaging> - - <name>Standard Services API Bundle</name> - - <properties> - <standard.services.api.version>0.0.1-SNAPSHOT</standard.services.api.version> - </properties> - - <modules> - <module>distributed-cache-client-service-api</module> - <module>ssl-context-service-api</module> - <module>load-distribution-service-api</module> - <module>standard-services-api-nar</module> - </modules> - - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.apache.nifi</groupId> - <artifactId>standard-services-api-nar</artifactId> - <version>${standard.services.api.version}</version> - <type>nar</type> - </dependency> - <dependency> - <groupId>org.apache.nifi</groupId> - <artifactId>nifi-security-utils</artifactId> - <version>0.0.1-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.nifi</groupId> - <artifactId>ssl-context-service-api</artifactId> - <version>${standard.services.api.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.nifi</groupId> - <artifactId>distributed-cache-client-service-api</artifactId> - <version>${standard.services.api.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.nifi</groupId> - <artifactId>load-distribution-service-api</artifactId> - <version>${standard.services.api.version}</version> - <scope>provided</scope> - </dependency> - </dependencies> - </dependencyManagement> -</project> http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-services-api-bundle/ssl-context-service-api/pom.xml ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-services-api-bundle/ssl-context-service-api/pom.xml b/nar-bundles/standard-services-api-bundle/ssl-context-service-api/pom.xml deleted file mode 100644 index a25e624..0000000 --- a/nar-bundles/standard-services-api-bundle/ssl-context-service-api/pom.xml +++ /dev/null @@ -1,36 +0,0 @@ -<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> - <groupId>org.apache.nifi</groupId> - <artifactId>standard-services-api-bundle</artifactId> - <version>0.0.1-SNAPSHOT</version> - </parent> - - <artifactId>ssl-context-service-api</artifactId> - <packaging>jar</packaging> - - <name>SSL Context Service API</name> - - <dependencies> - <dependency> - <groupId>org.apache.nifi</groupId> - <artifactId>nifi-api</artifactId> - </dependency> - </dependencies> - -</project> http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-services-api-bundle/ssl-context-service-api/src/main/java/org/apache/nifi/ssl/SSLContextService.java ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-services-api-bundle/ssl-context-service-api/src/main/java/org/apache/nifi/ssl/SSLContextService.java b/nar-bundles/standard-services-api-bundle/ssl-context-service-api/src/main/java/org/apache/nifi/ssl/SSLContextService.java deleted file mode 100644 index 7c71a8e..0000000 --- a/nar-bundles/standard-services-api-bundle/ssl-context-service-api/src/main/java/org/apache/nifi/ssl/SSLContextService.java +++ /dev/null @@ -1,55 +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.ssl; - -import javax.net.ssl.SSLContext; - -import org.apache.nifi.controller.ControllerService; -import org.apache.nifi.processor.exception.ProcessException; - -/** - * Definition for SSLContextService. - * - */ -public interface SSLContextService extends ControllerService { - - public static enum ClientAuth { - - WANT, - REQUIRED, - NONE - } - - public SSLContext createSSLContext(final ClientAuth clientAuth) throws ProcessException; - - public String getTrustStoreFile(); - - public String getTrustStoreType(); - - public String getTrustStorePassword(); - - public boolean isTrustStoreConfigured(); - - public String getKeyStoreFile(); - - public String getKeyStoreType(); - - public String getKeyStorePassword(); - - public boolean isKeyStoreConfigured(); - -} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-services-api-bundle/standard-services-api-nar/pom.xml ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-services-api-bundle/standard-services-api-nar/pom.xml b/nar-bundles/standard-services-api-bundle/standard-services-api-nar/pom.xml deleted file mode 100644 index bb83a8e..0000000 --- a/nar-bundles/standard-services-api-bundle/standard-services-api-nar/pom.xml +++ /dev/null @@ -1,44 +0,0 @@ -<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> - <groupId>org.apache.nifi</groupId> - <artifactId>standard-services-api-bundle</artifactId> - <version>0.0.1-SNAPSHOT</version> - </parent> - - <artifactId>standard-services-api-nar</artifactId> - <name>Standard Services API Nar</name> - <packaging>nar</packaging> - - <dependencies> - <dependency> - <groupId>org.apache.nifi</groupId> - <artifactId>ssl-context-service-api</artifactId> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>org.apache.nifi</groupId> - <artifactId>distributed-cache-client-service-api</artifactId> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>org.apache.nifi</groupId> - <artifactId>load-distribution-service-api</artifactId> - <scope>compile</scope> - </dependency> - </dependencies> -</project> http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-services/distributed-cache-client-service-api/pom.xml ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-services/distributed-cache-client-service-api/pom.xml b/nar-bundles/standard-services/distributed-cache-client-service-api/pom.xml new file mode 100644 index 0000000..1a7241f --- /dev/null +++ b/nar-bundles/standard-services/distributed-cache-client-service-api/pom.xml @@ -0,0 +1,36 @@ +<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> + <groupId>org.apache.nifi</groupId> + <artifactId>standard-services-parent</artifactId> + <version>0.0.1-SNAPSHOT</version> + </parent> + + <artifactId>distributed-cache-client-service-api</artifactId> + <packaging>jar</packaging> + + <name>Distributed Cache Client Service API</name> + <description>Provides an API for a Client that interfaces with a Distributed Cache</description> + + <dependencies> + <dependency> + <groupId>org.apache.nifi</groupId> + <artifactId>nifi-api</artifactId> + </dependency> + </dependencies> +</project> http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/19d4a150/nar-bundles/standard-services/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/Deserializer.java ---------------------------------------------------------------------- diff --git a/nar-bundles/standard-services/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/Deserializer.java b/nar-bundles/standard-services/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/Deserializer.java new file mode 100644 index 0000000..017119f --- /dev/null +++ b/nar-bundles/standard-services/distributed-cache-client-service-api/src/main/java/org/apache/nifi/distributed/cache/client/Deserializer.java @@ -0,0 +1,41 @@ +/* + * 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.distributed.cache.client; + +import java.io.IOException; + +import org.apache.nifi.distributed.cache.client.exception.DeserializationException; + +/** + * Provides an interface for deserializing an array of bytes into an Object + * + * @param <T> + */ +public interface Deserializer<T> { + + /** + * Deserializes the given byte array input an Object and returns that value. + * + * @param input + * @return + * @throws DeserializationException if a valid object cannot be deserialized + * from the given byte array + * @throws java.io.IOException + */ + T deserialize(byte[] input) throws DeserializationException, IOException; + +}
