From 99eef69235d3cd300cfe231bbb15e233d941e532 Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Wed, 3 May 2023 15:04:05 +0530 Subject: [PATCH] refactor packaging of pull notification listener --- .../pom.xml | 2 +- .../listener/DeviceTypeOperationAdapterSubscription.java | 4 ++-- .../mqtt/notification/listener/NotificationMessage.java | 2 +- .../listener/PullNotificationMqttContentTransformer.java | 2 +- .../listener/PullNotificationStartupListener.java | 6 +++--- .../listener/internal/MqttNotificationDataHolder.java | 2 +- .../PullNotificationListenerServiceComponent.java | 9 ++++----- .../listener/util/MqttNotificationListener.java | 8 ++++---- 8 files changed, 17 insertions(+), 18 deletions(-) rename components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/{org/wso2/carbon/device/mgt => io/entgra/device/mgt/plugins}/mqtt/notification/listener/DeviceTypeOperationAdapterSubscription.java (95%) rename components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/{org/wso2/carbon/device/mgt => io/entgra/device/mgt/plugins}/mqtt/notification/listener/NotificationMessage.java (96%) rename components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/{org/wso2/carbon/device/mgt => io/entgra/device/mgt/plugins}/mqtt/notification/listener/PullNotificationMqttContentTransformer.java (97%) rename components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/{org/wso2/carbon/device/mgt => io/entgra/device/mgt/plugins}/mqtt/notification/listener/PullNotificationStartupListener.java (90%) rename components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/{org/wso2/carbon/device/mgt => io/entgra/device/mgt/plugins}/mqtt/notification/listener/internal/MqttNotificationDataHolder.java (96%) rename components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/{org/wso2/carbon/device/mgt => io/entgra/device/mgt/plugins}/mqtt/notification/listener/internal/PullNotificationListenerServiceComponent.java (88%) rename components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/{org/wso2/carbon/device/mgt => io/entgra/device/mgt/plugins}/mqtt/notification/listener/util/MqttNotificationListener.java (89%) diff --git a/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/pom.xml b/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/pom.xml index ff861735d..dd20e23e9 100644 --- a/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/pom.xml +++ b/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/pom.xml @@ -82,7 +82,7 @@ ${carbon.devicemgt.plugins.version} MQTT Pull Notification Provider Bundle - !org.wso2.carbon.device.mgt.mqtt.notification.listener.internal, + !io.entgra.device.mgt.plugins.mqtt.notification.listener.internal, org.wso2.carbon.device.mgt.mqtt.notification.listener.* diff --git a/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/DeviceTypeOperationAdapterSubscription.java b/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/io/entgra/device/mgt/plugins/mqtt/notification/listener/DeviceTypeOperationAdapterSubscription.java similarity index 95% rename from components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/DeviceTypeOperationAdapterSubscription.java rename to components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/io/entgra/device/mgt/plugins/mqtt/notification/listener/DeviceTypeOperationAdapterSubscription.java index 0b23371c4..0df46d3cb 100644 --- a/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/DeviceTypeOperationAdapterSubscription.java +++ b/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/io/entgra/device/mgt/plugins/mqtt/notification/listener/DeviceTypeOperationAdapterSubscription.java @@ -16,7 +16,7 @@ * under the License. * */ -package org.wso2.carbon.device.mgt.mqtt.notification.listener; +package io.entgra.device.mgt.plugins.mqtt.notification.listener; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -24,7 +24,7 @@ import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException; import org.wso2.carbon.device.mgt.common.pull.notification.PullNotificationExecutionFailedException; -import org.wso2.carbon.device.mgt.mqtt.notification.listener.internal.MqttNotificationDataHolder; +import io.entgra.device.mgt.plugins.mqtt.notification.listener.internal.MqttNotificationDataHolder; import org.wso2.carbon.event.input.adapter.core.InputEventAdapterSubscription; import org.wso2.carbon.user.api.UserStoreException; diff --git a/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/NotificationMessage.java b/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/io/entgra/device/mgt/plugins/mqtt/notification/listener/NotificationMessage.java similarity index 96% rename from components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/NotificationMessage.java rename to components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/io/entgra/device/mgt/plugins/mqtt/notification/listener/NotificationMessage.java index dfd17e29d..19012572e 100644 --- a/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/NotificationMessage.java +++ b/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/io/entgra/device/mgt/plugins/mqtt/notification/listener/NotificationMessage.java @@ -16,7 +16,7 @@ * under the License. * */ -package org.wso2.carbon.device.mgt.mqtt.notification.listener; +package io.entgra.device.mgt.plugins.mqtt.notification.listener; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; diff --git a/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/PullNotificationMqttContentTransformer.java b/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/io/entgra/device/mgt/plugins/mqtt/notification/listener/PullNotificationMqttContentTransformer.java similarity index 97% rename from components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/PullNotificationMqttContentTransformer.java rename to components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/io/entgra/device/mgt/plugins/mqtt/notification/listener/PullNotificationMqttContentTransformer.java index 476b4eba0..6b3a02006 100644 --- a/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/PullNotificationMqttContentTransformer.java +++ b/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/io/entgra/device/mgt/plugins/mqtt/notification/listener/PullNotificationMqttContentTransformer.java @@ -16,7 +16,7 @@ * under the License. * */ -package org.wso2.carbon.device.mgt.mqtt.notification.listener; +package io.entgra.device.mgt.plugins.mqtt.notification.listener; import com.google.gson.Gson; import org.wso2.carbon.context.PrivilegedCarbonContext; diff --git a/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/PullNotificationStartupListener.java b/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/io/entgra/device/mgt/plugins/mqtt/notification/listener/PullNotificationStartupListener.java similarity index 90% rename from components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/PullNotificationStartupListener.java rename to components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/io/entgra/device/mgt/plugins/mqtt/notification/listener/PullNotificationStartupListener.java index 5db5acadf..c9496360b 100644 --- a/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/PullNotificationStartupListener.java +++ b/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/io/entgra/device/mgt/plugins/mqtt/notification/listener/PullNotificationStartupListener.java @@ -16,15 +16,15 @@ * under the License. * */ -package org.wso2.carbon.device.mgt.mqtt.notification.listener; +package io.entgra.device.mgt.plugins.mqtt.notification.listener; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.core.ServerStartupObserver; import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager; -import org.wso2.carbon.device.mgt.mqtt.notification.listener.internal.MqttNotificationDataHolder; -import org.wso2.carbon.device.mgt.mqtt.notification.listener.util.MqttNotificationListener; +import io.entgra.device.mgt.plugins.mqtt.notification.listener.internal.MqttNotificationDataHolder; +import io.entgra.device.mgt.plugins.mqtt.notification.listener.util.MqttNotificationListener; import org.wso2.carbon.utils.multitenancy.MultitenantConstants; /** diff --git a/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/internal/MqttNotificationDataHolder.java b/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/io/entgra/device/mgt/plugins/mqtt/notification/listener/internal/MqttNotificationDataHolder.java similarity index 96% rename from components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/internal/MqttNotificationDataHolder.java rename to components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/io/entgra/device/mgt/plugins/mqtt/notification/listener/internal/MqttNotificationDataHolder.java index 4a95c543f..9eae9c369 100644 --- a/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/internal/MqttNotificationDataHolder.java +++ b/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/io/entgra/device/mgt/plugins/mqtt/notification/listener/internal/MqttNotificationDataHolder.java @@ -16,7 +16,7 @@ * under the License. * */ -package org.wso2.carbon.device.mgt.mqtt.notification.listener.internal; +package io.entgra.device.mgt.plugins.mqtt.notification.listener.internal; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; import org.wso2.carbon.event.input.adapter.core.InputEventAdapterService; diff --git a/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/internal/PullNotificationListenerServiceComponent.java b/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/io/entgra/device/mgt/plugins/mqtt/notification/listener/internal/PullNotificationListenerServiceComponent.java similarity index 88% rename from components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/internal/PullNotificationListenerServiceComponent.java rename to components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/io/entgra/device/mgt/plugins/mqtt/notification/listener/internal/PullNotificationListenerServiceComponent.java index 78e918ec7..15fb52e9a 100644 --- a/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/internal/PullNotificationListenerServiceComponent.java +++ b/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/io/entgra/device/mgt/plugins/mqtt/notification/listener/internal/PullNotificationListenerServiceComponent.java @@ -16,7 +16,7 @@ * under the License. * */ -package org.wso2.carbon.device.mgt.mqtt.notification.listener.internal; +package io.entgra.device.mgt.plugins.mqtt.notification.listener.internal; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -25,13 +25,12 @@ import org.osgi.service.component.ComponentContext; import org.wso2.carbon.core.ServerStartupObserver; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; import org.wso2.carbon.device.mgt.input.adapter.extension.ContentTransformer; -import org.wso2.carbon.device.mgt.mqtt.notification.listener.PullNotificationMqttContentTransformer; -import org.wso2.carbon.device.mgt.mqtt.notification.listener.PullNotificationStartupListener; -import org.wso2.carbon.device.mgt.mqtt.notification.listener.util.MqttNotificationListener; +import io.entgra.device.mgt.plugins.mqtt.notification.listener.PullNotificationMqttContentTransformer; +import io.entgra.device.mgt.plugins.mqtt.notification.listener.PullNotificationStartupListener; import org.wso2.carbon.event.input.adapter.core.InputEventAdapterService; /** - * @scr.component name="org.wso2.carbon.device.mgt.mqtt.notification.listener.internal.PullNotificationListenerServiceComponent" immediate="true" + * @scr.component name="io.entgra.device.mgt.plugins.mqtt.notification.listener.internal.PullNotificationListenerServiceComponent" immediate="true" * @scr.reference name="carbon.device.mgt.provider" * interface="org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService" * cardinality="1..1" diff --git a/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/util/MqttNotificationListener.java b/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/io/entgra/device/mgt/plugins/mqtt/notification/listener/util/MqttNotificationListener.java similarity index 89% rename from components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/util/MqttNotificationListener.java rename to components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/io/entgra/device/mgt/plugins/mqtt/notification/listener/util/MqttNotificationListener.java index 08800272d..8e10420b9 100644 --- a/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/org/wso2/carbon/device/mgt/mqtt/notification/listener/util/MqttNotificationListener.java +++ b/components/extensions/pull-notification-listeners/io.entgra.device.mgt.plugins.mqtt.notification.listener/src/main/java/io/entgra/device/mgt/plugins/mqtt/notification/listener/util/MqttNotificationListener.java @@ -16,14 +16,14 @@ * under the License. * */ -package org.wso2.carbon.device.mgt.mqtt.notification.listener.util; +package io.entgra.device.mgt.plugins.mqtt.notification.listener.util; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.context.PrivilegedCarbonContext; -import org.wso2.carbon.device.mgt.mqtt.notification.listener.DeviceTypeOperationAdapterSubscription; -import org.wso2.carbon.device.mgt.mqtt.notification.listener.PullNotificationMqttContentTransformer; -import org.wso2.carbon.device.mgt.mqtt.notification.listener.internal.MqttNotificationDataHolder; +import io.entgra.device.mgt.plugins.mqtt.notification.listener.DeviceTypeOperationAdapterSubscription; +import io.entgra.device.mgt.plugins.mqtt.notification.listener.PullNotificationMqttContentTransformer; +import io.entgra.device.mgt.plugins.mqtt.notification.listener.internal.MqttNotificationDataHolder; import org.wso2.carbon.event.input.adapter.core.InputEventAdapterConfiguration; import org.wso2.carbon.event.input.adapter.core.exception.InputEventAdapterException; import org.wso2.carbon.utils.multitenancy.MultitenantConstants;