diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6a9185ef15..5ee7ff7823 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -92,22 +92,6 @@ jobs: push: true tags: ${{ env.DOCKERHUB_APACHE_REPO }}/ui:${{ env.MVN_VERSION }} - - name: Build and Push Docker Image connect-adapters - uses: docker/build-push-action@v5 - with: - context: ./streampipes-extensions/streampipes-connect-adapters - platforms: linux/amd64,linux/arm64/v8,linux/arm/v7 - push: true - tags: ${{ env.DOCKERHUB_APACHE_REPO }}/connect-adapters:${{ env.MVN_VERSION }} - - - name: Build and Push Docker Image connect-adapters-iiot - uses: docker/build-push-action@v5 - with: - context: ./streampipes-extensions/streampipes-connect-adapters-iiot - platforms: linux/amd64,linux/arm64/v8,linux/arm/v7 - push: true - tags: ${{ env.DOCKERHUB_APACHE_REPO }}/connect-adapters-iiot:${{ env.MVN_VERSION }} - - name: Build and Push Docker Image extensions-all-jvm uses: docker/build-push-action@v5 with: @@ -132,11 +116,11 @@ jobs: push: true tags: ${{ env.DOCKERHUB_APACHE_REPO }}/extensions-all-iiot:${{ env.MVN_VERSION }} - - name: Build and Push Docker Image pipeline-elements-all-jvm + - name: Build and Push Docker Image extensions-iiot-minimal uses: docker/build-push-action@v5 with: - context: ./streampipes-extensions/streampipes-pipeline-elements-all-jvm + context: ./streampipes-extensions/streampipes-extensions-iiot-minimal platforms: linux/amd64,linux/arm64/v8,linux/arm/v7 push: true - tags: ${{ env.DOCKERHUB_APACHE_REPO }}/pipeline-elements-all-jvm:${{ env.MVN_VERSION }} + tags: ${{ env.DOCKERHUB_APACHE_REPO }}/extensions-iiot-minimal:${{ env.MVN_VERSION }} diff --git a/installer/compose/docker-compose.full.yml b/installer/compose/docker-compose.full.yml index c60c538065..00029cdddb 100644 --- a/installer/compose/docker-compose.full.yml +++ b/installer/compose/docker-compose.full.yml @@ -38,34 +38,6 @@ services: networks: spnet: - connect-adapters: - image: "${SP_DOCKER_REGISTRY}/connect-adapters:${SP_VERSION}" - depends_on: - - consul - environment: - - SP_BACKEND_HOST=backend - - SP_CONNECT_CONTAINER_WORKER=connect-adapters - volumes: - - connect:/data/ - logging: *default-logging - restart: unless-stopped - networks: - spnet: - - connect-adapters-iiot: - image: "${SP_DOCKER_REGISTRY}/connect-adapters-iiot:${SP_VERSION}" - depends_on: - - consul - environment: - - SP_BACKEND_HOST=backend - - SP_CONNECT_CONTAINER_WORKER=connect-adapters - volumes: - - connect:/data/ - logging: *default-logging - restart: unless-stopped - networks: - spnet: - ui: image: "${SP_DOCKER_REGISTRY}/ui:${SP_VERSION}" ports: @@ -196,8 +168,8 @@ services: spnet: # Lite version pipeline elements - pipeline-elements-all-jvm: - image: "${SP_DOCKER_REGISTRY}/pipeline-elements-all-jvm:${SP_VERSION}" + extensions-all-jvm: + image: "${SP_DOCKER_REGISTRY}/extensions-all-jvm:${SP_VERSION}" depends_on: - consul volumes: diff --git a/installer/compose/docker-compose.minimal.yml b/installer/compose/docker-compose.minimal.yml new file mode 100644 index 0000000000..0a4246298a --- /dev/null +++ b/installer/compose/docker-compose.minimal.yml @@ -0,0 +1,144 @@ +# 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. +version: "3.4" + +# global logging +x-logging: + &default-logging + options: + max-size: '12m' + max-file: '5' + driver: json-file + +services: + + # StreamPipes services + backend: + image: "${SP_DOCKER_REGISTRY}/backend-nats:${SP_VERSION}" + depends_on: + - consul + - couchdb + environment: + - SP_PRIORITIZED_PROTOCOL=nats + volumes: + - backend:/root/.streampipes + logging: *default-logging + restart: unless-stopped + networks: + spnet: + + ui: + image: "${SP_DOCKER_REGISTRY}/ui:${SP_VERSION}" + ports: + - "80:8088" + depends_on: + - couchdb + - consul + - backend + volumes: + - nginx:/etc/nginx/ + logging: *default-logging + restart: unless-stopped + networks: + spnet: + + consul: + image: consul:1.14.3 + environment: + - "CONSUL_LOCAL_CONFIG={\"disable_update_check\": true}" + - "CONSUL_BIND_INTERFACE=eth0" + - "CONSUL_HTTP_ADDR=0.0.0.0" + entrypoint: + - consul + - agent + - -server + - -bootstrap-expect=1 + - -data-dir=/consul/data + - -node=consul-one + - -bind={{ GetInterfaceIP "eth0" }} + - -client=0.0.0.0 + - -enable-script-checks=true + - -ui + volumes: + - consul:/consul/data + logging: *default-logging + restart: unless-stopped + networks: + spnet: + ipv4_address: ${SP_CONSUL_CONTAINER_IP} + + couchdb: + image: couchdb:3.3.1 + environment: + - COUCHDB_USER=admin + - COUCHDB_PASSWORD=admin + volumes: + - couchdb:/opt/couchdb/data + logging: *default-logging + restart: unless-stopped + networks: + spnet: + + influxdb: + image: influxdb:2.6 + environment: + - INFLUXDB_DATA_ENGINE=tsm1 + - INFLUXDB_REPORTING_DISABLED=false + - INFLUXDB_ADMIN_ENABLED=true + - DOCKER_INFLUXDB_INIT_USERNAME=admin + - DOCKER_INFLUXDB_INIT_PASSWORD=sp-admin + - DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=sp-admin + - DOCKER_INFLUXDB_INIT_ORG=sp + - DOCKER_INFLUXDB_INIT_BUCKET=sp + - DOCKER_INFLUXDB_INIT_MODE=${SP_INFLUX_INIT_MODE} + volumes: + - influxdb:/var/lib/influxdb + - influxdb2:/var/lib/influxdb2 + logging: *default-logging + restart: unless-stopped + networks: + spnet: + + nats: + image: nats + restart: unless-stopped + networks: + spnet: + + extensions-iiot-minimal: + image: "${SP_DOCKER_REGISTRY}/extensions-iiot-minimal:${SP_VERSION}" + depends_on: + - consul + logging: *default-logging + restart: unless-stopped + networks: + spnet: + +volumes: + backend: + consul: + couchdb: + influxdb: + influxdb2: + nginx: + + +networks: + spnet: + driver: bridge + ipam: + config: + - subnet: ${SP_SUBNET} + diff --git a/streampipes-extensions/streampipes-sinks-notifications-jvm/src/main/java/org/apache/streampipes/sinks/notifications/jvm/config/ConfigKeys.java b/streampipes-extensions-api/src/main/java/org/apache/streampipes/extensions/api/declarer/IExtensionModuleExport.java similarity index 54% rename from streampipes-extensions/streampipes-sinks-notifications-jvm/src/main/java/org/apache/streampipes/sinks/notifications/jvm/config/ConfigKeys.java rename to streampipes-extensions-api/src/main/java/org/apache/streampipes/extensions/api/declarer/IExtensionModuleExport.java index 43ffb9efd2..d8da84cc23 100644 --- a/streampipes-extensions/streampipes-sinks-notifications-jvm/src/main/java/org/apache/streampipes/sinks/notifications/jvm/config/ConfigKeys.java +++ b/streampipes-extensions-api/src/main/java/org/apache/streampipes/extensions/api/declarer/IExtensionModuleExport.java @@ -16,8 +16,26 @@ * */ -package org.apache.streampipes.sinks.notifications.jvm.config; +package org.apache.streampipes.extensions.api.declarer; + +import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter; +import org.apache.streampipes.extensions.api.migration.IModelMigrator; +import org.apache.streampipes.extensions.api.pe.IStreamPipesPipelineElement; +import org.apache.streampipes.model.extensions.configuration.ConfigItem; + +import java.util.Collections; +import java.util.List; + +public interface IExtensionModuleExport { + + List adapters(); + + List> pipelineElements(); + + List> migrators(); + + default List configItems() { + return Collections.emptyList(); + } -public class ConfigKeys { - public static final String WEBSOCKET_PROTOCOL = "SP_WEBSOCKET_PROTOCOL"; } diff --git a/streampipes-extensions-management/src/main/java/org/apache/streampipes/extensions/management/model/SpServiceDefinitionBuilder.java b/streampipes-extensions-management/src/main/java/org/apache/streampipes/extensions/management/model/SpServiceDefinitionBuilder.java index e8e9220a0a..1cb2bb004d 100644 --- a/streampipes-extensions-management/src/main/java/org/apache/streampipes/extensions/management/model/SpServiceDefinitionBuilder.java +++ b/streampipes-extensions-management/src/main/java/org/apache/streampipes/extensions/management/model/SpServiceDefinitionBuilder.java @@ -19,6 +19,7 @@ import org.apache.streampipes.dataformat.SpDataFormatFactory; import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter; +import org.apache.streampipes.extensions.api.declarer.IExtensionModuleExport; import org.apache.streampipes.extensions.api.declarer.IStreamPipesFunctionDeclarer; import org.apache.streampipes.extensions.api.migration.IModelMigrator; import org.apache.streampipes.extensions.api.pe.IStreamPipesPipelineElement; @@ -82,7 +83,21 @@ public SpServiceDefinitionBuilder addConfig(ConfigItem configItem) { } public SpServiceDefinitionBuilder addConfigs(List configItems) { - configItems.stream().forEach(configItem -> this.serviceDefinition.addConfig(configItem)); + configItems.forEach(configItem -> this.serviceDefinition.addConfig(configItem)); + return this; + } + + public SpServiceDefinitionBuilder registerModules(IExtensionModuleExport... moduleExports) { + Arrays.stream(moduleExports).forEach(this::registerModule); + return this; + } + + public SpServiceDefinitionBuilder registerModule(IExtensionModuleExport moduleExport) { + moduleExport.pipelineElements().forEach(this::registerPipelineElement); + moduleExport.adapters().forEach(this::registerAdapter); + moduleExport.migrators().forEach(this::registerMigrators); + moduleExport.configItems().forEach(this::addConfig); + return this; } diff --git a/streampipes-extensions/pom.xml b/streampipes-extensions/pom.xml index 0e89e64f6c..1eaa13c0a2 100644 --- a/streampipes-extensions/pom.xml +++ b/streampipes-extensions/pom.xml @@ -46,7 +46,6 @@ streampipes-extensions-all-iiot streampipes-extensions-all-jvm - streampipes-pipeline-elements-all-jvm streampipes-pipeline-elements-data-simulator streampipes-pipeline-elements-shared @@ -64,6 +63,7 @@ streampipes-sinks-internal-jvm streampipes-sinks-notifications-jvm streampipes-connectors-plc + streampipes-extensions-iiot-minimal diff --git a/streampipes-extensions/streampipes-connect-adapters-iiot/pom.xml b/streampipes-extensions/streampipes-connect-adapters-iiot/pom.xml index 8d5bff6371..fb8ba5d5ad 100644 --- a/streampipes-extensions/streampipes-connect-adapters-iiot/pom.xml +++ b/streampipes-extensions/streampipes-connect-adapters-iiot/pom.xml @@ -34,46 +34,11 @@ - - org.apache.streampipes - streampipes-connectors-kafka - 0.93.0-SNAPSHOT - org.apache.streampipes streampipes-connectors-mqtt 0.93.0-SNAPSHOT - - org.apache.streampipes - streampipes-connectors-nats - 0.93.0-SNAPSHOT - - - org.apache.streampipes - streampipes-connectors-pulsar - 0.93.0-SNAPSHOT - - - org.apache.streampipes - streampipes-connectors-opcua - 0.93.0-SNAPSHOT - - - org.apache.streampipes - streampipes-connectors-plc - 0.93.0-SNAPSHOT - - - org.apache.streampipes - streampipes-connectors-rocketmq - 0.93.0-SNAPSHOT - - - org.apache.streampipes - streampipes-connectors-tubemq - 0.93.0-SNAPSHOT - org.apache.streampipes streampipes-pipeline-elements-shared @@ -221,35 +186,6 @@ - - org.apache.maven.plugins - maven-jar-plugin - - - - jar - - package - - embed - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - repackage - - - org.apache.streampipes.connect.iiot.ConnectAdapterIiotInit - - - - org.apache.maven.plugins maven-checkstyle-plugin diff --git a/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/java/org/apache/streampipes/connect/iiot/ConnectAdapterIiotInit.java b/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/java/org/apache/streampipes/connect/iiot/ConnectAdapterIiotInit.java deleted file mode 100644 index dd48df49be..0000000000 --- a/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/java/org/apache/streampipes/connect/iiot/ConnectAdapterIiotInit.java +++ /dev/null @@ -1,75 +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.connect.iiot; - -import org.apache.streampipes.connect.iiot.adapters.iolink.IfmAlMqttAdapter; -import org.apache.streampipes.connect.iiot.adapters.ros.RosBridgeAdapter; -import org.apache.streampipes.connect.iiot.adapters.simulator.machine.MachineDataSimulatorAdapter; -import org.apache.streampipes.connect.iiot.protocol.stream.FileReplayAdapter; -import org.apache.streampipes.connect.iiot.protocol.stream.HttpServerProtocol; -import org.apache.streampipes.connect.iiot.protocol.stream.HttpStreamProtocol; -import org.apache.streampipes.extensions.connectors.kafka.adapter.KafkaProtocol; -import org.apache.streampipes.extensions.connectors.mqtt.adapter.MqttProtocol; -import org.apache.streampipes.extensions.connectors.nats.adapter.NatsProtocol; -import org.apache.streampipes.extensions.connectors.opcua.adapter.OpcUaAdapter; -import org.apache.streampipes.extensions.connectors.opcua.migration.OpcUaAdapterMigrationV1; -import org.apache.streampipes.extensions.connectors.plc.adapter.migration.Plc4xS7AdapterMigrationV1; -import org.apache.streampipes.extensions.connectors.plc.adapter.modbus.Plc4xModbusAdapter; -import org.apache.streampipes.extensions.connectors.plc.adapter.s7.Plc4xS7Adapter; -import org.apache.streampipes.extensions.connectors.pulsar.adapter.PulsarProtocol; -import org.apache.streampipes.extensions.connectors.rocketmq.adapter.RocketMQProtocol; -import org.apache.streampipes.extensions.connectors.tubemq.adapter.TubeMQProtocol; -import org.apache.streampipes.extensions.management.model.SpServiceDefinition; -import org.apache.streampipes.extensions.management.model.SpServiceDefinitionBuilder; -import org.apache.streampipes.service.extensions.ExtensionsModelSubmitter; - -public class ConnectAdapterIiotInit extends ExtensionsModelSubmitter { - public static void main(String[] args) { - new ConnectAdapterIiotInit().init(); - } - - @Override - public SpServiceDefinition provideServiceDefinition() { - return SpServiceDefinitionBuilder.create("connect-adapter-iiot", - "StreamPipes connect worker containing adapters relevant for the IIoT", - "", - 8001) - .registerAdapter(new MachineDataSimulatorAdapter()) - .registerAdapter(new FileReplayAdapter()) - .registerAdapter(new IfmAlMqttAdapter()) - .registerAdapter(new RosBridgeAdapter()) - .registerAdapter(new OpcUaAdapter()) - .registerAdapter(new Plc4xS7Adapter()) - .registerAdapter(new Plc4xModbusAdapter()) - .registerAdapter(new KafkaProtocol()) - .registerAdapter(new MqttProtocol()) - .registerAdapter(new NatsProtocol()) - .registerAdapter(new HttpStreamProtocol()) - .registerAdapter(new PulsarProtocol()) - .registerAdapter(new RocketMQProtocol()) - .registerAdapter(new HttpServerProtocol()) - .registerAdapter(new TubeMQProtocol()) - - .registerMigrators( - new OpcUaAdapterMigrationV1(), - new Plc4xS7AdapterMigrationV1() - ) - .build(); - } -} diff --git a/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/java/org/apache/streampipes/connect/iiot/IIoTAdaptersExtensionModuleExport.java b/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/java/org/apache/streampipes/connect/iiot/IIoTAdaptersExtensionModuleExport.java new file mode 100644 index 0000000000..9714149241 --- /dev/null +++ b/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/java/org/apache/streampipes/connect/iiot/IIoTAdaptersExtensionModuleExport.java @@ -0,0 +1,57 @@ +/* + * 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.connect.iiot; + +import org.apache.streampipes.connect.iiot.adapters.iolink.IfmAlMqttAdapter; +import org.apache.streampipes.connect.iiot.adapters.ros.RosBridgeAdapter; +import org.apache.streampipes.connect.iiot.adapters.simulator.machine.MachineDataSimulatorAdapter; +import org.apache.streampipes.connect.iiot.protocol.stream.FileReplayAdapter; +import org.apache.streampipes.connect.iiot.protocol.stream.HttpServerProtocol; +import org.apache.streampipes.connect.iiot.protocol.stream.HttpStreamProtocol; +import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter; +import org.apache.streampipes.extensions.api.declarer.IExtensionModuleExport; +import org.apache.streampipes.extensions.api.migration.IModelMigrator; +import org.apache.streampipes.extensions.api.pe.IStreamPipesPipelineElement; + +import java.util.Collections; +import java.util.List; + +public class IIoTAdaptersExtensionModuleExport implements IExtensionModuleExport { + @Override + public List adapters() { + return List.of( + new MachineDataSimulatorAdapter(), + new FileReplayAdapter(), + new IfmAlMqttAdapter(), + new RosBridgeAdapter(), + new HttpStreamProtocol(), + new HttpServerProtocol() + ); + } + + @Override + public List> pipelineElements() { + return Collections.emptyList(); + } + + @Override + public List> migrators() { + return Collections.emptyList(); + } +} diff --git a/streampipes-extensions/streampipes-connect-adapters/Dockerfile b/streampipes-extensions/streampipes-connect-adapters/Dockerfile deleted file mode 100644 index 465c64fba8..0000000000 --- a/streampipes-extensions/streampipes-connect-adapters/Dockerfile +++ /dev/null @@ -1,20 +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. - -FROM eclipse-temurin:17-jre-focal - -COPY target/streampipes-connect-adapters.jar /streampipes-connect-adapters.jar - -ENTRYPOINT ["java", "-jar", "/streampipes-connect-adapters.jar"] diff --git a/streampipes-extensions/streampipes-connect-adapters/pom.xml b/streampipes-extensions/streampipes-connect-adapters/pom.xml index 4c2e42ee87..88dbfa69f1 100644 --- a/streampipes-extensions/streampipes-connect-adapters/pom.xml +++ b/streampipes-extensions/streampipes-connect-adapters/pom.xml @@ -34,6 +34,11 @@ + + org.apache.streampipes + streampipes-extensions-api + 0.93.0-SNAPSHOT + org.apache.streampipes streampipes-connectors-mqtt @@ -169,35 +174,6 @@ - - org.apache.maven.plugins - maven-jar-plugin - - - - jar - - package - - embed - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - repackage - - - org.apache.streampipes.connect.ConnectAdapterInit - - - - org.apache.maven.plugins maven-checkstyle-plugin diff --git a/streampipes-extensions/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/ConnectAdapterInit.java b/streampipes-extensions/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/GeneralAdaptersExtensionModuleExport.java similarity index 56% rename from streampipes-extensions/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/ConnectAdapterInit.java rename to streampipes-extensions/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/GeneralAdaptersExtensionModuleExport.java index 2d2405051c..ba1fcad199 100644 --- a/streampipes-extensions/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/ConnectAdapterInit.java +++ b/streampipes-extensions/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/GeneralAdaptersExtensionModuleExport.java @@ -28,35 +28,42 @@ import org.apache.streampipes.connect.adapters.ti.TISensorTag; import org.apache.streampipes.connect.adapters.wikipedia.WikipediaEditedArticlesAdapter; import org.apache.streampipes.connect.adapters.wikipedia.WikipediaNewArticlesAdapter; -import org.apache.streampipes.extensions.management.model.SpServiceDefinition; -import org.apache.streampipes.extensions.management.model.SpServiceDefinitionBuilder; -import org.apache.streampipes.service.extensions.ExtensionsModelSubmitter; +import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter; +import org.apache.streampipes.extensions.api.declarer.IExtensionModuleExport; +import org.apache.streampipes.extensions.api.migration.IModelMigrator; +import org.apache.streampipes.extensions.api.pe.IStreamPipesPipelineElement; -public class ConnectAdapterInit extends ExtensionsModelSubmitter { +import java.util.Collections; +import java.util.List; - public static void main(String[] args) { - new ConnectAdapterInit().init(); +public class GeneralAdaptersExtensionModuleExport implements IExtensionModuleExport { + + @Override + public List adapters() { + return List.of( + //new GdeltAdapter(), + new CoindeskBitcoinAdapter(), + new NetioRestAdapter(), + new NetioMQTTAdapter(), + //new IexCloudNewsAdapter(), + //new IexCloudStockAdapter(), + new SlackAdapter(), + new WikipediaEditedArticlesAdapter(), + new WikipediaNewArticlesAdapter(), + new ImageStreamAdapter(), + new IssAdapter(), + new FlicMQTTAdapter(), + new TISensorTag() + ); } @Override - public SpServiceDefinition provideServiceDefinition() { - return SpServiceDefinitionBuilder.create("connect-adapter", - "StreamPipes Connect Worker Main", - "", 8001) -// .registerAdapter(new GdeltAdapter()) - .registerAdapter(new CoindeskBitcoinAdapter()) - .registerAdapter(new NetioRestAdapter()) - .registerAdapter(new NetioMQTTAdapter()) -// .registerAdapter(new IexCloudNewsAdapter()) -// .registerAdapter(new IexCloudStockAdapter()) - .registerAdapter(new SlackAdapter()) - .registerAdapter(new WikipediaEditedArticlesAdapter()) - .registerAdapter(new WikipediaNewArticlesAdapter()) - .registerAdapter(new ImageStreamAdapter()) - .registerAdapter(new IssAdapter()) - .registerAdapter(new FlicMQTTAdapter()) - .registerAdapter(new TISensorTag()) - .build(); + public List> pipelineElements() { + return Collections.emptyList(); } + @Override + public List> migrators() { + return Collections.emptyList(); + } } diff --git a/streampipes-extensions/streampipes-connectors-influx/pom.xml b/streampipes-extensions/streampipes-connectors-influx/pom.xml index eff4895e51..0da4d721bd 100644 --- a/streampipes-extensions/streampipes-connectors-influx/pom.xml +++ b/streampipes-extensions/streampipes-connectors-influx/pom.xml @@ -36,7 +36,7 @@ org.apache.streampipes - streampipes-sdk-bundle + streampipes-extensions-management 0.93.0-SNAPSHOT diff --git a/streampipes-extensions/streampipes-connectors-influx/src/main/java/org/apache/streampipes/extensions/connectors/influx/InfluxConnectorsInit.java b/streampipes-extensions/streampipes-connectors-influx/src/main/java/org/apache/streampipes/extensions/connectors/influx/InfluxConnectorsInit.java deleted file mode 100644 index dbe78b149b..0000000000 --- a/streampipes-extensions/streampipes-connectors-influx/src/main/java/org/apache/streampipes/extensions/connectors/influx/InfluxConnectorsInit.java +++ /dev/null @@ -1,62 +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.extensions.connectors.influx; - -import org.apache.streampipes.dataformat.cbor.CborDataFormatFactory; -import org.apache.streampipes.dataformat.fst.FstDataFormatFactory; -import org.apache.streampipes.dataformat.json.JsonDataFormatFactory; -import org.apache.streampipes.dataformat.smile.SmileDataFormatFactory; -import org.apache.streampipes.extensions.connectors.influx.adapter.InfluxDbStreamAdapter; -import org.apache.streampipes.extensions.connectors.influx.sink.InfluxDbSink; -import org.apache.streampipes.extensions.management.model.SpServiceDefinition; -import org.apache.streampipes.extensions.management.model.SpServiceDefinitionBuilder; -import org.apache.streampipes.messaging.jms.SpJmsProtocolFactory; -import org.apache.streampipes.messaging.kafka.SpKafkaProtocolFactory; -import org.apache.streampipes.messaging.mqtt.SpMqttProtocolFactory; -import org.apache.streampipes.messaging.nats.SpNatsProtocolFactory; -import org.apache.streampipes.service.extensions.ExtensionsModelSubmitter; - -public class InfluxConnectorsInit extends ExtensionsModelSubmitter { - - public static void main(String[] args) { - new InfluxConnectorsInit().init(); - } - - @Override - public SpServiceDefinition provideServiceDefinition() { - return SpServiceDefinitionBuilder.create("org.apache.streampipes.connectors.influx", - "Connectors for InfluxDB", - "", - 8090) - .registerPipelineElements( - new InfluxDbSink()) - .registerAdapter(new InfluxDbStreamAdapter()) - .registerMessagingFormats( - new JsonDataFormatFactory(), - new CborDataFormatFactory(), - new SmileDataFormatFactory(), - new FstDataFormatFactory()) - .registerMessagingProtocols( - new SpKafkaProtocolFactory(), - new SpJmsProtocolFactory(), - new SpMqttProtocolFactory(), - new SpNatsProtocolFactory()) - .build(); - } -} diff --git a/streampipes-extensions/streampipes-connectors-influx/src/main/java/org/apache/streampipes/extensions/connectors/influx/InfluxConnectorsModuleExport.java b/streampipes-extensions/streampipes-connectors-influx/src/main/java/org/apache/streampipes/extensions/connectors/influx/InfluxConnectorsModuleExport.java new file mode 100644 index 0000000000..a3c0457caf --- /dev/null +++ b/streampipes-extensions/streampipes-connectors-influx/src/main/java/org/apache/streampipes/extensions/connectors/influx/InfluxConnectorsModuleExport.java @@ -0,0 +1,47 @@ +/* + * 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.extensions.connectors.influx; + +import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter; +import org.apache.streampipes.extensions.api.declarer.IExtensionModuleExport; +import org.apache.streampipes.extensions.api.migration.IModelMigrator; +import org.apache.streampipes.extensions.api.pe.IStreamPipesPipelineElement; +import org.apache.streampipes.extensions.connectors.influx.adapter.InfluxDbStreamAdapter; +import org.apache.streampipes.extensions.connectors.influx.sink.InfluxDbSink; + +import java.util.Collections; +import java.util.List; + +public class InfluxConnectorsModuleExport implements IExtensionModuleExport { + + @Override + public List adapters() { + return List.of(new InfluxDbStreamAdapter()); + } + + @Override + public List> pipelineElements() { + return List.of(new InfluxDbSink()); + } + + @Override + public List> migrators() { + return Collections.emptyList(); + } +} diff --git a/streampipes-extensions/streampipes-connectors-kafka/src/main/java/org/apache/streampipes/extensions/connectors/kafka/KafkaConnectorsModuleExport.java b/streampipes-extensions/streampipes-connectors-kafka/src/main/java/org/apache/streampipes/extensions/connectors/kafka/KafkaConnectorsModuleExport.java new file mode 100644 index 0000000000..351bef6996 --- /dev/null +++ b/streampipes-extensions/streampipes-connectors-kafka/src/main/java/org/apache/streampipes/extensions/connectors/kafka/KafkaConnectorsModuleExport.java @@ -0,0 +1,50 @@ +/* + * 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.extensions.connectors.kafka; + +import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter; +import org.apache.streampipes.extensions.api.declarer.IExtensionModuleExport; +import org.apache.streampipes.extensions.api.migration.IModelMigrator; +import org.apache.streampipes.extensions.api.pe.IStreamPipesPipelineElement; +import org.apache.streampipes.extensions.connectors.kafka.adapter.KafkaProtocol; +import org.apache.streampipes.extensions.connectors.kafka.sink.KafkaPublishSink; + +import java.util.Collections; +import java.util.List; + +public class KafkaConnectorsModuleExport implements IExtensionModuleExport { + @Override + public List adapters() { + return List.of( + new KafkaProtocol() + ); + } + + @Override + public List> pipelineElements() { + return List.of( + new KafkaPublishSink() + ); + } + + @Override + public List> migrators() { + return Collections.emptyList(); + } +} diff --git a/streampipes-extensions/streampipes-connectors-mqtt/src/main/java/org/apache/streampipes/extensions/connectors/mqtt/MqttConnectorsModuleExport.java b/streampipes-extensions/streampipes-connectors-mqtt/src/main/java/org/apache/streampipes/extensions/connectors/mqtt/MqttConnectorsModuleExport.java new file mode 100644 index 0000000000..a1c72f0fdf --- /dev/null +++ b/streampipes-extensions/streampipes-connectors-mqtt/src/main/java/org/apache/streampipes/extensions/connectors/mqtt/MqttConnectorsModuleExport.java @@ -0,0 +1,50 @@ +/* + * 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.extensions.connectors.mqtt; + +import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter; +import org.apache.streampipes.extensions.api.declarer.IExtensionModuleExport; +import org.apache.streampipes.extensions.api.migration.IModelMigrator; +import org.apache.streampipes.extensions.api.pe.IStreamPipesPipelineElement; +import org.apache.streampipes.extensions.connectors.mqtt.adapter.MqttProtocol; +import org.apache.streampipes.extensions.connectors.mqtt.sink.MqttPublisherSink; + +import java.util.Collections; +import java.util.List; + +public class MqttConnectorsModuleExport implements IExtensionModuleExport { + @Override + public List adapters() { + return List.of( + new MqttProtocol() + ); + } + + @Override + public List> pipelineElements() { + return List.of( + new MqttPublisherSink() + ); + } + + @Override + public List> migrators() { + return Collections.emptyList(); + } +} diff --git a/streampipes-extensions/streampipes-connectors-nats/src/main/java/org/apache/streampipes/extensions/connectors/nats/NatsConnectorsModuleExport.java b/streampipes-extensions/streampipes-connectors-nats/src/main/java/org/apache/streampipes/extensions/connectors/nats/NatsConnectorsModuleExport.java new file mode 100644 index 0000000000..bfc4387925 --- /dev/null +++ b/streampipes-extensions/streampipes-connectors-nats/src/main/java/org/apache/streampipes/extensions/connectors/nats/NatsConnectorsModuleExport.java @@ -0,0 +1,50 @@ +/* + * 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.extensions.connectors.nats; + +import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter; +import org.apache.streampipes.extensions.api.declarer.IExtensionModuleExport; +import org.apache.streampipes.extensions.api.migration.IModelMigrator; +import org.apache.streampipes.extensions.api.pe.IStreamPipesPipelineElement; +import org.apache.streampipes.extensions.connectors.nats.adapter.NatsProtocol; +import org.apache.streampipes.extensions.connectors.nats.sink.NatsSink; + +import java.util.Collections; +import java.util.List; + +public class NatsConnectorsModuleExport implements IExtensionModuleExport { + @Override + public List adapters() { + return List.of( + new NatsProtocol() + ); + } + + @Override + public List> pipelineElements() { + return List.of( + new NatsSink() + ); + } + + @Override + public List> migrators() { + return Collections.emptyList(); + } +} diff --git a/streampipes-extensions/streampipes-connectors-opcua/src/main/java/org/apache/streampipes/extensions/connectors/opcua/OpcUaConnectorsModuleExport.java b/streampipes-extensions/streampipes-connectors-opcua/src/main/java/org/apache/streampipes/extensions/connectors/opcua/OpcUaConnectorsModuleExport.java new file mode 100644 index 0000000000..8967148f6c --- /dev/null +++ b/streampipes-extensions/streampipes-connectors-opcua/src/main/java/org/apache/streampipes/extensions/connectors/opcua/OpcUaConnectorsModuleExport.java @@ -0,0 +1,52 @@ +/* + * 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.extensions.connectors.opcua; + +import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter; +import org.apache.streampipes.extensions.api.declarer.IExtensionModuleExport; +import org.apache.streampipes.extensions.api.migration.IModelMigrator; +import org.apache.streampipes.extensions.api.pe.IStreamPipesPipelineElement; +import org.apache.streampipes.extensions.connectors.opcua.adapter.OpcUaAdapter; +import org.apache.streampipes.extensions.connectors.opcua.migration.OpcUaAdapterMigrationV1; +import org.apache.streampipes.extensions.connectors.opcua.sink.OpcUaSink; + +import java.util.List; + +public class OpcUaConnectorsModuleExport implements IExtensionModuleExport { + @Override + public List adapters() { + return List.of( + new OpcUaAdapter() + ); + } + + @Override + public List> pipelineElements() { + return List.of( + new OpcUaSink() + ); + } + + @Override + public List> migrators() { + return List.of( + new OpcUaAdapterMigrationV1() + ); + } +} diff --git a/streampipes-extensions/streampipes-connectors-plc/src/main/java/org/apache/streampipes/extensions/connectors/plc/PlcConnectorsModuleExport.java b/streampipes-extensions/streampipes-connectors-plc/src/main/java/org/apache/streampipes/extensions/connectors/plc/PlcConnectorsModuleExport.java new file mode 100644 index 0000000000..b632d9c5b5 --- /dev/null +++ b/streampipes-extensions/streampipes-connectors-plc/src/main/java/org/apache/streampipes/extensions/connectors/plc/PlcConnectorsModuleExport.java @@ -0,0 +1,52 @@ +/* + * 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.extensions.connectors.plc; + +import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter; +import org.apache.streampipes.extensions.api.declarer.IExtensionModuleExport; +import org.apache.streampipes.extensions.api.migration.IModelMigrator; +import org.apache.streampipes.extensions.api.pe.IStreamPipesPipelineElement; +import org.apache.streampipes.extensions.connectors.plc.adapter.migration.Plc4xS7AdapterMigrationV1; +import org.apache.streampipes.extensions.connectors.plc.adapter.modbus.Plc4xModbusAdapter; +import org.apache.streampipes.extensions.connectors.plc.adapter.s7.Plc4xS7Adapter; + +import java.util.Collections; +import java.util.List; + +public class PlcConnectorsModuleExport implements IExtensionModuleExport { + @Override + public List adapters() { + return List.of( + new Plc4xModbusAdapter(), + new Plc4xS7Adapter() + ); + } + + @Override + public List> pipelineElements() { + return Collections.emptyList(); + } + + @Override + public List> migrators() { + return List.of( + new Plc4xS7AdapterMigrationV1() + ); + } +} diff --git a/streampipes-extensions/streampipes-connectors-pulsar/src/main/java/org/apache/streampipes/extensions/connectors/pulsar/PulsarConnectorsModuleExport.java b/streampipes-extensions/streampipes-connectors-pulsar/src/main/java/org/apache/streampipes/extensions/connectors/pulsar/PulsarConnectorsModuleExport.java new file mode 100644 index 0000000000..62b435a846 --- /dev/null +++ b/streampipes-extensions/streampipes-connectors-pulsar/src/main/java/org/apache/streampipes/extensions/connectors/pulsar/PulsarConnectorsModuleExport.java @@ -0,0 +1,51 @@ +/* + * 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.extensions.connectors.pulsar; + +import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter; +import org.apache.streampipes.extensions.api.declarer.IExtensionModuleExport; +import org.apache.streampipes.extensions.api.migration.IModelMigrator; +import org.apache.streampipes.extensions.api.pe.IStreamPipesPipelineElement; +import org.apache.streampipes.extensions.connectors.pulsar.adapter.PulsarProtocol; +import org.apache.streampipes.extensions.connectors.pulsar.sink.PulsarPublisherSink; + +import java.util.Collections; +import java.util.List; + +public class PulsarConnectorsModuleExport implements IExtensionModuleExport { + + @Override + public List adapters() { + return List.of( + new PulsarProtocol() + ); + } + + @Override + public List> pipelineElements() { + return List.of( + new PulsarPublisherSink() + ); + } + + @Override + public List> migrators() { + return Collections.emptyList(); + } +} diff --git a/streampipes-extensions/streampipes-connectors-rocketmq/src/main/java/org/apache/streampipes/extensions/connectors/rocketmq/RocketMqConnectorsModuleExport.java b/streampipes-extensions/streampipes-connectors-rocketmq/src/main/java/org/apache/streampipes/extensions/connectors/rocketmq/RocketMqConnectorsModuleExport.java new file mode 100644 index 0000000000..c50e4c670d --- /dev/null +++ b/streampipes-extensions/streampipes-connectors-rocketmq/src/main/java/org/apache/streampipes/extensions/connectors/rocketmq/RocketMqConnectorsModuleExport.java @@ -0,0 +1,51 @@ +/* + * 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.extensions.connectors.rocketmq; + +import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter; +import org.apache.streampipes.extensions.api.declarer.IExtensionModuleExport; +import org.apache.streampipes.extensions.api.migration.IModelMigrator; +import org.apache.streampipes.extensions.api.pe.IStreamPipesPipelineElement; +import org.apache.streampipes.extensions.connectors.rocketmq.adapter.RocketMQProtocol; +import org.apache.streampipes.extensions.connectors.rocketmq.sink.RocketMQPublisherSink; + +import java.util.Collections; +import java.util.List; + +public class RocketMqConnectorsModuleExport implements IExtensionModuleExport { + + @Override + public List adapters() { + return List.of( + new RocketMQProtocol() + ); + } + + @Override + public List> pipelineElements() { + return List.of( + new RocketMQPublisherSink() + ); + } + + @Override + public List> migrators() { + return Collections.emptyList(); + } +} diff --git a/streampipes-extensions/streampipes-connectors-tubemq/src/main/java/org/apache/streampipes/extensions/connectors/tubemq/TubeMQConnectorsModuleExport.java b/streampipes-extensions/streampipes-connectors-tubemq/src/main/java/org/apache/streampipes/extensions/connectors/tubemq/TubeMQConnectorsModuleExport.java new file mode 100644 index 0000000000..c72f05b0bc --- /dev/null +++ b/streampipes-extensions/streampipes-connectors-tubemq/src/main/java/org/apache/streampipes/extensions/connectors/tubemq/TubeMQConnectorsModuleExport.java @@ -0,0 +1,51 @@ +/* + * 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.extensions.connectors.tubemq; + +import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter; +import org.apache.streampipes.extensions.api.declarer.IExtensionModuleExport; +import org.apache.streampipes.extensions.api.migration.IModelMigrator; +import org.apache.streampipes.extensions.api.pe.IStreamPipesPipelineElement; +import org.apache.streampipes.extensions.connectors.tubemq.adapter.TubeMQProtocol; +import org.apache.streampipes.extensions.connectors.tubemq.sink.TubeMQPublisherSink; + +import java.util.Collections; +import java.util.List; + +public class TubeMQConnectorsModuleExport implements IExtensionModuleExport { + + @Override + public List adapters() { + return List.of( + new TubeMQProtocol() + ); + } + + @Override + public List> pipelineElements() { + return List.of( + new TubeMQPublisherSink() + ); + } + + @Override + public List> migrators() { + return Collections.emptyList(); + } +} diff --git a/streampipes-extensions/streampipes-extensions-all-iiot/pom.xml b/streampipes-extensions/streampipes-extensions-all-iiot/pom.xml index b1caa7a5bf..0273b69795 100644 --- a/streampipes-extensions/streampipes-extensions-all-iiot/pom.xml +++ b/streampipes-extensions/streampipes-extensions-all-iiot/pom.xml @@ -61,6 +61,51 @@ streampipes-connectors-influx 0.93.0-SNAPSHOT + + org.apache.streampipes + streampipes-connectors-kafka + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-connectors-mqtt + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-connectors-nats + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-connectors-opcua + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-connectors-plc + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-connectors-pulsar + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-connectors-rocketmq + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-connectors-tubemq + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-messaging-mqtt + 0.93.0-SNAPSHOT + org.apache.streampipes streampipes-messaging-pulsar @@ -125,7 +170,6 @@ org.apache.streampipes streampipes-connect-adapters-iiot 0.93.0-SNAPSHOT - embed 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 38d6203f25..33336d4f3f 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 @@ -18,18 +18,20 @@ package org.apache.streampipes.extensions.all.iiot; -import org.apache.streampipes.connect.iiot.ConnectAdapterIiotInit; +import org.apache.streampipes.connect.iiot.IIoTAdaptersExtensionModuleExport; import org.apache.streampipes.dataformat.cbor.CborDataFormatFactory; import org.apache.streampipes.dataformat.fst.FstDataFormatFactory; import org.apache.streampipes.dataformat.json.JsonDataFormatFactory; import org.apache.streampipes.dataformat.smile.SmileDataFormatFactory; -import org.apache.streampipes.extensions.connectors.influx.InfluxConnectorsInit; -import org.apache.streampipes.extensions.connectors.kafka.sink.KafkaPublishSink; -import org.apache.streampipes.extensions.connectors.mqtt.sink.MqttPublisherSink; -import org.apache.streampipes.extensions.connectors.nats.sink.NatsSink; -import org.apache.streampipes.extensions.connectors.pulsar.sink.PulsarPublisherSink; -import org.apache.streampipes.extensions.connectors.rocketmq.sink.RocketMQPublisherSink; -import org.apache.streampipes.extensions.connectors.tubemq.sink.TubeMQPublisherSink; +import org.apache.streampipes.extensions.connectors.influx.InfluxConnectorsModuleExport; +import org.apache.streampipes.extensions.connectors.kafka.KafkaConnectorsModuleExport; +import org.apache.streampipes.extensions.connectors.mqtt.MqttConnectorsModuleExport; +import org.apache.streampipes.extensions.connectors.nats.NatsConnectorsModuleExport; +import org.apache.streampipes.extensions.connectors.opcua.OpcUaConnectorsModuleExport; +import org.apache.streampipes.extensions.connectors.plc.PlcConnectorsModuleExport; +import org.apache.streampipes.extensions.connectors.pulsar.PulsarConnectorsModuleExport; +import org.apache.streampipes.extensions.connectors.rocketmq.RocketMqConnectorsModuleExport; +import org.apache.streampipes.extensions.connectors.tubemq.TubeMQConnectorsModuleExport; import org.apache.streampipes.extensions.management.model.SpServiceDefinition; import org.apache.streampipes.extensions.management.model.SpServiceDefinitionBuilder; import org.apache.streampipes.messaging.jms.SpJmsProtocolFactory; @@ -37,16 +39,16 @@ 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.processors.changedetection.jvm.ChangeDetectionJvmInit; -import org.apache.streampipes.processors.enricher.jvm.EnricherJvmInit; -import org.apache.streampipes.processors.filters.jvm.FiltersJvmInit; -import org.apache.streampipes.processors.siddhi.FiltersSiddhiInit; -import org.apache.streampipes.processors.transformation.jvm.TransformationJvmInit; +import org.apache.streampipes.processors.changedetection.jvm.ChangeDetectionExtensionModuleExport; +import org.apache.streampipes.processors.enricher.jvm.EnricherExtensionModuleExport; +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.sinks.brokers.jvm.BrokersJvmInit; -import org.apache.streampipes.sinks.databases.jvm.DatabasesJvmInit; -import org.apache.streampipes.sinks.internal.jvm.SinksInternalJvmInit; -import org.apache.streampipes.sinks.notifications.jvm.SinksNotificationsJvmInit; +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 { @@ -60,24 +62,30 @@ public SpServiceDefinition provideServiceDefinition() { return SpServiceDefinitionBuilder.create("org.apache.streampipes.extensions.all.iiot", "StreamPipes Extensions (IIoT only)", "", 8090) - .merge(new ConnectAdapterIiotInit().provideServiceDefinition()) - .merge(new SinksInternalJvmInit().provideServiceDefinition()) - .merge(new FiltersJvmInit().provideServiceDefinition()) - .merge(new ChangeDetectionJvmInit().provideServiceDefinition()) - .merge(new EnricherJvmInit().provideServiceDefinition()) - .merge(new FiltersSiddhiInit().provideServiceDefinition()) - .merge(new TransformationJvmInit().provideServiceDefinition()) - .merge(new BrokersJvmInit().provideServiceDefinition()) - .merge(new DatabasesJvmInit().provideServiceDefinition()) - .merge(new SinksNotificationsJvmInit().provideServiceDefinition()) - .merge(new InfluxConnectorsInit().provideServiceDefinition()) - .registerPipelineElements( - new KafkaPublishSink(), - new MqttPublisherSink(), - new NatsSink(), - new PulsarPublisherSink(), - new RocketMQPublisherSink(), - new TubeMQPublisherSink()) + .registerModules( + new IIoTAdaptersExtensionModuleExport(), + + new InfluxConnectorsModuleExport(), + new KafkaConnectorsModuleExport(), + new MqttConnectorsModuleExport(), + new NatsConnectorsModuleExport(), + new OpcUaConnectorsModuleExport(), + new PlcConnectorsModuleExport(), + new PulsarConnectorsModuleExport(), + new RocketMqConnectorsModuleExport(), + new TubeMQConnectorsModuleExport(), + + new ChangeDetectionExtensionModuleExport(), + new EnricherExtensionModuleExport(), + new FilterExtensionModuleExport(), + new SiddhiFilterExtensionModuleExport(), + new FilterExtensionModuleExport(), + new TransformationExtensionModuleExport(), + new BrokerSinksExtensionModuleExport(), + new DatabaseSinksExtensionModuleExport(), + new InternalSinksExtensionModuleExports(), + new NotificationsExtensionModuleExport() + ) .registerRuntimeProvider(new StandaloneStreamPipesRuntimeProvider()) .registerMessagingFormats( new JsonDataFormatFactory(), diff --git a/streampipes-extensions/streampipes-extensions-all-jvm/pom.xml b/streampipes-extensions/streampipes-extensions-all-jvm/pom.xml index bfaa6dc034..bce8151af9 100644 --- a/streampipes-extensions/streampipes-extensions-all-jvm/pom.xml +++ b/streampipes-extensions/streampipes-extensions-all-jvm/pom.xml @@ -42,26 +42,135 @@ - + + org.apache.streampipes - streampipes-pipeline-elements-all-jvm + streampipes-connect-adapters + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-connect-adapters-iiot + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-connectors-influx + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-connectors-kafka + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-connectors-mqtt + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-connectors-nats + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-connectors-opcua + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-connectors-plc + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-connectors-pulsar + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-connectors-rocketmq + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-connectors-tubemq 0.93.0-SNAPSHOT - embed - org.apache.streampipes - streampipes-connect-adapters + streampipes-messaging-mqtt 0.93.0-SNAPSHOT - embed + org.apache.streampipes - streampipes-connect-adapters-iiot + streampipes-processors-filters-jvm + 0.93.0-SNAPSHOT + + + org.graalvm.nativeimage + svm + + + + + org.apache.streampipes + streampipes-processors-image-processing-jvm + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-processors-filters-siddhi + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-processors-text-mining-jvm + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-processors-transformation-jvm + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-sinks-brokers-jvm + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-sinks-databases-jvm + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-sinks-internal-jvm + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-sinks-notifications-jvm + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-processors-enricher-jvm + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-processors-geo-jvm + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-processors-change-detection-jvm 0.93.0-SNAPSHOT - embed 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 acf19d229c..20282a060f 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 @@ -17,17 +17,21 @@ */ package org.apache.streampipes.extensions.all.jvm; -import org.apache.streampipes.connect.iiot.ConnectAdapterIiotInit; +import org.apache.streampipes.connect.GeneralAdaptersExtensionModuleExport; +import org.apache.streampipes.connect.iiot.IIoTAdaptersExtensionModuleExport; import org.apache.streampipes.dataformat.cbor.CborDataFormatFactory; import org.apache.streampipes.dataformat.fst.FstDataFormatFactory; import org.apache.streampipes.dataformat.json.JsonDataFormatFactory; import org.apache.streampipes.dataformat.smile.SmileDataFormatFactory; -import org.apache.streampipes.extensions.connectors.kafka.sink.KafkaPublishSink; -import org.apache.streampipes.extensions.connectors.mqtt.sink.MqttPublisherSink; -import org.apache.streampipes.extensions.connectors.nats.sink.NatsSink; -import org.apache.streampipes.extensions.connectors.pulsar.sink.PulsarPublisherSink; -import org.apache.streampipes.extensions.connectors.rocketmq.sink.RocketMQPublisherSink; -import org.apache.streampipes.extensions.connectors.tubemq.sink.TubeMQPublisherSink; +import org.apache.streampipes.extensions.connectors.influx.InfluxConnectorsModuleExport; +import org.apache.streampipes.extensions.connectors.kafka.KafkaConnectorsModuleExport; +import org.apache.streampipes.extensions.connectors.mqtt.MqttConnectorsModuleExport; +import org.apache.streampipes.extensions.connectors.nats.NatsConnectorsModuleExport; +import org.apache.streampipes.extensions.connectors.opcua.OpcUaConnectorsModuleExport; +import org.apache.streampipes.extensions.connectors.plc.PlcConnectorsModuleExport; +import org.apache.streampipes.extensions.connectors.pulsar.PulsarConnectorsModuleExport; +import org.apache.streampipes.extensions.connectors.rocketmq.RocketMqConnectorsModuleExport; +import org.apache.streampipes.extensions.connectors.tubemq.TubeMQConnectorsModuleExport; import org.apache.streampipes.extensions.management.model.SpServiceDefinition; import org.apache.streampipes.extensions.management.model.SpServiceDefinitionBuilder; import org.apache.streampipes.messaging.jms.SpJmsProtocolFactory; @@ -35,8 +39,19 @@ 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.pe.jvm.AllPipelineElementsInit; +import org.apache.streampipes.processors.changedetection.jvm.ChangeDetectionExtensionModuleExport; +import org.apache.streampipes.processors.enricher.jvm.EnricherExtensionModuleExport; +import org.apache.streampipes.processors.filters.jvm.FilterExtensionModuleExport; +import org.apache.streampipes.processors.geo.jvm.GeoExtensionModuleExport; +import org.apache.streampipes.processors.imageprocessing.jvm.ImageProcessingExtensionModuleExport; +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.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; @@ -51,15 +66,34 @@ public SpServiceDefinition provideServiceDefinition() { return SpServiceDefinitionBuilder.create("org.apache.streampipes.extensions.all.jvm", "StreamPipes Extensions (JVM)", "", 8090) - .merge(new ConnectAdapterIiotInit().provideServiceDefinition()) - .merge(new AllPipelineElementsInit().provideServiceDefinition()) - .registerPipelineElements( - new KafkaPublishSink(), - new MqttPublisherSink(), - new NatsSink(), - new PulsarPublisherSink(), - new RocketMQPublisherSink(), - new TubeMQPublisherSink()) + .registerModules( + new GeneralAdaptersExtensionModuleExport(), + new IIoTAdaptersExtensionModuleExport(), + + new InfluxConnectorsModuleExport(), + new KafkaConnectorsModuleExport(), + new MqttConnectorsModuleExport(), + new NatsConnectorsModuleExport(), + new OpcUaConnectorsModuleExport(), + new PlcConnectorsModuleExport(), + new PulsarConnectorsModuleExport(), + new RocketMqConnectorsModuleExport(), + new TubeMQConnectorsModuleExport(), + + new ChangeDetectionExtensionModuleExport(), + new EnricherExtensionModuleExport(), + new FilterExtensionModuleExport(), + new SiddhiFilterExtensionModuleExport(), + new FilterExtensionModuleExport(), + new GeoExtensionModuleExport(), + new ImageProcessingExtensionModuleExport(), + new TextMiningExtensionModuleExport(), + new TransformationExtensionModuleExport(), + new BrokerSinksExtensionModuleExport(), + new DatabaseSinksExtensionModuleExport(), + new InternalSinksExtensionModuleExports(), + new NotificationsExtensionModuleExport() + ) .registerRuntimeProvider(new StandaloneStreamPipesRuntimeProvider()) .registerMessagingFormats( new JsonDataFormatFactory(), diff --git a/streampipes-extensions/streampipes-connect-adapters-iiot/Dockerfile b/streampipes-extensions/streampipes-extensions-iiot-minimal/Dockerfile similarity index 83% rename from streampipes-extensions/streampipes-connect-adapters-iiot/Dockerfile rename to streampipes-extensions/streampipes-extensions-iiot-minimal/Dockerfile index 5e5d471c98..93bc8f7f71 100644 --- a/streampipes-extensions/streampipes-connect-adapters-iiot/Dockerfile +++ b/streampipes-extensions/streampipes-extensions-iiot-minimal/Dockerfile @@ -15,6 +15,6 @@ FROM eclipse-temurin:17-jre-focal -COPY target/streampipes-connect-adapters-iiot.jar /streampipes-connect-adapters-iiot.jar +COPY target/streampipes-extensions-iiot-minimal.jar /streampipes-extensions-iiot-minimal.jar -ENTRYPOINT ["java", "-jar", "/streampipes-connect-adapters-iiot.jar"] +ENTRYPOINT ["java", "-jar", "/streampipes-extensions-iiot-minimal.jar"] diff --git a/streampipes-extensions/streampipes-pipeline-elements-all-jvm/pom.xml b/streampipes-extensions/streampipes-extensions-iiot-minimal/pom.xml similarity index 72% rename from streampipes-extensions/streampipes-pipeline-elements-all-jvm/pom.xml rename to streampipes-extensions/streampipes-extensions-iiot-minimal/pom.xml index 66f0d7d74a..6fdd279540 100644 --- a/streampipes-extensions/streampipes-pipeline-elements-all-jvm/pom.xml +++ b/streampipes-extensions/streampipes-extensions-iiot-minimal/pom.xml @@ -17,31 +17,23 @@ ~ --> - + + 4.0.0 - streampipes-extensions org.apache.streampipes + streampipes-extensions 0.93.0-SNAPSHOT - 4.0.0 - streampipes-pipeline-elements-all-jvm - - - true - + streampipes-extensions-iiot-minimal org.apache.streampipes - streampipes-processors-filters-jvm + streampipes-connect-adapters-iiot 0.93.0-SNAPSHOT - - - org.graalvm.nativeimage - svm - - org.apache.streampipes @@ -50,17 +42,39 @@ org.apache.streampipes - streampipes-processors-image-processing-jvm + streampipes-connectors-mqtt 0.93.0-SNAPSHOT org.apache.streampipes - streampipes-processors-filters-siddhi + streampipes-connectors-nats + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-connectors-opcua + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-connectors-plc 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-processors-filters-jvm + 0.93.0-SNAPSHOT + + + org.graalvm.nativeimage + svm + + + org.apache.streampipes - streampipes-processors-text-mining-jvm + streampipes-processors-filters-siddhi 0.93.0-SNAPSHOT @@ -93,29 +107,26 @@ streampipes-processors-enricher-jvm 0.93.0-SNAPSHOT - - org.apache.streampipes - streampipes-processors-geo-jvm - 0.93.0-SNAPSHOT - org.apache.streampipes streampipes-processors-change-detection-jvm 0.93.0-SNAPSHOT - - io.dropwizard.metrics - metrics-core + org.apache.streampipes + streampipes-extensions-management + 0.93.0-SNAPSHOT - io.netty - netty-handler + org.apache.streampipes + streampipes-service-extensions + 0.93.0-SNAPSHOT - org.atteo.classindex - classindex + org.apache.streampipes + streampipes-wrapper-standalone + 0.93.0-SNAPSHOT @@ -126,25 +137,10 @@ maven-checkstyle-plugin - checkstyle.config.base.path=${project.parent.parent.basedir}/tools/maven - + checkstyle.config.base.path=${project.parent.parent.basedir}/tools/maven + - - org.apache.maven.plugins - maven-jar-plugin - - - - jar - - package - - embed - - - - org.springframework.boot spring-boot-maven-plugin @@ -154,12 +150,13 @@ repackage - org.apache.streampipes.pe.jvm.AllPipelineElementsInit + org.apache.streampipes.extensions.iiot.minimal.ExtensionsIIoTMinimalInit - streampipes-processors-all-jvm + streampipes-extensions-iiot-minimal + 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 new file mode 100644 index 0000000000..5861455e3f --- /dev/null +++ b/streampipes-extensions/streampipes-extensions-iiot-minimal/src/main/java/org/apache/streampipes/extensions/iiot/minimal/ExtensionsIIoTMinimalInit.java @@ -0,0 +1,86 @@ +/* + * 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.extensions.iiot.minimal; + +import org.apache.streampipes.connect.iiot.IIoTAdaptersExtensionModuleExport; +import org.apache.streampipes.dataformat.cbor.CborDataFormatFactory; +import org.apache.streampipes.dataformat.fst.FstDataFormatFactory; +import org.apache.streampipes.dataformat.json.JsonDataFormatFactory; +import org.apache.streampipes.dataformat.smile.SmileDataFormatFactory; +import org.apache.streampipes.extensions.connectors.influx.InfluxConnectorsModuleExport; +import org.apache.streampipes.extensions.connectors.mqtt.MqttConnectorsModuleExport; +import org.apache.streampipes.extensions.connectors.nats.NatsConnectorsModuleExport; +import org.apache.streampipes.extensions.connectors.opcua.OpcUaConnectorsModuleExport; +import org.apache.streampipes.extensions.connectors.plc.PlcConnectorsModuleExport; +import org.apache.streampipes.extensions.management.model.SpServiceDefinition; +import org.apache.streampipes.extensions.management.model.SpServiceDefinitionBuilder; +import org.apache.streampipes.messaging.nats.SpNatsProtocolFactory; +import org.apache.streampipes.processors.changedetection.jvm.ChangeDetectionExtensionModuleExport; +import org.apache.streampipes.processors.enricher.jvm.EnricherExtensionModuleExport; +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.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 static void main(String[] args) { + new ExtensionsIIoTMinimalInit().init(); + } + + @Override + public SpServiceDefinition provideServiceDefinition() { + return SpServiceDefinitionBuilder.create("org.apache.streampipes.extensions.iiot.minimal", + "StreamPipes Extensions (Minimal extensions for edge deployments)", + "", 8090) + .registerModules( + new IIoTAdaptersExtensionModuleExport(), + new InfluxConnectorsModuleExport(), + new MqttConnectorsModuleExport(), + new NatsConnectorsModuleExport(), + new OpcUaConnectorsModuleExport(), + new PlcConnectorsModuleExport(), + + new ChangeDetectionExtensionModuleExport(), + new EnricherExtensionModuleExport(), + new FilterExtensionModuleExport(), + new SiddhiFilterExtensionModuleExport(), + new FilterExtensionModuleExport(), + new TransformationExtensionModuleExport(), + new BrokerSinksExtensionModuleExport(), + new DatabaseSinksExtensionModuleExport(), + new InternalSinksExtensionModuleExports(), + new NotificationsExtensionModuleExport()) + .registerRuntimeProvider(new StandaloneStreamPipesRuntimeProvider()) + .registerMessagingFormats( + new JsonDataFormatFactory(), + new CborDataFormatFactory(), + new SmileDataFormatFactory(), + new FstDataFormatFactory()) + .registerMessagingProtocols( + new SpNatsProtocolFactory() + ) + .build(); + } +} diff --git a/streampipes-extensions/streampipes-pipeline-elements-all-jvm/Dockerfile b/streampipes-extensions/streampipes-pipeline-elements-all-jvm/Dockerfile deleted file mode 100644 index f3c7add02b..0000000000 --- a/streampipes-extensions/streampipes-pipeline-elements-all-jvm/Dockerfile +++ /dev/null @@ -1,23 +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. - -FROM eclipse-temurin:17-jre-focal - -# needed pkgs processors-image-processing-jvm -RUN apt-get update && apt-get install ttf-dejavu-core && apt-get install fontconfig - -COPY target/streampipes-processors-all-jvm.jar /streampipes-processing-element-container.jar - -ENTRYPOINT ["java", "-jar", "/streampipes-processing-element-container.jar"] diff --git a/streampipes-extensions/streampipes-pipeline-elements-all-jvm/development/env b/streampipes-extensions/streampipes-pipeline-elements-all-jvm/development/env deleted file mode 100644 index 03f0413a28..0000000000 --- a/streampipes-extensions/streampipes-pipeline-elements-all-jvm/development/env +++ /dev/null @@ -1,26 +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. - -# Those parameters are used by IntelliJ to set the default consul parameters for development -SP_PORT=7023 -#SP_HOST=host.docker.internal -SP_DEBUG=true -SP_COUCHDB_HOST=localhost -SP_JMS_HOST=localhost -SP_JMS_PORT=61616 -SP_DATA_LAKE_HOST=localhost -SP_DATA_LAKE_PORT=8086 -SP_BACKEND_HOST=localhost -SP_BACKEND_PORT=8030 diff --git a/streampipes-extensions/streampipes-pipeline-elements-all-jvm/src/main/java/org/apache/streampipes/pe/jvm/AllPipelineElementsInit.java b/streampipes-extensions/streampipes-pipeline-elements-all-jvm/src/main/java/org/apache/streampipes/pe/jvm/AllPipelineElementsInit.java deleted file mode 100644 index d524468c72..0000000000 --- a/streampipes-extensions/streampipes-pipeline-elements-all-jvm/src/main/java/org/apache/streampipes/pe/jvm/AllPipelineElementsInit.java +++ /dev/null @@ -1,84 +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.pe.jvm; - -import org.apache.streampipes.dataformat.cbor.CborDataFormatFactory; -import org.apache.streampipes.dataformat.fst.FstDataFormatFactory; -import org.apache.streampipes.dataformat.json.JsonDataFormatFactory; -import org.apache.streampipes.dataformat.smile.SmileDataFormatFactory; -import org.apache.streampipes.extensions.connectors.influx.InfluxConnectorsInit; -import org.apache.streampipes.extensions.management.model.SpServiceDefinition; -import org.apache.streampipes.extensions.management.model.SpServiceDefinitionBuilder; -import org.apache.streampipes.messaging.jms.SpJmsProtocolFactory; -import org.apache.streampipes.messaging.kafka.SpKafkaProtocolFactory; -import org.apache.streampipes.messaging.mqtt.SpMqttProtocolFactory; -import org.apache.streampipes.messaging.nats.SpNatsProtocolFactory; -import org.apache.streampipes.processors.changedetection.jvm.ChangeDetectionJvmInit; -import org.apache.streampipes.processors.enricher.jvm.EnricherJvmInit; -import org.apache.streampipes.processors.filters.jvm.FiltersJvmInit; -import org.apache.streampipes.processors.geo.jvm.GeoJvmInit; -import org.apache.streampipes.processors.imageprocessing.jvm.ImageProcessingJvmInit; -import org.apache.streampipes.processors.siddhi.FiltersSiddhiInit; -import org.apache.streampipes.processors.textmining.jvm.TextMiningJvmInit; -import org.apache.streampipes.processors.transformation.jvm.TransformationJvmInit; -import org.apache.streampipes.service.extensions.ExtensionsModelSubmitter; -import org.apache.streampipes.sinks.brokers.jvm.BrokersJvmInit; -import org.apache.streampipes.sinks.databases.jvm.DatabasesJvmInit; -import org.apache.streampipes.sinks.internal.jvm.SinksInternalJvmInit; -import org.apache.streampipes.sinks.notifications.jvm.SinksNotificationsJvmInit; -import org.apache.streampipes.wrapper.standalone.runtime.StandaloneStreamPipesRuntimeProvider; - -public class AllPipelineElementsInit extends ExtensionsModelSubmitter { - - public static void main(String[] args) { - new AllPipelineElementsInit().init(); - } - - @Override - public SpServiceDefinition provideServiceDefinition() { - return SpServiceDefinitionBuilder.create("org-apache-streampipes-pe-all-jvm", - "StreamPipes Bundled Pipeline Elements for JVM Wrapper", - "", - 8090) - .registerRuntimeProvider(new StandaloneStreamPipesRuntimeProvider()) - .merge(new SinksInternalJvmInit().provideServiceDefinition()) - .merge(new FiltersJvmInit().provideServiceDefinition()) - .merge(new ChangeDetectionJvmInit().provideServiceDefinition()) - .merge(new EnricherJvmInit().provideServiceDefinition()) - .merge(new FiltersSiddhiInit().provideServiceDefinition()) - .merge(new GeoJvmInit().provideServiceDefinition()) - .merge(new ImageProcessingJvmInit().provideServiceDefinition()) - .merge(new TextMiningJvmInit().provideServiceDefinition()) - .merge(new TransformationJvmInit().provideServiceDefinition()) - .merge(new BrokersJvmInit().provideServiceDefinition()) - .merge(new DatabasesJvmInit().provideServiceDefinition()) - .merge(new SinksNotificationsJvmInit().provideServiceDefinition()) - .merge(new InfluxConnectorsInit().provideServiceDefinition()) - .registerMessagingFormats( - new JsonDataFormatFactory(), - new CborDataFormatFactory(), - new SmileDataFormatFactory(), - new FstDataFormatFactory()) - .registerMessagingProtocols( - new SpKafkaProtocolFactory(), - new SpJmsProtocolFactory(), - new SpMqttProtocolFactory(), - new SpNatsProtocolFactory()) - .build(); - } -} diff --git a/streampipes-extensions/streampipes-processors-change-detection-jvm/pom.xml b/streampipes-extensions/streampipes-processors-change-detection-jvm/pom.xml index b68156ba72..f0e451bca1 100644 --- a/streampipes-extensions/streampipes-processors-change-detection-jvm/pom.xml +++ b/streampipes-extensions/streampipes-processors-change-detection-jvm/pom.xml @@ -31,7 +31,7 @@ org.apache.streampipes - streampipes-sdk-bundle + streampipes-extensions-management 0.93.0-SNAPSHOT diff --git a/streampipes-extensions/streampipes-processors-change-detection-jvm/src/main/java/org/apache/streampipes/processors/changedetection/jvm/ChangeDetectionExtensionModuleExport.java b/streampipes-extensions/streampipes-processors-change-detection-jvm/src/main/java/org/apache/streampipes/processors/changedetection/jvm/ChangeDetectionExtensionModuleExport.java new file mode 100644 index 0000000000..2d724c5f96 --- /dev/null +++ b/streampipes-extensions/streampipes-processors-change-detection-jvm/src/main/java/org/apache/streampipes/processors/changedetection/jvm/ChangeDetectionExtensionModuleExport.java @@ -0,0 +1,48 @@ +/* + * 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.processors.changedetection.jvm; + +import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter; +import org.apache.streampipes.extensions.api.declarer.IExtensionModuleExport; +import org.apache.streampipes.extensions.api.migration.IModelMigrator; +import org.apache.streampipes.extensions.api.pe.IStreamPipesPipelineElement; +import org.apache.streampipes.processors.changedetection.jvm.welford.WelfordChangeDetection; + +import java.util.Collections; +import java.util.List; + +public class ChangeDetectionExtensionModuleExport implements IExtensionModuleExport { + + @Override + public List adapters() { + return Collections.emptyList(); + } + + @Override + public List> pipelineElements() { + return List.of( + new WelfordChangeDetection() + ); + } + + @Override + public List> migrators() { + return Collections.emptyList(); + } +} diff --git a/streampipes-extensions/streampipes-processors-change-detection-jvm/src/main/java/org/apache/streampipes/processors/changedetection/jvm/ChangeDetectionJvmInit.java b/streampipes-extensions/streampipes-processors-change-detection-jvm/src/main/java/org/apache/streampipes/processors/changedetection/jvm/ChangeDetectionJvmInit.java deleted file mode 100644 index aa90a6943a..0000000000 --- a/streampipes-extensions/streampipes-processors-change-detection-jvm/src/main/java/org/apache/streampipes/processors/changedetection/jvm/ChangeDetectionJvmInit.java +++ /dev/null @@ -1,62 +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.processors.changedetection.jvm; - - -import org.apache.streampipes.dataformat.cbor.CborDataFormatFactory; -import org.apache.streampipes.dataformat.fst.FstDataFormatFactory; -import org.apache.streampipes.dataformat.json.JsonDataFormatFactory; -import org.apache.streampipes.dataformat.smile.SmileDataFormatFactory; -import org.apache.streampipes.extensions.management.model.SpServiceDefinition; -import org.apache.streampipes.extensions.management.model.SpServiceDefinitionBuilder; -import org.apache.streampipes.messaging.jms.SpJmsProtocolFactory; -import org.apache.streampipes.messaging.kafka.SpKafkaProtocolFactory; -import org.apache.streampipes.messaging.mqtt.SpMqttProtocolFactory; -import org.apache.streampipes.messaging.nats.SpNatsProtocolFactory; -import org.apache.streampipes.processors.changedetection.jvm.welford.WelfordChangeDetection; -import org.apache.streampipes.service.extensions.ExtensionsModelSubmitter; - -public class ChangeDetectionJvmInit extends ExtensionsModelSubmitter { - - public static void main(String[] args) { - new ChangeDetectionJvmInit().init(); - } - - @Override - public SpServiceDefinition provideServiceDefinition() { - return SpServiceDefinitionBuilder.create("org.apache.streampipes.processors.changedetection.jvm", - "Processors Change Detection JVM", - "", - 8090) - .registerPipelineElements( - new WelfordChangeDetection() - ) - .registerMessagingFormats( - new JsonDataFormatFactory(), - new CborDataFormatFactory(), - new SmileDataFormatFactory(), - new FstDataFormatFactory()) - .registerMessagingProtocols( - new SpKafkaProtocolFactory(), - new SpJmsProtocolFactory(), - new SpMqttProtocolFactory(), - new SpNatsProtocolFactory()) - .build(); - } -} diff --git a/streampipes-extensions/streampipes-processors-enricher-jvm/pom.xml b/streampipes-extensions/streampipes-processors-enricher-jvm/pom.xml index 40fc564aae..399c73ecd3 100644 --- a/streampipes-extensions/streampipes-processors-enricher-jvm/pom.xml +++ b/streampipes-extensions/streampipes-processors-enricher-jvm/pom.xml @@ -34,7 +34,7 @@ org.apache.streampipes - streampipes-sdk-bundle + streampipes-extensions-api 0.93.0-SNAPSHOT diff --git a/streampipes-extensions/streampipes-processors-enricher-jvm/src/main/java/org/apache/streampipes/processors/enricher/jvm/EnricherExtensionModuleExport.java b/streampipes-extensions/streampipes-processors-enricher-jvm/src/main/java/org/apache/streampipes/processors/enricher/jvm/EnricherExtensionModuleExport.java new file mode 100644 index 0000000000..1839197eb5 --- /dev/null +++ b/streampipes-extensions/streampipes-processors-enricher-jvm/src/main/java/org/apache/streampipes/processors/enricher/jvm/EnricherExtensionModuleExport.java @@ -0,0 +1,55 @@ +/* + * 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.processors.enricher.jvm; + +import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter; +import org.apache.streampipes.extensions.api.declarer.IExtensionModuleExport; +import org.apache.streampipes.extensions.api.migration.IModelMigrator; +import org.apache.streampipes.extensions.api.pe.IStreamPipesPipelineElement; +import org.apache.streampipes.processors.enricher.jvm.processor.jseval.JSEvalProcessor; +import org.apache.streampipes.processors.enricher.jvm.processor.math.MathOpProcessor; +import org.apache.streampipes.processors.enricher.jvm.processor.math.staticmathop.StaticMathOpProcessor; +import org.apache.streampipes.processors.enricher.jvm.processor.trigonometry.TrigonometryProcessor; +import org.apache.streampipes.processors.enricher.jvm.processor.valuechange.ValueChangeProcessor; + +import java.util.Collections; +import java.util.List; + +public class EnricherExtensionModuleExport implements IExtensionModuleExport { + @Override + public List adapters() { + return Collections.emptyList(); + } + + @Override + public List> pipelineElements() { + return List.of( + new JSEvalProcessor(), + new MathOpProcessor(), + new StaticMathOpProcessor(), + new TrigonometryProcessor(), + new ValueChangeProcessor() + ); + } + + @Override + public List> migrators() { + return Collections.emptyList(); + } +} diff --git a/streampipes-extensions/streampipes-processors-enricher-jvm/src/main/java/org/apache/streampipes/processors/enricher/jvm/EnricherJvmInit.java b/streampipes-extensions/streampipes-processors-enricher-jvm/src/main/java/org/apache/streampipes/processors/enricher/jvm/EnricherJvmInit.java deleted file mode 100644 index fa48a77fc0..0000000000 --- a/streampipes-extensions/streampipes-processors-enricher-jvm/src/main/java/org/apache/streampipes/processors/enricher/jvm/EnricherJvmInit.java +++ /dev/null @@ -1,69 +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.processors.enricher.jvm; - -import org.apache.streampipes.dataformat.cbor.CborDataFormatFactory; -import org.apache.streampipes.dataformat.fst.FstDataFormatFactory; -import org.apache.streampipes.dataformat.json.JsonDataFormatFactory; -import org.apache.streampipes.dataformat.smile.SmileDataFormatFactory; -import org.apache.streampipes.extensions.management.model.SpServiceDefinition; -import org.apache.streampipes.extensions.management.model.SpServiceDefinitionBuilder; -import org.apache.streampipes.messaging.jms.SpJmsProtocolFactory; -import org.apache.streampipes.messaging.kafka.SpKafkaProtocolFactory; -import org.apache.streampipes.messaging.mqtt.SpMqttProtocolFactory; -import org.apache.streampipes.messaging.nats.SpNatsProtocolFactory; -import org.apache.streampipes.processors.enricher.jvm.processor.jseval.JSEvalProcessor; -import org.apache.streampipes.processors.enricher.jvm.processor.math.MathOpProcessor; -import org.apache.streampipes.processors.enricher.jvm.processor.math.staticmathop.StaticMathOpProcessor; -import org.apache.streampipes.processors.enricher.jvm.processor.sizemeasure.SizeMeasureProcessor; -import org.apache.streampipes.processors.enricher.jvm.processor.trigonometry.TrigonometryProcessor; -import org.apache.streampipes.processors.enricher.jvm.processor.valuechange.ValueChangeProcessor; -import org.apache.streampipes.service.extensions.ExtensionsModelSubmitter; - -public class EnricherJvmInit extends ExtensionsModelSubmitter { - - public static void main(String[] args) { - new EnricherJvmInit().init(); - } - - @Override - public SpServiceDefinition provideServiceDefinition() { - return SpServiceDefinitionBuilder.create("org.apache.streampipes.processors.enricher.jvm", - "Processors Enricher JVM", - "", - 8090) - .registerPipelineElements(new SizeMeasureProcessor(), - new JSEvalProcessor(), - new MathOpProcessor(), - new StaticMathOpProcessor(), - new TrigonometryProcessor(), - new ValueChangeProcessor()) - .registerMessagingFormats( - new JsonDataFormatFactory(), - new CborDataFormatFactory(), - new SmileDataFormatFactory(), - new FstDataFormatFactory()) - .registerMessagingProtocols( - new SpKafkaProtocolFactory(), - new SpJmsProtocolFactory(), - new SpMqttProtocolFactory(), - new SpNatsProtocolFactory()) - .build(); - } -} diff --git a/streampipes-extensions/streampipes-processors-filters-jvm/pom.xml b/streampipes-extensions/streampipes-processors-filters-jvm/pom.xml index 09dc0887bf..6cb7753e72 100644 --- a/streampipes-extensions/streampipes-processors-filters-jvm/pom.xml +++ b/streampipes-extensions/streampipes-processors-filters-jvm/pom.xml @@ -31,7 +31,7 @@ org.apache.streampipes - streampipes-sdk-bundle + streampipes-extensions-management 0.93.0-SNAPSHOT diff --git a/streampipes-extensions/streampipes-processors-filters-jvm/src/main/java/org/apache/streampipes/processors/filters/jvm/FiltersJvmInit.java b/streampipes-extensions/streampipes-processors-filters-jvm/src/main/java/org/apache/streampipes/processors/filters/jvm/FilterExtensionModuleExport.java similarity index 50% rename from streampipes-extensions/streampipes-processors-filters-jvm/src/main/java/org/apache/streampipes/processors/filters/jvm/FiltersJvmInit.java rename to streampipes-extensions/streampipes-processors-filters-jvm/src/main/java/org/apache/streampipes/processors/filters/jvm/FilterExtensionModuleExport.java index c88ca5ac38..6f61014fc5 100644 --- a/streampipes-extensions/streampipes-processors-filters-jvm/src/main/java/org/apache/streampipes/processors/filters/jvm/FiltersJvmInit.java +++ b/streampipes-extensions/streampipes-processors-filters-jvm/src/main/java/org/apache/streampipes/processors/filters/jvm/FilterExtensionModuleExport.java @@ -18,16 +18,10 @@ package org.apache.streampipes.processors.filters.jvm; -import org.apache.streampipes.dataformat.cbor.CborDataFormatFactory; -import org.apache.streampipes.dataformat.fst.FstDataFormatFactory; -import org.apache.streampipes.dataformat.json.JsonDataFormatFactory; -import org.apache.streampipes.dataformat.smile.SmileDataFormatFactory; -import org.apache.streampipes.extensions.management.model.SpServiceDefinition; -import org.apache.streampipes.extensions.management.model.SpServiceDefinitionBuilder; -import org.apache.streampipes.messaging.jms.SpJmsProtocolFactory; -import org.apache.streampipes.messaging.kafka.SpKafkaProtocolFactory; -import org.apache.streampipes.messaging.mqtt.SpMqttProtocolFactory; -import org.apache.streampipes.messaging.nats.SpNatsProtocolFactory; +import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter; +import org.apache.streampipes.extensions.api.declarer.IExtensionModuleExport; +import org.apache.streampipes.extensions.api.migration.IModelMigrator; +import org.apache.streampipes.extensions.api.pe.IStreamPipesPipelineElement; import org.apache.streampipes.processors.filters.jvm.processor.booleanfilter.BooleanFilterProcessor; import org.apache.streampipes.processors.filters.jvm.processor.compose.ComposeProcessor; import org.apache.streampipes.processors.filters.jvm.processor.enrich.MergeByEnrichProcessor; @@ -42,45 +36,38 @@ import org.apache.streampipes.processors.filters.jvm.processor.textfilter.TextFilterProcessor; import org.apache.streampipes.processors.filters.jvm.processor.threshold.ThresholdDetectionProcessor; import org.apache.streampipes.processors.filters.jvm.processor.throughputmon.ThroughputMonitorProcessor; -import org.apache.streampipes.service.extensions.ExtensionsModelSubmitter; -public class FiltersJvmInit extends ExtensionsModelSubmitter { +import java.util.Collections; +import java.util.List; - public static void main(String[] args) { - new FiltersJvmInit().init(); +public class FilterExtensionModuleExport implements IExtensionModuleExport { + @Override + public List adapters() { + return Collections.emptyList(); + } + + @Override + public List> pipelineElements() { + return List.of( + new BooleanFilterProcessor(), + new TextFilterProcessor(), + new NumericalFilterProcessor(), + new ThresholdDetectionProcessor(), + new ThroughputMonitorProcessor(), + new ProjectionProcessor(), + new MergeByEnrichProcessor(), + new MergeByTimeProcessor(), + new MergeBySchemaProcessor(), + new ComposeProcessor(), + new NumericalTextFilterProcessor(), + new RateLimitProcessor(), + new MovingAverageProcessor(), + new SwingingDoorTrendingFilterProcessor() + ); } @Override - public SpServiceDefinition provideServiceDefinition() { - return SpServiceDefinitionBuilder.create("org.apache.streampipes.processors.filters.jvm", - "StreamPipes Processors Filters (JVM)", - "", - 8090) - .registerPipelineElements( - new BooleanFilterProcessor(), - new TextFilterProcessor(), - new NumericalFilterProcessor(), - new ThresholdDetectionProcessor(), - new ThroughputMonitorProcessor(), - new ProjectionProcessor(), - new MergeByEnrichProcessor(), - new MergeByTimeProcessor(), - new MergeBySchemaProcessor(), - new ComposeProcessor(), - new NumericalTextFilterProcessor(), - new RateLimitProcessor(), - new MovingAverageProcessor(), - new SwingingDoorTrendingFilterProcessor()) - .registerMessagingFormats( - new JsonDataFormatFactory(), - new CborDataFormatFactory(), - new SmileDataFormatFactory(), - new FstDataFormatFactory()) - .registerMessagingProtocols( - new SpKafkaProtocolFactory(), - new SpJmsProtocolFactory(), - new SpMqttProtocolFactory(), - new SpNatsProtocolFactory()) - .build(); + public List> migrators() { + return Collections.emptyList(); } } diff --git a/streampipes-extensions/streampipes-processors-filters-siddhi/pom.xml b/streampipes-extensions/streampipes-processors-filters-siddhi/pom.xml index aa2fce447d..6de3a356f5 100644 --- a/streampipes-extensions/streampipes-processors-filters-siddhi/pom.xml +++ b/streampipes-extensions/streampipes-processors-filters-siddhi/pom.xml @@ -31,7 +31,7 @@ org.apache.streampipes - streampipes-sdk-bundle + streampipes-extensions-management 0.93.0-SNAPSHOT diff --git a/streampipes-extensions/streampipes-processors-filters-siddhi/src/main/java/org/apache/streampipes/processors/siddhi/FiltersSiddhiInit.java b/streampipes-extensions/streampipes-processors-filters-siddhi/src/main/java/org/apache/streampipes/processors/siddhi/FiltersSiddhiInit.java deleted file mode 100644 index d7099f379d..0000000000 --- a/streampipes-extensions/streampipes-processors-filters-siddhi/src/main/java/org/apache/streampipes/processors/siddhi/FiltersSiddhiInit.java +++ /dev/null @@ -1,71 +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.processors.siddhi; - -import org.apache.streampipes.dataformat.cbor.CborDataFormatFactory; -import org.apache.streampipes.dataformat.fst.FstDataFormatFactory; -import org.apache.streampipes.dataformat.json.JsonDataFormatFactory; -import org.apache.streampipes.dataformat.smile.SmileDataFormatFactory; -import org.apache.streampipes.extensions.management.model.SpServiceDefinition; -import org.apache.streampipes.extensions.management.model.SpServiceDefinitionBuilder; -import org.apache.streampipes.messaging.jms.SpJmsProtocolFactory; -import org.apache.streampipes.messaging.kafka.SpKafkaProtocolFactory; -import org.apache.streampipes.messaging.mqtt.SpMqttProtocolFactory; -import org.apache.streampipes.messaging.nats.SpNatsProtocolFactory; -import org.apache.streampipes.processors.siddhi.count.CountAggregation; -import org.apache.streampipes.processors.siddhi.filter.NumericalFilterSiddhiProcessor; -import org.apache.streampipes.processors.siddhi.listcollector.ListCollector; -import org.apache.streampipes.processors.siddhi.listfilter.ListFilter; -import org.apache.streampipes.processors.siddhi.topk.TopK; -import org.apache.streampipes.processors.siddhi.trend.TrendProcessor; -import org.apache.streampipes.service.extensions.ExtensionsModelSubmitter; - -public class FiltersSiddhiInit extends ExtensionsModelSubmitter { - - public static void main(String[] args) { - new FiltersSiddhiInit().init(); - } - - @Override - public SpServiceDefinition provideServiceDefinition() { - return SpServiceDefinitionBuilder.create("org.apache.streampipes.processors.filters.siddhi", - "Processors Filters Siddhi", - "", - 8090) - .registerPipelineElements( - new TrendProcessor(), - new NumericalFilterSiddhiProcessor(), - new ListFilter(), - new ListCollector(), - new CountAggregation(), - new TopK()) - // Currently not working: StreamStopSiddhiProcessor, FrequencyChangeSiddhiProcessor, FrequencySiddhiProcessor - .registerMessagingFormats( - new JsonDataFormatFactory(), - new CborDataFormatFactory(), - new SmileDataFormatFactory(), - new FstDataFormatFactory()) - .registerMessagingProtocols( - new SpKafkaProtocolFactory(), - new SpJmsProtocolFactory(), - new SpMqttProtocolFactory(), - new SpNatsProtocolFactory()) - .build(); - } -} diff --git a/streampipes-extensions/streampipes-processors-filters-siddhi/src/main/java/org/apache/streampipes/processors/siddhi/SiddhiFilterExtensionModuleExport.java b/streampipes-extensions/streampipes-processors-filters-siddhi/src/main/java/org/apache/streampipes/processors/siddhi/SiddhiFilterExtensionModuleExport.java new file mode 100644 index 0000000000..a9935b1e27 --- /dev/null +++ b/streampipes-extensions/streampipes-processors-filters-siddhi/src/main/java/org/apache/streampipes/processors/siddhi/SiddhiFilterExtensionModuleExport.java @@ -0,0 +1,57 @@ +/* + * 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.processors.siddhi; + +import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter; +import org.apache.streampipes.extensions.api.declarer.IExtensionModuleExport; +import org.apache.streampipes.extensions.api.migration.IModelMigrator; +import org.apache.streampipes.extensions.api.pe.IStreamPipesPipelineElement; +import org.apache.streampipes.processors.siddhi.count.CountAggregation; +import org.apache.streampipes.processors.siddhi.filter.NumericalFilterSiddhiProcessor; +import org.apache.streampipes.processors.siddhi.listcollector.ListCollector; +import org.apache.streampipes.processors.siddhi.listfilter.ListFilter; +import org.apache.streampipes.processors.siddhi.topk.TopK; +import org.apache.streampipes.processors.siddhi.trend.TrendProcessor; + +import java.util.Collections; +import java.util.List; + +public class SiddhiFilterExtensionModuleExport implements IExtensionModuleExport { + @Override + public List adapters() { + return Collections.emptyList(); + } + + @Override + public List> pipelineElements() { + return List.of( + new TrendProcessor(), + new NumericalFilterSiddhiProcessor(), + new ListFilter(), + new ListCollector(), + new CountAggregation(), + new TopK() + ); + } + + @Override + public List> migrators() { + return Collections.emptyList(); + } +} diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/pom.xml b/streampipes-extensions/streampipes-processors-geo-jvm/pom.xml index 4692236cbe..1290023009 100644 --- a/streampipes-extensions/streampipes-processors-geo-jvm/pom.xml +++ b/streampipes-extensions/streampipes-processors-geo-jvm/pom.xml @@ -31,12 +31,7 @@ org.apache.streampipes - streampipes-config - 0.93.0-SNAPSHOT - - - org.apache.streampipes - streampipes-sdk-bundle + streampipes-extensions-management 0.93.0-SNAPSHOT diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/GeoExtensionModuleExport.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/GeoExtensionModuleExport.java new file mode 100644 index 0000000000..e118a6dd24 --- /dev/null +++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/GeoExtensionModuleExport.java @@ -0,0 +1,82 @@ +/* + * 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.processors.geo.jvm; + +import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter; +import org.apache.streampipes.extensions.api.declarer.IExtensionModuleExport; +import org.apache.streampipes.extensions.api.migration.IModelMigrator; +import org.apache.streampipes.extensions.api.pe.IStreamPipesPipelineElement; +import org.apache.streampipes.model.extensions.configuration.ConfigItem; +import org.apache.streampipes.processors.geo.jvm.config.ConfigKeys; +import org.apache.streampipes.processors.geo.jvm.jts.processor.buffergeometry.BufferGeomProcessor; +import org.apache.streampipes.processors.geo.jvm.jts.processor.bufferpoint.BufferPointProcessor; +import org.apache.streampipes.processors.geo.jvm.jts.processor.epsg.EpsgProcessor; +import org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint.LatLngToJtsPointProcessor; +import org.apache.streampipes.processors.geo.jvm.jts.processor.reprojection.ReprojectionProcessor; +import org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory.TrajectoryFromPointsProcessor; +import org.apache.streampipes.processors.geo.jvm.jts.processor.validation.complex.TopologyValidationProcessor; +import org.apache.streampipes.processors.geo.jvm.jts.processor.validation.simple.GeometryValidationProcessor; +import org.apache.streampipes.processors.geo.jvm.latlong.processor.distancecalculator.haversine.HaversineDistanceCalculatorProcessor; +import org.apache.streampipes.processors.geo.jvm.latlong.processor.distancecalculator.haversinestatic.HaversineStaticDistanceCalculatorProcessor; +import org.apache.streampipes.processors.geo.jvm.latlong.processor.geocoder.googlemaps.GoogleMapsGeocoderProcessor; +import org.apache.streampipes.processors.geo.jvm.latlong.processor.geocoder.googlemapsstatic.GoogleMapsStaticGeocoderProcessor; +import org.apache.streampipes.processors.geo.jvm.latlong.processor.revgeocoder.geocityname.GeoCityNameRevdecodeProcessor; +import org.apache.streampipes.processors.geo.jvm.latlong.processor.speedcalculator.SpeedCalculatorProcessor; + +import java.util.Collections; +import java.util.List; + +public class GeoExtensionModuleExport implements IExtensionModuleExport { + @Override + public List adapters() { + return Collections.emptyList(); + } + + @Override + public List> pipelineElements() { + return List.of( + new HaversineDistanceCalculatorProcessor(), + new HaversineStaticDistanceCalculatorProcessor(), + new GoogleMapsGeocoderProcessor(), + new GoogleMapsStaticGeocoderProcessor(), + new GeoCityNameRevdecodeProcessor(), + new EpsgProcessor(), + new LatLngToJtsPointProcessor(), + new TrajectoryFromPointsProcessor(), + new SpeedCalculatorProcessor(), + new ReprojectionProcessor(), + new GeometryValidationProcessor(), + new TopologyValidationProcessor(), + new BufferGeomProcessor(), + new BufferPointProcessor() + ); + } + + @Override + public List> migrators() { + return Collections.emptyList(); + } + + @Override + public List configItems() { + return List.of( + ConfigItem.from(ConfigKeys.GOOGLE_API_KEY, "", "Google Maps API key") + ); + } +} diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/GeoJvmInit.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/GeoJvmInit.java deleted file mode 100644 index e391ed874e..0000000000 --- a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/GeoJvmInit.java +++ /dev/null @@ -1,112 +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.processors.geo.jvm; - -import org.apache.streampipes.dataformat.cbor.CborDataFormatFactory; -import org.apache.streampipes.dataformat.fst.FstDataFormatFactory; -import org.apache.streampipes.dataformat.json.JsonDataFormatFactory; -import org.apache.streampipes.dataformat.smile.SmileDataFormatFactory; -import org.apache.streampipes.extensions.management.model.SpServiceDefinition; -import org.apache.streampipes.extensions.management.model.SpServiceDefinitionBuilder; -import org.apache.streampipes.messaging.jms.SpJmsProtocolFactory; -import org.apache.streampipes.messaging.kafka.SpKafkaProtocolFactory; -import org.apache.streampipes.messaging.mqtt.SpMqttProtocolFactory; -import org.apache.streampipes.messaging.nats.SpNatsProtocolFactory; -import org.apache.streampipes.processors.geo.jvm.config.ConfigKeys; -import org.apache.streampipes.processors.geo.jvm.jts.processor.buffergeometry.BufferGeomProcessor; -import org.apache.streampipes.processors.geo.jvm.jts.processor.bufferpoint.BufferPointProcessor; -import org.apache.streampipes.processors.geo.jvm.jts.processor.epsg.EpsgProcessor; -import org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint.LatLngToJtsPointProcessor; -import org.apache.streampipes.processors.geo.jvm.jts.processor.reprojection.ReprojectionProcessor; -import org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory.TrajectoryFromPointsProcessor; -import org.apache.streampipes.processors.geo.jvm.jts.processor.validation.complex.TopologyValidationProcessor; -import org.apache.streampipes.processors.geo.jvm.jts.processor.validation.simple.GeometryValidationProcessor; -import org.apache.streampipes.processors.geo.jvm.latlong.processor.distancecalculator.haversine.HaversineDistanceCalculatorProcessor; -import org.apache.streampipes.processors.geo.jvm.latlong.processor.distancecalculator.haversinestatic.HaversineStaticDistanceCalculatorProcessor; -import org.apache.streampipes.processors.geo.jvm.latlong.processor.geocoder.googlemaps.GoogleMapsGeocoderProcessor; -import org.apache.streampipes.processors.geo.jvm.latlong.processor.geocoder.googlemapsstatic.GoogleMapsStaticGeocoderProcessor; -import org.apache.streampipes.processors.geo.jvm.latlong.processor.revgeocoder.geocityname.GeoCityNameRevdecodeProcessor; -import org.apache.streampipes.processors.geo.jvm.latlong.processor.speedcalculator.SpeedCalculatorProcessor; -import org.apache.streampipes.service.extensions.ExtensionsModelSubmitter; - -import org.apache.sis.setup.Configuration; -import org.postgresql.ds.PGSimpleDataSource; - -public class GeoJvmInit extends ExtensionsModelSubmitter { - - - @Override - public SpServiceDefinition provideServiceDefinition() { - - - try { - Configuration.current().setDatabase(GeoJvmInit::createDataSource); - } catch (IllegalStateException e) { - // catch the exceptions due connection is already initialized. - } - - return SpServiceDefinitionBuilder.create("org.apache.streampipes.processors.geo.jvm", - "Processors Geo JVM", - "", - 8090) - .registerPipelineElements( - new HaversineDistanceCalculatorProcessor(), - new HaversineStaticDistanceCalculatorProcessor(), - new GoogleMapsGeocoderProcessor(), - new GoogleMapsStaticGeocoderProcessor(), - new GeoCityNameRevdecodeProcessor(), - new EpsgProcessor(), - new LatLngToJtsPointProcessor(), - new TrajectoryFromPointsProcessor(), - new SpeedCalculatorProcessor(), - new ReprojectionProcessor(), - new GeometryValidationProcessor(), - new TopologyValidationProcessor(), - new BufferGeomProcessor(), - new BufferPointProcessor()) - .registerMessagingFormats( - new JsonDataFormatFactory(), - new CborDataFormatFactory(), - new SmileDataFormatFactory(), - new FstDataFormatFactory()) - .registerMessagingProtocols( - new SpKafkaProtocolFactory(), - new SpJmsProtocolFactory(), - new SpMqttProtocolFactory(), - new SpNatsProtocolFactory()) - .addConfig(ConfigKeys.GOOGLE_API_KEY, "", "Google Maps API key") - .build(); - } - - // https://sis.apache.org/apidocs/org/apache/sis/setup/Configuration.html#setDatabase(java.util.function.Supplier) - protected static PGSimpleDataSource createDataSource() { - PGSimpleDataSource ds = new PGSimpleDataSource(); - String[] serverAddresses = {"localhost"}; - ds.setServerNames(serverAddresses); - int[] portNumbers = {54320}; - ds.setPortNumbers(portNumbers); - ds.setDatabaseName("EPSG"); - ds.setUser("streampipes"); - ds.setPassword("streampipes"); - ds.setReadOnly(true); - - return ds; - } - -} diff --git a/streampipes-extensions/streampipes-processors-image-processing-jvm/pom.xml b/streampipes-extensions/streampipes-processors-image-processing-jvm/pom.xml index b80cfcf744..7912334954 100644 --- a/streampipes-extensions/streampipes-processors-image-processing-jvm/pom.xml +++ b/streampipes-extensions/streampipes-processors-image-processing-jvm/pom.xml @@ -31,7 +31,7 @@ org.apache.streampipes - streampipes-sdk-bundle + streampipes-extensions-management 0.93.0-SNAPSHOT diff --git a/streampipes-extensions/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/ImageProcessingExtensionModuleExport.java b/streampipes-extensions/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/ImageProcessingExtensionModuleExport.java new file mode 100644 index 0000000000..79b82aa3d0 --- /dev/null +++ b/streampipes-extensions/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/ImageProcessingExtensionModuleExport.java @@ -0,0 +1,53 @@ +/* + * 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.processors.imageprocessing.jvm; + +import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter; +import org.apache.streampipes.extensions.api.declarer.IExtensionModuleExport; +import org.apache.streampipes.extensions.api.migration.IModelMigrator; +import org.apache.streampipes.extensions.api.pe.IStreamPipesPipelineElement; +import org.apache.streampipes.processors.imageprocessing.jvm.processor.genericclassification.GenericImageClassificationProcessor; +import org.apache.streampipes.processors.imageprocessing.jvm.processor.imagecropper.ImageCropperProcessor; +import org.apache.streampipes.processors.imageprocessing.jvm.processor.imageenrichment.ImageEnrichmentProcessor; +import org.apache.streampipes.processors.imageprocessing.jvm.processor.qrreader.QrCodeReaderProcessor; + +import java.util.Collections; +import java.util.List; + +public class ImageProcessingExtensionModuleExport implements IExtensionModuleExport { + @Override + public List adapters() { + return Collections.emptyList(); + } + + @Override + public List> pipelineElements() { + return List.of( + new ImageEnrichmentProcessor(), + new ImageCropperProcessor(), + new QrCodeReaderProcessor(), + new GenericImageClassificationProcessor() + ); + } + + @Override + public List> migrators() { + return Collections.emptyList(); + } +} diff --git a/streampipes-extensions/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/ImageProcessingJvmInit.java b/streampipes-extensions/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/ImageProcessingJvmInit.java deleted file mode 100644 index b9aa41e4fc..0000000000 --- a/streampipes-extensions/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/ImageProcessingJvmInit.java +++ /dev/null @@ -1,62 +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.processors.imageprocessing.jvm; - -import org.apache.streampipes.dataformat.cbor.CborDataFormatFactory; -import org.apache.streampipes.dataformat.fst.FstDataFormatFactory; -import org.apache.streampipes.dataformat.json.JsonDataFormatFactory; -import org.apache.streampipes.dataformat.smile.SmileDataFormatFactory; -import org.apache.streampipes.extensions.management.model.SpServiceDefinition; -import org.apache.streampipes.extensions.management.model.SpServiceDefinitionBuilder; -import org.apache.streampipes.messaging.jms.SpJmsProtocolFactory; -import org.apache.streampipes.messaging.kafka.SpKafkaProtocolFactory; -import org.apache.streampipes.messaging.mqtt.SpMqttProtocolFactory; -import org.apache.streampipes.messaging.nats.SpNatsProtocolFactory; -import org.apache.streampipes.processors.imageprocessing.jvm.processor.genericclassification.GenericImageClassificationProcessor; -import org.apache.streampipes.processors.imageprocessing.jvm.processor.imagecropper.ImageCropperProcessor; -import org.apache.streampipes.processors.imageprocessing.jvm.processor.imageenrichment.ImageEnrichmentProcessor; -import org.apache.streampipes.processors.imageprocessing.jvm.processor.qrreader.QrCodeReaderProcessor; -import org.apache.streampipes.service.extensions.ExtensionsModelSubmitter; - -public class ImageProcessingJvmInit extends ExtensionsModelSubmitter { - - @Override - public SpServiceDefinition provideServiceDefinition() { - return SpServiceDefinitionBuilder.create("org.apache.streampipes.processors.imageprocessing.jvm", - "Processors Image Processing JVM", - "", - 8090) - .registerPipelineElements( - new ImageEnrichmentProcessor(), - new ImageCropperProcessor(), - new QrCodeReaderProcessor(), - new GenericImageClassificationProcessor()) - .registerMessagingFormats( - new JsonDataFormatFactory(), - new CborDataFormatFactory(), - new SmileDataFormatFactory(), - new FstDataFormatFactory()) - .registerMessagingProtocols( - new SpKafkaProtocolFactory(), - new SpJmsProtocolFactory(), - new SpMqttProtocolFactory(), - new SpNatsProtocolFactory()) - .build(); - } -} diff --git a/streampipes-extensions/streampipes-processors-text-mining-jvm/pom.xml b/streampipes-extensions/streampipes-processors-text-mining-jvm/pom.xml index 2d5fbc396f..0244b6ff05 100644 --- a/streampipes-extensions/streampipes-processors-text-mining-jvm/pom.xml +++ b/streampipes-extensions/streampipes-processors-text-mining-jvm/pom.xml @@ -31,7 +31,7 @@ org.apache.streampipes - streampipes-sdk-bundle + streampipes-extensions-management 0.93.0-SNAPSHOT @@ -45,11 +45,6 @@ org.apache.opennlp opennlp-tools - - org.apache.streampipes - streampipes-messaging-mqtt - 0.93.0-SNAPSHOT - diff --git a/streampipes-extensions/streampipes-processors-text-mining-jvm/src/main/java/org/apache/streampipes/processors/textmining/jvm/TextMiningExtensionModuleExport.java b/streampipes-extensions/streampipes-processors-text-mining-jvm/src/main/java/org/apache/streampipes/processors/textmining/jvm/TextMiningExtensionModuleExport.java new file mode 100644 index 0000000000..b8c5ec2d8f --- /dev/null +++ b/streampipes-extensions/streampipes-processors-text-mining-jvm/src/main/java/org/apache/streampipes/processors/textmining/jvm/TextMiningExtensionModuleExport.java @@ -0,0 +1,56 @@ +/* + * 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.processors.textmining.jvm; + +import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter; +import org.apache.streampipes.extensions.api.declarer.IExtensionModuleExport; +import org.apache.streampipes.extensions.api.migration.IModelMigrator; +import org.apache.streampipes.extensions.api.pe.IStreamPipesPipelineElement; +import org.apache.streampipes.processors.textmining.jvm.processor.chunker.ChunkerProcessor; +import org.apache.streampipes.processors.textmining.jvm.processor.namefinder.NameFinderProcessor; +import org.apache.streampipes.processors.textmining.jvm.processor.partofspeech.PartOfSpeechProcessor; +import org.apache.streampipes.processors.textmining.jvm.processor.sentencedetection.SentenceDetectionProcessor; +import org.apache.streampipes.processors.textmining.jvm.processor.tokenizer.TokenizerProcessor; + +import java.util.Collections; +import java.util.List; + +public class TextMiningExtensionModuleExport implements IExtensionModuleExport { + + @Override + public List adapters() { + return Collections.emptyList(); + } + + @Override + public List> pipelineElements() { + return List.of( + new TokenizerProcessor(), + new PartOfSpeechProcessor(), + new ChunkerProcessor(), + new NameFinderProcessor(), + new SentenceDetectionProcessor() + ); + } + + @Override + public List> migrators() { + return Collections.emptyList(); + } +} diff --git a/streampipes-extensions/streampipes-processors-text-mining-jvm/src/main/java/org/apache/streampipes/processors/textmining/jvm/TextMiningJvmInit.java b/streampipes-extensions/streampipes-processors-text-mining-jvm/src/main/java/org/apache/streampipes/processors/textmining/jvm/TextMiningJvmInit.java deleted file mode 100644 index e9c1ed7964..0000000000 --- a/streampipes-extensions/streampipes-processors-text-mining-jvm/src/main/java/org/apache/streampipes/processors/textmining/jvm/TextMiningJvmInit.java +++ /dev/null @@ -1,69 +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.processors.textmining.jvm; - -import org.apache.streampipes.dataformat.cbor.CborDataFormatFactory; -import org.apache.streampipes.dataformat.fst.FstDataFormatFactory; -import org.apache.streampipes.dataformat.json.JsonDataFormatFactory; -import org.apache.streampipes.dataformat.smile.SmileDataFormatFactory; -import org.apache.streampipes.extensions.management.model.SpServiceDefinition; -import org.apache.streampipes.extensions.management.model.SpServiceDefinitionBuilder; -import org.apache.streampipes.messaging.jms.SpJmsProtocolFactory; -import org.apache.streampipes.messaging.kafka.SpKafkaProtocolFactory; -import org.apache.streampipes.messaging.mqtt.SpMqttProtocolFactory; -import org.apache.streampipes.messaging.nats.SpNatsProtocolFactory; -import org.apache.streampipes.processors.textmining.jvm.processor.chunker.ChunkerProcessor; -import org.apache.streampipes.processors.textmining.jvm.processor.language.LanguageDetectionProcessor; -import org.apache.streampipes.processors.textmining.jvm.processor.namefinder.NameFinderProcessor; -import org.apache.streampipes.processors.textmining.jvm.processor.partofspeech.PartOfSpeechProcessor; -import org.apache.streampipes.processors.textmining.jvm.processor.sentencedetection.SentenceDetectionProcessor; -import org.apache.streampipes.processors.textmining.jvm.processor.tokenizer.TokenizerProcessor; -import org.apache.streampipes.service.extensions.ExtensionsModelSubmitter; - -public class TextMiningJvmInit extends ExtensionsModelSubmitter { - - public static void main(String[] args) { - new TextMiningJvmInit().init(); - } - - @Override - public SpServiceDefinition provideServiceDefinition() { - - return SpServiceDefinitionBuilder.create("org.apache.streampipes.processors.textmining.jvm", - "Processors Text Mining JVM", "", - 8090) - .registerPipelineElements(new LanguageDetectionProcessor(), - new TokenizerProcessor(), - new PartOfSpeechProcessor(), - new ChunkerProcessor(), - new NameFinderProcessor(), - new SentenceDetectionProcessor()) - .registerMessagingFormats( - new JsonDataFormatFactory(), - new CborDataFormatFactory(), - new SmileDataFormatFactory(), - new FstDataFormatFactory()) - .registerMessagingProtocols( - new SpKafkaProtocolFactory(), - new SpJmsProtocolFactory(), - new SpMqttProtocolFactory(), - new SpNatsProtocolFactory()) - .build(); - } -} diff --git a/streampipes-extensions/streampipes-processors-transformation-jvm/pom.xml b/streampipes-extensions/streampipes-processors-transformation-jvm/pom.xml index 9a79d5baeb..3bdfe0b2a4 100644 --- a/streampipes-extensions/streampipes-processors-transformation-jvm/pom.xml +++ b/streampipes-extensions/streampipes-processors-transformation-jvm/pom.xml @@ -39,7 +39,7 @@ org.apache.streampipes - streampipes-sdk-bundle + streampipes-extensions-management 0.93.0-SNAPSHOT diff --git a/streampipes-extensions/streampipes-processors-transformation-jvm/src/main/java/org/apache/streampipes/processors/transformation/jvm/TransformationJvmInit.java b/streampipes-extensions/streampipes-processors-transformation-jvm/src/main/java/org/apache/streampipes/processors/transformation/jvm/TransformationExtensionModuleExport.java similarity index 55% rename from streampipes-extensions/streampipes-processors-transformation-jvm/src/main/java/org/apache/streampipes/processors/transformation/jvm/TransformationJvmInit.java rename to streampipes-extensions/streampipes-processors-transformation-jvm/src/main/java/org/apache/streampipes/processors/transformation/jvm/TransformationExtensionModuleExport.java index 337a0ca105..fc7cdb5cd6 100644 --- a/streampipes-extensions/streampipes-processors-transformation-jvm/src/main/java/org/apache/streampipes/processors/transformation/jvm/TransformationJvmInit.java +++ b/streampipes-extensions/streampipes-processors-transformation-jvm/src/main/java/org/apache/streampipes/processors/transformation/jvm/TransformationExtensionModuleExport.java @@ -18,16 +18,10 @@ package org.apache.streampipes.processors.transformation.jvm; -import org.apache.streampipes.dataformat.cbor.CborDataFormatFactory; -import org.apache.streampipes.dataformat.fst.FstDataFormatFactory; -import org.apache.streampipes.dataformat.json.JsonDataFormatFactory; -import org.apache.streampipes.dataformat.smile.SmileDataFormatFactory; -import org.apache.streampipes.extensions.management.model.SpServiceDefinition; -import org.apache.streampipes.extensions.management.model.SpServiceDefinitionBuilder; -import org.apache.streampipes.messaging.jms.SpJmsProtocolFactory; -import org.apache.streampipes.messaging.kafka.SpKafkaProtocolFactory; -import org.apache.streampipes.messaging.mqtt.SpMqttProtocolFactory; -import org.apache.streampipes.messaging.nats.SpNatsProtocolFactory; +import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter; +import org.apache.streampipes.extensions.api.declarer.IExtensionModuleExport; +import org.apache.streampipes.extensions.api.migration.IModelMigrator; +import org.apache.streampipes.extensions.api.pe.IStreamPipesPipelineElement; import org.apache.streampipes.processors.transformation.jvm.processor.array.count.CountArrayProcessor; import org.apache.streampipes.processors.transformation.jvm.processor.array.split.SplitArrayProcessor; import org.apache.streampipes.processors.transformation.jvm.processor.booloperator.counter.BooleanCounterProcessor; @@ -52,57 +46,49 @@ import org.apache.streampipes.processors.transformation.jvm.processor.transformtoboolean.TransformToBooleanProcessor; import org.apache.streampipes.processors.transformation.jvm.processor.value.change.ChangedValueDetectionProcessor; import org.apache.streampipes.processors.transformation.jvm.processor.value.duration.CalculateDurationProcessor; -import org.apache.streampipes.service.extensions.ExtensionsModelSubmitter; -import org.apache.streampipes.wrapper.standalone.runtime.StandaloneStreamPipesRuntimeProvider; -public class TransformationJvmInit extends ExtensionsModelSubmitter { +import java.util.Collections; +import java.util.List; - public static void main(String[] args) { - new TransformationJvmInit().init(); +public class TransformationExtensionModuleExport implements IExtensionModuleExport { + + @Override + public List adapters() { + return Collections.emptyList(); + } + + @Override + public List> pipelineElements() { + return List.of( + new CountArrayProcessor(), + new SplitArrayProcessor(), + new CalculateDurationProcessor(), + new ChangedValueDetectionProcessor(), + new TimestampExtractorProcessor(), + new BooleanCounterProcessor(), + new BooleanInverterProcessor(), + new BooleanTimekeepingProcessor(), + new BooleanTimerProcessor(), + new CsvMetadataEnrichmentProcessor(), + new FieldHasherProcessor(), + new FieldMapperProcessor(), + new MeasurementUnitConverterProcessor(), + new TaskDurationProcessor(), + new TransformToBooleanProcessor(), + new StringTimerProcessor(), + new SignalEdgeFilterProcessor(), + new BooleanToStateProcessor(), + new NumberLabelerProcessor(), + new StringToStateProcessor(), + new StringCounterProcessor(), + new BooleanOperatorProcessor(), + new FiledRenameProcessor(), + new RoundProcessor() + ); } @Override - public SpServiceDefinition provideServiceDefinition() { - return SpServiceDefinitionBuilder.create("org.apache.streampipes.processors.transformation.jvm", - "Processors Transformation JVM", - "", - 8090) - .registerRuntimeProvider(new StandaloneStreamPipesRuntimeProvider()) - .registerPipelineElements( - new CountArrayProcessor(), - new SplitArrayProcessor(), - new CalculateDurationProcessor(), - new ChangedValueDetectionProcessor(), - new TimestampExtractorProcessor(), - new BooleanCounterProcessor(), - new BooleanInverterProcessor(), - new BooleanTimekeepingProcessor(), - new BooleanTimerProcessor(), - new CsvMetadataEnrichmentProcessor(), - new FieldHasherProcessor(), - new FieldMapperProcessor(), - new MeasurementUnitConverterProcessor(), - new TaskDurationProcessor(), - new TransformToBooleanProcessor(), - new StringTimerProcessor(), - new SignalEdgeFilterProcessor(), - new BooleanToStateProcessor(), - new NumberLabelerProcessor(), - new StringToStateProcessor(), - new StringCounterProcessor(), - new BooleanOperatorProcessor(), - new FiledRenameProcessor(), - new RoundProcessor()) - .registerMessagingFormats( - new JsonDataFormatFactory(), - new CborDataFormatFactory(), - new SmileDataFormatFactory(), - new FstDataFormatFactory()) - .registerMessagingProtocols( - new SpKafkaProtocolFactory(), - new SpJmsProtocolFactory(), - new SpMqttProtocolFactory(), - new SpNatsProtocolFactory()) - .build(); + public List> migrators() { + return Collections.emptyList(); } } diff --git a/streampipes-extensions/streampipes-sinks-brokers-jvm/pom.xml b/streampipes-extensions/streampipes-sinks-brokers-jvm/pom.xml index 17ce327654..2788c4dfd2 100644 --- a/streampipes-extensions/streampipes-sinks-brokers-jvm/pom.xml +++ b/streampipes-extensions/streampipes-sinks-brokers-jvm/pom.xml @@ -37,7 +37,12 @@ org.apache.streampipes - streampipes-sdk-bundle + streampipes-extensions-management + 0.93.0-SNAPSHOT + + + org.apache.streampipes + streampipes-messaging-jms 0.93.0-SNAPSHOT diff --git a/streampipes-extensions/streampipes-sinks-brokers-jvm/src/main/java/org/apache/streampipes/sinks/brokers/jvm/BrokerSinksExtensionModuleExport.java b/streampipes-extensions/streampipes-sinks-brokers-jvm/src/main/java/org/apache/streampipes/sinks/brokers/jvm/BrokerSinksExtensionModuleExport.java new file mode 100644 index 0000000000..86fe680f7c --- /dev/null +++ b/streampipes-extensions/streampipes-sinks-brokers-jvm/src/main/java/org/apache/streampipes/sinks/brokers/jvm/BrokerSinksExtensionModuleExport.java @@ -0,0 +1,55 @@ +/* + * 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.sinks.brokers.jvm; + +import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter; +import org.apache.streampipes.extensions.api.declarer.IExtensionModuleExport; +import org.apache.streampipes.extensions.api.migration.IModelMigrator; +import org.apache.streampipes.extensions.api.pe.IStreamPipesPipelineElement; +import org.apache.streampipes.sinks.brokers.jvm.bufferrest.BufferRestPublisherSink; +import org.apache.streampipes.sinks.brokers.jvm.jms.JmsPublisherSink; +import org.apache.streampipes.sinks.brokers.jvm.rabbitmq.RabbitMqPublisherSink; +import org.apache.streampipes.sinks.brokers.jvm.rest.RestSink; +import org.apache.streampipes.sinks.brokers.jvm.websocket.WebsocketServerSink; + +import java.util.Collections; +import java.util.List; + +public class BrokerSinksExtensionModuleExport implements IExtensionModuleExport { + @Override + public List adapters() { + return Collections.emptyList(); + } + + @Override + public List> pipelineElements() { + return List.of( + new JmsPublisherSink(), + new RestSink(), + new BufferRestPublisherSink(), + new RabbitMqPublisherSink(), + new WebsocketServerSink() + ); + } + + @Override + public List> migrators() { + return Collections.emptyList(); + } +} diff --git a/streampipes-extensions/streampipes-sinks-brokers-jvm/src/main/java/org/apache/streampipes/sinks/brokers/jvm/BrokersJvmInit.java b/streampipes-extensions/streampipes-sinks-brokers-jvm/src/main/java/org/apache/streampipes/sinks/brokers/jvm/BrokersJvmInit.java deleted file mode 100644 index d9bde7132e..0000000000 --- a/streampipes-extensions/streampipes-sinks-brokers-jvm/src/main/java/org/apache/streampipes/sinks/brokers/jvm/BrokersJvmInit.java +++ /dev/null @@ -1,68 +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.sinks.brokers.jvm; - -import org.apache.streampipes.dataformat.cbor.CborDataFormatFactory; -import org.apache.streampipes.dataformat.fst.FstDataFormatFactory; -import org.apache.streampipes.dataformat.json.JsonDataFormatFactory; -import org.apache.streampipes.dataformat.smile.SmileDataFormatFactory; -import org.apache.streampipes.extensions.management.model.SpServiceDefinition; -import org.apache.streampipes.extensions.management.model.SpServiceDefinitionBuilder; -import org.apache.streampipes.messaging.jms.SpJmsProtocolFactory; -import org.apache.streampipes.messaging.kafka.SpKafkaProtocolFactory; -import org.apache.streampipes.messaging.mqtt.SpMqttProtocolFactory; -import org.apache.streampipes.messaging.nats.SpNatsProtocolFactory; -import org.apache.streampipes.service.extensions.ExtensionsModelSubmitter; -import org.apache.streampipes.sinks.brokers.jvm.bufferrest.BufferRestPublisherSink; -import org.apache.streampipes.sinks.brokers.jvm.jms.JmsPublisherSink; -import org.apache.streampipes.sinks.brokers.jvm.rabbitmq.RabbitMqPublisherSink; -import org.apache.streampipes.sinks.brokers.jvm.rest.RestSink; -import org.apache.streampipes.sinks.brokers.jvm.websocket.WebsocketServerSink; - -public class BrokersJvmInit extends ExtensionsModelSubmitter { - - public static void main(String[] args) { - new BrokersJvmInit().init(); - } - - @Override - public SpServiceDefinition provideServiceDefinition() { - return SpServiceDefinitionBuilder.create("org.apache.streampipes.sinks.notifications.jvm", - "Sinks Notifications JVM", - "", - 8096) - .registerPipelineElements( - new JmsPublisherSink(), - new RestSink(), - new BufferRestPublisherSink(), - new RabbitMqPublisherSink(), - new WebsocketServerSink()) - .registerMessagingFormats( - new JsonDataFormatFactory(), - new CborDataFormatFactory(), - new SmileDataFormatFactory(), - new FstDataFormatFactory()) - .registerMessagingProtocols( - new SpKafkaProtocolFactory(), - new SpJmsProtocolFactory(), - new SpMqttProtocolFactory(), - new SpNatsProtocolFactory()) - .build(); - } -} diff --git a/streampipes-extensions/streampipes-sinks-databases-jvm/pom.xml b/streampipes-extensions/streampipes-sinks-databases-jvm/pom.xml index 157333404c..411c0b337b 100644 --- a/streampipes-extensions/streampipes-sinks-databases-jvm/pom.xml +++ b/streampipes-extensions/streampipes-sinks-databases-jvm/pom.xml @@ -31,12 +31,7 @@ org.apache.streampipes - streampipes-connectors-opcua - 0.93.0-SNAPSHOT - - - org.apache.streampipes - streampipes-sdk-bundle + streampipes-extensions-management 0.93.0-SNAPSHOT diff --git a/streampipes-extensions/streampipes-sinks-databases-jvm/src/main/java/org/apache/streampipes/sinks/databases/jvm/DatabaseSinksExtensionModuleExport.java b/streampipes-extensions/streampipes-sinks-databases-jvm/src/main/java/org/apache/streampipes/sinks/databases/jvm/DatabaseSinksExtensionModuleExport.java new file mode 100644 index 0000000000..2e316b2698 --- /dev/null +++ b/streampipes-extensions/streampipes-sinks-databases-jvm/src/main/java/org/apache/streampipes/sinks/databases/jvm/DatabaseSinksExtensionModuleExport.java @@ -0,0 +1,55 @@ +/* + * 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.sinks.databases.jvm; + +import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter; +import org.apache.streampipes.extensions.api.declarer.IExtensionModuleExport; +import org.apache.streampipes.extensions.api.migration.IModelMigrator; +import org.apache.streampipes.extensions.api.pe.IStreamPipesPipelineElement; +import org.apache.streampipes.sinks.databases.jvm.couchdb.CouchDbSink; +import org.apache.streampipes.sinks.databases.jvm.ditto.DittoSink; +import org.apache.streampipes.sinks.databases.jvm.iotdb.IotDbSink; +import org.apache.streampipes.sinks.databases.jvm.postgresql.PostgreSqlSink; +import org.apache.streampipes.sinks.databases.jvm.redis.RedisSink; + +import java.util.Collections; +import java.util.List; + +public class DatabaseSinksExtensionModuleExport implements IExtensionModuleExport { + @Override + public List adapters() { + return Collections.emptyList(); + } + + @Override + public List> pipelineElements() { + return List.of( + new CouchDbSink(), + new PostgreSqlSink(), + new IotDbSink(), + new DittoSink(), + new RedisSink() + ); + } + + @Override + public List> migrators() { + return Collections.emptyList(); + } +} diff --git a/streampipes-extensions/streampipes-sinks-databases-jvm/src/main/java/org/apache/streampipes/sinks/databases/jvm/DatabasesJvmInit.java b/streampipes-extensions/streampipes-sinks-databases-jvm/src/main/java/org/apache/streampipes/sinks/databases/jvm/DatabasesJvmInit.java deleted file mode 100644 index e2fa2991cf..0000000000 --- a/streampipes-extensions/streampipes-sinks-databases-jvm/src/main/java/org/apache/streampipes/sinks/databases/jvm/DatabasesJvmInit.java +++ /dev/null @@ -1,70 +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.sinks.databases.jvm; - -import org.apache.streampipes.dataformat.cbor.CborDataFormatFactory; -import org.apache.streampipes.dataformat.fst.FstDataFormatFactory; -import org.apache.streampipes.dataformat.json.JsonDataFormatFactory; -import org.apache.streampipes.dataformat.smile.SmileDataFormatFactory; -import org.apache.streampipes.extensions.connectors.opcua.sink.OpcUaSink; -import org.apache.streampipes.extensions.management.model.SpServiceDefinition; -import org.apache.streampipes.extensions.management.model.SpServiceDefinitionBuilder; -import org.apache.streampipes.messaging.jms.SpJmsProtocolFactory; -import org.apache.streampipes.messaging.kafka.SpKafkaProtocolFactory; -import org.apache.streampipes.messaging.mqtt.SpMqttProtocolFactory; -import org.apache.streampipes.messaging.nats.SpNatsProtocolFactory; -import org.apache.streampipes.service.extensions.ExtensionsModelSubmitter; -import org.apache.streampipes.sinks.databases.jvm.couchdb.CouchDbSink; -import org.apache.streampipes.sinks.databases.jvm.ditto.DittoSink; -import org.apache.streampipes.sinks.databases.jvm.iotdb.IotDbSink; -import org.apache.streampipes.sinks.databases.jvm.postgresql.PostgreSqlSink; -import org.apache.streampipes.sinks.databases.jvm.redis.RedisSink; - -public class DatabasesJvmInit extends ExtensionsModelSubmitter { - - public static void main(String[] args) { - new DatabasesJvmInit().init(); - } - - @Override - public SpServiceDefinition provideServiceDefinition() { - return SpServiceDefinitionBuilder.create("org.apache.streampipes.sinks.databases.jvm", - "Sinks Databases JVM", - "", - 8090) - .registerPipelineElements( - new CouchDbSink(), - new OpcUaSink(), - new PostgreSqlSink(), - new IotDbSink(), - new DittoSink(), - new RedisSink()) - .registerMessagingFormats( - new JsonDataFormatFactory(), - new CborDataFormatFactory(), - new SmileDataFormatFactory(), - new FstDataFormatFactory()) - .registerMessagingProtocols( - new SpKafkaProtocolFactory(), - new SpJmsProtocolFactory(), - new SpMqttProtocolFactory(), - new SpNatsProtocolFactory()) - .build(); - } -} diff --git a/streampipes-extensions/streampipes-sinks-internal-jvm/pom.xml b/streampipes-extensions/streampipes-sinks-internal-jvm/pom.xml index dc36ac49b2..aa80587874 100644 --- a/streampipes-extensions/streampipes-sinks-internal-jvm/pom.xml +++ b/streampipes-extensions/streampipes-sinks-internal-jvm/pom.xml @@ -41,7 +41,7 @@ org.apache.streampipes - streampipes-sdk-bundle + streampipes-extensions-management 0.93.0-SNAPSHOT diff --git a/streampipes-extensions/streampipes-sinks-internal-jvm/src/main/java/org/apache/streampipes/sinks/internal/jvm/InternalSinksExtensionModuleExports.java b/streampipes-extensions/streampipes-sinks-internal-jvm/src/main/java/org/apache/streampipes/sinks/internal/jvm/InternalSinksExtensionModuleExports.java new file mode 100644 index 0000000000..ccf27a5da5 --- /dev/null +++ b/streampipes-extensions/streampipes-sinks-internal-jvm/src/main/java/org/apache/streampipes/sinks/internal/jvm/InternalSinksExtensionModuleExports.java @@ -0,0 +1,49 @@ +/* + * 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.sinks.internal.jvm; + +import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter; +import org.apache.streampipes.extensions.api.declarer.IExtensionModuleExport; +import org.apache.streampipes.extensions.api.migration.IModelMigrator; +import org.apache.streampipes.extensions.api.pe.IStreamPipesPipelineElement; +import org.apache.streampipes.sinks.internal.jvm.datalake.DataLakeSink; +import org.apache.streampipes.sinks.internal.jvm.notification.NotificationProducer; + +import java.util.Collections; +import java.util.List; + +public class InternalSinksExtensionModuleExports implements IExtensionModuleExport { + @Override + public List adapters() { + return Collections.emptyList(); + } + + @Override + public List> pipelineElements() { + return List.of( + new DataLakeSink(), + new NotificationProducer() + ); + } + + @Override + public List> migrators() { + return Collections.emptyList(); + } +} diff --git a/streampipes-extensions/streampipes-sinks-internal-jvm/src/main/java/org/apache/streampipes/sinks/internal/jvm/SinksInternalJvmInit.java b/streampipes-extensions/streampipes-sinks-internal-jvm/src/main/java/org/apache/streampipes/sinks/internal/jvm/SinksInternalJvmInit.java deleted file mode 100644 index 38961624c8..0000000000 --- a/streampipes-extensions/streampipes-sinks-internal-jvm/src/main/java/org/apache/streampipes/sinks/internal/jvm/SinksInternalJvmInit.java +++ /dev/null @@ -1,60 +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.sinks.internal.jvm; - -import org.apache.streampipes.dataformat.cbor.CborDataFormatFactory; -import org.apache.streampipes.dataformat.fst.FstDataFormatFactory; -import org.apache.streampipes.dataformat.json.JsonDataFormatFactory; -import org.apache.streampipes.dataformat.smile.SmileDataFormatFactory; -import org.apache.streampipes.extensions.management.model.SpServiceDefinition; -import org.apache.streampipes.extensions.management.model.SpServiceDefinitionBuilder; -import org.apache.streampipes.messaging.jms.SpJmsProtocolFactory; -import org.apache.streampipes.messaging.kafka.SpKafkaProtocolFactory; -import org.apache.streampipes.messaging.mqtt.SpMqttProtocolFactory; -import org.apache.streampipes.messaging.nats.SpNatsProtocolFactory; -import org.apache.streampipes.service.extensions.ExtensionsModelSubmitter; -import org.apache.streampipes.sinks.internal.jvm.datalake.DataLakeSink; -import org.apache.streampipes.sinks.internal.jvm.notification.NotificationProducer; - -public class SinksInternalJvmInit extends ExtensionsModelSubmitter { - - @Override - public SpServiceDefinition provideServiceDefinition() { - return SpServiceDefinitionBuilder.create("org.apache.streampipes.sinks.internal.jvm", - "StreamPipes Sinks Internal JVM", - "", - 8090) - .registerPipelineElements( - new DataLakeSink(), - new NotificationProducer()) - .registerMessagingFormats( - new JsonDataFormatFactory(), - new CborDataFormatFactory(), - new SmileDataFormatFactory(), - new FstDataFormatFactory()) - .registerMessagingProtocols( - new SpKafkaProtocolFactory(), - new SpJmsProtocolFactory(), - new SpMqttProtocolFactory(), - new SpNatsProtocolFactory()) - .build(); - - - } -} diff --git a/streampipes-extensions/streampipes-sinks-notifications-jvm/pom.xml b/streampipes-extensions/streampipes-sinks-notifications-jvm/pom.xml index b51a074695..78440cdce6 100644 --- a/streampipes-extensions/streampipes-sinks-notifications-jvm/pom.xml +++ b/streampipes-extensions/streampipes-sinks-notifications-jvm/pom.xml @@ -36,7 +36,7 @@ org.apache.streampipes - streampipes-sdk-bundle + streampipes-extensions-management 0.93.0-SNAPSHOT diff --git a/streampipes-extensions/streampipes-sinks-notifications-jvm/src/main/java/org/apache/streampipes/sinks/notifications/jvm/NotificationsExtensionModuleExport.java b/streampipes-extensions/streampipes-sinks-notifications-jvm/src/main/java/org/apache/streampipes/sinks/notifications/jvm/NotificationsExtensionModuleExport.java new file mode 100644 index 0000000000..5b59a64ead --- /dev/null +++ b/streampipes-extensions/streampipes-sinks-notifications-jvm/src/main/java/org/apache/streampipes/sinks/notifications/jvm/NotificationsExtensionModuleExport.java @@ -0,0 +1,53 @@ +/* + * 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.sinks.notifications.jvm; + +import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter; +import org.apache.streampipes.extensions.api.declarer.IExtensionModuleExport; +import org.apache.streampipes.extensions.api.migration.IModelMigrator; +import org.apache.streampipes.extensions.api.pe.IStreamPipesPipelineElement; +import org.apache.streampipes.sinks.notifications.jvm.email.EmailSink; +import org.apache.streampipes.sinks.notifications.jvm.onesignal.OneSignalSink; +import org.apache.streampipes.sinks.notifications.jvm.slack.SlackNotificationSink; +import org.apache.streampipes.sinks.notifications.jvm.telegram.TelegramSink; + +import java.util.Collections; +import java.util.List; + +public class NotificationsExtensionModuleExport implements IExtensionModuleExport { + @Override + public List adapters() { + return Collections.emptyList(); + } + + @Override + public List> pipelineElements() { + return List.of( + new EmailSink(), + new OneSignalSink(), + new SlackNotificationSink(), + new TelegramSink() + ); + } + + @Override + public List> migrators() { + return Collections.emptyList(); + } +} diff --git a/streampipes-extensions/streampipes-sinks-notifications-jvm/src/main/java/org/apache/streampipes/sinks/notifications/jvm/SinksNotificationsJvmInit.java b/streampipes-extensions/streampipes-sinks-notifications-jvm/src/main/java/org/apache/streampipes/sinks/notifications/jvm/SinksNotificationsJvmInit.java deleted file mode 100644 index 9f8995213d..0000000000 --- a/streampipes-extensions/streampipes-sinks-notifications-jvm/src/main/java/org/apache/streampipes/sinks/notifications/jvm/SinksNotificationsJvmInit.java +++ /dev/null @@ -1,64 +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.sinks.notifications.jvm; - -import org.apache.streampipes.dataformat.cbor.CborDataFormatFactory; -import org.apache.streampipes.dataformat.fst.FstDataFormatFactory; -import org.apache.streampipes.dataformat.json.JsonDataFormatFactory; -import org.apache.streampipes.dataformat.smile.SmileDataFormatFactory; -import org.apache.streampipes.extensions.management.model.SpServiceDefinition; -import org.apache.streampipes.extensions.management.model.SpServiceDefinitionBuilder; -import org.apache.streampipes.messaging.jms.SpJmsProtocolFactory; -import org.apache.streampipes.messaging.kafka.SpKafkaProtocolFactory; -import org.apache.streampipes.messaging.mqtt.SpMqttProtocolFactory; -import org.apache.streampipes.messaging.nats.SpNatsProtocolFactory; -import org.apache.streampipes.service.extensions.ExtensionsModelSubmitter; -import org.apache.streampipes.sinks.notifications.jvm.config.ConfigKeys; -import org.apache.streampipes.sinks.notifications.jvm.email.EmailSink; -import org.apache.streampipes.sinks.notifications.jvm.onesignal.OneSignalSink; -import org.apache.streampipes.sinks.notifications.jvm.slack.SlackNotificationSink; -import org.apache.streampipes.sinks.notifications.jvm.telegram.TelegramSink; - -public class SinksNotificationsJvmInit extends ExtensionsModelSubmitter { - - @Override - public SpServiceDefinition provideServiceDefinition() { - return SpServiceDefinitionBuilder.create("org.apache.streampipes.sinks.notifications.jvm", - "Sinks Notifications JVM", - "", - 8090) - .registerPipelineElements( - new EmailSink(), - new OneSignalSink(), - new SlackNotificationSink(), - new TelegramSink()) - .registerMessagingFormats( - new JsonDataFormatFactory(), - new CborDataFormatFactory(), - new SmileDataFormatFactory(), - new FstDataFormatFactory()) - .registerMessagingProtocols( - new SpKafkaProtocolFactory(), - new SpJmsProtocolFactory(), - new SpMqttProtocolFactory(), - new SpNatsProtocolFactory()) - .addConfig(ConfigKeys.WEBSOCKET_PROTOCOL, "ws", "") - .build(); - } -} diff --git a/streampipes-integration-tests/pom.xml b/streampipes-integration-tests/pom.xml index 024207d21e..57f41f2b44 100644 --- a/streampipes-integration-tests/pom.xml +++ b/streampipes-integration-tests/pom.xml @@ -68,9 +68,20 @@ org.apache.streampipes - streampipes-connect-adapters-iiot + streampipes-connectors-kafka + 0.93.0-SNAPSHOT + test + + + org.apache.streampipes + streampipes-connectors-mqtt + 0.93.0-SNAPSHOT + test + + + org.apache.streampipes + streampipes-connectors-pulsar 0.93.0-SNAPSHOT - embed test diff --git a/streampipes-rest-extensions/pom.xml b/streampipes-rest-extensions/pom.xml index 211d2e73cb..5024453b98 100644 --- a/streampipes-rest-extensions/pom.xml +++ b/streampipes-rest-extensions/pom.xml @@ -32,11 +32,6 @@ - - org.apache.streampipes - streampipes-rest - 0.93.0-SNAPSHOT - org.apache.streampipes streampipes-rest-shared @@ -49,6 +44,10 @@ + + io.swagger.core.v3 + swagger-annotations-jakarta + jakarta.ws.rs jakarta.ws.rs-api @@ -83,4 +82,4 @@ - \ No newline at end of file + diff --git a/streampipes-rest-extensions/src/main/java/org/apache/streampipes/rest/extensions/migration/AdapterMigrationResource.java b/streampipes-rest-extensions/src/main/java/org/apache/streampipes/rest/extensions/migration/AdapterMigrationResource.java index f4e94691ce..476f11b64b 100644 --- a/streampipes-rest-extensions/src/main/java/org/apache/streampipes/rest/extensions/migration/AdapterMigrationResource.java +++ b/streampipes-rest-extensions/src/main/java/org/apache/streampipes/rest/extensions/migration/AdapterMigrationResource.java @@ -22,7 +22,6 @@ import org.apache.streampipes.extensions.api.migration.IAdapterMigrator; import org.apache.streampipes.model.connect.adapter.AdapterDescription; import org.apache.streampipes.model.extensions.migration.MigrationRequest; -import org.apache.streampipes.rest.security.AuthConstants; import org.apache.streampipes.rest.shared.annotation.JacksonSerialized; import org.apache.streampipes.sdk.extractor.StaticPropertyExtractor; @@ -32,7 +31,6 @@ import io.swagger.v3.oas.annotations.media.ExampleObject; import io.swagger.v3.oas.annotations.responses.ApiResponse; import org.apache.http.HttpStatus; -import org.springframework.security.access.prepost.PreAuthorize; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.POST; @@ -51,7 +49,6 @@ public class AdapterMigrationResource extends MigrateExtensionsResource< @POST @Consumes(MediaType.APPLICATION_JSON) @JacksonSerialized - @PreAuthorize(AuthConstants.IS_ADMIN_ROLE) @Operation( summary = "Execute the migration for a specific adapter instance", tags = {"Extensions", "Migration"}, responses = { diff --git a/streampipes-rest-extensions/src/main/java/org/apache/streampipes/rest/extensions/migration/DataProcessorMigrationResource.java b/streampipes-rest-extensions/src/main/java/org/apache/streampipes/rest/extensions/migration/DataProcessorMigrationResource.java index f8153b4640..8a493a6e08 100644 --- a/streampipes-rest-extensions/src/main/java/org/apache/streampipes/rest/extensions/migration/DataProcessorMigrationResource.java +++ b/streampipes-rest-extensions/src/main/java/org/apache/streampipes/rest/extensions/migration/DataProcessorMigrationResource.java @@ -22,7 +22,6 @@ import org.apache.streampipes.extensions.api.migration.IDataProcessorMigrator; import org.apache.streampipes.model.extensions.migration.MigrationRequest; import org.apache.streampipes.model.graph.DataProcessorInvocation; -import org.apache.streampipes.rest.security.AuthConstants; import org.apache.streampipes.rest.shared.annotation.JacksonSerialized; import org.apache.streampipes.sdk.extractor.ProcessingElementParameterExtractor; @@ -32,7 +31,6 @@ import io.swagger.v3.oas.annotations.media.ExampleObject; import io.swagger.v3.oas.annotations.responses.ApiResponse; import org.apache.http.HttpStatus; -import org.springframework.security.access.prepost.PreAuthorize; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.POST; @@ -50,7 +48,6 @@ public class DataProcessorMigrationResource extends MigrateExtensionsResource< @POST @Consumes(MediaType.APPLICATION_JSON) @JacksonSerialized - @PreAuthorize(AuthConstants.IS_ADMIN_ROLE) @Operation( summary = "Execute the migration for a specific data processor instance", tags = {"Extensions", "Migration"}, responses = { diff --git a/streampipes-rest-extensions/src/main/java/org/apache/streampipes/rest/extensions/migration/DataSinkMigrationResource.java b/streampipes-rest-extensions/src/main/java/org/apache/streampipes/rest/extensions/migration/DataSinkMigrationResource.java index 6d1844743a..ceea800b11 100644 --- a/streampipes-rest-extensions/src/main/java/org/apache/streampipes/rest/extensions/migration/DataSinkMigrationResource.java +++ b/streampipes-rest-extensions/src/main/java/org/apache/streampipes/rest/extensions/migration/DataSinkMigrationResource.java @@ -22,7 +22,6 @@ import org.apache.streampipes.extensions.api.migration.IDataSinkMigrator; import org.apache.streampipes.model.extensions.migration.MigrationRequest; import org.apache.streampipes.model.graph.DataSinkInvocation; -import org.apache.streampipes.rest.security.AuthConstants; import org.apache.streampipes.rest.shared.annotation.JacksonSerialized; import org.apache.streampipes.sdk.extractor.DataSinkParameterExtractor; @@ -32,7 +31,6 @@ import io.swagger.v3.oas.annotations.media.ExampleObject; import io.swagger.v3.oas.annotations.responses.ApiResponse; import org.apache.http.HttpStatus; -import org.springframework.security.access.prepost.PreAuthorize; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.POST; @@ -47,7 +45,6 @@ public class DataSinkMigrationResource extends MigrateExtensionsResource< @POST @Consumes(MediaType.APPLICATION_JSON) @JacksonSerialized - @PreAuthorize(AuthConstants.IS_ADMIN_ROLE) @Operation( summary = "Execute the migration for a specific data sink instance", tags = {"Extensions", "Migration"}, responses = {