From 2caf5a4f2867ba8cfd1d339fa1fef4f2f3680213 Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Wed, 10 May 2023 19:51:16 +0530 Subject: [PATCH] refactored tenant mgt component --- .../pom.xml | 4 ++-- .../mgt/common/exception/TenantMgtException.java | 2 +- .../mgt/common/spi/TenantManagerService.java | 4 ++-- .../pom.xml | 12 ++++++------ .../mgt/core}/tenant/mgt/core/TenantManager.java | 4 ++-- .../tenant/mgt/core/impl/TenantManagerImpl.java | 8 ++++---- .../mgt/core/impl/TenantManagerServiceImpl.java | 8 ++++---- .../mgt/core/internal/TenantMgtDataHolder.java | 4 ++-- .../core/internal/TenantMgtServiceComponent.java | 14 +++++++------- .../mgt/core/listener/DeviceMgtTenantListener.java | 8 ++++---- components/tenant-mgt/pom.xml | 4 ++-- .../pom.xml | 8 ++++---- pom.xml | 8 ++++---- 13 files changed, 44 insertions(+), 44 deletions(-) rename components/tenant-mgt/{io.entgra.tenant.mgt.common => io.entgra.device.mgt.core.tenant.mgt.common}/pom.xml (93%) rename components/tenant-mgt/{io.entgra.tenant.mgt.common/src/main/java/io/entgra => io.entgra.device.mgt.core.tenant.mgt.common/src/main/java/io/entgra/device/mgt/core}/tenant/mgt/common/exception/TenantMgtException.java (93%) rename components/tenant-mgt/{io.entgra.tenant.mgt.common/src/main/java/io/entgra => io.entgra.device.mgt.core.tenant.mgt.common/src/main/java/io/entgra/device/mgt/core}/tenant/mgt/common/spi/TenantManagerService.java (87%) rename components/tenant-mgt/{io.entgra.tenant.mgt.core => io.entgra.device.mgt.core.tenant.mgt.core}/pom.xml (91%) rename components/tenant-mgt/{io.entgra.tenant.mgt.core/src/main/java/io/entgra => io.entgra.device.mgt.core.tenant.mgt.core/src/main/java/io/entgra/device/mgt/core}/tenant/mgt/core/TenantManager.java (92%) rename components/tenant-mgt/{io.entgra.tenant.mgt.core/src/main/java/io/entgra => io.entgra.device.mgt.core.tenant.mgt.core/src/main/java/io/entgra/device/mgt/core}/tenant/mgt/core/impl/TenantManagerImpl.java (95%) rename components/tenant-mgt/{io.entgra.tenant.mgt.core/src/main/java/io/entgra => io.entgra.device.mgt.core.tenant.mgt.core/src/main/java/io/entgra/device/mgt/core}/tenant/mgt/core/impl/TenantManagerServiceImpl.java (80%) rename components/tenant-mgt/{io.entgra.tenant.mgt.core/src/main/java/io/entgra => io.entgra.device.mgt.core.tenant.mgt.core/src/main/java/io/entgra/device/mgt/core}/tenant/mgt/core/internal/TenantMgtDataHolder.java (94%) rename components/tenant-mgt/{io.entgra.tenant.mgt.core/src/main/java/io/entgra => io.entgra.device.mgt.core.tenant.mgt.core/src/main/java/io/entgra/device/mgt/core}/tenant/mgt/core/internal/TenantMgtServiceComponent.java (90%) rename components/tenant-mgt/{io.entgra.tenant.mgt.core/src/main/java/io/entgra => io.entgra.device.mgt.core.tenant.mgt.core/src/main/java/io/entgra/device/mgt/core}/tenant/mgt/core/listener/DeviceMgtTenantListener.java (91%) diff --git a/components/tenant-mgt/io.entgra.tenant.mgt.common/pom.xml b/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.common/pom.xml similarity index 93% rename from components/tenant-mgt/io.entgra.tenant.mgt.common/pom.xml rename to components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.common/pom.xml index bdb3195212..ec1848fc1b 100644 --- a/components/tenant-mgt/io.entgra.tenant.mgt.common/pom.xml +++ b/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.common/pom.xml @@ -25,7 +25,7 @@ 4.0.0 - io.entgra.tenant.mgt.common + io.entgra.device.mgt.core.tenant.mgt.common Entgra IoT - Tenant Manager Common Entgra IoT - Tenant Manager Common bundle @@ -46,7 +46,7 @@ org.apache.commons.logging, org.wso2.carbon.stratos.common.beans - io.entgra.tenant.mgt.common.* + io.entgra.device.mgt.core.tenant.mgt.common.* diff --git a/components/tenant-mgt/io.entgra.tenant.mgt.common/src/main/java/io/entgra/tenant/mgt/common/exception/TenantMgtException.java b/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.common/src/main/java/io/entgra/device/mgt/core/tenant/mgt/common/exception/TenantMgtException.java similarity index 93% rename from components/tenant-mgt/io.entgra.tenant.mgt.common/src/main/java/io/entgra/tenant/mgt/common/exception/TenantMgtException.java rename to components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.common/src/main/java/io/entgra/device/mgt/core/tenant/mgt/common/exception/TenantMgtException.java index 1470f07f63..f6116854d0 100644 --- a/components/tenant-mgt/io.entgra.tenant.mgt.common/src/main/java/io/entgra/tenant/mgt/common/exception/TenantMgtException.java +++ b/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.common/src/main/java/io/entgra/device/mgt/core/tenant/mgt/common/exception/TenantMgtException.java @@ -15,7 +15,7 @@ * specific language governing permissions and limitations * under the License. */ -package io.entgra.tenant.mgt.common.exception; +package io.entgra.device.mgt.core.tenant.mgt.common.exception; public class TenantMgtException extends Exception { diff --git a/components/tenant-mgt/io.entgra.tenant.mgt.common/src/main/java/io/entgra/tenant/mgt/common/spi/TenantManagerService.java b/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.common/src/main/java/io/entgra/device/mgt/core/tenant/mgt/common/spi/TenantManagerService.java similarity index 87% rename from components/tenant-mgt/io.entgra.tenant.mgt.common/src/main/java/io/entgra/tenant/mgt/common/spi/TenantManagerService.java rename to components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.common/src/main/java/io/entgra/device/mgt/core/tenant/mgt/common/spi/TenantManagerService.java index 472b1b7cb1..d9b4c237fc 100644 --- a/components/tenant-mgt/io.entgra.tenant.mgt.common/src/main/java/io/entgra/tenant/mgt/common/spi/TenantManagerService.java +++ b/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.common/src/main/java/io/entgra/device/mgt/core/tenant/mgt/common/spi/TenantManagerService.java @@ -15,9 +15,9 @@ * specific language governing permissions and limitations * under the License. */ -package io.entgra.tenant.mgt.common.spi; +package io.entgra.device.mgt.core.tenant.mgt.common.spi; -import io.entgra.tenant.mgt.common.exception.TenantMgtException; +import io.entgra.device.mgt.core.tenant.mgt.common.exception.TenantMgtException; import org.wso2.carbon.stratos.common.beans.TenantInfoBean; public interface TenantManagerService { diff --git a/components/tenant-mgt/io.entgra.tenant.mgt.core/pom.xml b/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.core/pom.xml similarity index 91% rename from components/tenant-mgt/io.entgra.tenant.mgt.core/pom.xml rename to components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.core/pom.xml index 23c168d692..c73ac3c9ee 100644 --- a/components/tenant-mgt/io.entgra.tenant.mgt.core/pom.xml +++ b/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.core/pom.xml @@ -25,7 +25,7 @@ 4.0.0 - io.entgra.tenant.mgt.core + io.entgra.device.mgt.core.tenant.mgt.core Entgra IoT - Tenant Manager Core Entgra IoT - Tenant Manager Core bundle @@ -46,7 +46,7 @@ ${project.artifactId} ${carbon.device.mgt.version} Tenant Management Core Bundle - io.entgra.tenant.mgt.core.internal + io.entgra.device.mgt.core.tenant.mgt.core.internal org.osgi.framework.*;version="${imp.package.version.osgi.framework}", org.osgi.service.*;version="${imp.package.version.osgi.service}", @@ -56,7 +56,7 @@ org.wso2.carbon.device.mgt.core, org.wso2.carbon.user.api, org.wso2.carbon.registry.core.exceptions, - io.entgra.tenant.mgt.common.*, + io.entgra.device.mgt.core.tenant.mgt.common.*, org.wso2.carbon.stratos.common.beans, org.wso2.carbon.stratos.common.exception, org.wso2.carbon.stratos.common.listeners, @@ -70,8 +70,8 @@ org.wso2.carbon.context - !io.entgra.tenant.mgt.core.internal, - io.entgra.tenant.mgt.core.* + !io.entgra.device.mgt.core.tenant.mgt.core.internal, + io.entgra.device.mgt.core.tenant.mgt.core.* @@ -123,7 +123,7 @@ io.entgra.device.mgt.core - io.entgra.tenant.mgt.common + io.entgra.device.mgt.core.tenant.mgt.common org.wso2.carbon diff --git a/components/tenant-mgt/io.entgra.tenant.mgt.core/src/main/java/io/entgra/tenant/mgt/core/TenantManager.java b/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.core/src/main/java/io/entgra/device/mgt/core/tenant/mgt/core/TenantManager.java similarity index 92% rename from components/tenant-mgt/io.entgra.tenant.mgt.core/src/main/java/io/entgra/tenant/mgt/core/TenantManager.java rename to components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.core/src/main/java/io/entgra/device/mgt/core/tenant/mgt/core/TenantManager.java index ab9b8b2290..9257b6cbd2 100644 --- a/components/tenant-mgt/io.entgra.tenant.mgt.core/src/main/java/io/entgra/tenant/mgt/core/TenantManager.java +++ b/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.core/src/main/java/io/entgra/device/mgt/core/tenant/mgt/core/TenantManager.java @@ -15,9 +15,9 @@ * specific language governing permissions and limitations * under the License. */ -package io.entgra.tenant.mgt.core; +package io.entgra.device.mgt.core.tenant.mgt.core; -import io.entgra.tenant.mgt.common.exception.TenantMgtException; +import io.entgra.device.mgt.core.tenant.mgt.common.exception.TenantMgtException; import org.wso2.carbon.stratos.common.beans.TenantInfoBean; public interface TenantManager { diff --git a/components/tenant-mgt/io.entgra.tenant.mgt.core/src/main/java/io/entgra/tenant/mgt/core/impl/TenantManagerImpl.java b/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.core/src/main/java/io/entgra/device/mgt/core/tenant/mgt/core/impl/TenantManagerImpl.java similarity index 95% rename from components/tenant-mgt/io.entgra.tenant.mgt.core/src/main/java/io/entgra/tenant/mgt/core/impl/TenantManagerImpl.java rename to components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.core/src/main/java/io/entgra/device/mgt/core/tenant/mgt/core/impl/TenantManagerImpl.java index 4089b4bffa..f7cd187668 100644 --- a/components/tenant-mgt/io.entgra.tenant.mgt.core/src/main/java/io/entgra/tenant/mgt/core/impl/TenantManagerImpl.java +++ b/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.core/src/main/java/io/entgra/device/mgt/core/tenant/mgt/core/impl/TenantManagerImpl.java @@ -15,14 +15,14 @@ * specific language governing permissions and limitations * under the License. */ -package io.entgra.tenant.mgt.core.impl; +package io.entgra.device.mgt.core.tenant.mgt.core.impl; import io.entgra.application.mgt.common.exception.ApplicationManagementException; import io.entgra.application.mgt.core.config.ConfigurationManager; import io.entgra.application.mgt.common.services.ApplicationManager; -import io.entgra.tenant.mgt.core.TenantManager; -import io.entgra.tenant.mgt.common.exception.TenantMgtException; -import io.entgra.tenant.mgt.core.internal.TenantMgtDataHolder; +import io.entgra.device.mgt.core.tenant.mgt.core.TenantManager; +import io.entgra.device.mgt.core.tenant.mgt.common.exception.TenantMgtException; +import io.entgra.device.mgt.core.tenant.mgt.core.internal.TenantMgtDataHolder; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.context.PrivilegedCarbonContext; diff --git a/components/tenant-mgt/io.entgra.tenant.mgt.core/src/main/java/io/entgra/tenant/mgt/core/impl/TenantManagerServiceImpl.java b/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.core/src/main/java/io/entgra/device/mgt/core/tenant/mgt/core/impl/TenantManagerServiceImpl.java similarity index 80% rename from components/tenant-mgt/io.entgra.tenant.mgt.core/src/main/java/io/entgra/tenant/mgt/core/impl/TenantManagerServiceImpl.java rename to components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.core/src/main/java/io/entgra/device/mgt/core/tenant/mgt/core/impl/TenantManagerServiceImpl.java index e15d105fbf..9013d534d9 100644 --- a/components/tenant-mgt/io.entgra.tenant.mgt.core/src/main/java/io/entgra/tenant/mgt/core/impl/TenantManagerServiceImpl.java +++ b/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.core/src/main/java/io/entgra/device/mgt/core/tenant/mgt/core/impl/TenantManagerServiceImpl.java @@ -15,11 +15,11 @@ * specific language governing permissions and limitations * under the License. */ -package io.entgra.tenant.mgt.core.impl; +package io.entgra.device.mgt.core.tenant.mgt.core.impl; -import io.entgra.tenant.mgt.common.spi.TenantManagerService; -import io.entgra.tenant.mgt.common.exception.TenantMgtException; -import io.entgra.tenant.mgt.core.internal.TenantMgtDataHolder; +import io.entgra.device.mgt.core.tenant.mgt.common.spi.TenantManagerService; +import io.entgra.device.mgt.core.tenant.mgt.common.exception.TenantMgtException; +import io.entgra.device.mgt.core.tenant.mgt.core.internal.TenantMgtDataHolder; import org.wso2.carbon.stratos.common.beans.TenantInfoBean; public class TenantManagerServiceImpl implements TenantManagerService { diff --git a/components/tenant-mgt/io.entgra.tenant.mgt.core/src/main/java/io/entgra/tenant/mgt/core/internal/TenantMgtDataHolder.java b/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.core/src/main/java/io/entgra/device/mgt/core/tenant/mgt/core/internal/TenantMgtDataHolder.java similarity index 94% rename from components/tenant-mgt/io.entgra.tenant.mgt.core/src/main/java/io/entgra/tenant/mgt/core/internal/TenantMgtDataHolder.java rename to components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.core/src/main/java/io/entgra/device/mgt/core/tenant/mgt/core/internal/TenantMgtDataHolder.java index d28862d410..d168bb9bd7 100644 --- a/components/tenant-mgt/io.entgra.tenant.mgt.core/src/main/java/io/entgra/tenant/mgt/core/internal/TenantMgtDataHolder.java +++ b/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.core/src/main/java/io/entgra/device/mgt/core/tenant/mgt/core/internal/TenantMgtDataHolder.java @@ -15,10 +15,10 @@ * specific language governing permissions and limitations * under the License. */ -package io.entgra.tenant.mgt.core.internal; +package io.entgra.device.mgt.core.tenant.mgt.core.internal; import io.entgra.application.mgt.common.services.ApplicationManager; -import io.entgra.tenant.mgt.core.TenantManager; +import io.entgra.device.mgt.core.tenant.mgt.core.TenantManager; import org.wso2.carbon.device.mgt.common.metadata.mgt.WhiteLabelManagementService; import org.wso2.carbon.user.core.service.RealmService; diff --git a/components/tenant-mgt/io.entgra.tenant.mgt.core/src/main/java/io/entgra/tenant/mgt/core/internal/TenantMgtServiceComponent.java b/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.core/src/main/java/io/entgra/device/mgt/core/tenant/mgt/core/internal/TenantMgtServiceComponent.java similarity index 90% rename from components/tenant-mgt/io.entgra.tenant.mgt.core/src/main/java/io/entgra/tenant/mgt/core/internal/TenantMgtServiceComponent.java rename to components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.core/src/main/java/io/entgra/device/mgt/core/tenant/mgt/core/internal/TenantMgtServiceComponent.java index cab03921c0..a335f27546 100644 --- a/components/tenant-mgt/io.entgra.tenant.mgt.core/src/main/java/io/entgra/tenant/mgt/core/internal/TenantMgtServiceComponent.java +++ b/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.core/src/main/java/io/entgra/device/mgt/core/tenant/mgt/core/internal/TenantMgtServiceComponent.java @@ -15,14 +15,14 @@ * specific language governing permissions and limitations * under the License. */ -package io.entgra.tenant.mgt.core.internal; +package io.entgra.device.mgt.core.tenant.mgt.core.internal; import io.entgra.application.mgt.common.services.ApplicationManager; -import io.entgra.tenant.mgt.common.spi.TenantManagerService; -import io.entgra.tenant.mgt.core.TenantManager; -import io.entgra.tenant.mgt.core.impl.TenantManagerImpl; -import io.entgra.tenant.mgt.core.impl.TenantManagerServiceImpl; -import io.entgra.tenant.mgt.core.listener.DeviceMgtTenantListener; +import io.entgra.device.mgt.core.tenant.mgt.common.spi.TenantManagerService; +import io.entgra.device.mgt.core.tenant.mgt.core.TenantManager; +import io.entgra.device.mgt.core.tenant.mgt.core.impl.TenantManagerImpl; +import io.entgra.device.mgt.core.tenant.mgt.core.impl.TenantManagerServiceImpl; +import io.entgra.device.mgt.core.tenant.mgt.core.listener.DeviceMgtTenantListener; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.osgi.service.component.ComponentContext; @@ -32,7 +32,7 @@ import org.wso2.carbon.stratos.common.listeners.TenantMgtListener; import org.wso2.carbon.user.core.service.RealmService; /** - * @scr.component name="org.wso2.carbon.devicemgt.tenant.manager" immediate="true" + * @scr.component name="io.entgra.device.mgt.core.tenant.manager" immediate="true" * @scr.reference name="org.wso2.carbon.application.mgt.service" * interface="io.entgra.application.mgt.common.services.ApplicationManager" * cardinality="1..1" diff --git a/components/tenant-mgt/io.entgra.tenant.mgt.core/src/main/java/io/entgra/tenant/mgt/core/listener/DeviceMgtTenantListener.java b/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.core/src/main/java/io/entgra/device/mgt/core/tenant/mgt/core/listener/DeviceMgtTenantListener.java similarity index 91% rename from components/tenant-mgt/io.entgra.tenant.mgt.core/src/main/java/io/entgra/tenant/mgt/core/listener/DeviceMgtTenantListener.java rename to components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.core/src/main/java/io/entgra/device/mgt/core/tenant/mgt/core/listener/DeviceMgtTenantListener.java index a272585bf7..baaef87785 100644 --- a/components/tenant-mgt/io.entgra.tenant.mgt.core/src/main/java/io/entgra/tenant/mgt/core/listener/DeviceMgtTenantListener.java +++ b/components/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.core/src/main/java/io/entgra/device/mgt/core/tenant/mgt/core/listener/DeviceMgtTenantListener.java @@ -15,11 +15,11 @@ * specific language governing permissions and limitations * under the License. */ -package io.entgra.tenant.mgt.core.listener; +package io.entgra.device.mgt.core.tenant.mgt.core.listener; -import io.entgra.tenant.mgt.core.TenantManager; -import io.entgra.tenant.mgt.common.exception.TenantMgtException; -import io.entgra.tenant.mgt.core.internal.TenantMgtDataHolder; +import io.entgra.device.mgt.core.tenant.mgt.core.TenantManager; +import io.entgra.device.mgt.core.tenant.mgt.common.exception.TenantMgtException; +import io.entgra.device.mgt.core.tenant.mgt.core.internal.TenantMgtDataHolder; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.stratos.common.beans.TenantInfoBean; diff --git a/components/tenant-mgt/pom.xml b/components/tenant-mgt/pom.xml index 2f1dbe9de3..d809b23eec 100644 --- a/components/tenant-mgt/pom.xml +++ b/components/tenant-mgt/pom.xml @@ -31,8 +31,8 @@ Entgra IoT - Tenant Management Component - io.entgra.tenant.mgt.core - io.entgra.tenant.mgt.common + io.entgra.device.mgt.core.tenant.mgt.core + io.entgra.device.mgt.core.tenant.mgt.common \ No newline at end of file diff --git a/features/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.server.feature/pom.xml b/features/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.server.feature/pom.xml index 0fa4ed6dce..943bbd4774 100644 --- a/features/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.server.feature/pom.xml +++ b/features/tenant-mgt/io.entgra.device.mgt.core.tenant.mgt.server.feature/pom.xml @@ -33,11 +33,11 @@ io.entgra.device.mgt.core - io.entgra.tenant.mgt.core + io.entgra.device.mgt.core.tenant.mgt.core io.entgra.device.mgt.core - io.entgra.tenant.mgt.common + io.entgra.device.mgt.core.tenant.mgt.common @@ -93,10 +93,10 @@ - io.entgra.device.mgt.core:io.entgra.tenant.mgt.core:${carbon.device.mgt.version} + io.entgra.device.mgt.core:io.entgra.device.mgt.core.tenant.mgt.core:${carbon.device.mgt.version} - io.entgra.device.mgt.core:io.entgra.tenant.mgt.common:${carbon.device.mgt.version} + io.entgra.device.mgt.core:io.entgra.device.mgt.core.tenant.mgt.common:${carbon.device.mgt.version} diff --git a/pom.xml b/pom.xml index 7f616b4043..9891f33f0a 100644 --- a/pom.xml +++ b/pom.xml @@ -49,7 +49,7 @@ - + components/tenant-mgt components/operation-template-mgt @@ -66,7 +66,7 @@ - + features/tenant-mgt features/operation-template-mgt-plugin-feature @@ -355,12 +355,12 @@ io.entgra.device.mgt.core - io.entgra.tenant.mgt.common + io.entgra.device.mgt.core.tenant.mgt.common ${carbon.device.mgt.version} io.entgra.device.mgt.core - io.entgra.tenant.mgt.core + io.entgra.device.mgt.core.tenant.mgt.core ${carbon.device.mgt.version}