diff --git a/archetypes/streampipes-archetype-extensions-jvm/src/main/resources/archetype-resources/src/main/java/Init.java b/archetypes/streampipes-archetype-extensions-jvm/src/main/resources/archetype-resources/src/main/java/Init.java index d1b9cd51e7..b467203177 100644 --- a/archetypes/streampipes-archetype-extensions-jvm/src/main/resources/archetype-resources/src/main/java/Init.java +++ b/archetypes/streampipes-archetype-extensions-jvm/src/main/resources/archetype-resources/src/main/java/Init.java @@ -32,7 +32,7 @@ import org.apache.streampipes.messaging.mqtt.SpMqttProtocolFactory; import org.apache.streampipes.messaging.nats.SpNatsProtocolFactory; import org.apache.streampipes.messaging.pulsar.SpPulsarProtocolFactory; -import org.apache.streampipes.service.extensions.ExtensionsModelSubmitter; +import org.apache.streampipes.service.extensions.StreamPipesExtensionsServiceBase; import org.apache.streampipes.wrapper.standalone.runtime.StandaloneStreamPipesRuntimeProvider; import ${package}.pe.${packageName}.${classNamePrefix}DataProcessor; @@ -40,7 +40,7 @@ import ${package}.pe.${packageName}.${classNamePrefix}GenericAdapter; import ${package}.pe.${packageName}.${classNamePrefix}SpecificAdapter; -public class Init extends ExtensionsModelSubmitter { +public class Init extends StreamPipesExtensionsServiceBase { public static void main(String[] args) { new Init().init(); diff --git a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/java/Init.java b/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/java/Init.java index 58f30bf004..71e371dc77 100644 --- a/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/java/Init.java +++ b/archetypes/streampipes-archetype-pe-processors-flink/src/main/resources/archetype-resources/src/main/java/Init.java @@ -36,9 +36,9 @@ import org.apache.streampipes.messaging.mqtt.SpMqttProtocolFactory; import org.apache.streampipes.messaging.pulsar.SpPulsarProtocolFactory; import org.apache.streampipes.messaging.nats.SpNatsProtocolFactory; -import org.apache.streampipes.service.extensions.ExtensionsModelSubmitter; +import org.apache.streampipes.service.extensions.StreamPipesExtensionsServiceBase; -public class Init extends ExtensionsModelSubmitter { +public class Init extends StreamPipesExtensionsServiceBase { public static void main(String[] args) throws Exception { new Init().init(); diff --git a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/java/Init.java b/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/java/Init.java index f0258d8ffc..b320c7a3ca 100644 --- a/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/java/Init.java +++ b/archetypes/streampipes-archetype-pe-sinks-flink/src/main/resources/archetype-resources/src/main/java/Init.java @@ -32,12 +32,12 @@ import org.apache.streampipes.messaging.mqtt.SpMqttProtocolFactory; import org.apache.streampipes.messaging.pulsar.SpPulsarProtocolFactory; import org.apache.streampipes.messaging.nats.SpNatsProtocolFactory; -import org.apache.streampipes.service.extensions.ExtensionsModelSubmitter; +import org.apache.streampipes.service.extensions.StreamPipesExtensionsServiceBase; import ${package}.config.ConfigKeys; import ${package}.pe.sink.${packageName}.${classNamePrefix}Controller; -public class Init extends ExtensionsModelSubmitter { +public class Init extends StreamPipesExtensionsServiceBase { public static void main(String[] args) throws Exception { new Init().init(); diff --git a/streampipes-extensions/streampipes-extensions-all-iiot/src/main/java/org/apache/streampipes/extensions/all/iiot/AllExtensionsIIoTInit.java b/streampipes-extensions/streampipes-extensions-all-iiot/src/main/java/org/apache/streampipes/extensions/all/iiot/AllExtensionsIIoTInit.java index 34ec545b57..66187857a0 100644 --- a/streampipes-extensions/streampipes-extensions-all-iiot/src/main/java/org/apache/streampipes/extensions/all/iiot/AllExtensionsIIoTInit.java +++ b/streampipes-extensions/streampipes-extensions-all-iiot/src/main/java/org/apache/streampipes/extensions/all/iiot/AllExtensionsIIoTInit.java @@ -45,14 +45,14 @@ import org.apache.streampipes.processors.filters.jvm.FilterExtensionModuleExport; import org.apache.streampipes.processors.siddhi.SiddhiFilterExtensionModuleExport; import org.apache.streampipes.processors.transformation.jvm.TransformationExtensionModuleExport; -import org.apache.streampipes.service.extensions.ExtensionsModelSubmitter; +import org.apache.streampipes.service.extensions.StreamPipesExtensionsServiceBase; import org.apache.streampipes.sinks.brokers.jvm.BrokerSinksExtensionModuleExport; import org.apache.streampipes.sinks.databases.jvm.DatabaseSinksExtensionModuleExport; import org.apache.streampipes.sinks.internal.jvm.InternalSinksExtensionModuleExports; import org.apache.streampipes.sinks.notifications.jvm.NotificationsExtensionModuleExport; import org.apache.streampipes.wrapper.standalone.runtime.StandaloneStreamPipesRuntimeProvider; -public class AllExtensionsIIoTInit extends ExtensionsModelSubmitter { +public class AllExtensionsIIoTInit extends StreamPipesExtensionsServiceBase { public static void main(String[] args) { new AllExtensionsIIoTInit().init(); diff --git a/streampipes-extensions/streampipes-extensions-all-jvm/src/main/java/org/apache/streampipes/extensions/all/jvm/AllExtensionsInit.java b/streampipes-extensions/streampipes-extensions-all-jvm/src/main/java/org/apache/streampipes/extensions/all/jvm/AllExtensionsInit.java index d5b9bf6f92..19c7e551c1 100644 --- a/streampipes-extensions/streampipes-extensions-all-jvm/src/main/java/org/apache/streampipes/extensions/all/jvm/AllExtensionsInit.java +++ b/streampipes-extensions/streampipes-extensions-all-jvm/src/main/java/org/apache/streampipes/extensions/all/jvm/AllExtensionsInit.java @@ -48,7 +48,7 @@ import org.apache.streampipes.processors.siddhi.SiddhiFilterExtensionModuleExport; import org.apache.streampipes.processors.textmining.jvm.TextMiningExtensionModuleExport; import org.apache.streampipes.processors.transformation.jvm.TransformationExtensionModuleExport; -import org.apache.streampipes.service.extensions.ExtensionsModelSubmitter; +import org.apache.streampipes.service.extensions.StreamPipesExtensionsServiceBase; import org.apache.streampipes.sinks.brokers.jvm.BrokerSinksExtensionModuleExport; import org.apache.streampipes.sinks.databases.jvm.DatabaseSinksExtensionModuleExport; import org.apache.streampipes.sinks.internal.jvm.InternalSinksExtensionModuleExports; @@ -56,7 +56,7 @@ import org.apache.streampipes.wrapper.standalone.runtime.StandaloneStreamPipesRuntimeProvider; -public class AllExtensionsInit extends ExtensionsModelSubmitter { +public class AllExtensionsInit extends StreamPipesExtensionsServiceBase { public static void main(String[] args) { new AllExtensionsInit().init(); diff --git a/streampipes-extensions/streampipes-extensions-iiot-minimal/src/main/java/org/apache/streampipes/extensions/iiot/minimal/ExtensionsIIoTMinimalInit.java b/streampipes-extensions/streampipes-extensions-iiot-minimal/src/main/java/org/apache/streampipes/extensions/iiot/minimal/ExtensionsIIoTMinimalInit.java index e609b018c7..80db365175 100644 --- a/streampipes-extensions/streampipes-extensions-iiot-minimal/src/main/java/org/apache/streampipes/extensions/iiot/minimal/ExtensionsIIoTMinimalInit.java +++ b/streampipes-extensions/streampipes-extensions-iiot-minimal/src/main/java/org/apache/streampipes/extensions/iiot/minimal/ExtensionsIIoTMinimalInit.java @@ -37,14 +37,14 @@ import org.apache.streampipes.processors.filters.jvm.FilterExtensionModuleExport; import org.apache.streampipes.processors.siddhi.SiddhiFilterExtensionModuleExport; import org.apache.streampipes.processors.transformation.jvm.TransformationExtensionModuleExport; -import org.apache.streampipes.service.extensions.ExtensionsModelSubmitter; +import org.apache.streampipes.service.extensions.StreamPipesExtensionsServiceBase; import org.apache.streampipes.sinks.brokers.jvm.BrokerSinksExtensionModuleExport; import org.apache.streampipes.sinks.databases.jvm.DatabaseSinksExtensionModuleExport; import org.apache.streampipes.sinks.internal.jvm.InternalSinksExtensionModuleExports; import org.apache.streampipes.sinks.notifications.jvm.NotificationsExtensionModuleExport; import org.apache.streampipes.wrapper.standalone.runtime.StandaloneStreamPipesRuntimeProvider; -public class ExtensionsIIoTMinimalInit extends ExtensionsModelSubmitter { +public class ExtensionsIIoTMinimalInit extends StreamPipesExtensionsServiceBase { public static void main(String[] args) { new ExtensionsIIoTMinimalInit().init(); diff --git a/streampipes-extensions/streampipes-pipeline-elements-experimental-flink/src/main/java/org/apache/streampipes/pe/flink/AllFlinkPipelineElementsInit.java b/streampipes-extensions/streampipes-pipeline-elements-experimental-flink/src/main/java/org/apache/streampipes/pe/flink/AllFlinkPipelineElementsInit.java index 47e568367f..033e658399 100644 --- a/streampipes-extensions/streampipes-pipeline-elements-experimental-flink/src/main/java/org/apache/streampipes/pe/flink/AllFlinkPipelineElementsInit.java +++ b/streampipes-extensions/streampipes-pipeline-elements-experimental-flink/src/main/java/org/apache/streampipes/pe/flink/AllFlinkPipelineElementsInit.java @@ -47,11 +47,11 @@ import org.apache.streampipes.pe.flink.processor.urldereferencing.UrlDereferencingController; import org.apache.streampipes.pe.flink.processor.wordcount.WordCountController; import org.apache.streampipes.pe.flink.sink.elasticsearch.ElasticSearchController; -import org.apache.streampipes.service.extensions.ExtensionsModelSubmitter; +import org.apache.streampipes.service.extensions.StreamPipesExtensionsServiceBase; import org.apache.streampipes.wrapper.flink.FlinkRuntimeProvider; -public class AllFlinkPipelineElementsInit extends ExtensionsModelSubmitter { +public class AllFlinkPipelineElementsInit extends StreamPipesExtensionsServiceBase { public static void main(String[] args) { new AllFlinkPipelineElementsInit().init(); diff --git a/streampipes-maven-plugin/README.md b/streampipes-maven-plugin/README.md index 70c9fffb5b..6e1ea1b260 100644 --- a/streampipes-maven-plugin/README.md +++ b/streampipes-maven-plugin/README.md @@ -31,7 +31,7 @@ The streampipes-maven-plugin can either be started from the command line or embe ### Prerequisites -The plugin must be started from a module which contains an `Init` class which inherits `ExtensionsModelSubmitter`. +The plugin must be started from a module which contains an `Init` class which inherits `StreamPipesExtensionsServiceBase`. By default, the goal runs in the `package` phase. ### Command line diff --git a/streampipes-maven-plugin/src/main/java/org/apache/streampipes/smp/extractor/ExtensionsFinder.java b/streampipes-maven-plugin/src/main/java/org/apache/streampipes/smp/extractor/ExtensionsFinder.java index b36abb767b..c1ac981bb4 100644 --- a/streampipes-maven-plugin/src/main/java/org/apache/streampipes/smp/extractor/ExtensionsFinder.java +++ b/streampipes-maven-plugin/src/main/java/org/apache/streampipes/smp/extractor/ExtensionsFinder.java @@ -23,7 +23,7 @@ import org.apache.streampipes.extensions.api.pe.config.IDataSinkConfiguration; import org.apache.streampipes.extensions.api.pe.config.IPipelineElementConfiguration; import org.apache.streampipes.extensions.management.model.SpServiceDefinition; -import org.apache.streampipes.service.extensions.ExtensionsModelSubmitter; +import org.apache.streampipes.service.extensions.StreamPipesExtensionsServiceBase; import org.apache.streampipes.smp.constants.PeType; import org.apache.streampipes.smp.model.AssetModel; @@ -39,17 +39,23 @@ public class ExtensionsFinder { private final ClassLoader loader; private final String initClass; - public ExtensionsFinder(ClassLoader loader, - String initClass) { + public ExtensionsFinder( + ClassLoader loader, + String initClass + ) { this.loader = loader; this.initClass = initClass; } public List findExtensions() throws MalformedURLException, DependencyResolutionRequiredException, ClassNotFoundException, - InstantiationException, IllegalAccessException { + InstantiationException, IllegalAccessException { var extensions = new ArrayList(); - var serviceDef = ((ExtensionsModelSubmitter) loader.loadClass(initClass).newInstance()).provideServiceDefinition(); + var serviceDef = ( + (StreamPipesExtensionsServiceBase) loader + .loadClass(initClass) + .newInstance() + ).provideServiceDefinition(); extensions.addAll(findAdapters(serviceDef)); extensions.addAll(findPipelineElements(serviceDef, IDataProcessorConfiguration.class, PeType.PROCESSOR)); @@ -58,20 +64,28 @@ public List findExtensions() return extensions; } - private List findPipelineElements(SpServiceDefinition serviceDef, - Class> configType, - PeType peType) { + private List findPipelineElements( + SpServiceDefinition serviceDef, + Class> configType, + PeType peType + ) { return serviceDef.getDeclarers() - .stream() - .map(IStreamPipesPipelineElement::declareConfig) - .filter(configType::isInstance) - .map(config -> new AssetModel(config.getDescription().getAppId(), peType)).toList(); + .stream() + .map(IStreamPipesPipelineElement::declareConfig) + .filter(configType::isInstance) + .map(config -> new AssetModel(config.getDescription() + .getAppId(), peType)) + .toList(); } private Collection findAdapters(SpServiceDefinition serviceDef) { - return serviceDef.getAdapters().stream().map(adapter -> { - var config = adapter.declareConfig(); - return new AssetModel(config.getAdapterDescription().getAppId(), PeType.ADAPTER); - }).toList(); + return serviceDef.getAdapters() + .stream() + .map(adapter -> { + var config = adapter.declareConfig(); + return new AssetModel(config.getAdapterDescription() + .getAppId(), PeType.ADAPTER); + }) + .toList(); } } diff --git a/streampipes-service-extensions/src/main/java/org/apache/streampipes/service/extensions/ExtensionsModelSubmitter.java b/streampipes-service-extensions/src/main/java/org/apache/streampipes/service/extensions/ExtensionsModelSubmitter.java deleted file mode 100644 index 29b60bd186..0000000000 --- a/streampipes-service-extensions/src/main/java/org/apache/streampipes/service/extensions/ExtensionsModelSubmitter.java +++ /dev/null @@ -1,25 +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.streampipes.service.extensions; - -/** - * @deprecated Use {@link StreamPipesExtensionsServiceBase} instead - */ -@Deprecated(forRemoval = true, since = "0.95.0") -public abstract class ExtensionsModelSubmitter extends StreamPipesExtensionsServiceBase { -}