refactored tenant mgt component

pull/118/head
Amalka Subasinghe 2 years ago
parent e3c4765650
commit 2caf5a4f28

@ -25,7 +25,7 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>io.entgra.tenant.mgt.common</artifactId> <artifactId>io.entgra.device.mgt.core.tenant.mgt.common</artifactId>
<name>Entgra IoT - Tenant Manager Common</name> <name>Entgra IoT - Tenant Manager Common</name>
<description>Entgra IoT - Tenant Manager Common</description> <description>Entgra IoT - Tenant Manager Common</description>
<packaging>bundle</packaging> <packaging>bundle</packaging>
@ -46,7 +46,7 @@
org.apache.commons.logging, org.apache.commons.logging,
org.wso2.carbon.stratos.common.beans org.wso2.carbon.stratos.common.beans
</Import-Package> </Import-Package>
<Export-Package>io.entgra.tenant.mgt.common.*</Export-Package> <Export-Package>io.entgra.device.mgt.core.tenant.mgt.common.*</Export-Package>
</instructions> </instructions>
</configuration> </configuration>
</plugin> </plugin>

@ -15,7 +15,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * 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 { public class TenantMgtException extends Exception {

@ -15,9 +15,9 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * 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; import org.wso2.carbon.stratos.common.beans.TenantInfoBean;
public interface TenantManagerService { public interface TenantManagerService {

@ -25,7 +25,7 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>io.entgra.tenant.mgt.core</artifactId> <artifactId>io.entgra.device.mgt.core.tenant.mgt.core</artifactId>
<name>Entgra IoT - Tenant Manager Core</name> <name>Entgra IoT - Tenant Manager Core</name>
<description>Entgra IoT - Tenant Manager Core</description> <description>Entgra IoT - Tenant Manager Core</description>
<packaging>bundle</packaging> <packaging>bundle</packaging>
@ -46,7 +46,7 @@
<Bundle-Name>${project.artifactId}</Bundle-Name> <Bundle-Name>${project.artifactId}</Bundle-Name>
<Bundle-Version>${carbon.device.mgt.version}</Bundle-Version> <Bundle-Version>${carbon.device.mgt.version}</Bundle-Version>
<Bundle-Description>Tenant Management Core Bundle</Bundle-Description> <Bundle-Description>Tenant Management Core Bundle</Bundle-Description>
<Private-Package>io.entgra.tenant.mgt.core.internal</Private-Package> <Private-Package>io.entgra.device.mgt.core.tenant.mgt.core.internal</Private-Package>
<Import-Package> <Import-Package>
org.osgi.framework.*;version="${imp.package.version.osgi.framework}", org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
org.osgi.service.*;version="${imp.package.version.osgi.service}", org.osgi.service.*;version="${imp.package.version.osgi.service}",
@ -56,7 +56,7 @@
org.wso2.carbon.device.mgt.core, org.wso2.carbon.device.mgt.core,
org.wso2.carbon.user.api, org.wso2.carbon.user.api,
org.wso2.carbon.registry.core.exceptions, 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.beans,
org.wso2.carbon.stratos.common.exception, org.wso2.carbon.stratos.common.exception,
org.wso2.carbon.stratos.common.listeners, org.wso2.carbon.stratos.common.listeners,
@ -70,8 +70,8 @@
org.wso2.carbon.context org.wso2.carbon.context
</Import-Package> </Import-Package>
<Export-Package> <Export-Package>
!io.entgra.tenant.mgt.core.internal, !io.entgra.device.mgt.core.tenant.mgt.core.internal,
io.entgra.tenant.mgt.core.* io.entgra.device.mgt.core.tenant.mgt.core.*
</Export-Package> </Export-Package>
</instructions> </instructions>
</configuration> </configuration>
@ -123,7 +123,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.entgra.device.mgt.core</groupId> <groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.tenant.mgt.common</artifactId> <artifactId>io.entgra.device.mgt.core.tenant.mgt.common</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon</groupId> <groupId>org.wso2.carbon</groupId>

@ -15,9 +15,9 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * 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; import org.wso2.carbon.stratos.common.beans.TenantInfoBean;
public interface TenantManager { public interface TenantManager {

@ -15,14 +15,14 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * 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.common.exception.ApplicationManagementException;
import io.entgra.application.mgt.core.config.ConfigurationManager; import io.entgra.application.mgt.core.config.ConfigurationManager;
import io.entgra.application.mgt.common.services.ApplicationManager; 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 io.entgra.tenant.mgt.common.exception.TenantMgtException; import io.entgra.device.mgt.core.tenant.mgt.common.exception.TenantMgtException;
import io.entgra.tenant.mgt.core.internal.TenantMgtDataHolder; import io.entgra.device.mgt.core.tenant.mgt.core.internal.TenantMgtDataHolder;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.context.PrivilegedCarbonContext;

@ -15,11 +15,11 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * 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.device.mgt.core.tenant.mgt.common.spi.TenantManagerService;
import io.entgra.tenant.mgt.common.exception.TenantMgtException; import io.entgra.device.mgt.core.tenant.mgt.common.exception.TenantMgtException;
import io.entgra.tenant.mgt.core.internal.TenantMgtDataHolder; import io.entgra.device.mgt.core.tenant.mgt.core.internal.TenantMgtDataHolder;
import org.wso2.carbon.stratos.common.beans.TenantInfoBean; import org.wso2.carbon.stratos.common.beans.TenantInfoBean;
public class TenantManagerServiceImpl implements TenantManagerService { public class TenantManagerServiceImpl implements TenantManagerService {

@ -15,10 +15,10 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * 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.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.device.mgt.common.metadata.mgt.WhiteLabelManagementService;
import org.wso2.carbon.user.core.service.RealmService; import org.wso2.carbon.user.core.service.RealmService;

@ -15,14 +15,14 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * 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.application.mgt.common.services.ApplicationManager;
import io.entgra.tenant.mgt.common.spi.TenantManagerService; import io.entgra.device.mgt.core.tenant.mgt.common.spi.TenantManagerService;
import io.entgra.tenant.mgt.core.TenantManager; import io.entgra.device.mgt.core.tenant.mgt.core.TenantManager;
import io.entgra.tenant.mgt.core.impl.TenantManagerImpl; import io.entgra.device.mgt.core.tenant.mgt.core.impl.TenantManagerImpl;
import io.entgra.tenant.mgt.core.impl.TenantManagerServiceImpl; import io.entgra.device.mgt.core.tenant.mgt.core.impl.TenantManagerServiceImpl;
import io.entgra.tenant.mgt.core.listener.DeviceMgtTenantListener; import io.entgra.device.mgt.core.tenant.mgt.core.listener.DeviceMgtTenantListener;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.osgi.service.component.ComponentContext; 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; 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" * @scr.reference name="org.wso2.carbon.application.mgt.service"
* interface="io.entgra.application.mgt.common.services.ApplicationManager" * interface="io.entgra.application.mgt.common.services.ApplicationManager"
* cardinality="1..1" * cardinality="1..1"

@ -15,11 +15,11 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * 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.device.mgt.core.tenant.mgt.core.TenantManager;
import io.entgra.tenant.mgt.common.exception.TenantMgtException; import io.entgra.device.mgt.core.tenant.mgt.common.exception.TenantMgtException;
import io.entgra.tenant.mgt.core.internal.TenantMgtDataHolder; import io.entgra.device.mgt.core.tenant.mgt.core.internal.TenantMgtDataHolder;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.stratos.common.beans.TenantInfoBean; import org.wso2.carbon.stratos.common.beans.TenantInfoBean;

@ -31,8 +31,8 @@
<description>Entgra IoT - Tenant Management Component</description> <description>Entgra IoT - Tenant Management Component</description>
<modules> <modules>
<module>io.entgra.tenant.mgt.core</module> <module>io.entgra.device.mgt.core.tenant.mgt.core</module>
<module>io.entgra.tenant.mgt.common</module> <module>io.entgra.device.mgt.core.tenant.mgt.common</module>
</modules> </modules>
</project> </project>

@ -33,11 +33,11 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>io.entgra.device.mgt.core</groupId> <groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.tenant.mgt.core</artifactId> <artifactId>io.entgra.device.mgt.core.tenant.mgt.core</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.entgra.device.mgt.core</groupId> <groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.tenant.mgt.common</artifactId> <artifactId>io.entgra.device.mgt.core.tenant.mgt.common</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
@ -93,10 +93,10 @@
<bundles> <bundles>
<!--<bundleDef>{groupId}:{artifactId}:{version}</bundleDef>--> <!--<bundleDef>{groupId}:{artifactId}:{version}</bundleDef>-->
<bundleDef> <bundleDef>
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}
</bundleDef> </bundleDef>
<bundleDef> <bundleDef>
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}
</bundleDef> </bundleDef>
</bundles> </bundles>
</configuration> </configuration>

@ -49,7 +49,7 @@
<!-- <module>components/logger</module>--> <!-- <module>components/logger</module>-->
<!-- <module>components/task-mgt</module>--> <!-- <module>components/task-mgt</module>-->
<!-- <module>components/subtype-mgt</module>--> <!-- <module>components/subtype-mgt</module>-->
<!-- <module>components/tenant-mgt</module>--> <module>components/tenant-mgt</module>
<module>components/operation-template-mgt</module> <module>components/operation-template-mgt</module>
<!-- <module>features/device-mgt</module>--> <!-- <module>features/device-mgt</module>-->
<!-- <module>features/apimgt-extensions</module>--> <!-- <module>features/apimgt-extensions</module>-->
@ -66,7 +66,7 @@
<!-- <module>features/logger</module>--> <!-- <module>features/logger</module>-->
<!-- <module>features/task-mgt</module>--> <!-- <module>features/task-mgt</module>-->
<!-- <module>features/subtype-mgt</module>--> <!-- <module>features/subtype-mgt</module>-->
<!-- <module>features/tenant-mgt</module>--> <module>features/tenant-mgt</module>
<module>features/operation-template-mgt-plugin-feature</module> <module>features/operation-template-mgt-plugin-feature</module>
</modules> </modules>
@ -355,12 +355,12 @@
<!-- Tenant Management dependencies --> <!-- Tenant Management dependencies -->
<dependency> <dependency>
<groupId>io.entgra.device.mgt.core</groupId> <groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.tenant.mgt.common</artifactId> <artifactId>io.entgra.device.mgt.core.tenant.mgt.common</artifactId>
<version>${carbon.device.mgt.version}</version> <version>${carbon.device.mgt.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.entgra.device.mgt.core</groupId> <groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.tenant.mgt.core</artifactId> <artifactId>io.entgra.device.mgt.core.tenant.mgt.core</artifactId>
<version>${carbon.device.mgt.version}</version> <version>${carbon.device.mgt.version}</version>
</dependency> </dependency>

Loading…
Cancel
Save