diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml
index 4c32e6f2ae3..aeb8e0168c6 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml
@@ -22,13 +22,12 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.annotations
- 4.1.16-SNAPSHOT
bundle
WSO2 Carbon - API Management Annotations
WSO2 Carbon - API Management Custom Annotation Module
@@ -73,8 +72,8 @@
org.wso2.carbon.apimgt.annotations.*
- org.osgi.framework,
- org.osgi.service.component,
+ org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
+ org.osgi.service.*;version="${imp.package.version.osgi.service}",
org.apache.commons.logging,
javax.servlet,
javax.xml.*,
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/src/main/java/org/wso2/carbon/apimgt/annotations/api/Scope.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/src/main/java/org/wso2/carbon/apimgt/annotations/api/Scope.java
index 701a6f183c5..86d3b8f4771 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/src/main/java/org/wso2/carbon/apimgt/annotations/api/Scope.java
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/src/main/java/org/wso2/carbon/apimgt/annotations/api/Scope.java
@@ -20,4 +20,6 @@ public @interface Scope {
String[] permissions();
+ String[] roles();
+
}
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml
index a77543fc931..6b0a02043b6 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml
@@ -21,12 +21,11 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
- 4.1.16-SNAPSHOT
org.wso2.carbon.apimgt.application.extension.api
war
WSO2 Carbon - API Application Management API
@@ -34,42 +33,24 @@
http://wso2.org
-
- org.apache.cxf
- cxf-rt-frontend-jaxws
- provided
+ io.swagger
+ swagger-annotations
- org.apache.cxf
- cxf-rt-frontend-jaxrs
+ org.springframework
+ spring-web
provided
org.apache.cxf
- cxf-rt-transports-http
+ cxf-bundle-jaxrs
provided
-
-
-
- org.codehaus.jackson
- jackson-core-asl
-
org.codehaus.jackson
jackson-jaxrs
-
- javax
- javaee-web-api
- provided
-
-
- javax.ws.rs
- jsr311-api
- provided
-
commons-httpclient.wso2
commons-httpclient
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/ApiApplicationRegistrationServiceImpl.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/ApiApplicationRegistrationServiceImpl.java
index aec0df4a167..471136864a2 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/ApiApplicationRegistrationServiceImpl.java
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/ApiApplicationRegistrationServiceImpl.java
@@ -27,8 +27,6 @@ import org.wso2.carbon.apimgt.application.extension.api.util.RegistrationProfile
import org.wso2.carbon.apimgt.application.extension.constants.ApiApplicationConstants;
import org.wso2.carbon.apimgt.application.extension.dto.ApiApplicationKey;
import org.wso2.carbon.apimgt.application.extension.exception.APIManagerException;
-import org.wso2.carbon.apimgt.integration.client.OAuthRequestInterceptor;
-import org.wso2.carbon.apimgt.integration.client.store.StoreClient;
import org.wso2.carbon.base.MultitenantConstants;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException;
@@ -110,12 +108,10 @@ public class ApiApplicationRegistrationServiceImpl implements ApiApplicationRegi
if (username.equals(registrationProfile.getUsername())) {
synchronized (ApiApplicationRegistrationServiceImpl.class) {
- StoreClient storeClient = new StoreClient(new OAuthRequestInterceptor(registrationProfile.getUsername(),
- registrationProfile.getPassword()));
ApiApplicationKey apiApplicationKey = apiManagementProviderService.generateAndRetrieveApplicationKeys(
applicationName, registrationProfile.getTags(),
ApiApplicationConstants.DEFAULT_TOKEN_TYPE, username,
- registrationProfile.isAllowedToAllDomains(), validityPeriod, storeClient);
+ registrationProfile.isAllowedToAllDomains(), validityPeriod);
return Response.status(Response.Status.CREATED).entity(apiApplicationKey.toString()).build();
}
}
@@ -126,7 +122,7 @@ public class ApiApplicationRegistrationServiceImpl implements ApiApplicationRegi
synchronized (ApiApplicationRegistrationServiceImpl.class) {
ApiApplicationKey apiApplicationKey = apiManagementProviderService.generateAndRetrieveApplicationKeys(
applicationName, registrationProfile.getTags(),
- ApiApplicationConstants.DEFAULT_TOKEN_TYPE, username,
+ ApiApplicationConstants.DEFAULT_TOKEN_TYPE, registrationProfile.getUsername(),
registrationProfile.isAllowedToAllDomains(), validityPeriod);
return Response.status(Response.Status.CREATED).entity(apiApplicationKey.toString()).build();
}
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/filter/ApiPermissionFilter.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/filter/ApiPermissionFilter.java
index 0c78488a2db..fc3efadb425 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/filter/ApiPermissionFilter.java
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/filter/ApiPermissionFilter.java
@@ -25,7 +25,12 @@ import org.wso2.carbon.user.api.UserRealm;
import org.wso2.carbon.user.api.UserStoreException;
import org.wso2.carbon.utils.multitenancy.MultitenantUtils;
-import javax.servlet.*;
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.bind.JAXBContext;
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/webapp/META-INF/webapp-classloading.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/webapp/META-INF/webapp-classloading.xml
index b410b426700..5cb6aa62827 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/webapp/META-INF/webapp-classloading.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/webapp/META-INF/webapp-classloading.xml
@@ -31,5 +31,5 @@
Tomcat environment is the default and every webapps gets it even if they didn't specify it.
e.g. If a webapps requires CXF, they will get both Tomcat and CXF.
-->
- CXF,Carbon
+ CXF3,Carbon
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/webapp/WEB-INF/web.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/webapp/WEB-INF/web.xml
index 823bf51d731..ab313685bfb 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/webapp/WEB-INF/web.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/webapp/WEB-INF/web.xml
@@ -54,6 +54,10 @@
managed-api-owner
admin
+
+ resource-permission-validate
+ false
+
ApiPermissionFilter
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml
index a04bf65bb93..ae6c1076a24 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml
@@ -22,12 +22,11 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
- 4.1.16-SNAPSHOT
org.wso2.carbon.apimgt.application.extension
bundle
WSO2 Carbon - API Application Management
@@ -51,14 +50,15 @@
org.wso2.carbon
org.wso2.carbon.logging
-
- org.wso2.carbon.devicemgt
- org.wso2.carbon.apimgt.integration.client
-
-
- org.wso2.carbon.devicemgt
- org.wso2.carbon.apimgt.integration.generated.client
-
+
+ org.wso2.carbon.apimgt
+ org.wso2.carbon.apimgt.api
+
+
+ org.wso2.carbon.apimgt
+ org.wso2.carbon.apimgt.impl
+ provided
+
com.googlecode.json-simple.wso2
json-simple
@@ -100,24 +100,32 @@
${carbon.device.mgt.version}
API Management Application Bundle
org.wso2.carbon.apimgt.application.extension.internal
-
- org.osgi.framework,
- org.osgi.service.component,
- org.apache.commons.logging.*,
- org.wso2.carbon.user.core.*,
- org.wso2.carbon.user.api,
- org.wso2.carbon.utils.multitenancy,
+
+ org.apache.commons.lang;version="[2.6,3)",
+ org.apache.commons.logging;version="[1.2,2)",
org.json.simple,
- org.wso2.carbon.context,
- org.wso2.carbon.base,
- org.wso2.carbon.registry.core.*;resolution:=optional,
- org.wso2.carbon.registry.indexing.*; version="${carbon.registry.imp.pkg.version.range}",
- org.wso2.carbon.apimgt.integration.client.*,
- org.wso2.carbon.apimgt.integration.generated.client.store.api,
- org.wso2.carbon.apimgt.integration.generated.client.store.model,
- org.wso2.carbon.identity.jwt.client.extension.*,
- feign
-
+ org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
+ org.osgi.service.*;version="${imp.package.version.osgi.service}",
+ org.wso2.carbon.apimgt.api;version="${carbon.api.mgt.version.range}",
+ org.wso2.carbon.apimgt.api.dto;version="${carbon.api.mgt.version.range}",
+ org.wso2.carbon.apimgt.api.model;version="${carbon.api.mgt.version.range}",
+ org.wso2.carbon.apimgt.application.extension.bean,
+ org.wso2.carbon.apimgt.application.extension.dto,
+ org.wso2.carbon.apimgt.application.extension.exception,
+ org.wso2.carbon.apimgt.impl;version="${carbon.api.mgt.version.range}",
+ org.wso2.carbon.apimgt.impl.utils;version="${carbon.api.mgt.version.range}",
+ org.wso2.carbon.context;version="${carbon.kernel.version.range}",
+ org.wso2.carbon.identity.jwt.client.extension,
+ org.wso2.carbon.identity.jwt.client.extension.dto,
+ org.wso2.carbon.identity.jwt.client.extension.exception,
+ org.wso2.carbon.identity.jwt.client.extension.service,
+ org.wso2.carbon.registry.core.exceptions;version="[1.0,2)",
+ org.wso2.carbon.registry.core.service;version="[1.0,2)",
+ org.wso2.carbon.registry.indexing.service;version="${carbon.registry.imp.pkg.version.range}",
+ org.wso2.carbon.user.api;version="[1.0,2)",
+ org.wso2.carbon.user.core.service;version="${carbon.kernel.version.range}",
+ org.wso2.carbon.user.core.tenant;version="${carbon.kernel.version.range}"
+
!org.wso2.carbon.apimgt.application.extension.internal,
org.wso2.carbon.apimgt.application.extension.*
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderService.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderService.java
index 62d353d0fd1..7405737237e 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderService.java
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderService.java
@@ -20,7 +20,6 @@ package org.wso2.carbon.apimgt.application.extension;
import org.wso2.carbon.apimgt.application.extension.dto.ApiApplicationKey;
import org.wso2.carbon.apimgt.application.extension.exception.APIManagerException;
-import org.wso2.carbon.apimgt.integration.client.store.StoreClient;
import org.wso2.carbon.identity.jwt.client.extension.dto.AccessTokenInfo;
/**
@@ -51,28 +50,6 @@ public interface APIManagementProviderService {
String keyType, String username, boolean isAllowedAllDomains,
String validityTime) throws APIManagerException;
- /**
- * Generate and retreive application keys. if the application does exist then
- * create it and subscribe to apis that are grouped with the tags.
- *
- * @param apiApplicationName name of the application.
- * @param tags tags of the apis that application needs to be subscribed.
- * @param keyType of the application.
- * @param username to whom the application is created
- * @param isAllowedAllDomains application is allowed to all the tenants
- * @param validityTime validity period of the application
- * @param storeClient Specified store client
- * @return consumerkey and secrete of the created application.
- * @throws APIManagerException
- */
- ApiApplicationKey generateAndRetrieveApplicationKeys(String apiApplicationName,
- String tags[],
- String keyType,
- String username,
- boolean isAllowedAllDomains,
- String validityTime,
- StoreClient storeClient) throws APIManagerException;
-
/**
* Remove APIM Application.
*/
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderServiceImpl.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderServiceImpl.java
index 0c957fd4e71..99dde8d4b3c 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderServiceImpl.java
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/APIManagementProviderServiceImpl.java
@@ -18,18 +18,29 @@
package org.wso2.carbon.apimgt.application.extension;
-import feign.FeignException;
+import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.apimgt.api.APIAdmin;
+import org.wso2.carbon.apimgt.api.APIConsumer;
+import org.wso2.carbon.apimgt.api.APIManagementException;
+import org.wso2.carbon.apimgt.api.dto.KeyManagerConfigurationDTO;
+import org.wso2.carbon.apimgt.api.model.API;
+import org.wso2.carbon.apimgt.api.model.APIKey;
+import org.wso2.carbon.apimgt.api.model.ApiTypeWrapper;
+import org.wso2.carbon.apimgt.api.model.Application;
+import org.wso2.carbon.apimgt.api.model.SubscribedAPI;
+import org.wso2.carbon.apimgt.api.model.Subscriber;
import org.wso2.carbon.apimgt.application.extension.bean.APIRegistrationProfile;
import org.wso2.carbon.apimgt.application.extension.constants.ApiApplicationConstants;
import org.wso2.carbon.apimgt.application.extension.dto.ApiApplicationKey;
import org.wso2.carbon.apimgt.application.extension.exception.APIManagerException;
import org.wso2.carbon.apimgt.application.extension.internal.APIApplicationManagerExtensionDataHolder;
import org.wso2.carbon.apimgt.application.extension.util.APIManagerUtil;
-import org.wso2.carbon.apimgt.integration.client.OAuthRequestInterceptor;
-import org.wso2.carbon.apimgt.integration.client.store.StoreClient;
-import org.wso2.carbon.apimgt.integration.generated.client.store.model.*;
+import org.wso2.carbon.apimgt.impl.APIAdminImpl;
+import org.wso2.carbon.apimgt.impl.APIConstants;
+import org.wso2.carbon.apimgt.impl.APIManagerFactory;
+import org.wso2.carbon.apimgt.impl.utils.APIUtil;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.identity.jwt.client.extension.JWTClient;
import org.wso2.carbon.identity.jwt.client.extension.dto.AccessTokenInfo;
@@ -39,7 +50,10 @@ import org.wso2.carbon.user.api.UserStoreException;
import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
+import java.util.Map;
+import java.util.Set;
/**
* This class represents an implementation of APIManagementProviderService.
@@ -47,51 +61,37 @@ import java.util.List;
public class APIManagementProviderServiceImpl implements APIManagementProviderService {
private static final Log log = LogFactory.getLog(APIManagementProviderServiceImpl.class);
- private static final String CONTENT_TYPE = "application/json";
- private static final int MAX_API_PER_TAG = 200;
- private static final String APP_TIER_TYPE = "application";
+ public static final APIManagerFactory API_MANAGER_FACTORY = APIManagerFactory.getInstance();
+ @Override
public boolean isTierLoaded() {
- StoreClient storeClient = APIApplicationManagerExtensionDataHolder.getInstance().getIntegrationClientService()
- .getStoreClient();
- String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext()
- .getTenantDomain();
+
+ String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain();
+
try {
- storeClient.getIndividualTier().tiersTierLevelTierNameGet(ApiApplicationConstants.DEFAULT_TIER,
- APP_TIER_TYPE,
- tenantDomain, CONTENT_TYPE, null, null);
+ APIUtil.getTiers(APIConstants.TIER_APPLICATION_TYPE, tenantDomain);
return true;
- } catch (FeignException e) {
- log.error("Feign Exception", e);
- if (e.status() == 401) {
- OAuthRequestInterceptor oAuthRequestInterceptor = new OAuthRequestInterceptor();
- String username = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername();
- oAuthRequestInterceptor.removeToken(username, tenantDomain);
- try {
- storeClient.getIndividualTier().tiersTierLevelTierNameGet(ApiApplicationConstants.DEFAULT_TIER,
- APP_TIER_TYPE, tenantDomain, CONTENT_TYPE, null, null);
- } catch (FeignException ex) {
- log.error("Invalid Attempt : " + ex);
- }
- }
- } catch (Exception e) {
+ } catch (APIManagementException e) {
log.error("APIs not ready", e);
}
+
return false;
}
@Override
public void removeAPIApplication(String applicationName, String username) throws APIManagerException {
- StoreClient storeClient = APIApplicationManagerExtensionDataHolder.getInstance().getIntegrationClientService()
- .getStoreClient();
- ApplicationList applicationList = storeClient.getApplications()
- .applicationsGet("", applicationName, 1, 0, CONTENT_TYPE, null);
- if (applicationList.getList() != null && applicationList.getList().size() > 0) {
- ApplicationInfo applicationInfo = applicationList.getList().get(0);
- storeClient.getIndividualApplication().applicationsApplicationIdDelete(applicationInfo.getApplicationId(),
- null, null);
+ try {
+ APIConsumer apiConsumer = API_MANAGER_FACTORY.getAPIConsumer(username);
+ Application application = apiConsumer.getApplicationsByName(username, applicationName, "");
+ if (application != null) {
+ apiConsumer.removeApplication(application, username);
+ }
+ } catch (APIManagementException e) {
+ throw new APIManagerException("Failed to remove api application : " + applicationName, e);
}
+
+
}
/**
@@ -99,95 +99,83 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe
*/
@Override
public synchronized ApiApplicationKey generateAndRetrieveApplicationKeys(String applicationName, String tags[],
- String keyType, String username,
- boolean isAllowedAllDomains, String validityTime,
- StoreClient sClient) throws APIManagerException {
-
- StoreClient storeClient;
+ String keyType, String username, boolean isAllowedAllDomains, String validityTime)
+ throws APIManagerException {
- if (sClient == null) {
- storeClient = APIApplicationManagerExtensionDataHolder.getInstance().getIntegrationClientService()
- .getStoreClient();
- } else {
- storeClient = sClient;
+ String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain();
+ if (StringUtils.isEmpty(username)) {
+ username = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername();
}
-
- String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext()
- .getTenantDomain();
try {
- ApplicationList applicationList = storeClient.getApplications()
- .applicationsGet("", applicationName, 1, 0, CONTENT_TYPE, null);
- Application application;
- if (applicationList == null || applicationList.getList() == null || applicationList.getList().size() == 0) {
- //create application;
- application = new Application();
- application.setName(applicationName);
- application.setSubscriber(username);
- application.setDescription("");
- application.setThrottlingTier(ApiApplicationConstants.DEFAULT_TIER);
+ APIConsumer apiConsumer = API_MANAGER_FACTORY.getAPIConsumer(username);
+ Application application = apiConsumer.getApplicationsByName(username, applicationName, "");
+
+ int applicationId = 0;
+ Subscriber subscriber = null;
+ if (application == null) {
+ subscriber = apiConsumer.getSubscriber(username);
+ if (subscriber == null) {
+ // create subscriber
+ apiConsumer.addSubscriber(username, "");
+ subscriber = apiConsumer.getSubscriber(username);
+ }
+ //create application
+ application = new Application(applicationName, subscriber);
+ application.setTier(ApiApplicationConstants.DEFAULT_TIER);
application.setGroupId("");
- application = storeClient.getIndividualApplication().applicationsPost(application, CONTENT_TYPE);
+ application.setTokenType("OAUTH");
+ apiConsumer.addApplication(application, username);
+ application = apiConsumer.getApplicationsByName(username, applicationName, "");
} else {
- ApplicationInfo applicationInfo = applicationList.getList().get(0);
- application = storeClient.getIndividualApplication()
- .applicationsApplicationIdGet(applicationInfo.getApplicationId(), CONTENT_TYPE, null, null);
- }
- if (application == null) {
- throw new APIManagerException(
- "Api application creation failed for " + applicationName + " to the user " + username);
+ subscriber = apiConsumer.getSubscriber(username);
}
- SubscriptionList subscriptionList = storeClient.getSubscriptions().subscriptionsGet
- (null, application.getApplicationId(), "", 0, 100, CONTENT_TYPE, null);
- List needToSubscribe = new ArrayList<>();
+ Set subscribedAPIs =
+ apiConsumer.getSubscribedAPIs(subscriber, applicationName, "");
+
+ log.info("Already subscribed API count: " + subscribedAPIs.size());
+
// subscribe to apis.
+ Set tempApiIds = new HashSet<>();
if (tags != null && tags.length > 0) {
for (String tag : tags) {
- APIList apiList = storeClient.getApis().apisGet(MAX_API_PER_TAG, 0, tenantDomain, "tag:" + tag
- , CONTENT_TYPE, null);
- if (apiList.getList() == null || apiList.getList().size() == 0) {
- apiList = storeClient.getApis().apisGet(MAX_API_PER_TAG, 0
- , MultitenantConstants.SUPER_TENANT_DOMAIN_NAME, "tag:" + tag, CONTENT_TYPE, null);
+ Set apisWithTag = apiConsumer.getAPIsWithTag(tag, tenantDomain);
+ if (apisWithTag == null || apisWithTag.size() == 0) {
+ apisWithTag = apiConsumer.getAPIsWithTag(tag, MultitenantConstants.SUPER_TENANT_DOMAIN_NAME);
}
- if (apiList.getList() != null && apiList.getList().size() > 0) {
- for (APIInfo apiInfo : apiList.getList()) {
- String id = apiInfo.getProvider().replace("@", "-AT-")
- + "-" + apiInfo.getName() + "-" + apiInfo.getVersion();
- id = id.replace(" ", "+");
+ if (apisWithTag != null && apisWithTag.size() > 0) {
+ for (API apiInfo : apisWithTag) {
+ String id = apiInfo.getId().getProviderName().replace("@", "-AT-")
+ + "-" + apiInfo.getId().getName() + "-" + apiInfo.getId().getVersion();
+ // todo: amalka will this break old apis?
boolean subscriptionExist = false;
- if (subscriptionList.getList() != null && subscriptionList.getList().size() > 0) {
- for (Subscription subs : subscriptionList.getList()) {
- if (subs.getApiIdentifier().equals(id)) {
+ if (subscribedAPIs.size() > 0) {
+ for (SubscribedAPI subscribedAPI : subscribedAPIs) {
+ if (String.valueOf(subscribedAPI.getApiId().toString()).equals(id)) {
subscriptionExist = true;
break;
}
}
}
- if (!subscriptionExist) {
- Subscription subscription = new Subscription();
- //fix for APIMANAGER-5566 admin-AT-tenant1.com-Tenant1API1-1.0.0
-
- subscription.setApiIdentifier(id);
- subscription.setApplicationId(application.getApplicationId());
- subscription.tier(ApiApplicationConstants.DEFAULT_TIER);
- if (!needToSubscribe.contains(subscription)) {
- needToSubscribe.add(subscription);
- }
+ if (!subscriptionExist && !tempApiIds.contains(id)) {
+ ApiTypeWrapper apiTypeWrapper = apiConsumer.getAPIorAPIProductByUUID(
+ apiInfo.getUuid(), tenantDomain);
+ apiTypeWrapper.setTier(ApiApplicationConstants.DEFAULT_TIER);
+
+ apiConsumer.addSubscription(apiTypeWrapper, username, application);
+ tempApiIds.add(id);
}
}
}
}
}
- if (!needToSubscribe.isEmpty()) {
- storeClient.getSubscriptionMultitpleApi().subscriptionsMultiplePost(needToSubscribe, CONTENT_TYPE);
- }
//end of subscription
- List applicationKeys = application.getKeys();
+ List applicationKeys = application.getKeys();
if (applicationKeys != null) {
- for (ApplicationKey applicationKey : applicationKeys) {
- if (keyType.equals(applicationKey.getKeyType().toString())) {
+ for (APIKey applicationKey : applicationKeys) {
+ if (keyType.equals(applicationKey.getType())) {
if (applicationKey.getConsumerKey() != null && !applicationKey.getConsumerKey().isEmpty()) {
ApiApplicationKey apiApplicationKey = new ApiApplicationKey();
apiApplicationKey.setConsumerKey(applicationKey.getConsumerKey());
@@ -198,45 +186,51 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe
}
}
- ApplicationKeyGenerateRequest applicationKeyGenerateRequest = new ApplicationKeyGenerateRequest();
List allowedDomains = new ArrayList<>();
if (isAllowedAllDomains) {
allowedDomains.add(ApiApplicationConstants.ALLOWED_DOMAINS);
} else {
allowedDomains.add(APIManagerUtil.getTenantDomain());
}
- applicationKeyGenerateRequest.setAccessAllowDomains(allowedDomains);
- applicationKeyGenerateRequest.setCallbackUrl("");
- applicationKeyGenerateRequest.setKeyType(ApplicationKeyGenerateRequest.KeyTypeEnum.PRODUCTION);
- applicationKeyGenerateRequest.setValidityTime(validityTime);
-
- ApplicationKey applicationKey = storeClient.getIndividualApplication().applicationsGenerateKeysPost(
- application.getApplicationId(), applicationKeyGenerateRequest, CONTENT_TYPE, null, null);
- if (applicationKey.getConsumerKey() != null && !applicationKey.getConsumerKey().isEmpty()) {
- ApiApplicationKey apiApplicationKey = new ApiApplicationKey();
- apiApplicationKey.setConsumerKey(applicationKey.getConsumerKey());
- apiApplicationKey.setConsumerSecret(applicationKey.getConsumerSecret());
- return apiApplicationKey;
+
+ APIAdmin apiAdmin = new APIAdminImpl();
+ String keyManagerId = null;
+ try {
+ List keyManagerConfigurations = apiAdmin
+ .getKeyManagerConfigurationsByTenant(tenantDomain);
+ if (keyManagerConfigurations != null) {
+ for (KeyManagerConfigurationDTO keyManagerConfigurationDTO : keyManagerConfigurations) {
+ keyManagerId = keyManagerConfigurationDTO.getUuid();
+ }
+ }
+ String jsonString = "{\"grant_types\":\"refresh_token,urn:ietf:params:oauth:grant-type:saml2-bearer," +
+ "password,client_credentials,iwa:ntlm,urn:ietf:params:oauth:grant-type:jwt-bearer\"," +
+ "\"additionalProperties\":\"{\\\"application_access_token_expiry_time\\\":\\\"N\\/A\\\"," +
+ "\\\"user_access_token_expiry_time\\\":\\\"N\\/A\\\"," +
+ "\\\"refresh_token_expiry_time\\\":\\\"N\\/A\\\"," +
+ "\\\"id_token_expiry_time\\\":\\\"N\\/A\\\"}\"," +
+ "\"username\":\"" + username + "\"}";
+
+ Map keyDetails = apiConsumer
+ .requestApprovalForApplicationRegistration(username, applicationName, keyType, "",
+ allowedDomains.toArray(new String[allowedDomains.size()]), validityTime, "default", "",
+ jsonString, keyManagerId, tenantDomain);
+
+ if (keyDetails != null) {
+ ApiApplicationKey apiApplicationKey = new ApiApplicationKey();
+ apiApplicationKey.setConsumerKey((String) keyDetails.get("consumerKey"));
+ apiApplicationKey.setConsumerSecret((String) keyDetails.get("consumerSecret"));
+ return apiApplicationKey;
+ }
+ throw new APIManagerException("Failed to generate keys for tenant: " + tenantDomain);
+ } catch (APIManagementException e) {
+ throw new APIManagerException("Failed to create api application for tenant: " + tenantDomain, e);
}
- throw new APIManagerException("Failed to generate keys for tenant: " + tenantDomain);
- } catch (FeignException e) {
+ } catch (APIManagementException e) {
throw new APIManagerException("Failed to create api application for tenant: " + tenantDomain, e);
}
}
- /**
- * {@inheritDoc}
- */
- @Override
- public synchronized ApiApplicationKey generateAndRetrieveApplicationKeys(String applicationName, String tags[],
- String keyType, String username,
- boolean isAllowedAllDomains,
- String validityTime)
- throws APIManagerException {
- return this.generateAndRetrieveApplicationKeys(applicationName, tags, keyType, username,
- isAllowedAllDomains, validityTime, null);
- }
-
@Override
public AccessTokenInfo getAccessToken(String scopes, String[] tags, String applicationName, String tokenType,
String validityPeriod) throws APIManagerException {
@@ -311,7 +305,7 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe
if (registrationProfile.getUsername() == null || registrationProfile.getUsername().isEmpty()) {
info = generateAndRetrieveApplicationKeys(registrationProfile.getApplicationName(),
- registrationProfile.getTags(), tokenType, registrationProfile.getApplicationName(),
+ registrationProfile.getTags(), tokenType, null,
registrationProfile.isAllowedToAllDomains(), validityPeriod);
}
} finally {
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/internal/APIApplicationManagerExtensionDataHolder.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/internal/APIApplicationManagerExtensionDataHolder.java
index 90f297e6d3a..26f0320974d 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/internal/APIApplicationManagerExtensionDataHolder.java
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/internal/APIApplicationManagerExtensionDataHolder.java
@@ -18,7 +18,6 @@
package org.wso2.carbon.apimgt.application.extension.internal;
import org.wso2.carbon.apimgt.application.extension.APIManagementProviderService;
-import org.wso2.carbon.apimgt.integration.client.service.IntegrationClientService;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.identity.jwt.client.extension.service.JWTClientManagerService;
import org.wso2.carbon.registry.core.service.TenantRegistryLoader;
@@ -35,7 +34,6 @@ public class APIApplicationManagerExtensionDataHolder {
private TenantManager tenantManager;
private TenantRegistryLoader tenantRegistryLoader;
private TenantIndexingLoader indexLoader;
- private IntegrationClientService integrationClientService;
private JWTClientManagerService jwtClientManagerService;
private APIApplicationManagerExtensionDataHolder() {
@@ -94,15 +92,6 @@ public class APIApplicationManagerExtensionDataHolder {
return indexLoader;
}
- public IntegrationClientService getIntegrationClientService() {
- return integrationClientService;
- }
-
- public void setIntegrationClientService(
- IntegrationClientService integrationClientService) {
- this.integrationClientService = integrationClientService;
- }
-
public JWTClientManagerService getJwtClientManagerService() {
if (jwtClientManagerService == null) {
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/internal/APIApplicationManagerExtensionServiceComponent.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/internal/APIApplicationManagerExtensionServiceComponent.java
index 9d28c89f167..d2c675c253c 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/internal/APIApplicationManagerExtensionServiceComponent.java
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/src/main/java/org/wso2/carbon/apimgt/application/extension/internal/APIApplicationManagerExtensionServiceComponent.java
@@ -23,7 +23,6 @@ import org.osgi.framework.BundleContext;
import org.osgi.service.component.ComponentContext;;
import org.wso2.carbon.apimgt.application.extension.APIManagementProviderService;
import org.wso2.carbon.apimgt.application.extension.APIManagementProviderServiceImpl;
-import org.wso2.carbon.apimgt.integration.client.service.IntegrationClientService;
import org.wso2.carbon.registry.core.service.TenantRegistryLoader;
import org.wso2.carbon.registry.indexing.service.TenantIndexingLoader;
import org.wso2.carbon.user.core.service.RealmService;
@@ -49,12 +48,6 @@ import org.wso2.carbon.user.core.service.RealmService;
* policy="dynamic"
* bind="setRealmService"
* unbind="unsetRealmService"
- * @scr.reference name="integration.client.service"
- * interface="org.wso2.carbon.apimgt.integration.client.service.IntegrationClientService"
- * cardinality="1..1"
- * policy="dynamic"
- * bind="setIntegrationClientService"
- * unbind="unsetIntegrationClientService"
*/
public class APIApplicationManagerExtensionServiceComponent {
@@ -97,17 +90,6 @@ public class APIApplicationManagerExtensionServiceComponent {
APIApplicationManagerExtensionDataHolder.getInstance().setIndexLoaderService(null);
}
- protected void setIntegrationClientService(IntegrationClientService integrationClientService) {
- if (integrationClientService != null && log.isDebugEnabled()) {
- log.debug("integrationClientService initialized");
- }
- APIApplicationManagerExtensionDataHolder.getInstance().setIntegrationClientService(integrationClientService);
- }
-
- protected void unsetIntegrationClientService(IntegrationClientService integrationClientService) {
- APIApplicationManagerExtensionDataHolder.getInstance().setIntegrationClientService(null);
- }
-
/**
* Sets Realm Service.
*
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml
index 2fbd10211f2..aa77bf7ecd5 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml
@@ -21,13 +21,12 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.handlers
- 4.1.16-SNAPSHOT
bundle
WSO2 Carbon - API Security Handler Component
WSO2 Carbon - API Management Security Handler Module
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml
index eeddf628a54..7980d20223c 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml
@@ -13,13 +13,12 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.integration.client
- 4.1.16-SNAPSHOT
bundle
WSO2 Carbon - API Management Integration Client
WSO2 Carbon - API Management Integration Client
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/pom.xml
index 22c399e5b7e..391979285e0 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/pom.xml
@@ -13,13 +13,12 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.integration.generated.client
- 4.1.16-SNAPSHOT
bundle
WSO2 Carbon - API Management Integration Generated Client
WSO2 Carbon - API Management Integration Client
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml
index f033de1d89a..e4cf00b565d 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml
@@ -22,13 +22,12 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.webapp.publisher
- 4.1.16-SNAPSHOT
bundle
WSO2 Carbon - API Management Webapp Publisher
WSO2 Carbon - API Management Webapp Publisher
@@ -109,8 +108,14 @@
org.wso2.carbon.device.mgt.common
- org.wso2.carbon.devicemgt
- org.wso2.carbon.apimgt.integration.client
+ org.wso2.carbon.apimgt
+ org.wso2.carbon.apimgt.api
+ provided
+
+
+ org.wso2.carbon.apimgt
+ org.wso2.carbon.apimgt.impl
+ provided
com.h2database.wso2
@@ -144,41 +149,46 @@
org.wso2.carbon.apimgt.webapp.publisher.*
- org.osgi.framework,
- org.osgi.service.component,
- org.apache.commons.logging,
- javax.servlet,
- javax.xml.*,
- javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional,
- com.google.gson.*,
- org.apache.catalina,
- org.apache.catalina.core,
- org.apache.axis2.*;version="${axis2.osgi.version.range}",
- org.wso2.carbon.core,
- org.apache.commons.lang,
- org.wso2.carbon.utils,
- org.wso2.carbon.apimgt.annotations.*,
- org.wso2.carbon.governance.lcm.util.*,
- org.wso2.carbon.registry.core.*,
+ com.google.gson;version="2.3",
+ com.google.gson.reflect;version="2.3",
io.swagger.annotations,
- javax.net.ssl,
- org.scannotation,
- org.scannotation.archiveiterator,
+ javax.servlet;version="2.6",
+ javax.xml,
+ javax.xml.bind,
+ javax.xml.bind.annotation,
+ javax.xml.parsers,
+ org.apache.catalina;version="9.0",
+ org.apache.catalina.core;version="9.0",
+ org.apache.commons.logging;version="1.2",
+ org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
+ org.osgi.service.*;version="${imp.package.version.osgi.service}",
+ org.scannotation;version="1.0",
+ org.scannotation.archiveiterator;version="1.0",
org.w3c.dom,
- org.wso2.carbon.apimgt.integration.client.*,
- org.wso2.carbon.context,
- org.wso2.carbon.core.util,
- org.wso2.carbon.user.api,
- org.wso2.carbon.user.core.*,
- org.wso2.carbon.utils.multitenancy,
- org.wso2.carbon.apimgt.integration.generated.client.publisher.api,
- org.wso2.carbon.apimgt.integration.generated.client.publisher.model
+ org.wso2.carbon.apimgt.annotations.api,
+ org.wso2.carbon.apimgt.api,
+ org.wso2.carbon.apimgt.api.model,
+ org.wso2.carbon.apimgt.impl,
+ org.wso2.carbon.apimgt.webapp.publisher,
+ org.wso2.carbon.apimgt.webapp.publisher.config,
+ org.wso2.carbon.apimgt.webapp.publisher.dto,
+ org.wso2.carbon.apimgt.webapp.publisher.exception,
+ org.wso2.carbon.apimgt.webapp.publisher.lifecycle.listener,
+ org.wso2.carbon.apimgt.webapp.publisher.lifecycle.util,
+ org.wso2.carbon.base;version="1.0",
+ org.wso2.carbon.context;version="4.6",
+ org.wso2.carbon.core;version="4.6",
+ org.wso2.carbon.core.util;version="4.6",
+ org.wso2.carbon.registry.core.service;version="1.0",
+ org.wso2.carbon.user.api;version="1.0",
+ org.wso2.carbon.user.core.service;version="4.6",
+ org.wso2.carbon.user.core.tenant;version="4.6",
+ org.wso2.carbon.utils;version="4.6",
+ org.wso2.carbon.utils.multitenancy;version="4.6"
- javax.ws.rs-api,
- scribe;scope=compile|runtime;inline=false;
+ jsr311-api;scope=compile|runtime;inline=false
- *
@@ -210,4 +220,9 @@
+
+
+ true
+
+
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherServiceImpl.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherServiceImpl.java
index 2fe35e472bf..34c9348e240 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherServiceImpl.java
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/APIPublisherServiceImpl.java
@@ -18,15 +18,32 @@
*/
package org.wso2.carbon.apimgt.webapp.publisher;
-import feign.FeignException;
-import org.wso2.carbon.apimgt.integration.generated.client.publisher.model.*;
-import org.wso2.carbon.apimgt.integration.client.publisher.PublisherClient;
+import org.wso2.carbon.apimgt.webapp.publisher.dto.ApiScope;
+import org.wso2.carbon.apimgt.webapp.publisher.dto.ApiUriTemplate;
+import org.wso2.carbon.apimgt.api.APIManagementException;
+import org.wso2.carbon.apimgt.api.APIProvider;
+import org.wso2.carbon.apimgt.api.FaultGatewaysException;
+import org.wso2.carbon.apimgt.api.model.API;
+import org.wso2.carbon.apimgt.api.model.APIIdentifier;
+import org.wso2.carbon.apimgt.api.model.APIRevision;
+import org.wso2.carbon.apimgt.api.model.APIRevisionDeployment;
+import org.wso2.carbon.apimgt.api.model.CORSConfiguration;
+import org.wso2.carbon.apimgt.api.model.Scope;
+import org.wso2.carbon.apimgt.api.model.Tier;
+import org.wso2.carbon.apimgt.api.model.URITemplate;
+import org.wso2.carbon.apimgt.impl.APIConstants;
+import org.wso2.carbon.apimgt.impl.APIManagerFactory;
import org.wso2.carbon.apimgt.webapp.publisher.config.WebappPublisherConfig;
import org.wso2.carbon.apimgt.webapp.publisher.exception.APIManagerPublisherException;
-import org.wso2.carbon.apimgt.webapp.publisher.internal.APIPublisherDataHolder;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.utils.multitenancy.MultitenantUtils;
-import java.util.*;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
/**
* This class represents the concrete implementation of the APIPublisherService that corresponds to providing all
@@ -34,11 +51,10 @@ import java.util.*;
*/
public class APIPublisherServiceImpl implements APIPublisherService {
private static final String UNLIMITED_TIER = "Unlimited";
- private static final String API_PUBLISH_ENVIRONMENT = "Production and Sandbox";
- private static final String CONTENT_TYPE = "application/json";
- private static final String PUBLISHED_STATUS = "PUBLISHED";
+ private static final String API_PUBLISH_ENVIRONMENT = "Default";
private static final String CREATED_STATUS = "CREATED";
private static final String PUBLISH_ACTION = "Publish";
+ public static final APIManagerFactory API_MANAGER_FACTORY = APIManagerFactory.getInstance();
@Override
public void publishAPI(APIConfig apiConfig) throws APIManagerPublisherException {
@@ -46,100 +62,219 @@ public class APIPublisherServiceImpl implements APIPublisherService {
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, true);
PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(apiConfig.getOwner());
+ int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId();
try {
- PublisherClient publisherClient = APIPublisherDataHolder.getInstance().getIntegrationClientService()
- .getPublisherClient();
- API api = getAPI(apiConfig);
- APIList apiList = publisherClient.getApis().apisGet(100, 0, "name:" + api.getName(), CONTENT_TYPE, null);
-
- if (!isExist(api, apiList)) {
- api = publisherClient.getApi().apisPost(api, CONTENT_TYPE, null);
- if (CREATED_STATUS.equals(api.getStatus())) {
- publisherClient.getApi().apisChangeLifecyclePost(PUBLISH_ACTION, api.getId(), null, null, null);
+ APIProvider apiProvider = API_MANAGER_FACTORY.getAPIProvider(apiConfig.getOwner());
+ APIIdentifier apiIdentifier = new APIIdentifier(apiConfig.getOwner(), apiConfig.getName(), apiConfig.getVersion());
+
+ if (!apiProvider.isAPIAvailable(apiIdentifier)) {
+
+ // add new scopes as shared scopes
+ Set allSharedScopeKeys = apiProvider.getAllSharedScopeKeys(tenantDomain);
+ for (ApiScope apiScope : apiConfig.getScopes()) {
+ if (!allSharedScopeKeys.contains(apiScope.getKey())) {
+ Scope scope = new Scope();
+ scope.setName(apiScope.getName());
+ scope.setDescription(apiScope.getDescription());
+ scope.setKey(apiScope.getKey());
+ scope.setRoles(apiScope.getRoles());
+ apiProvider.addSharedScope(scope, tenantDomain);
+ }
+ }
+ API api = getAPI(apiConfig, true);
+ API createdAPI = apiProvider.addAPI(api);
+ if (CREATED_STATUS.equals(createdAPI.getStatus())) {
+ apiProvider.changeLifeCycleStatus(tenantDomain, createdAPI.getUuid(), PUBLISH_ACTION, null);
+ APIRevision apiRevision = new APIRevision();
+ apiRevision.setApiUUID(createdAPI.getUuid());
+ apiRevision.setDescription("Initial Revision");
+ String apiRevisionId = apiProvider.addAPIRevision(apiRevision, tenantDomain);
+
+ APIRevisionDeployment apiRevisionDeployment = new APIRevisionDeployment();
+ apiRevisionDeployment.setDeployment(API_PUBLISH_ENVIRONMENT);
+ apiRevisionDeployment.setVhost(System.getProperty("iot.gateway.host"));
+ apiRevisionDeployment.setDisplayOnDevportal(true);
+
+ List apiRevisionDeploymentList = new ArrayList<>();
+ apiRevisionDeploymentList.add(apiRevisionDeployment);
+ apiProvider.deployAPIRevision(createdAPI.getUuid(), apiRevisionId, apiRevisionDeploymentList);
+
}
} else {
if (WebappPublisherConfig.getInstance().isEnabledUpdateApi()) {
- for (APIInfo apiInfo : apiList.getList()) {
- if (api.getName().equals(apiInfo.getName()) && api.getVersion().equals(apiInfo.getVersion())) {
- api = publisherClient.getApi().apisApiIdPut(apiInfo.getId(), api, CONTENT_TYPE, null, null);
- if (api != null && CREATED_STATUS.equals(api.getStatus())) {
- publisherClient.getApi().apisChangeLifecyclePost(PUBLISH_ACTION, api.getId(), null, null,
- null);
+
+ // With 4.x to 5.x upgrade
+ // - there cannot be same local scope assigned in 2 different APIs
+ // - local scopes will be deprecated in the future, so need to move all scopes as shared scopes
+
+ // if an api scope is not available as shared scope, but already assigned as local scope -> that means, the scopes available for this API has not moved as shared scopes
+ // in order to do that :
+ // 1. update the same API removing scopes from URI templates
+ // 2. add scopes as shared scopes
+ // 3. update the API again adding scopes for the URI Templates
+
+ // if an api scope is not available as shared scope, and not assigned as local scope -> that means, there are new scopes
+ // 1. add new scopes as shared scopes
+ // 2. update the API adding scopes for the URI Templates
+
+ Set allSharedScopeKeys = apiProvider.getAllSharedScopeKeys(tenantDomain);
+ Set scopesToMoveAsSharedScopes = new HashSet<>();
+ for (ApiScope apiScope : apiConfig.getScopes()) {
+ // if the scope is not available as shared scope and it is assigned to an API as a local scope
+ // need remove the local scope and add as a shared scope
+ if (!allSharedScopeKeys.contains(apiScope.getKey())) {
+ if (apiProvider.isScopeKeyAssignedLocally(apiIdentifier, apiScope.getKey(), tenantId)) {
+ // collect scope to move as shared scopes
+ scopesToMoveAsSharedScopes.add(apiScope);
+ } else {
+ // if new scope add as shared scope
+ Scope scope = new Scope();
+ scope.setName(apiScope.getName());
+ scope.setDescription(apiScope.getDescription());
+ scope.setKey(apiScope.getKey());
+ scope.setRoles(apiScope.getRoles());
+ apiProvider.addSharedScope(scope, tenantDomain);
}
}
+ }
+
+ // Get existing API
+ API existingAPI = apiProvider.getAPI(apiIdentifier);
+
+ if (scopesToMoveAsSharedScopes.size() > 0) {
+ // update API to remove local scopes
+ API api = getAPI(apiConfig, false);
+ api.setStatus(existingAPI.getStatus());
+ apiProvider.updateAPI(api);
+ for (ApiScope apiScope : scopesToMoveAsSharedScopes) {
+ Scope scope = new Scope();
+ scope.setName(apiScope.getName());
+ scope.setDescription(apiScope.getDescription());
+ scope.setKey(apiScope.getKey());
+ scope.setRoles(apiScope.getRoles());
+ apiProvider.addSharedScope(scope, tenantDomain);
+ }
+ }
+
+ existingAPI = apiProvider.getAPI(apiIdentifier);
+ API api = getAPI(apiConfig, true);
+ api.setStatus(existingAPI.getStatus());
+ apiProvider.updateAPI(api);
+
+ // Assumption: Assume the latest revision is the published one
+ String latestRevisionUUID = apiProvider.getLatestRevisionUUID(existingAPI.getUuid());
+ List latestRevisionDeploymentList =
+ apiProvider.getAPIRevisionDeploymentList(latestRevisionUUID);
+
+ List apiRevisionList = apiProvider.getAPIRevisions(existingAPI.getUuid());
+ if (apiRevisionList.size() >= 5) {
+ String earliestRevisionUUID = apiProvider.getEarliestRevisionUUID(existingAPI.getUuid());
+ List earliestRevisionDeploymentList =
+ apiProvider.getAPIRevisionDeploymentList(earliestRevisionUUID);
+ apiProvider.undeployAPIRevisionDeployment(existingAPI.getUuid(), earliestRevisionUUID, earliestRevisionDeploymentList);
+ apiProvider.deleteAPIRevision(existingAPI.getUuid(), earliestRevisionUUID, tenantDomain);
+ }
+
+ // create new revision
+ APIRevision apiRevision = new APIRevision();
+ apiRevision.setApiUUID(existingAPI.getUuid());
+ apiRevision.setDescription("Updated Revision");
+ String apiRevisionId = apiProvider.addAPIRevision(apiRevision, tenantDomain);
+
+ apiProvider.deployAPIRevision(existingAPI.getUuid(), apiRevisionId, latestRevisionDeploymentList);
+
+ if (CREATED_STATUS.equals(existingAPI.getStatus())) {
+ apiProvider.changeLifeCycleStatus(tenantDomain, existingAPI.getUuid(), PUBLISH_ACTION, null);
}
}
}
- } catch (FeignException e) {
+
+
+ } catch (FaultGatewaysException | APIManagementException e) {
throw new APIManagerPublisherException(e);
} finally {
PrivilegedCarbonContext.endTenantFlow();
}
}
- private boolean isExist(API api, APIList apiList) {
- if (apiList == null || apiList.getList() == null || apiList.getList().size() == 0) {
- return false;
- }
- for (APIInfo existingApi : apiList.getList()) {
- if (existingApi.getName() != null && existingApi.getName().equals(api.
- getName()) && existingApi.getVersion() != null &&
- existingApi.getVersion().equals(api.getVersion())) {
- return true;
+ private API getAPI(APIConfig config, boolean includeScopes) {
+
+ APIIdentifier apiIdentifier = new APIIdentifier(config.getOwner(), config.getName(), config.getVersion());
+ API api = new API(apiIdentifier);
+ api.setDescription("");
+ String context = config.getContext();
+ context = context.startsWith("/") ? context : ("/" + context);
+ api.setContext(context + "/" + config.getVersion());
+ api.setStatus(CREATED_STATUS);
+ api.setWsdlUrl(null);
+ api.setResponseCache("Disabled");
+ api.setContextTemplate(context + "/{version}" );
+ api.setSwaggerDefinition(APIPublisherUtil.getSwaggerDefinition(config));
+ api.setType("HTTP");
+
+ Set uriTemplates = new HashSet<>();
+ Iterator iterator;
+ for (iterator = config.getUriTemplates().iterator(); iterator.hasNext(); ) {
+ ApiUriTemplate apiUriTemplate = iterator.next();
+ URITemplate uriTemplate = new URITemplate();
+ uriTemplate.setAuthType(apiUriTemplate.getAuthType());
+ uriTemplate.setHTTPVerb(apiUriTemplate.getHttpVerb());
+ uriTemplate.setResourceURI(apiUriTemplate.getResourceURI());
+ uriTemplate.setUriTemplate(apiUriTemplate.getUriTemplate());
+ if (includeScopes) {
+ Scope scope = new Scope();
+ if (apiUriTemplate.getScope() != null) {
+ scope.setName(apiUriTemplate.getScope().getName());
+ scope.setDescription(apiUriTemplate.getScope().getDescription());
+ scope.setKey(apiUriTemplate.getScope().getKey());
+ scope.setRoles(apiUriTemplate.getScope().getRoles());
+ uriTemplate.setScopes(scope);
+ }
}
+ uriTemplates.add(uriTemplate);
}
- return false;
- }
+ api.setUriTemplates(uriTemplates);
- private API getAPI(APIConfig config) {
+ api.setApiOwner(config.getOwner());
- API api = new API();
- api.setName(config.getName());
- api.setDescription("");
- String context = config.getContext();
- context = context.startsWith("/") ? context : ("/" + context);
- api.setContext(context);
- api.setVersion(config.getVersion());
- api.setProvider(config.getOwner());
- api.setApiDefinition(APIPublisherUtil.getSwaggerDefinition(config));
- api.setWsdlUri(null);
- api.setStatus(PUBLISHED_STATUS);
- api.setResponseCaching("DISABLED");
- api.setDestinationStatsEnabled("false");
- api.isDefaultVersion(config.isDefault());
- List transport = new ArrayList<>();
- transport.add("https");
- transport.add("http");
- api.transport(transport);
- api.setTags(Arrays.asList(config.getTags()));
- api.addTiersItem(UNLIMITED_TIER);
- api.setGatewayEnvironments(API_PUBLISH_ENVIRONMENT);
+ api.setDefaultVersion(config.isDefault());
+ api.setTransports("https,http");
+
+ Set tags = new HashSet<>();
+ tags.addAll(Arrays.asList(config.getTags()));
+ api.setTags(tags);
+
+ Set availableTiers = new HashSet<>();
+ availableTiers.add(new Tier(UNLIMITED_TIER));
+ api.setAvailableTiers(availableTiers);
+
+ Set environments = new HashSet<>();
+ environments.add(API_PUBLISH_ENVIRONMENT);
+ api.setEnvironments(environments);
+
if (config.isSharedWithAllTenants()) {
- api.setSubscriptionAvailability(API.SubscriptionAvailabilityEnum.all_tenants);
- api.setVisibility(API.VisibilityEnum.PUBLIC);
+ api.setSubscriptionAvailability(APIConstants.SUBSCRIPTION_TO_ALL_TENANTS);
+ api.setVisibility(APIConstants.API_GLOBAL_VISIBILITY);
} else {
- api.setSubscriptionAvailability(API.SubscriptionAvailabilityEnum.current_tenant);
- api.setVisibility(API.VisibilityEnum.PRIVATE);
+ api.setSubscriptionAvailability(APIConstants.SUBSCRIPTION_TO_CURRENT_TENANT);
+ api.setVisibility(APIConstants.API_PRIVATE_VISIBILITY);
}
- String endpointConfig = "{\"production_endpoints\":{\"url\":\"" + config.getEndpoint() +
- "\",\"config\":null},\"implementation_status\":\"managed\",\"endpoint_type\":\"http\"}";
-
+ String endpointConfig = "{ \"endpoint_type\": \"http\", \"sandbox_endpoints\": { \"url\": \" " +
+ config.getEndpoint() + "\" }, \"production_endpoints\": { \"url\": \" "+ config.getEndpoint()+"\" } }";
api.setEndpointConfig(endpointConfig);
- APICorsConfiguration apiCorsConfiguration = new APICorsConfiguration();
List accessControlAllowOrigins = new ArrayList<>();
accessControlAllowOrigins.add("*");
- apiCorsConfiguration.setAccessControlAllowOrigins(accessControlAllowOrigins);
List accessControlAllowHeaders = new ArrayList<>();
accessControlAllowHeaders.add("authorization");
accessControlAllowHeaders.add("Access-Control-Allow-Origin");
accessControlAllowHeaders.add("Content-Type");
accessControlAllowHeaders.add("SOAPAction");
- apiCorsConfiguration.setAccessControlAllowHeaders(accessControlAllowHeaders);
-
+ accessControlAllowHeaders.add("apikey");
+ accessControlAllowHeaders.add("Internal-Key");
List accessControlAllowMethods = new ArrayList<>();
accessControlAllowMethods.add("GET");
accessControlAllowMethods.add("PUT");
@@ -147,10 +282,16 @@ public class APIPublisherServiceImpl implements APIPublisherService {
accessControlAllowMethods.add("POST");
accessControlAllowMethods.add("PATCH");
accessControlAllowMethods.add("OPTIONS");
- apiCorsConfiguration.setAccessControlAllowMethods(accessControlAllowMethods);
- apiCorsConfiguration.setAccessControlAllowCredentials(false);
- apiCorsConfiguration.corsConfigurationEnabled(false);
- api.setCorsConfiguration(apiCorsConfiguration);
+ CORSConfiguration corsConfiguration = new CORSConfiguration(false, accessControlAllowOrigins, false,
+ accessControlAllowHeaders, accessControlAllowMethods);
+ api.setCorsConfiguration(corsConfiguration);
+
+ api.setAuthorizationHeader("Authorization");
+ List keyManagers = new ArrayList<>();
+ keyManagers.add("all");
+ api.setKeyManagers(keyManagers);
+ api.setEnableStore(true);
+
return api;
}
}
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/dto/ApiScope.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/dto/ApiScope.java
index 016dbff37f0..5578ea05df3 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/dto/ApiScope.java
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/dto/ApiScope.java
@@ -23,6 +23,7 @@ public class ApiScope {
String key;
String name;
String roles;
+ String permissions;
String description;
int id;
@@ -61,4 +62,11 @@ public class ApiScope {
this.description = description;
}
+ public String getPermissions() {
+ return permissions;
+ }
+
+ public void setPermissions(String permissions) {
+ this.permissions = permissions;
+ }
}
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/internal/APIPublisherDataHolder.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/internal/APIPublisherDataHolder.java
index 639c2fe217a..afc5ec69985 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/internal/APIPublisherDataHolder.java
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/internal/APIPublisherDataHolder.java
@@ -18,7 +18,6 @@
*/
package org.wso2.carbon.apimgt.webapp.publisher.internal;
-import org.wso2.carbon.apimgt.integration.client.service.IntegrationClientService;
import org.wso2.carbon.apimgt.webapp.publisher.APIConfig;
import org.wso2.carbon.apimgt.webapp.publisher.APIPublisherService;
import org.wso2.carbon.registry.core.service.RegistryService;
@@ -37,8 +36,6 @@ public class APIPublisherDataHolder {
private RegistryService registryService;
private boolean isServerStarted;
private Stack unpublishedApis = new Stack<>();
- private IntegrationClientService integrationClientService;
-
private static APIPublisherDataHolder thisInstance = new APIPublisherDataHolder();
private APIPublisherDataHolder() {
@@ -117,12 +114,4 @@ public class APIPublisherDataHolder {
this.unpublishedApis = unpublishedApis;
}
- public IntegrationClientService getIntegrationClientService() {
- return integrationClientService;
- }
-
- public void setIntegrationClientService(
- IntegrationClientService integrationClientService) {
- this.integrationClientService = integrationClientService;
- }
}
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/internal/APIPublisherServiceComponent.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/internal/APIPublisherServiceComponent.java
index dd5736570c5..dbdd8748105 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/internal/APIPublisherServiceComponent.java
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/internal/APIPublisherServiceComponent.java
@@ -22,7 +22,6 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.osgi.framework.BundleContext;
import org.osgi.service.component.ComponentContext;
-import org.wso2.carbon.apimgt.integration.client.service.IntegrationClientService;
import org.wso2.carbon.apimgt.webapp.publisher.APIPublisherService;
import org.wso2.carbon.apimgt.webapp.publisher.APIPublisherServiceImpl;
import org.wso2.carbon.apimgt.webapp.publisher.APIPublisherStartupHandler;
@@ -45,11 +44,6 @@ import org.wso2.carbon.user.core.service.RealmService;
* policy="dynamic"
* bind="setRegistryService"
* unbind="unsetRegistryService"
- * interface="org.wso2.carbon.apimgt.integration.client.service.IntegrationClientService"
- * cardinality="1..1"
- * policy="dynamic"
- * bind="setIntegrationClientService"
- * unbind="unsetIntegrationClientService"
*/
public class APIPublisherServiceComponent {
@@ -120,14 +114,4 @@ public class APIPublisherServiceComponent {
APIPublisherDataHolder.getInstance().setRegistryService(null);
}
- protected void setIntegrationClientService(IntegrationClientService integrationClientService) {
- if (integrationClientService != null && log.isDebugEnabled()) {
- log.debug("integrationClientService initialized");
- }
- APIPublisherDataHolder.getInstance().setIntegrationClientService(integrationClientService);
- }
-
- protected void unsetIntegrationClientService(IntegrationClientService integrationClientService) {
- APIPublisherDataHolder.getInstance().setIntegrationClientService(null);
- }
}
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/lifecycle/util/AnnotationProcessor.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/lifecycle/util/AnnotationProcessor.java
index 9cac3ca45a4..0836018a0c7 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/lifecycle/util/AnnotationProcessor.java
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/lifecycle/util/AnnotationProcessor.java
@@ -70,6 +70,7 @@ public class AnnotationProcessor {
private static final String SWAGGER_ANNOTATIONS_PROPERTIES_DESCRIPTION = "description";
private static final String SWAGGER_ANNOTATIONS_PROPERTIES_KEY = "key";
private static final String SWAGGER_ANNOTATIONS_PROPERTIES_PERMISSIONS = "permissions";
+ private static final String SWAGGER_ANNOTATIONS_PROPERTIES_ROLES = "roles";
private static final String SWAGGER_ANNOTATIONS_PROPERTIES_VERSION = "version";
private static final String SWAGGER_ANNOTATIONS_PROPERTIES_CONTEXT = "context";
private static final String SWAGGER_ANNOTATIONS_PROPERTIES_VALUE = "value";
@@ -78,6 +79,7 @@ public class AnnotationProcessor {
private static final String DEFAULT_SCOPE_NAME = "default admin scope";
private static final String DEFAULT_SCOPE_KEY = "perm:admin";
private static final String DEFAULT_SCOPE_PERMISSION = "/permision/device-mgt";
+ private static final String DEFAULT_SCOPE_ROLE = "admin";
private static final String PERMISSION_PREFIX = "/permission/admin";
@@ -217,8 +219,11 @@ public class AnnotationProcessor {
ApiScope scope;
String permissions[];
StringBuilder aggregatedPermissions;
+ String roles[];
+ StringBuilder aggregatedRoles;
for(int i=0; i
org.wso2.carbon.devicemgt
carbon-devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../../pom.xml
4.0.0
apimgt-extensions
- 4.1.16-SNAPSHOT
pom
WSO2 Carbon - API Management Extensions Component
http://wso2.org
- org.wso2.carbon.apimgt.integration.generated.client
- org.wso2.carbon.apimgt.integration.client
org.wso2.carbon.apimgt.webapp.publisher
org.wso2.carbon.apimgt.application.extension
org.wso2.carbon.apimgt.application.extension.api
org.wso2.carbon.apimgt.annotations
- org.wso2.carbon.apimgt.handlers
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.addons/pom.xml b/components/application-mgt/io.entgra.application.mgt.addons/pom.xml
similarity index 76%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.addons/pom.xml
rename to components/application-mgt/io.entgra.application.mgt.addons/pom.xml
index e85664237d7..59c2e6dbbac 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.addons/pom.xml
+++ b/components/application-mgt/io.entgra.application.mgt.addons/pom.xml
@@ -1,17 +1,34 @@
-
+
+
application-mgt
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
- org.wso2.carbon.device.application.mgt.addons
- 4.1.16-SNAPSHOT
- WSO2 Carbon - Application Management Add-Ons
- WSO2 Carbon - Application Management Add-Ons
+ io.entgra.application.mgt.addons
+ Entgra - Application Management Add-Ons
+ Entgra - Application Management Add-Ons
https://entgra.io
@@ -36,7 +53,7 @@
io.swagger.annotations.*;resolution:=optional
- org.wso2.carbon.device.application.mgt.addons.*
+ io.entgra.application.mgt.addons.*
@@ -95,7 +112,7 @@
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.common
+ io.entgra.application.mgt.common
javax.servlet
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.addons/src/main/java/org/wso2/carbon/device/application/mgt/addons/ApiOriginFilter.java b/components/application-mgt/io.entgra.application.mgt.addons/src/main/java/io/entgra/application/mgt/addons/ApiOriginFilter.java
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.addons/src/main/java/org/wso2/carbon/device/application/mgt/addons/ApiOriginFilter.java
rename to components/application-mgt/io.entgra.application.mgt.addons/src/main/java/io/entgra/application/mgt/addons/ApiOriginFilter.java
index 25446e95135..62ba2f3521c 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.addons/src/main/java/org/wso2/carbon/device/application/mgt/addons/ApiOriginFilter.java
+++ b/components/application-mgt/io.entgra.application.mgt.addons/src/main/java/io/entgra/application/mgt/addons/ApiOriginFilter.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.addons;
+package io.entgra.application.mgt.addons;
import javax.servlet.Filter;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.addons/src/main/java/org/wso2/carbon/device/application/mgt/addons/FileStreamingOutput.java b/components/application-mgt/io.entgra.application.mgt.addons/src/main/java/io/entgra/application/mgt/addons/FileStreamingOutput.java
similarity index 90%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.addons/src/main/java/org/wso2/carbon/device/application/mgt/addons/FileStreamingOutput.java
rename to components/application-mgt/io.entgra.application.mgt.addons/src/main/java/io/entgra/application/mgt/addons/FileStreamingOutput.java
index a1ad912d196..3012adf008e 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.addons/src/main/java/org/wso2/carbon/device/application/mgt/addons/FileStreamingOutput.java
+++ b/components/application-mgt/io.entgra.application.mgt.addons/src/main/java/io/entgra/application/mgt/addons/FileStreamingOutput.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.addons;
+package io.entgra.application.mgt.addons;
import javax.ws.rs.WebApplicationException;
@@ -24,7 +24,7 @@ import java.io.InputStream;
import java.io.OutputStream;
/**
- * org.wso2.carbon.device.application.mgt.addons.FileStreamingOutput to allow the user to send the files as Stream.
+ * io.entgra.application.mgt.addons.FileStreamingOutput to allow the user to send the files as Stream.
*/
public class FileStreamingOutput implements StreamingOutput {
private InputStream inputStream;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.addons/src/main/java/org/wso2/carbon/device/application/mgt/addons/JSONMessageHandler.java b/components/application-mgt/io.entgra.application.mgt.addons/src/main/java/io/entgra/application/mgt/addons/JSONMessageHandler.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.addons/src/main/java/org/wso2/carbon/device/application/mgt/addons/JSONMessageHandler.java
rename to components/application-mgt/io.entgra.application.mgt.addons/src/main/java/io/entgra/application/mgt/addons/JSONMessageHandler.java
index 6951e02b2ea..9aa828b34c8 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.addons/src/main/java/org/wso2/carbon/device/application/mgt/addons/JSONMessageHandler.java
+++ b/components/application-mgt/io.entgra.application.mgt.addons/src/main/java/io/entgra/application/mgt/addons/JSONMessageHandler.java
@@ -14,11 +14,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.addons;
+package io.entgra.application.mgt.addons;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
-import org.wso2.carbon.device.application.mgt.addons.jaxrs.AnnotationExclusionStrategy;
+import io.entgra.application.mgt.addons.jaxrs.AnnotationExclusionStrategy;
import javax.ws.rs.Consumes;
import javax.ws.rs.Produces;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.addons/src/main/java/org/wso2/carbon/device/application/mgt/addons/MultipartCustomProvider.java b/components/application-mgt/io.entgra.application.mgt.addons/src/main/java/io/entgra/application/mgt/addons/MultipartCustomProvider.java
similarity index 94%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.addons/src/main/java/org/wso2/carbon/device/application/mgt/addons/MultipartCustomProvider.java
rename to components/application-mgt/io.entgra.application.mgt.addons/src/main/java/io/entgra/application/mgt/addons/MultipartCustomProvider.java
index 647cbcc27db..3a8c2d42eaa 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.addons/src/main/java/org/wso2/carbon/device/application/mgt/addons/MultipartCustomProvider.java
+++ b/components/application-mgt/io.entgra.application.mgt.addons/src/main/java/io/entgra/application/mgt/addons/MultipartCustomProvider.java
@@ -14,14 +14,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.addons;
+package io.entgra.application.mgt.addons;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
-import org.wso2.carbon.device.application.mgt.addons.jaxrs.AnnotationExclusionStrategy;
+import io.entgra.application.mgt.addons.jaxrs.AnnotationExclusionStrategy;
import javax.ws.rs.Consumes;
import javax.ws.rs.WebApplicationException;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.addons/src/main/java/org/wso2/carbon/device/application/mgt/addons/ValidationInterceptor.java b/components/application-mgt/io.entgra.application.mgt.addons/src/main/java/io/entgra/application/mgt/addons/ValidationInterceptor.java
similarity index 98%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.addons/src/main/java/org/wso2/carbon/device/application/mgt/addons/ValidationInterceptor.java
rename to components/application-mgt/io.entgra.application.mgt.addons/src/main/java/io/entgra/application/mgt/addons/ValidationInterceptor.java
index d36e9986b1e..43182bafdc2 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.addons/src/main/java/org/wso2/carbon/device/application/mgt/addons/ValidationInterceptor.java
+++ b/components/application-mgt/io.entgra.application.mgt.addons/src/main/java/io/entgra/application/mgt/addons/ValidationInterceptor.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.addons;
+package io.entgra.application.mgt.addons;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.addons/src/main/java/org/wso2/carbon/device/application/mgt/addons/jaxrs/AnnotationExclusionStrategy.java b/components/application-mgt/io.entgra.application.mgt.addons/src/main/java/io/entgra/application/mgt/addons/jaxrs/AnnotationExclusionStrategy.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.addons/src/main/java/org/wso2/carbon/device/application/mgt/addons/jaxrs/AnnotationExclusionStrategy.java
rename to components/application-mgt/io.entgra.application.mgt.addons/src/main/java/io/entgra/application/mgt/addons/jaxrs/AnnotationExclusionStrategy.java
index d2a92c4c27c..5a4932532cc 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.addons/src/main/java/org/wso2/carbon/device/application/mgt/addons/jaxrs/AnnotationExclusionStrategy.java
+++ b/components/application-mgt/io.entgra.application.mgt.addons/src/main/java/io/entgra/application/mgt/addons/jaxrs/AnnotationExclusionStrategy.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.addons.jaxrs;
+package io.entgra.application.mgt.addons.jaxrs;
import com.google.gson.ExclusionStrategy;
import com.google.gson.FieldAttributes;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.addons/src/main/java/org/wso2/carbon/device/application/mgt/addons/jaxrs/Exclude.java b/components/application-mgt/io.entgra.application.mgt.addons/src/main/java/io/entgra/application/mgt/addons/jaxrs/Exclude.java
similarity index 94%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.addons/src/main/java/org/wso2/carbon/device/application/mgt/addons/jaxrs/Exclude.java
rename to components/application-mgt/io.entgra.application.mgt.addons/src/main/java/io/entgra/application/mgt/addons/jaxrs/Exclude.java
index e185ececcbd..1f42ccb3350 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.addons/src/main/java/org/wso2/carbon/device/application/mgt/addons/jaxrs/Exclude.java
+++ b/components/application-mgt/io.entgra.application.mgt.addons/src/main/java/io/entgra/application/mgt/addons/jaxrs/Exclude.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.addons.jaxrs;
+package io.entgra.application.mgt.addons.jaxrs;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/pom.xml b/components/application-mgt/io.entgra.application.mgt.api/pom.xml
similarity index 93%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.api/pom.xml
rename to components/application-mgt/io.entgra.application.mgt.api/pom.xml
index 591b2f46f17..9ce26dac9fd 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/pom.xml
+++ b/components/application-mgt/io.entgra.application.mgt.api/pom.xml
@@ -22,16 +22,15 @@
application-mgt
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
- org.wso2.carbon.device.application.mgt.api
- 4.1.16-SNAPSHOT
+ io.entgra.application.mgt.api
war
- WSO2 Carbon - Application Management API
- WSO2 Carbon - Application Management API
+ Entgra - Application Management API
+ Entgra - Application Management API
https://entgra.io
@@ -155,12 +154,12 @@
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.core
+ io.entgra.application.mgt.core
provided
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.common
+ io.entgra.application.mgt.common
provided
@@ -219,7 +218,7 @@
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.addons
+ io.entgra.application.mgt.addons
\ No newline at end of file
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/ArtifactDownloadAPI.java b/components/application-mgt/io.entgra.application.mgt.api/src/main/java/io/entgra/application/mgt/api/services/ArtifactDownloadAPI.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/ArtifactDownloadAPI.java
rename to components/application-mgt/io.entgra.application.mgt.api/src/main/java/io/entgra/application/mgt/api/services/ArtifactDownloadAPI.java
index 8a013e13707..2698811f7ad 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/ArtifactDownloadAPI.java
+++ b/components/application-mgt/io.entgra.application.mgt.api/src/main/java/io/entgra/application/mgt/api/services/ArtifactDownloadAPI.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.api.services;
+package io.entgra.application.mgt.api.services;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -26,8 +26,8 @@ import io.swagger.annotations.Extension;
import io.swagger.annotations.ExtensionProperty;
import io.swagger.annotations.Info;
import io.swagger.annotations.SwaggerDefinition;
-import org.wso2.carbon.device.application.mgt.common.ApplicationList;
-import org.wso2.carbon.device.application.mgt.common.ErrorResponse;
+import io.entgra.application.mgt.common.ApplicationList;
+import io.entgra.application.mgt.common.ErrorResponse;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/ArtifactDownloadAPIImpl.java b/components/application-mgt/io.entgra.application.mgt.api/src/main/java/io/entgra/application/mgt/api/services/impl/ArtifactDownloadAPIImpl.java
similarity index 91%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/ArtifactDownloadAPIImpl.java
rename to components/application-mgt/io.entgra.application.mgt.api/src/main/java/io/entgra/application/mgt/api/services/impl/ArtifactDownloadAPIImpl.java
index 005d00e757a..51a5074e136 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/ArtifactDownloadAPIImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.api/src/main/java/io/entgra/application/mgt/api/services/impl/ArtifactDownloadAPIImpl.java
@@ -15,19 +15,19 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.api.services.impl;
+package io.entgra.application.mgt.api.services.impl;
import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.api.services.ArtifactDownloadAPI;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
-import org.wso2.carbon.device.application.mgt.common.services.ApplicationManager;
-import org.wso2.carbon.device.application.mgt.common.services.AppmDataHandler;
-import org.wso2.carbon.device.application.mgt.core.exception.BadRequestException;
-import org.wso2.carbon.device.application.mgt.core.exception.NotFoundException;
-import org.wso2.carbon.device.application.mgt.core.util.APIUtil;
-import org.wso2.carbon.device.application.mgt.core.util.Constants;
+import io.entgra.application.mgt.api.services.ArtifactDownloadAPI;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.services.ApplicationManager;
+import io.entgra.application.mgt.common.services.AppmDataHandler;
+import io.entgra.application.mgt.core.exception.BadRequestException;
+import io.entgra.application.mgt.core.exception.NotFoundException;
+import io.entgra.application.mgt.core.util.APIUtil;
+import io.entgra.application.mgt.core.util.Constants;
import java.io.ByteArrayInputStream;
import java.io.IOException;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/webapp/META-INF/permissions.xml b/components/application-mgt/io.entgra.application.mgt.api/src/main/webapp/META-INF/permissions.xml
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/webapp/META-INF/permissions.xml
rename to components/application-mgt/io.entgra.application.mgt.api/src/main/webapp/META-INF/permissions.xml
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/webapp/META-INF/webapp-classloading.xml b/components/application-mgt/io.entgra.application.mgt.api/src/main/webapp/META-INF/webapp-classloading.xml
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/webapp/META-INF/webapp-classloading.xml
rename to components/application-mgt/io.entgra.application.mgt.api/src/main/webapp/META-INF/webapp-classloading.xml
index e195e080972..9f50930c4f7 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/webapp/META-INF/webapp-classloading.xml
+++ b/components/application-mgt/io.entgra.application.mgt.api/src/main/webapp/META-INF/webapp-classloading.xml
@@ -31,5 +31,5 @@
Tomcat environment is the default and every webapps gets it even if they didn't specify it.
e.g. If a webapps requires CXF, they will get both Tomcat and CXF.
-->
- CXF,Carbon
+ CXF3,Carbon
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml b/components/application-mgt/io.entgra.application.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml
similarity index 78%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml
rename to components/application-mgt/io.entgra.application.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml
index 23d288898d0..8b0e0c94ad5 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml
+++ b/components/application-mgt/io.entgra.application.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml
@@ -36,7 +36,7 @@
-
+
@@ -48,17 +48,17 @@
-
+
-
-
-
+
+
+
-
+
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/webapp/WEB-INF/web.xml b/components/application-mgt/io.entgra.application.mgt.api/src/main/webapp/WEB-INF/web.xml
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/webapp/WEB-INF/web.xml
rename to components/application-mgt/io.entgra.application.mgt.api/src/main/webapp/WEB-INF/web.xml
index 15677f5277e..5917cf8aaad 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/webapp/WEB-INF/web.xml
+++ b/components/application-mgt/io.entgra.application.mgt.api/src/main/webapp/WEB-INF/web.xml
@@ -74,7 +74,7 @@
ApiOriginFilter
- org.wso2.carbon.device.application.mgt.addons.ApiOriginFilter
+ io.entgra.application.mgt.addons.ApiOriginFilter
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/pom.xml b/components/application-mgt/io.entgra.application.mgt.common/pom.xml
similarity index 91%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/pom.xml
rename to components/application-mgt/io.entgra.application.mgt.common/pom.xml
index 876c0ab594c..877c259b6fe 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/pom.xml
+++ b/components/application-mgt/io.entgra.application.mgt.common/pom.xml
@@ -21,16 +21,15 @@
org.wso2.carbon.devicemgt
application-mgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
- org.wso2.carbon.device.application.mgt.common
- 4.1.16-SNAPSHOT
+ io.entgra.application.mgt.common
bundle
- WSO2 Carbon - Application Management Common
- WSO2 Carbon - Application Management Common
+ Entgra - Application Management Common
+ Entgra - Application Management Common
https://entgra.io
@@ -56,10 +55,10 @@
io.swagger.annotations.*;resolution:=optional,
com.fasterxml.jackson.annotation,
javax.validation.constraints,
- javax.xml.bind.annotation.*,
+ javax.xml.bind.annotation; version="${javax.xml.bind.imp.pkg.version}",
- org.wso2.carbon.device.application.mgt.common.*
+ io.entgra.application.mgt.common.*
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/AppLifecycleState.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/AppLifecycleState.java
similarity index 93%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/AppLifecycleState.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/AppLifecycleState.java
index d41de093e23..7c068158d28 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/AppLifecycleState.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/AppLifecycleState.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
/**
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/AppOperation.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/AppOperation.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/AppOperation.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/AppOperation.java
index a7fe3c9ced2..100042f8924 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/AppOperation.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/AppOperation.java
@@ -14,9 +14,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationDTO;
+import io.entgra.application.mgt.common.dto.ApplicationDTO;
public class AppOperation {
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationArtifact.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ApplicationArtifact.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationArtifact.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ApplicationArtifact.java
index c71a468957a..1485ef0e116 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationArtifact.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ApplicationArtifact.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
import java.io.InputStream;
import java.util.Map;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationInstallResponse.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ApplicationInstallResponse.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationInstallResponse.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ApplicationInstallResponse.java
index 06b0817ac1e..bd77ad4079b 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationInstallResponse.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ApplicationInstallResponse.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
import io.swagger.annotations.ApiModelProperty;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationInstaller.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ApplicationInstaller.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationInstaller.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ApplicationInstaller.java
index dde6722d853..78876f0d436 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationInstaller.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ApplicationInstaller.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
public class ApplicationInstaller {
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationList.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ApplicationList.java
similarity index 86%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationList.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ApplicationList.java
index e34c55c4642..9d725dd6b55 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationList.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ApplicationList.java
@@ -14,10 +14,10 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationDTO;
-import org.wso2.carbon.device.application.mgt.common.response.Application;
+import io.entgra.application.mgt.common.dto.ApplicationDTO;
+import io.entgra.application.mgt.common.response.Application;
import java.util.List;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationSubscriptionInfo.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ApplicationSubscriptionInfo.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationSubscriptionInfo.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ApplicationSubscriptionInfo.java
index 648e8585f93..d8c0736f658 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationSubscriptionInfo.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ApplicationSubscriptionInfo.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationSubscriptionType.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ApplicationSubscriptionType.java
similarity index 93%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationSubscriptionType.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ApplicationSubscriptionType.java
index 5628c9d96d8..9dadc7ebd77 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationSubscriptionType.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ApplicationSubscriptionType.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
/**
* Possible Subscription Type of the application.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationType.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ApplicationType.java
similarity index 93%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationType.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ApplicationType.java
index 8964ec60e7f..54d091aeb16 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationType.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ApplicationType.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
/**
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/BasePaginatedResult.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/BasePaginatedResult.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/BasePaginatedResult.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/BasePaginatedResult.java
index b2445fcf7fb..b32f6c553ee 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/BasePaginatedResult.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/BasePaginatedResult.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/BasicUserInfo.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/BasicUserInfo.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/BasicUserInfo.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/BasicUserInfo.java
index 26e73d2dc1d..ece8ad6867b 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/BasicUserInfo.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/BasicUserInfo.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/BasicUserInfoList.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/BasicUserInfoList.java
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/BasicUserInfoList.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/BasicUserInfoList.java
index 3f4762e3cb3..e7f07472986 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/BasicUserInfoList.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/BasicUserInfoList.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/DeviceGroupList.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/DeviceGroupList.java
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/DeviceGroupList.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/DeviceGroupList.java
index 698d29ee448..bb7daca91ae 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/DeviceGroupList.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/DeviceGroupList.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/DeviceList.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/DeviceList.java
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/DeviceList.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/DeviceList.java
index 94f81e153cc..692a3a8aed2 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/DeviceList.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/DeviceList.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/DeviceSubscriptionData.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/DeviceSubscriptionData.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/DeviceSubscriptionData.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/DeviceSubscriptionData.java
index 550c1c98fcb..d769a8b139e 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/DeviceSubscriptionData.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/DeviceSubscriptionData.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
import org.wso2.carbon.device.mgt.common.Device;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/DeviceTypes.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/DeviceTypes.java
similarity index 93%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/DeviceTypes.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/DeviceTypes.java
index 7fa8a02062b..fed66c582ca 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/DeviceTypes.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/DeviceTypes.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
public enum DeviceTypes {
ANDROID, IOS, WINDOWS
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/EnterpriseInstallationDetails.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/EnterpriseInstallationDetails.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/EnterpriseInstallationDetails.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/EnterpriseInstallationDetails.java
index e045fecd78c..49986c11bd0 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/EnterpriseInstallationDetails.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/EnterpriseInstallationDetails.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ErrorListItem.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ErrorListItem.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ErrorListItem.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ErrorListItem.java
index 8a5e2e2f60d..143c1374ff6 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ErrorListItem.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ErrorListItem.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ErrorResponse.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ErrorResponse.java
similarity index 98%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ErrorResponse.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ErrorResponse.java
index 58c67bfc3a6..6a7673bba81 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ErrorResponse.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ErrorResponse.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ExecutionStatus.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ExecutionStatus.java
similarity index 90%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ExecutionStatus.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ExecutionStatus.java
index c24a65593fc..dc4a8f21974 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ExecutionStatus.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ExecutionStatus.java
@@ -16,7 +16,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
public enum ExecutionStatus {
PENDING, EXECUTED, FAILED
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Filter.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/Filter.java
similarity index 98%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Filter.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/Filter.java
index 6e45015c413..6ce0f2b2d32 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Filter.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/Filter.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
import java.util.List;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ImageArtifact.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ImageArtifact.java
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ImageArtifact.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ImageArtifact.java
index 30eed0d513f..e885ffbcf89 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ImageArtifact.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ImageArtifact.java
@@ -16,7 +16,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
/**
* This represents a image artifact of a application. Icon, Screen-shot or Banner.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/InstallationDetails.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/InstallationDetails.java
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/InstallationDetails.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/InstallationDetails.java
index d15dd4a7c57..22ade534500 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/InstallationDetails.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/InstallationDetails.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
import io.swagger.annotations.ApiModelProperty;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/LifecycleChanger.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/LifecycleChanger.java
similarity index 94%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/LifecycleChanger.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/LifecycleChanger.java
index abb39642f9d..2709823ddd1 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/LifecycleChanger.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/LifecycleChanger.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
public class LifecycleChanger {
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/LifecycleState.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/LifecycleState.java
similarity index 98%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/LifecycleState.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/LifecycleState.java
index 3021b6fd9b4..78ad7689124 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/LifecycleState.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/LifecycleState.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
import java.sql.Timestamp;
import io.swagger.annotations.ApiModel;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Pagination.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/Pagination.java
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Pagination.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/Pagination.java
index 01a2205bf7b..c2179dcd70a 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Pagination.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/Pagination.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
/**
* This class represents the pagination details that will be used when fetching application details from database.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/PaginationRequest.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/PaginationRequest.java
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/PaginationRequest.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/PaginationRequest.java
index 80e0f1c603c..794ec1a2a1c 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/PaginationRequest.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/PaginationRequest.java
@@ -16,7 +16,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
/**
* This class holds required parameters for a querying a paginated device response.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/PaginationResult.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/PaginationResult.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/PaginationResult.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/PaginationResult.java
index 3f90066264b..57cbafb8848 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/PaginationResult.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/PaginationResult.java
@@ -16,7 +16,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Rating.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/Rating.java
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Rating.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/Rating.java
index 8ac24146684..5fbb1a1e39c 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Rating.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/Rating.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
import java.util.TreeMap;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ReviewNode.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ReviewNode.java
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ReviewNode.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ReviewNode.java
index c3c5c75026c..f8f45ef6ef2 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ReviewNode.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/ReviewNode.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
import java.util.ArrayList;
import java.util.List;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/RoleList.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/RoleList.java
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/RoleList.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/RoleList.java
index 183f196c8c5..fadca3462ca 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/RoleList.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/RoleList.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/SortingOrder.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/SortingOrder.java
similarity index 93%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/SortingOrder.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/SortingOrder.java
index f0c19bdffc9..2479c97046e 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/SortingOrder.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/SortingOrder.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
/**
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/SubAction.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/SubAction.java
similarity index 93%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/SubAction.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/SubAction.java
index fde06081efd..1c3bd64ff96 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/SubAction.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/SubAction.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
public enum SubAction {
INSTALL, UNINSTALL
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/SubscribingDeviceIdHolder.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/SubscribingDeviceIdHolder.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/SubscribingDeviceIdHolder.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/SubscribingDeviceIdHolder.java
index 0dd283b3fe8..be3051a3148 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/SubscribingDeviceIdHolder.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/SubscribingDeviceIdHolder.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/SubscriptionType.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/SubscriptionType.java
similarity index 93%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/SubscriptionType.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/SubscriptionType.java
index 08af098d8fb..048c83b7217 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/SubscriptionType.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/SubscriptionType.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
public enum SubscriptionType {
USER, ROLE, GROUP, DEVICE
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/User.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/User.java
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/User.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/User.java
index 780a066b176..3e0b2011261 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/User.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/User.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common;
+package io.entgra.application.mgt.common;
/**
* Represents an user.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/config/ErrorCallback.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/config/ErrorCallback.java
similarity index 98%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/config/ErrorCallback.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/config/ErrorCallback.java
index 660c6c4b094..83a5810dd9a 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/config/ErrorCallback.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/config/ErrorCallback.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.config;
+package io.entgra.application.mgt.common.config;
import javax.xml.bind.annotation.XmlElement;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/config/LifecycleState.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/config/LifecycleState.java
similarity index 98%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/config/LifecycleState.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/config/LifecycleState.java
index f94f3b36901..8f8122b437e 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/config/LifecycleState.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/config/LifecycleState.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.config;
+package io.entgra.application.mgt.common.config;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/config/MDMConfig.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/config/MDMConfig.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/config/MDMConfig.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/config/MDMConfig.java
index 1f478f84811..1c6c47330dc 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/config/MDMConfig.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/config/MDMConfig.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.config;
+package io.entgra.application.mgt.common.config;
import javax.xml.bind.annotation.XmlElement;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/config/RatingConfiguration.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/config/RatingConfiguration.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/config/RatingConfiguration.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/config/RatingConfiguration.java
index 44892c462fb..f821d7c996c 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/config/RatingConfiguration.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/config/RatingConfiguration.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.config;
+package io.entgra.application.mgt.common.config;
import javax.xml.bind.annotation.XmlElement;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/ApiRegistrationProfile.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/ApiRegistrationProfile.java
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/ApiRegistrationProfile.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/ApiRegistrationProfile.java
index a117584bd8a..6d44f354788 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/ApiRegistrationProfile.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/ApiRegistrationProfile.java
@@ -16,7 +16,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.dto;
+package io.entgra.application.mgt.common.dto;
public class ApiRegistrationProfile {
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/ApplicationDTO.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/ApplicationDTO.java
similarity index 98%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/ApplicationDTO.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/ApplicationDTO.java
index 57ec6991f94..48bd1c68228 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/ApplicationDTO.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/ApplicationDTO.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.dto;
+package io.entgra.application.mgt.common.dto;
import io.swagger.annotations.ApiModel;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/ApplicationPolicyDTO.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/ApplicationPolicyDTO.java
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/ApplicationPolicyDTO.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/ApplicationPolicyDTO.java
index 5611eb51b7f..f4357d59bea 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/ApplicationPolicyDTO.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/ApplicationPolicyDTO.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.dto;
+package io.entgra.application.mgt.common.dto;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/ApplicationReleaseDTO.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/ApplicationReleaseDTO.java
similarity index 99%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/ApplicationReleaseDTO.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/ApplicationReleaseDTO.java
index d5df40f969b..7b5fddac630 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/ApplicationReleaseDTO.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/ApplicationReleaseDTO.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.dto;
+package io.entgra.application.mgt.common.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/CategoryDTO.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/CategoryDTO.java
similarity index 94%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/CategoryDTO.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/CategoryDTO.java
index 5ab45a30794..a29c2b96701 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/CategoryDTO.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/CategoryDTO.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.dto;
+package io.entgra.application.mgt.common.dto;
public class CategoryDTO {
int id;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/DeviceSubscriptionDTO.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/DeviceSubscriptionDTO.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/DeviceSubscriptionDTO.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/DeviceSubscriptionDTO.java
index 58809c1b2ed..b2cd3d15726 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/DeviceSubscriptionDTO.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/DeviceSubscriptionDTO.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.dto;
+package io.entgra.application.mgt.common.dto;
import java.sql.Timestamp;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/GroupSubscriptionDTO.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/GroupSubscriptionDTO.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/GroupSubscriptionDTO.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/GroupSubscriptionDTO.java
index 1d1640a247b..a01b2b08bcd 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/GroupSubscriptionDTO.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/GroupSubscriptionDTO.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.dto;
+package io.entgra.application.mgt.common.dto;
import java.sql.Timestamp;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/ReviewDTO.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/ReviewDTO.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/ReviewDTO.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/ReviewDTO.java
index 42f410a26fd..24dbb6125cb 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/ReviewDTO.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/ReviewDTO.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.dto;
+package io.entgra.application.mgt.common.dto;
import java.sql.Timestamp;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/RoleSubscriptionDTO.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/RoleSubscriptionDTO.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/RoleSubscriptionDTO.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/RoleSubscriptionDTO.java
index 9d06179024a..075e96d0831 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/RoleSubscriptionDTO.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/RoleSubscriptionDTO.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.dto;
+package io.entgra.application.mgt.common.dto;
import java.sql.Timestamp;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/ScheduledSubscriptionDTO.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/ScheduledSubscriptionDTO.java
similarity index 91%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/ScheduledSubscriptionDTO.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/ScheduledSubscriptionDTO.java
index da3e1e01e0f..59ad166e802 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/ScheduledSubscriptionDTO.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/ScheduledSubscriptionDTO.java
@@ -16,13 +16,12 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.dto;
+package io.entgra.application.mgt.common.dto;
import com.google.gson.Gson;
-import org.wso2.carbon.device.application.mgt.common.ExecutionStatus;
-import org.wso2.carbon.device.application.mgt.common.SubscriptionType;
+import io.entgra.application.mgt.common.ExecutionStatus;
+import io.entgra.application.mgt.common.SubscriptionType;
-import java.time.LocalDateTime;
import java.util.List;
import java.util.stream.Collectors;
@@ -41,7 +40,7 @@ public class ScheduledSubscriptionDTO {
* Task name is a generated field and in the following pattern:
* {@code __}
* {@code SUBSCRIPTION-TYPE} - {@see {@linkplain SubscriptionType}}
- * {@code ACTION} - {@see {@linkplain org.wso2.carbon.device.application.mgt.common.SubAction}
+ * {@code ACTION} - {@see {@linkplain io.entgra.application.mgt.common.SubAction}
* {@code HASH-VALUE} - this is a hash value of the combination of application uuid and the subscriber list.
*
* Example: {@code DEVICE_INSTALL_e593e00e8ef55efc764295b6aa9ad56b}
@@ -50,7 +49,7 @@ public class ScheduledSubscriptionDTO {
/**
* UUID of the application release which is subscribed to.
- * {@see {@link org.wso2.carbon.device.application.mgt.common.response.ApplicationRelease}}
+ * {@see {@link io.entgra.application.mgt.common.response.ApplicationRelease}}
*/
private String applicationUUID;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/TagDTO.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/TagDTO.java
similarity index 94%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/TagDTO.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/TagDTO.java
index 6a7f5f5af0b..cb06a8a1cef 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/TagDTO.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/TagDTO.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.dto;
+package io.entgra.application.mgt.common.dto;
public class TagDTO {
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/UserSubscriptionDTO.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/UserSubscriptionDTO.java
similarity index 94%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/UserSubscriptionDTO.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/UserSubscriptionDTO.java
index 277b04e97d5..4b318df937d 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/UserSubscriptionDTO.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/dto/UserSubscriptionDTO.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.dto;
+package io.entgra.application.mgt.common.dto;
import java.sql.Timestamp;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/ApplicationCategoryManagementException.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/ApplicationCategoryManagementException.java
similarity index 93%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/ApplicationCategoryManagementException.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/ApplicationCategoryManagementException.java
index 027aa52d439..206b4d19706 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/ApplicationCategoryManagementException.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/ApplicationCategoryManagementException.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.exception;
+package io.entgra.application.mgt.common.exception;
/**
* Exception that will be thrown during Application Category Management.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/ApplicationManagementException.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/ApplicationManagementException.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/ApplicationManagementException.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/ApplicationManagementException.java
index 48596fe9692..c698aa01ecc 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/ApplicationManagementException.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/ApplicationManagementException.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.exception;
+package io.entgra.application.mgt.common.exception;
/**
* Represents the exception thrown during application management.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/ApplicationStorageManagementException.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/ApplicationStorageManagementException.java
similarity index 94%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/ApplicationStorageManagementException.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/ApplicationStorageManagementException.java
index 56cfb197102..0549d2e3fca 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/ApplicationStorageManagementException.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/ApplicationStorageManagementException.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.exception;
+package io.entgra.application.mgt.common.exception;
/**
* Represents the exception thrown during storing and retrieving the artifacts.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/DBConnectionException.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/DBConnectionException.java
similarity index 94%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/DBConnectionException.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/DBConnectionException.java
index cedf06bf7ce..e09cbae4b01 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/DBConnectionException.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/DBConnectionException.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.exception;
+package io.entgra.application.mgt.common.exception;
/**
* Exception thrown due to Database Connection issues.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/DeviceConnectorException.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/DeviceConnectorException.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/DeviceConnectorException.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/DeviceConnectorException.java
index 3e9fb9ddee6..d6e43825fb8 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/DeviceConnectorException.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/DeviceConnectorException.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.exception;
+package io.entgra.application.mgt.common.exception;
/**
* Represents the exception thrown during device connections.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/IllegalTransactionStateException.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/IllegalTransactionStateException.java
similarity index 94%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/IllegalTransactionStateException.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/IllegalTransactionStateException.java
index 40d0c4916a3..10400af2e0c 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/IllegalTransactionStateException.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/IllegalTransactionStateException.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.exception;
+package io.entgra.application.mgt.common.exception;
/**
* Exception thrown due to an issue in database transactions.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/InvalidConfigurationException.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/InvalidConfigurationException.java
similarity index 94%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/InvalidConfigurationException.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/InvalidConfigurationException.java
index 9ad11d10b5f..2acfdd57eb1 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/InvalidConfigurationException.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/InvalidConfigurationException.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.exception;
+package io.entgra.application.mgt.common.exception;
/**
* Exception thrown due to invalid configurations provided for Application Management.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/LifecycleManagementException.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/LifecycleManagementException.java
similarity index 94%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/LifecycleManagementException.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/LifecycleManagementException.java
index 6df1b092469..022e2bfcac9 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/LifecycleManagementException.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/LifecycleManagementException.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.exception;
+package io.entgra.application.mgt.common.exception;
/**
* Exception caused during the lifecycle management.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/RequestValidatingException.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/RequestValidatingException.java
similarity index 93%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/RequestValidatingException.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/RequestValidatingException.java
index 3fbb27fc356..62d5d06eb2f 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/RequestValidatingException.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/RequestValidatingException.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.exception;
+package io.entgra.application.mgt.common.exception;
/**
* Represents the exception thrown during validating the request.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/ResourceManagementException.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/ResourceManagementException.java
similarity index 94%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/ResourceManagementException.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/ResourceManagementException.java
index 3b5125d365b..21634a38aa7 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/ResourceManagementException.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/ResourceManagementException.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.exception;
+package io.entgra.application.mgt.common.exception;
/**
* Represents the exception that will be thrown when there is an issue while managing the resources.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/ReviewDoesNotExistException.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/ReviewDoesNotExistException.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/ReviewDoesNotExistException.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/ReviewDoesNotExistException.java
index c31c8b6263d..81ed5ad18cf 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/ReviewDoesNotExistException.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/ReviewDoesNotExistException.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.exception;
+package io.entgra.application.mgt.common.exception;
public class ReviewDoesNotExistException extends Exception {
private String message;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/ReviewManagementException.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/ReviewManagementException.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/ReviewManagementException.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/ReviewManagementException.java
index 1e6d0c0a63d..c8ef1af7817 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/ReviewManagementException.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/ReviewManagementException.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.exception;
+package io.entgra.application.mgt.common.exception;
public class ReviewManagementException extends Exception {
private String message;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/SubscriptionManagementException.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/SubscriptionManagementException.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/SubscriptionManagementException.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/SubscriptionManagementException.java
index e3c48164d0f..1abb93a98d2 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/SubscriptionManagementException.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/SubscriptionManagementException.java
@@ -16,7 +16,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.exception;
+package io.entgra.application.mgt.common.exception;
public class SubscriptionManagementException extends Exception {
private String message;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/TransactionManagementException.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/TransactionManagementException.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/TransactionManagementException.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/TransactionManagementException.java
index 4fcb6261fd3..bb24e02638a 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/TransactionManagementException.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/TransactionManagementException.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.exception;
+package io.entgra.application.mgt.common.exception;
/**
* Exception thrown due to an issue in TransactionManagement of Database.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/UnsupportedDatabaseEngineException.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/UnsupportedDatabaseEngineException.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/UnsupportedDatabaseEngineException.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/UnsupportedDatabaseEngineException.java
index 0be1bc74663..99613e67368 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/UnsupportedDatabaseEngineException.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/UnsupportedDatabaseEngineException.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.exception;
+package io.entgra.application.mgt.common.exception;
/**
* This runtime exception will be thrown if the server has configured with unsupported DB engine.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/VisibilityManagementException.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/VisibilityManagementException.java
similarity index 94%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/VisibilityManagementException.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/VisibilityManagementException.java
index aecf2c76c5d..4133158ebb2 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/exception/VisibilityManagementException.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/exception/VisibilityManagementException.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.exception;
+package io.entgra.application.mgt.common.exception;
/**
* This specialized exception is thrown by the Visibility Manager during unexpected behaviour
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/response/Application.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/response/Application.java
similarity index 98%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/response/Application.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/response/Application.java
index 0cd8a72783c..fc5251d3a8d 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/response/Application.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/response/Application.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.response;
+package io.entgra.application.mgt.common.response;
import io.swagger.annotations.ApiModelProperty;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/response/ApplicationRelease.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/response/ApplicationRelease.java
similarity index 98%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/response/ApplicationRelease.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/response/ApplicationRelease.java
index 25009bae1f2..aff7688f18c 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/response/ApplicationRelease.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/response/ApplicationRelease.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.response;
+package io.entgra.application.mgt.common.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/response/Category.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/response/Category.java
similarity index 94%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/response/Category.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/response/Category.java
index f90a688a5f3..f65614d1973 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/response/Category.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/response/Category.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.response;
+package io.entgra.application.mgt.common.response;
public class Category {
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/response/Review.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/response/Review.java
similarity index 98%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/response/Review.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/response/Review.java
index 1c0285fbb41..5e72e376de9 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/response/Review.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/response/Review.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.response;
+package io.entgra.application.mgt.common.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/response/Tag.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/response/Tag.java
similarity index 94%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/response/Tag.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/response/Tag.java
index a10e3eccc9c..bc58ded9969 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/response/Tag.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/response/Tag.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.response;
+package io.entgra.application.mgt.common.response;
public class Tag {
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/ApplicationManager.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/services/ApplicationManager.java
similarity index 88%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/ApplicationManager.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/services/ApplicationManager.java
index 73f78478e70..5e77584b9a2 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/ApplicationManager.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/services/ApplicationManager.java
@@ -14,30 +14,30 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.services;
+package io.entgra.application.mgt.common.services;
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
-import org.wso2.carbon.device.application.mgt.common.ApplicationArtifact;
-import org.wso2.carbon.device.application.mgt.common.LifecycleChanger;
-import org.wso2.carbon.device.application.mgt.common.ApplicationList;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationReleaseDTO;
-import org.wso2.carbon.device.application.mgt.common.Filter;
-import org.wso2.carbon.device.application.mgt.common.LifecycleState;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
-import org.wso2.carbon.device.application.mgt.common.exception.RequestValidatingException;
-import org.wso2.carbon.device.application.mgt.common.response.Application;
-import org.wso2.carbon.device.application.mgt.common.response.ApplicationRelease;
-import org.wso2.carbon.device.application.mgt.common.response.Category;
-import org.wso2.carbon.device.application.mgt.common.response.Tag;
-import org.wso2.carbon.device.application.mgt.common.wrapper.CustomAppReleaseWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.CustomAppWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.EntAppReleaseWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.ApplicationUpdateWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.ApplicationWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.PublicAppReleaseWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.PublicAppWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.WebAppReleaseWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.WebAppWrapper;
+import io.entgra.application.mgt.common.ApplicationArtifact;
+import io.entgra.application.mgt.common.LifecycleChanger;
+import io.entgra.application.mgt.common.ApplicationList;
+import io.entgra.application.mgt.common.dto.ApplicationReleaseDTO;
+import io.entgra.application.mgt.common.Filter;
+import io.entgra.application.mgt.common.LifecycleState;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.exception.RequestValidatingException;
+import io.entgra.application.mgt.common.response.Application;
+import io.entgra.application.mgt.common.response.ApplicationRelease;
+import io.entgra.application.mgt.common.response.Category;
+import io.entgra.application.mgt.common.response.Tag;
+import io.entgra.application.mgt.common.wrapper.CustomAppReleaseWrapper;
+import io.entgra.application.mgt.common.wrapper.CustomAppWrapper;
+import io.entgra.application.mgt.common.wrapper.EntAppReleaseWrapper;
+import io.entgra.application.mgt.common.wrapper.ApplicationUpdateWrapper;
+import io.entgra.application.mgt.common.wrapper.ApplicationWrapper;
+import io.entgra.application.mgt.common.wrapper.PublicAppReleaseWrapper;
+import io.entgra.application.mgt.common.wrapper.PublicAppWrapper;
+import io.entgra.application.mgt.common.wrapper.WebAppReleaseWrapper;
+import io.entgra.application.mgt.common.wrapper.WebAppWrapper;
import java.util.List;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/ApplicationStorageManager.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/services/ApplicationStorageManager.java
similarity index 91%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/ApplicationStorageManager.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/services/ApplicationStorageManager.java
index 3d8b0f68215..39be94cc3de 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/ApplicationStorageManager.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/services/ApplicationStorageManager.java
@@ -15,13 +15,13 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.services;
+package io.entgra.application.mgt.common.services;
-import org.wso2.carbon.device.application.mgt.common.ApplicationInstaller;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationReleaseDTO;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationStorageManagementException;
-import org.wso2.carbon.device.application.mgt.common.exception.RequestValidatingException;
-import org.wso2.carbon.device.application.mgt.common.exception.ResourceManagementException;
+import io.entgra.application.mgt.common.ApplicationInstaller;
+import io.entgra.application.mgt.common.dto.ApplicationReleaseDTO;
+import io.entgra.application.mgt.common.exception.ApplicationStorageManagementException;
+import io.entgra.application.mgt.common.exception.RequestValidatingException;
+import io.entgra.application.mgt.common.exception.ResourceManagementException;
import java.io.InputStream;
import java.util.List;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/AppmDataHandler.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/services/AppmDataHandler.java
similarity index 84%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/AppmDataHandler.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/services/AppmDataHandler.java
index e789fe54213..5b99870c5f6 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/AppmDataHandler.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/services/AppmDataHandler.java
@@ -15,11 +15,11 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.services;
+package io.entgra.application.mgt.common.services;
-import org.wso2.carbon.device.application.mgt.common.config.LifecycleState;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
-import org.wso2.carbon.device.application.mgt.common.exception.LifecycleManagementException;
+import io.entgra.application.mgt.common.config.LifecycleState;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.exception.LifecycleManagementException;
import java.io.InputStream;
import java.util.Map;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/DeviceConnector.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/services/DeviceConnector.java
similarity index 87%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/DeviceConnector.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/services/DeviceConnector.java
index b227dd43b53..10a8c31258a 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/DeviceConnector.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/services/DeviceConnector.java
@@ -14,10 +14,10 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.services;
+package io.entgra.application.mgt.common.services;
-import org.wso2.carbon.device.application.mgt.common.AppOperation;
-import org.wso2.carbon.device.application.mgt.common.exception.DeviceConnectorException;
+import io.entgra.application.mgt.common.AppOperation;
+import io.entgra.application.mgt.common.exception.DeviceConnectorException;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import java.util.List;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/ReviewManager.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/services/ReviewManager.java
similarity index 85%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/ReviewManager.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/services/ReviewManager.java
index c87b50a3eb6..97da7397c4b 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/ReviewManager.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/services/ReviewManager.java
@@ -14,15 +14,15 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.services;
+package io.entgra.application.mgt.common.services;
-import org.wso2.carbon.device.application.mgt.common.Rating;
-import org.wso2.carbon.device.application.mgt.common.response.Review;
-import org.wso2.carbon.device.application.mgt.common.PaginationRequest;
-import org.wso2.carbon.device.application.mgt.common.PaginationResult;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
-import org.wso2.carbon.device.application.mgt.common.exception.ReviewManagementException;
-import org.wso2.carbon.device.application.mgt.common.wrapper.ReviewWrapper;
+import io.entgra.application.mgt.common.Rating;
+import io.entgra.application.mgt.common.response.Review;
+import io.entgra.application.mgt.common.PaginationRequest;
+import io.entgra.application.mgt.common.PaginationResult;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.exception.ReviewManagementException;
+import io.entgra.application.mgt.common.wrapper.ReviewWrapper;
/**
* ReviewManager is responsible for handling all the add/update/delete/get operations related with
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/SubscriptionManager.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/services/SubscriptionManager.java
similarity index 92%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/SubscriptionManager.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/services/SubscriptionManager.java
index bc2eaabc47f..068a6900fc2 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/services/SubscriptionManager.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/services/SubscriptionManager.java
@@ -14,13 +14,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.services;
+package io.entgra.application.mgt.common.services;
-import org.wso2.carbon.device.application.mgt.common.ApplicationInstallResponse;
-import org.wso2.carbon.device.application.mgt.common.ExecutionStatus;
-import org.wso2.carbon.device.application.mgt.common.dto.ScheduledSubscriptionDTO;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
-import org.wso2.carbon.device.application.mgt.common.exception.SubscriptionManagementException;
+import io.entgra.application.mgt.common.ApplicationInstallResponse;
+import io.entgra.application.mgt.common.ExecutionStatus;
+import io.entgra.application.mgt.common.dto.ScheduledSubscriptionDTO;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.exception.SubscriptionManagementException;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.PaginationRequest;
import org.wso2.carbon.device.mgt.common.PaginationResult;
@@ -45,8 +45,8 @@ public interface SubscriptionManager {
* @param generic type of the method.
* @return {@link ApplicationInstallResponse}
* @throws ApplicationManagementException if error occurs when subscribing to the given application
- * @link org.wso2.carbon.device.application.mgt.common.SubscriptionType}}
- * @link org.wso2.carbon.device.application.mgt.common.SubAction}}
+ * @link io.entgra.application.mgt.common.SubscriptionType}}
+ * @link io.entgra.application.mgt.common.SubAction}}
* @param properties
*/
ApplicationInstallResponse performBulkAppOperation(String applicationUUID, List params, String subType,
@@ -109,7 +109,7 @@ public interface SubscriptionManager {
* @return {@link ApplicationInstallResponse}
* @throws ApplicationManagementException ApplicationManagementException if error occurs when subscribing to the
* given application
- * @link org.wso2.carbon.device.application.mgt.common.SubscriptionType}}
+ * @link io.entgra.application.mgt.common.SubscriptionType}}
*/
void performEntAppSubscription(String applicationUUID, List params, String subType, String action,
boolean requiresUpdatingExternal) throws ApplicationManagementException;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/ApplicationUpdateWrapper.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/ApplicationUpdateWrapper.java
similarity index 98%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/ApplicationUpdateWrapper.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/ApplicationUpdateWrapper.java
index 4c7614e6127..84da8cecb52 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/ApplicationUpdateWrapper.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/ApplicationUpdateWrapper.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.wrapper;
+package io.entgra.application.mgt.common.wrapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/ApplicationWrapper.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/ApplicationWrapper.java
similarity index 98%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/ApplicationWrapper.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/ApplicationWrapper.java
index 11ae27b7f2a..f109b7b78dc 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/ApplicationWrapper.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/ApplicationWrapper.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.wrapper;
+package io.entgra.application.mgt.common.wrapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/CustomAppReleaseWrapper.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/CustomAppReleaseWrapper.java
similarity index 98%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/CustomAppReleaseWrapper.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/CustomAppReleaseWrapper.java
index ca9a77e2cd5..eb30c7e9120 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/CustomAppReleaseWrapper.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/CustomAppReleaseWrapper.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.wrapper;
+package io.entgra.application.mgt.common.wrapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/CustomAppWrapper.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/CustomAppWrapper.java
similarity index 98%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/CustomAppWrapper.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/CustomAppWrapper.java
index ce0108bbd73..4c0a392d897 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/CustomAppWrapper.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/CustomAppWrapper.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.wrapper;
+package io.entgra.application.mgt.common.wrapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/EntAppReleaseWrapper.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/EntAppReleaseWrapper.java
similarity index 98%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/EntAppReleaseWrapper.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/EntAppReleaseWrapper.java
index c3c7ddb84dd..4d39506e9b6 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/EntAppReleaseWrapper.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/EntAppReleaseWrapper.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.wrapper;
+package io.entgra.application.mgt.common.wrapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/PublicAppReleaseWrapper.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/PublicAppReleaseWrapper.java
similarity index 98%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/PublicAppReleaseWrapper.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/PublicAppReleaseWrapper.java
index badbdf30d5c..4b60e529410 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/PublicAppReleaseWrapper.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/PublicAppReleaseWrapper.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.wrapper;
+package io.entgra.application.mgt.common.wrapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/PublicAppWrapper.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/PublicAppWrapper.java
similarity index 98%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/PublicAppWrapper.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/PublicAppWrapper.java
index beb66706fdd..5f653257cb8 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/PublicAppWrapper.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/PublicAppWrapper.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.wrapper;
+package io.entgra.application.mgt.common.wrapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/ReviewWrapper.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/ReviewWrapper.java
similarity index 94%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/ReviewWrapper.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/ReviewWrapper.java
index 120df8cc1b6..90a525f3dbe 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/ReviewWrapper.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/ReviewWrapper.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.wrapper;
+package io.entgra.application.mgt.common.wrapper;
public class ReviewWrapper {
private String content;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/WebAppReleaseWrapper.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/WebAppReleaseWrapper.java
similarity index 98%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/WebAppReleaseWrapper.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/WebAppReleaseWrapper.java
index 02435bcc8eb..090307a32de 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/WebAppReleaseWrapper.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/WebAppReleaseWrapper.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.wrapper;
+package io.entgra.application.mgt.common.wrapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/WebAppWrapper.java b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/WebAppWrapper.java
similarity index 98%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/WebAppWrapper.java
rename to components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/WebAppWrapper.java
index 1c5bba1d201..8455f0ce672 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/wrapper/WebAppWrapper.java
+++ b/components/application-mgt/io.entgra.application.mgt.common/src/main/java/io/entgra/application/mgt/common/wrapper/WebAppWrapper.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.common.wrapper;
+package io.entgra.application.mgt.common.wrapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/pom.xml b/components/application-mgt/io.entgra.application.mgt.core/pom.xml
similarity index 91%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/pom.xml
rename to components/application-mgt/io.entgra.application.mgt.core/pom.xml
index 82d75d46871..5ca9f9a6555 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/pom.xml
+++ b/components/application-mgt/io.entgra.application.mgt.core/pom.xml
@@ -21,16 +21,15 @@
org.wso2.carbon.devicemgt
application-mgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
- org.wso2.carbon.device.application.mgt.core
- 4.1.16-SNAPSHOT
+ io.entgra.application.mgt.core
bundle
- WSO2 Carbon - Application Management Core
- WSO2 Carbon - Application Management Core
+ Entgra - Application Management Core
+ Entgra - Application Management Core
https://entgra.io
@@ -49,10 +48,10 @@
${project.artifactId}
${carbon.device.mgt.version}
Application Management Core Bundle
- org.wso2.carbon.device.application.mgt.core.internal
+ io.entgra.application.mgt.core.internal
- org.osgi.framework,
- org.osgi.service.component,
+ org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
+ org.osgi.service.*;version="${imp.package.version.osgi.service}",
org.apache.commons.logging,
javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional,
org.wso2.carbon.context.*,
@@ -62,9 +61,9 @@
javax.sql,
com.google.gson.*,
javax.naming,
- javax.xml.bind.annotation,
- javax.xml.bind,
- org.wso2.carbon.device.application.mgt.common.*,
+ javax.xml.bind.annotation; version="${javax.xml.bind.imp.pkg.version}",
+ javax.xml.bind; version="${javax.xml.bind.imp.pkg.version}",
+ io.entgra.application.mgt.common.*,
org.wso2.carbon.device.mgt.core.*,
org.wso2.carbon.device.mgt.common.*,
org.wso2.carbon.user.core.*,
@@ -87,11 +86,9 @@
org.apache.commons.validator.routines
apk-parser;scope=compile|runtime;inline=false
-
-
- !org.wso2.carbon.device.application.mgt.core.internal.*,
- org.wso2.carbon.device.application.mgt.core.*
+ !io.entgra.application.mgt.core.internal.*,
+ io.entgra.application.mgt.core.*
@@ -166,7 +163,7 @@
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.common
+ io.entgra.application.mgt.common
org.wso2.carbon.devicemgt
@@ -261,6 +258,12 @@
5.1.34
test
+
+ xerces.wso2
+ xercesImpl
+ 2.8.1.wso2v2
+ test
+
com.h2database.wso2
h2-database-engine
@@ -348,6 +351,10 @@
+
+ org.wso2.carbon.devicemgt
+ org.wso2.carbon.identity.jwt.client.extension
+
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/Artifacts.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/config/Artifacts.java
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/Artifacts.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/config/Artifacts.java
index 2c2e6cf25e7..8e745c77eb1 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/Artifacts.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/config/Artifacts.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.config;
+package io.entgra.application.mgt.core.config;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/Configuration.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/config/Configuration.java
similarity index 90%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/Configuration.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/config/Configuration.java
index 3f3626bfb75..b152ed28b82 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/Configuration.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/config/Configuration.java
@@ -15,11 +15,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.config;
+package io.entgra.application.mgt.core.config;
-import org.wso2.carbon.device.application.mgt.common.config.MDMConfig;
-import org.wso2.carbon.device.application.mgt.common.config.RatingConfiguration;
-import org.wso2.carbon.device.application.mgt.common.config.LifecycleState;
+import io.entgra.application.mgt.common.config.MDMConfig;
+import io.entgra.application.mgt.common.config.RatingConfiguration;
+import io.entgra.application.mgt.common.config.LifecycleState;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/ConfigurationManager.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/config/ConfigurationManager.java
similarity index 91%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/ConfigurationManager.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/config/ConfigurationManager.java
index da8146cf2e9..ab85f87bb3f 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/ConfigurationManager.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/config/ConfigurationManager.java
@@ -15,13 +15,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.config;
+package io.entgra.application.mgt.core.config;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
-import org.wso2.carbon.device.application.mgt.common.exception.InvalidConfigurationException;
-import org.wso2.carbon.device.application.mgt.core.util.Constants;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.exception.InvalidConfigurationException;
+import io.entgra.application.mgt.core.util.Constants;
import java.io.File;
import javax.xml.bind.JAXBContext;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/Extension.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/config/Extension.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/Extension.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/config/Extension.java
index 17c9f3f63d6..282f051889d 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/Extension.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/config/Extension.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.config;
+package io.entgra.application.mgt.core.config;
import java.util.List;
import javax.xml.bind.annotation.XmlAttribute;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/PaginationConfiguration.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/config/PaginationConfiguration.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/PaginationConfiguration.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/config/PaginationConfiguration.java
index 0ca3d0e3437..6b7974c74fa 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/PaginationConfiguration.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/config/PaginationConfiguration.java
@@ -16,7 +16,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.config;
+package io.entgra.application.mgt.core.config;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/Parameter.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/config/Parameter.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/Parameter.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/config/Parameter.java
index a8e3d1dbc5b..82419b1897f 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/Parameter.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/config/Parameter.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.config;
+package io.entgra.application.mgt.core.config;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/ApplicationDAO.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/ApplicationDAO.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/ApplicationDAO.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/ApplicationDAO.java
index 73784e48130..6ffa843e5a5 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/ApplicationDAO.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/ApplicationDAO.java
@@ -15,13 +15,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao;
+package io.entgra.application.mgt.core.dao;
-import org.wso2.carbon.device.application.mgt.common.*;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationDTO;
-import org.wso2.carbon.device.application.mgt.common.dto.CategoryDTO;
-import org.wso2.carbon.device.application.mgt.common.dto.TagDTO;
-import org.wso2.carbon.device.application.mgt.core.exception.ApplicationManagementDAOException;
+import io.entgra.application.mgt.common.*;
+import io.entgra.application.mgt.common.dto.ApplicationDTO;
+import io.entgra.application.mgt.common.dto.CategoryDTO;
+import io.entgra.application.mgt.common.dto.TagDTO;
+import io.entgra.application.mgt.core.exception.ApplicationManagementDAOException;
import java.util.List;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/ApplicationReleaseDAO.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/ApplicationReleaseDAO.java
similarity index 94%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/ApplicationReleaseDAO.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/ApplicationReleaseDAO.java
index 28af63f2eda..0ac48248401 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/ApplicationReleaseDAO.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/ApplicationReleaseDAO.java
@@ -15,11 +15,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao;
+package io.entgra.application.mgt.core.dao;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationReleaseDTO;
-import org.wso2.carbon.device.application.mgt.common.Rating;
-import org.wso2.carbon.device.application.mgt.core.exception.ApplicationManagementDAOException;
+import io.entgra.application.mgt.common.dto.ApplicationReleaseDTO;
+import io.entgra.application.mgt.common.Rating;
+import io.entgra.application.mgt.core.exception.ApplicationManagementDAOException;
import java.util.List;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/LifecycleStateDAO.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/LifecycleStateDAO.java
similarity index 92%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/LifecycleStateDAO.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/LifecycleStateDAO.java
index dd4e2575c96..f56849263cc 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/LifecycleStateDAO.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/LifecycleStateDAO.java
@@ -15,10 +15,10 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao;
+package io.entgra.application.mgt.core.dao;
-import org.wso2.carbon.device.application.mgt.common.LifecycleState;
-import org.wso2.carbon.device.application.mgt.core.exception.LifeCycleManagementDAOException;
+import io.entgra.application.mgt.common.LifecycleState;
+import io.entgra.application.mgt.core.exception.LifeCycleManagementDAOException;
import java.util.List;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/ReviewDAO.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/ReviewDAO.java
similarity index 92%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/ReviewDAO.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/ReviewDAO.java
index ff2cf5d164b..488563987e8 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/ReviewDAO.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/ReviewDAO.java
@@ -15,12 +15,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao;
+package io.entgra.application.mgt.core.dao;
-import org.wso2.carbon.device.application.mgt.common.response.Review;
-import org.wso2.carbon.device.application.mgt.common.PaginationRequest;
-import org.wso2.carbon.device.application.mgt.common.dto.ReviewDTO;
-import org.wso2.carbon.device.application.mgt.core.exception.ReviewManagementDAOException;
+import io.entgra.application.mgt.common.response.Review;
+import io.entgra.application.mgt.common.PaginationRequest;
+import io.entgra.application.mgt.common.dto.ReviewDTO;
+import io.entgra.application.mgt.core.exception.ReviewManagementDAOException;
import java.util.List;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/SubscriptionDAO.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/SubscriptionDAO.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/SubscriptionDAO.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/SubscriptionDAO.java
index 3ff0d95945d..a84446d6a38 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/SubscriptionDAO.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/SubscriptionDAO.java
@@ -15,16 +15,15 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao;
+package io.entgra.application.mgt.core.dao;
-import org.wso2.carbon.device.application.mgt.common.ExecutionStatus;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationReleaseDTO;
-import org.wso2.carbon.device.application.mgt.common.dto.DeviceSubscriptionDTO;
-import org.wso2.carbon.device.application.mgt.common.dto.ScheduledSubscriptionDTO;
-import org.wso2.carbon.device.application.mgt.common.exception.SubscriptionManagementException;
-import org.wso2.carbon.device.application.mgt.core.exception.ApplicationManagementDAOException;
+import io.entgra.application.mgt.common.ExecutionStatus;
+import io.entgra.application.mgt.common.dto.ApplicationReleaseDTO;
+import io.entgra.application.mgt.common.dto.DeviceSubscriptionDTO;
+import io.entgra.application.mgt.common.dto.ScheduledSubscriptionDTO;
+import io.entgra.application.mgt.common.exception.SubscriptionManagementException;
+import io.entgra.application.mgt.core.exception.ApplicationManagementDAOException;
-import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/VisibilityDAO.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/VisibilityDAO.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/VisibilityDAO.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/VisibilityDAO.java
index e1cf1880ec8..48597b84957 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/VisibilityDAO.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/VisibilityDAO.java
@@ -15,9 +15,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao;
+package io.entgra.application.mgt.core.dao;
-import org.wso2.carbon.device.application.mgt.core.exception.VisibilityManagementDAOException;
+import io.entgra.application.mgt.core.exception.VisibilityManagementDAOException;
import java.util.List;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/common/ApplicationManagementDAOFactory.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/common/ApplicationManagementDAOFactory.java
similarity index 71%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/common/ApplicationManagementDAOFactory.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/common/ApplicationManagementDAOFactory.java
index 36aeaf96781..414ca0d0153 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/common/ApplicationManagementDAOFactory.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/common/ApplicationManagementDAOFactory.java
@@ -15,43 +15,43 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.common;
+package io.entgra.application.mgt.core.dao.common;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.exception.UnsupportedDatabaseEngineException;
-import org.wso2.carbon.device.application.mgt.core.dao.ApplicationDAO;
-import org.wso2.carbon.device.application.mgt.core.dao.ApplicationReleaseDAO;
-import org.wso2.carbon.device.application.mgt.core.dao.LifecycleStateDAO;
-import org.wso2.carbon.device.application.mgt.core.dao.ReviewDAO;
-import org.wso2.carbon.device.application.mgt.core.dao.SubscriptionDAO;
-import org.wso2.carbon.device.application.mgt.core.dao.VisibilityDAO;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.application.PostgreSQLApplicationDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.application.SQLServerApplicationDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.application.release.OracleApplicationReleaseDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.application.release.PostgreSQLApplicationReleaseDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.application.release.SQLServerApplicationReleaseDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.lifecyclestate.OracleLifecycleStateDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.lifecyclestate.PostgreSQLLifecycleStateDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.lifecyclestate.SQLServerLifecycleStateDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.review.GenericReviewDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.application.GenericApplicationDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.application.release.GenericApplicationReleaseDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.application.OracleApplicationDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.lifecyclestate.GenericLifecycleStateDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.review.OracleReviewDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.review.PostgreSQLReviewDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.review.SQLServerReviewDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.subscription.GenericSubscriptionDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.subscription.OracleSubscriptionDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.subscription.PostgreSQLSubscriptionDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.subscription.SQLServerSubscriptionDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.visibility.GenericVisibilityDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.visibility.OracleVisibilityDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.visibility.PostgreSQLVisibilityDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.visibility.SQLServerVisibilityDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.util.ConnectionManagerUtil;
-import org.wso2.carbon.device.application.mgt.core.util.Constants;
+import io.entgra.application.mgt.common.exception.UnsupportedDatabaseEngineException;
+import io.entgra.application.mgt.core.dao.ApplicationDAO;
+import io.entgra.application.mgt.core.dao.ApplicationReleaseDAO;
+import io.entgra.application.mgt.core.dao.LifecycleStateDAO;
+import io.entgra.application.mgt.core.dao.ReviewDAO;
+import io.entgra.application.mgt.core.dao.SubscriptionDAO;
+import io.entgra.application.mgt.core.dao.VisibilityDAO;
+import io.entgra.application.mgt.core.dao.impl.application.PostgreSQLApplicationDAOImpl;
+import io.entgra.application.mgt.core.dao.impl.application.SQLServerApplicationDAOImpl;
+import io.entgra.application.mgt.core.dao.impl.application.release.OracleApplicationReleaseDAOImpl;
+import io.entgra.application.mgt.core.dao.impl.application.release.PostgreSQLApplicationReleaseDAOImpl;
+import io.entgra.application.mgt.core.dao.impl.application.release.SQLServerApplicationReleaseDAOImpl;
+import io.entgra.application.mgt.core.dao.impl.lifecyclestate.OracleLifecycleStateDAOImpl;
+import io.entgra.application.mgt.core.dao.impl.lifecyclestate.PostgreSQLLifecycleStateDAOImpl;
+import io.entgra.application.mgt.core.dao.impl.lifecyclestate.SQLServerLifecycleStateDAOImpl;
+import io.entgra.application.mgt.core.dao.impl.review.GenericReviewDAOImpl;
+import io.entgra.application.mgt.core.dao.impl.application.GenericApplicationDAOImpl;
+import io.entgra.application.mgt.core.dao.impl.application.release.GenericApplicationReleaseDAOImpl;
+import io.entgra.application.mgt.core.dao.impl.application.OracleApplicationDAOImpl;
+import io.entgra.application.mgt.core.dao.impl.lifecyclestate.GenericLifecycleStateDAOImpl;
+import io.entgra.application.mgt.core.dao.impl.review.OracleReviewDAOImpl;
+import io.entgra.application.mgt.core.dao.impl.review.PostgreSQLReviewDAOImpl;
+import io.entgra.application.mgt.core.dao.impl.review.SQLServerReviewDAOImpl;
+import io.entgra.application.mgt.core.dao.impl.subscription.GenericSubscriptionDAOImpl;
+import io.entgra.application.mgt.core.dao.impl.subscription.OracleSubscriptionDAOImpl;
+import io.entgra.application.mgt.core.dao.impl.subscription.PostgreSQLSubscriptionDAOImpl;
+import io.entgra.application.mgt.core.dao.impl.subscription.SQLServerSubscriptionDAOImpl;
+import io.entgra.application.mgt.core.dao.impl.visibility.GenericVisibilityDAOImpl;
+import io.entgra.application.mgt.core.dao.impl.visibility.OracleVisibilityDAOImpl;
+import io.entgra.application.mgt.core.dao.impl.visibility.PostgreSQLVisibilityDAOImpl;
+import io.entgra.application.mgt.core.dao.impl.visibility.SQLServerVisibilityDAOImpl;
+import io.entgra.application.mgt.core.util.ConnectionManagerUtil;
+import io.entgra.application.mgt.core.util.Constants;
import javax.sql.DataSource;
import java.sql.SQLException;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/AbstractDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/AbstractDAOImpl.java
similarity index 80%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/AbstractDAOImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/AbstractDAOImpl.java
index a9488163fca..f8b50341fc1 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/AbstractDAOImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/AbstractDAOImpl.java
@@ -15,10 +15,10 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.impl;
+package io.entgra.application.mgt.core.dao.impl;
-import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionException;
-import org.wso2.carbon.device.application.mgt.core.util.ConnectionManagerUtil;
+import io.entgra.application.mgt.common.exception.DBConnectionException;
+import io.entgra.application.mgt.core.util.ConnectionManagerUtil;
import java.sql.Connection;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/GenericApplicationDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/application/GenericApplicationDAOImpl.java
similarity index 98%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/GenericApplicationDAOImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/application/GenericApplicationDAOImpl.java
index dd8880c6fcb..9fa9743590b 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/GenericApplicationDAOImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/application/GenericApplicationDAOImpl.java
@@ -15,23 +15,23 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.impl.application;
+package io.entgra.application.mgt.core.dao.impl.application;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.AppLifecycleState;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationDTO;
-import org.wso2.carbon.device.application.mgt.common.dto.CategoryDTO;
-import org.wso2.carbon.device.application.mgt.common.Filter;
-import org.wso2.carbon.device.application.mgt.common.dto.ReviewDTO;
-import org.wso2.carbon.device.application.mgt.common.dto.TagDTO;
-import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionException;
-import org.wso2.carbon.device.application.mgt.core.dao.ApplicationDAO;
-import org.wso2.carbon.device.application.mgt.core.util.DAOUtil;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.AbstractDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.exception.ApplicationManagementDAOException;
-import org.wso2.carbon.device.application.mgt.core.exception.UnexpectedServerErrorException;
+import io.entgra.application.mgt.common.AppLifecycleState;
+import io.entgra.application.mgt.common.dto.ApplicationDTO;
+import io.entgra.application.mgt.common.dto.CategoryDTO;
+import io.entgra.application.mgt.common.Filter;
+import io.entgra.application.mgt.common.dto.ReviewDTO;
+import io.entgra.application.mgt.common.dto.TagDTO;
+import io.entgra.application.mgt.common.exception.DBConnectionException;
+import io.entgra.application.mgt.core.dao.ApplicationDAO;
+import io.entgra.application.mgt.core.util.DAOUtil;
+import io.entgra.application.mgt.core.dao.impl.AbstractDAOImpl;
+import io.entgra.application.mgt.core.exception.ApplicationManagementDAOException;
+import io.entgra.application.mgt.core.exception.UnexpectedServerErrorException;
import java.sql.Connection;
import java.sql.PreparedStatement;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/OracleApplicationDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/application/OracleApplicationDAOImpl.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/OracleApplicationDAOImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/application/OracleApplicationDAOImpl.java
index bb705d7f82a..60e49f2a270 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/OracleApplicationDAOImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/application/OracleApplicationDAOImpl.java
@@ -16,16 +16,16 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.impl.application;
+package io.entgra.application.mgt.core.dao.impl.application;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.Filter;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationDTO;
-import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionException;
-import org.wso2.carbon.device.application.mgt.core.exception.ApplicationManagementDAOException;
-import org.wso2.carbon.device.application.mgt.core.util.DAOUtil;
+import io.entgra.application.mgt.common.Filter;
+import io.entgra.application.mgt.common.dto.ApplicationDTO;
+import io.entgra.application.mgt.common.exception.DBConnectionException;
+import io.entgra.application.mgt.core.exception.ApplicationManagementDAOException;
+import io.entgra.application.mgt.core.util.DAOUtil;
import java.sql.Connection;
import java.sql.PreparedStatement;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/PostgreSQLApplicationDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/application/PostgreSQLApplicationDAOImpl.java
similarity index 93%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/PostgreSQLApplicationDAOImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/application/PostgreSQLApplicationDAOImpl.java
index 54eb76b914b..bba8543c2cd 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/PostgreSQLApplicationDAOImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/application/PostgreSQLApplicationDAOImpl.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.impl.application;
+package io.entgra.application.mgt.core.dao.impl.application;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/SQLServerApplicationDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/application/SQLServerApplicationDAOImpl.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/SQLServerApplicationDAOImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/application/SQLServerApplicationDAOImpl.java
index d27e55aa9bd..7420b9a0574 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/SQLServerApplicationDAOImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/application/SQLServerApplicationDAOImpl.java
@@ -15,16 +15,16 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.impl.application;
+package io.entgra.application.mgt.core.dao.impl.application;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.Filter;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationDTO;
-import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionException;
-import org.wso2.carbon.device.application.mgt.core.exception.ApplicationManagementDAOException;
-import org.wso2.carbon.device.application.mgt.core.util.DAOUtil;
+import io.entgra.application.mgt.common.Filter;
+import io.entgra.application.mgt.common.dto.ApplicationDTO;
+import io.entgra.application.mgt.common.exception.DBConnectionException;
+import io.entgra.application.mgt.core.exception.ApplicationManagementDAOException;
+import io.entgra.application.mgt.core.util.DAOUtil;
import java.sql.Connection;
import java.sql.PreparedStatement;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/release/GenericApplicationReleaseDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/application/release/GenericApplicationReleaseDAOImpl.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/release/GenericApplicationReleaseDAOImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/application/release/GenericApplicationReleaseDAOImpl.java
index c03ab8bea21..11dbcf6c20d 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/release/GenericApplicationReleaseDAOImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/application/release/GenericApplicationReleaseDAOImpl.java
@@ -16,17 +16,17 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.impl.application.release;
+package io.entgra.application.mgt.core.dao.impl.application.release;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationReleaseDTO;
-import org.wso2.carbon.device.application.mgt.common.Rating;
-import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionException;
-import org.wso2.carbon.device.application.mgt.core.dao.ApplicationReleaseDAO;
-import org.wso2.carbon.device.application.mgt.core.util.DAOUtil;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.AbstractDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.exception.ApplicationManagementDAOException;
+import io.entgra.application.mgt.common.dto.ApplicationReleaseDTO;
+import io.entgra.application.mgt.common.Rating;
+import io.entgra.application.mgt.common.exception.DBConnectionException;
+import io.entgra.application.mgt.core.dao.ApplicationReleaseDAO;
+import io.entgra.application.mgt.core.util.DAOUtil;
+import io.entgra.application.mgt.core.dao.impl.AbstractDAOImpl;
+import io.entgra.application.mgt.core.exception.ApplicationManagementDAOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/release/OracleApplicationReleaseDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/application/release/OracleApplicationReleaseDAOImpl.java
similarity index 91%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/release/OracleApplicationReleaseDAOImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/application/release/OracleApplicationReleaseDAOImpl.java
index d030fa82b7f..33105e9bdc2 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/release/OracleApplicationReleaseDAOImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/application/release/OracleApplicationReleaseDAOImpl.java
@@ -15,12 +15,12 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.impl.application.release;
+package io.entgra.application.mgt.core.dao.impl.application.release;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionException;
-import org.wso2.carbon.device.application.mgt.core.exception.ApplicationManagementDAOException;
+import io.entgra.application.mgt.common.exception.DBConnectionException;
+import io.entgra.application.mgt.core.exception.ApplicationManagementDAOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/release/PostgreSQLApplicationReleaseDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/application/release/PostgreSQLApplicationReleaseDAOImpl.java
similarity index 92%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/release/PostgreSQLApplicationReleaseDAOImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/application/release/PostgreSQLApplicationReleaseDAOImpl.java
index 3ffa907fcf8..3727a992aef 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/release/PostgreSQLApplicationReleaseDAOImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/application/release/PostgreSQLApplicationReleaseDAOImpl.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.impl.application.release;
+package io.entgra.application.mgt.core.dao.impl.application.release;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/release/SQLServerApplicationReleaseDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/application/release/SQLServerApplicationReleaseDAOImpl.java
similarity index 91%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/release/SQLServerApplicationReleaseDAOImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/application/release/SQLServerApplicationReleaseDAOImpl.java
index 4afcdf0928b..b40790a7b88 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/release/SQLServerApplicationReleaseDAOImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/application/release/SQLServerApplicationReleaseDAOImpl.java
@@ -15,12 +15,12 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.impl.application.release;
+package io.entgra.application.mgt.core.dao.impl.application.release;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionException;
-import org.wso2.carbon.device.application.mgt.core.exception.ApplicationManagementDAOException;
+import io.entgra.application.mgt.common.exception.DBConnectionException;
+import io.entgra.application.mgt.core.exception.ApplicationManagementDAOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/lifecyclestate/GenericLifecycleStateDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/lifecyclestate/GenericLifecycleStateDAOImpl.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/lifecyclestate/GenericLifecycleStateDAOImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/lifecyclestate/GenericLifecycleStateDAOImpl.java
index ee907722059..83d1bdf79f1 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/lifecyclestate/GenericLifecycleStateDAOImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/lifecyclestate/GenericLifecycleStateDAOImpl.java
@@ -15,17 +15,17 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.impl.lifecyclestate;
+package io.entgra.application.mgt.core.dao.impl.lifecyclestate;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.AppLifecycleState;
-import org.wso2.carbon.device.application.mgt.common.LifecycleState;
-import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionException;
-import org.wso2.carbon.device.application.mgt.core.dao.LifecycleStateDAO;
-import org.wso2.carbon.device.application.mgt.core.util.DAOUtil;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.AbstractDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.exception.LifeCycleManagementDAOException;
+import io.entgra.application.mgt.common.AppLifecycleState;
+import io.entgra.application.mgt.common.LifecycleState;
+import io.entgra.application.mgt.common.exception.DBConnectionException;
+import io.entgra.application.mgt.core.dao.LifecycleStateDAO;
+import io.entgra.application.mgt.core.util.DAOUtil;
+import io.entgra.application.mgt.core.dao.impl.AbstractDAOImpl;
+import io.entgra.application.mgt.core.exception.LifeCycleManagementDAOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/lifecyclestate/OracleLifecycleStateDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/lifecyclestate/OracleLifecycleStateDAOImpl.java
similarity index 91%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/lifecyclestate/OracleLifecycleStateDAOImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/lifecyclestate/OracleLifecycleStateDAOImpl.java
index e278574c396..feffaafca91 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/lifecyclestate/OracleLifecycleStateDAOImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/lifecyclestate/OracleLifecycleStateDAOImpl.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.impl.lifecyclestate;
+package io.entgra.application.mgt.core.dao.impl.lifecyclestate;
/**
* This handles App Lifecycle operations which are specific to MSSQL.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/lifecyclestate/PostgreSQLLifecycleStateDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/lifecyclestate/PostgreSQLLifecycleStateDAOImpl.java
similarity index 93%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/lifecyclestate/PostgreSQLLifecycleStateDAOImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/lifecyclestate/PostgreSQLLifecycleStateDAOImpl.java
index 1637777285c..0dff4b0395b 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/lifecyclestate/PostgreSQLLifecycleStateDAOImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/lifecyclestate/PostgreSQLLifecycleStateDAOImpl.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.impl.lifecyclestate;
+package io.entgra.application.mgt.core.dao.impl.lifecyclestate;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/lifecyclestate/SQLServerLifecycleStateDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/lifecyclestate/SQLServerLifecycleStateDAOImpl.java
similarity index 91%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/lifecyclestate/SQLServerLifecycleStateDAOImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/lifecyclestate/SQLServerLifecycleStateDAOImpl.java
index 063e3ccd56f..09db3384554 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/lifecyclestate/SQLServerLifecycleStateDAOImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/lifecyclestate/SQLServerLifecycleStateDAOImpl.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.impl.lifecyclestate;
+package io.entgra.application.mgt.core.dao.impl.lifecyclestate;
/**
* This handles App Lifecycle operations which are specific to MSSQL.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/review/GenericReviewDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/review/GenericReviewDAOImpl.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/review/GenericReviewDAOImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/review/GenericReviewDAOImpl.java
index 24052730b36..c5c5a0bfa06 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/review/GenericReviewDAOImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/review/GenericReviewDAOImpl.java
@@ -15,20 +15,20 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.impl.review;
+package io.entgra.application.mgt.core.dao.impl.review;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.PaginationRequest;
-import org.wso2.carbon.device.application.mgt.common.dto.ReviewDTO;
-import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionException;
-import org.wso2.carbon.device.application.mgt.core.dao.ReviewDAO;
-import org.wso2.carbon.device.application.mgt.core.exception.UnexpectedServerErrorException;
-import org.wso2.carbon.device.application.mgt.core.util.DAOUtil;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.AbstractDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.exception.ReviewManagementDAOException;
-import org.wso2.carbon.device.application.mgt.core.util.Constants;
+import io.entgra.application.mgt.common.PaginationRequest;
+import io.entgra.application.mgt.common.dto.ReviewDTO;
+import io.entgra.application.mgt.common.exception.DBConnectionException;
+import io.entgra.application.mgt.core.dao.ReviewDAO;
+import io.entgra.application.mgt.core.exception.UnexpectedServerErrorException;
+import io.entgra.application.mgt.core.util.DAOUtil;
+import io.entgra.application.mgt.core.dao.impl.AbstractDAOImpl;
+import io.entgra.application.mgt.core.exception.ReviewManagementDAOException;
+import io.entgra.application.mgt.core.util.Constants;
import java.sql.SQLException;
import java.sql.ResultSet;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/review/OracleReviewDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/review/OracleReviewDAOImpl.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/review/OracleReviewDAOImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/review/OracleReviewDAOImpl.java
index ac252e52f72..340b7204f47 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/review/OracleReviewDAOImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/review/OracleReviewDAOImpl.java
@@ -15,16 +15,16 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.impl.review;
+package io.entgra.application.mgt.core.dao.impl.review;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.PaginationRequest;
-import org.wso2.carbon.device.application.mgt.common.dto.ReviewDTO;
-import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionException;
-import org.wso2.carbon.device.application.mgt.core.exception.ReviewManagementDAOException;
-import org.wso2.carbon.device.application.mgt.core.util.Constants;
-import org.wso2.carbon.device.application.mgt.core.util.DAOUtil;
+import io.entgra.application.mgt.common.PaginationRequest;
+import io.entgra.application.mgt.common.dto.ReviewDTO;
+import io.entgra.application.mgt.common.exception.DBConnectionException;
+import io.entgra.application.mgt.core.exception.ReviewManagementDAOException;
+import io.entgra.application.mgt.core.util.Constants;
+import io.entgra.application.mgt.core.util.DAOUtil;
import java.sql.Connection;
import java.sql.PreparedStatement;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/review/PostgreSQLReviewDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/review/PostgreSQLReviewDAOImpl.java
similarity index 93%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/review/PostgreSQLReviewDAOImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/review/PostgreSQLReviewDAOImpl.java
index 38bebccd123..b5eacab5aa3 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/review/PostgreSQLReviewDAOImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/review/PostgreSQLReviewDAOImpl.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.impl.review;
+package io.entgra.application.mgt.core.dao.impl.review;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/review/SQLServerReviewDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/review/SQLServerReviewDAOImpl.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/review/SQLServerReviewDAOImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/review/SQLServerReviewDAOImpl.java
index 213d619b0c9..0b0e45e6f39 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/review/SQLServerReviewDAOImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/review/SQLServerReviewDAOImpl.java
@@ -15,16 +15,16 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.impl.review;
+package io.entgra.application.mgt.core.dao.impl.review;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.PaginationRequest;
-import org.wso2.carbon.device.application.mgt.common.dto.ReviewDTO;
-import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionException;
-import org.wso2.carbon.device.application.mgt.core.exception.ReviewManagementDAOException;
-import org.wso2.carbon.device.application.mgt.core.util.Constants;
-import org.wso2.carbon.device.application.mgt.core.util.DAOUtil;
+import io.entgra.application.mgt.common.PaginationRequest;
+import io.entgra.application.mgt.common.dto.ReviewDTO;
+import io.entgra.application.mgt.common.exception.DBConnectionException;
+import io.entgra.application.mgt.core.exception.ReviewManagementDAOException;
+import io.entgra.application.mgt.core.util.Constants;
+import io.entgra.application.mgt.core.util.DAOUtil;
import java.sql.Connection;
import java.sql.PreparedStatement;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/subscription/GenericSubscriptionDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/subscription/GenericSubscriptionDAOImpl.java
similarity index 98%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/subscription/GenericSubscriptionDAOImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/subscription/GenericSubscriptionDAOImpl.java
index 4e6c6623f16..521981849d1 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/subscription/GenericSubscriptionDAOImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/subscription/GenericSubscriptionDAOImpl.java
@@ -15,28 +15,27 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.impl.subscription;
+package io.entgra.application.mgt.core.dao.impl.subscription;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.ExecutionStatus;
-import org.wso2.carbon.device.application.mgt.common.SubAction;
-import org.wso2.carbon.device.application.mgt.common.SubscriptionType;
-import org.wso2.carbon.device.application.mgt.common.dto.DeviceSubscriptionDTO;
-import org.wso2.carbon.device.application.mgt.common.dto.ScheduledSubscriptionDTO;
-import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionException;
-import org.wso2.carbon.device.application.mgt.core.dao.SubscriptionDAO;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.AbstractDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.exception.ApplicationManagementDAOException;
-import org.wso2.carbon.device.application.mgt.core.exception.UnexpectedServerErrorException;
-import org.wso2.carbon.device.application.mgt.core.util.DAOUtil;
+import io.entgra.application.mgt.common.ExecutionStatus;
+import io.entgra.application.mgt.common.SubAction;
+import io.entgra.application.mgt.common.SubscriptionType;
+import io.entgra.application.mgt.common.dto.DeviceSubscriptionDTO;
+import io.entgra.application.mgt.common.dto.ScheduledSubscriptionDTO;
+import io.entgra.application.mgt.common.exception.DBConnectionException;
+import io.entgra.application.mgt.core.dao.SubscriptionDAO;
+import io.entgra.application.mgt.core.dao.impl.AbstractDAOImpl;
+import io.entgra.application.mgt.core.exception.ApplicationManagementDAOException;
+import io.entgra.application.mgt.core.exception.UnexpectedServerErrorException;
+import io.entgra.application.mgt.core.util.DAOUtil;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
-import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/subscription/OracleSubscriptionDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/subscription/OracleSubscriptionDAOImpl.java
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/subscription/OracleSubscriptionDAOImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/subscription/OracleSubscriptionDAOImpl.java
index b7932d9f9c8..d52cc49fef6 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/subscription/OracleSubscriptionDAOImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/subscription/OracleSubscriptionDAOImpl.java
@@ -15,12 +15,12 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.impl.subscription;
+package io.entgra.application.mgt.core.dao.impl.subscription;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionException;
-import org.wso2.carbon.device.application.mgt.core.exception.ApplicationManagementDAOException;
+import io.entgra.application.mgt.common.exception.DBConnectionException;
+import io.entgra.application.mgt.core.exception.ApplicationManagementDAOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/subscription/PostgreSQLSubscriptionDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/subscription/PostgreSQLSubscriptionDAOImpl.java
similarity index 93%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/subscription/PostgreSQLSubscriptionDAOImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/subscription/PostgreSQLSubscriptionDAOImpl.java
index de13737299b..bae3c144718 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/subscription/PostgreSQLSubscriptionDAOImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/subscription/PostgreSQLSubscriptionDAOImpl.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.impl.subscription;
+package io.entgra.application.mgt.core.dao.impl.subscription;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/subscription/SQLServerSubscriptionDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/subscription/SQLServerSubscriptionDAOImpl.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/subscription/SQLServerSubscriptionDAOImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/subscription/SQLServerSubscriptionDAOImpl.java
index 26a498af1b5..7872b64ff5b 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/subscription/SQLServerSubscriptionDAOImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/subscription/SQLServerSubscriptionDAOImpl.java
@@ -15,21 +15,18 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.impl.subscription;
+package io.entgra.application.mgt.core.dao.impl.subscription;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionException;
-import org.wso2.carbon.device.application.mgt.core.exception.ApplicationManagementDAOException;
+import io.entgra.application.mgt.common.exception.DBConnectionException;
+import io.entgra.application.mgt.core.exception.ApplicationManagementDAOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
-import java.sql.Statement;
-import java.sql.Timestamp;
import java.util.ArrayList;
-import java.util.Calendar;
import java.util.List;
/**
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/visibility/GenericVisibilityDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/visibility/GenericVisibilityDAOImpl.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/visibility/GenericVisibilityDAOImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/visibility/GenericVisibilityDAOImpl.java
index 492a65e0043..eb4b712cd54 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/visibility/GenericVisibilityDAOImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/visibility/GenericVisibilityDAOImpl.java
@@ -15,14 +15,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.impl.visibility;
+package io.entgra.application.mgt.core.dao.impl.visibility;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionException;
-import org.wso2.carbon.device.application.mgt.core.dao.VisibilityDAO;
-import org.wso2.carbon.device.application.mgt.core.dao.impl.AbstractDAOImpl;
-import org.wso2.carbon.device.application.mgt.core.exception.VisibilityManagementDAOException;
+import io.entgra.application.mgt.common.exception.DBConnectionException;
+import io.entgra.application.mgt.core.dao.VisibilityDAO;
+import io.entgra.application.mgt.core.dao.impl.AbstractDAOImpl;
+import io.entgra.application.mgt.core.exception.VisibilityManagementDAOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/visibility/OracleVisibilityDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/visibility/OracleVisibilityDAOImpl.java
similarity index 92%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/visibility/OracleVisibilityDAOImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/visibility/OracleVisibilityDAOImpl.java
index 82348795984..8649d32d064 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/visibility/OracleVisibilityDAOImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/visibility/OracleVisibilityDAOImpl.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.impl.visibility;
+package io.entgra.application.mgt.core.dao.impl.visibility;
/**
* This handles Application visibility handling operations which are specific to Oracle..
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/visibility/PostgreSQLVisibilityDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/visibility/PostgreSQLVisibilityDAOImpl.java
similarity index 93%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/visibility/PostgreSQLVisibilityDAOImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/visibility/PostgreSQLVisibilityDAOImpl.java
index 3d9169f7b69..fb0cecccd62 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/visibility/PostgreSQLVisibilityDAOImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/visibility/PostgreSQLVisibilityDAOImpl.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.impl.visibility;
+package io.entgra.application.mgt.core.dao.impl.visibility;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/visibility/SQLServerVisibilityDAOImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/visibility/SQLServerVisibilityDAOImpl.java
similarity index 92%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/visibility/SQLServerVisibilityDAOImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/visibility/SQLServerVisibilityDAOImpl.java
index 3243f241163..935f0f057ef 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/visibility/SQLServerVisibilityDAOImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/dao/impl/visibility/SQLServerVisibilityDAOImpl.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao.impl.visibility;
+package io.entgra.application.mgt.core.dao.impl.visibility;
/**
* This handles Application visibility handling operations which are specific to MsSQL.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/deployer/Property.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/deployer/Property.java
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/deployer/Property.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/deployer/Property.java
index f9fc46b0a1d..0072d10d498 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/deployer/Property.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/deployer/Property.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.deployer;
+package io.entgra.application.mgt.core.deployer;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/ApplicationManagementDAOException.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/ApplicationManagementDAOException.java
similarity index 94%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/ApplicationManagementDAOException.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/ApplicationManagementDAOException.java
index d946ee3fcee..2643d255f73 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/ApplicationManagementDAOException.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/ApplicationManagementDAOException.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.exception;
+package io.entgra.application.mgt.core.exception;
/**
* Exception thrown during the ApplicationDTO Management DAO operations.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/ApplicationOperationTaskException.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/ApplicationOperationTaskException.java
similarity index 91%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/ApplicationOperationTaskException.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/ApplicationOperationTaskException.java
index bfec70afc57..1a9b9f55f45 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/ApplicationOperationTaskException.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/ApplicationOperationTaskException.java
@@ -16,7 +16,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.exception;
+package io.entgra.application.mgt.core.exception;
public class ApplicationOperationTaskException extends Exception {
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/BadRequestException.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/BadRequestException.java
similarity index 86%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/BadRequestException.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/BadRequestException.java
index 8930d873102..c898bb33180 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/BadRequestException.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/BadRequestException.java
@@ -16,9 +16,9 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.exception;
+package io.entgra.application.mgt.core.exception;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
/**
* Custom exception class for wrapping BadRequest related exceptions.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/ForbiddenException.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/ForbiddenException.java
similarity index 86%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/ForbiddenException.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/ForbiddenException.java
index 3957b5bff2c..f0286f3e696 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/ForbiddenException.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/ForbiddenException.java
@@ -16,10 +16,10 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.exception;
+package io.entgra.application.mgt.core.exception;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
/**
* Exception class that is corresponding to 401 Forbidden response
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/LifeCycleManagementDAOException.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/LifeCycleManagementDAOException.java
similarity index 94%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/LifeCycleManagementDAOException.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/LifeCycleManagementDAOException.java
index 3b2a36da48e..cd90374dc5e 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/LifeCycleManagementDAOException.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/LifeCycleManagementDAOException.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.exception;
+package io.entgra.application.mgt.core.exception;
/**
* This exception will be thrown when there is an issue with Lifecycle related DAO operations.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/NotFoundException.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/NotFoundException.java
similarity index 86%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/NotFoundException.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/NotFoundException.java
index 2073d5a7c06..aca4f221fe5 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/NotFoundException.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/NotFoundException.java
@@ -15,9 +15,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.exception;
+package io.entgra.application.mgt.core.exception;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
/**
* This exception will be thrown when the requested application or platform not found.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/ParsingException.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/ParsingException.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/ParsingException.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/ParsingException.java
index 543de598c4c..53ecb39ae0b 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/ParsingException.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/ParsingException.java
@@ -16,7 +16,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.exception;
+package io.entgra.application.mgt.core.exception;
public class ParsingException extends Exception {
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/ReviewManagementDAOException.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/ReviewManagementDAOException.java
similarity index 87%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/ReviewManagementDAOException.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/ReviewManagementDAOException.java
index e9f17065c7f..4dec217d0ce 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/ReviewManagementDAOException.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/ReviewManagementDAOException.java
@@ -15,9 +15,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.exception;
+package io.entgra.application.mgt.core.exception;
-import org.wso2.carbon.device.application.mgt.common.exception.ReviewManagementException;
+import io.entgra.application.mgt.common.exception.ReviewManagementException;
/**
* Exception thrown during the Review Management DAO operations.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/SubscriptionManagementDAOException.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/SubscriptionManagementDAOException.java
similarity index 87%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/SubscriptionManagementDAOException.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/SubscriptionManagementDAOException.java
index 8419ed643db..f45337cd3b6 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/SubscriptionManagementDAOException.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/SubscriptionManagementDAOException.java
@@ -14,9 +14,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.exception;
+package io.entgra.application.mgt.core.exception;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
/**
* Exception thrown during the ApplicationDTO Management DAO operations.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/UnexpectedServerErrorException.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/UnexpectedServerErrorException.java
similarity index 86%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/UnexpectedServerErrorException.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/UnexpectedServerErrorException.java
index d17116730fd..58a24f1e449 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/UnexpectedServerErrorException.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/UnexpectedServerErrorException.java
@@ -15,10 +15,10 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.exception;
+package io.entgra.application.mgt.core.exception;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
public class UnexpectedServerErrorException extends ApplicationManagementException {
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/ValidationException.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/ValidationException.java
similarity index 86%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/ValidationException.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/ValidationException.java
index f17baee7f76..bad1b6b69dc 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/ValidationException.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/ValidationException.java
@@ -15,9 +15,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.exception;
+package io.entgra.application.mgt.core.exception;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
/**
* This exception will be thrown when the initial validation fails to perform an operation.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/VisibilityManagementDAOException.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/VisibilityManagementDAOException.java
similarity index 88%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/VisibilityManagementDAOException.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/VisibilityManagementDAOException.java
index b3cc7a3a63b..5988904f551 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/exception/VisibilityManagementDAOException.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/exception/VisibilityManagementDAOException.java
@@ -15,9 +15,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.exception;
+package io.entgra.application.mgt.core.exception;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
/**
* This is the specialized exception which is thrown when there are database level problems encountered
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ApplicationManagerImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/impl/ApplicationManagerImpl.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ApplicationManagerImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/impl/ApplicationManagerImpl.java
index 05b757ba453..82405ee2fe9 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ApplicationManagerImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/impl/ApplicationManagerImpl.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.impl;
+package io.entgra.application.mgt.core.impl;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.io.IOUtils;
@@ -27,63 +27,63 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.context.CarbonContext;
import org.wso2.carbon.context.PrivilegedCarbonContext;
-import org.wso2.carbon.device.application.mgt.common.ApplicationArtifact;
-import org.wso2.carbon.device.application.mgt.common.ApplicationInstaller;
-import org.wso2.carbon.device.application.mgt.common.DeviceTypes;
-import org.wso2.carbon.device.application.mgt.common.LifecycleChanger;
-import org.wso2.carbon.device.application.mgt.common.Pagination;
-import org.wso2.carbon.device.application.mgt.common.config.RatingConfiguration;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationDTO;
-import org.wso2.carbon.device.application.mgt.common.ApplicationList;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationReleaseDTO;
-import org.wso2.carbon.device.application.mgt.common.ApplicationSubscriptionType;
-import org.wso2.carbon.device.application.mgt.common.ApplicationType;
-import org.wso2.carbon.device.application.mgt.common.dto.CategoryDTO;
-import org.wso2.carbon.device.application.mgt.common.Filter;
-import org.wso2.carbon.device.application.mgt.common.dto.DeviceSubscriptionDTO;
-import org.wso2.carbon.device.application.mgt.common.LifecycleState;
-import org.wso2.carbon.device.application.mgt.common.dto.TagDTO;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationStorageManagementException;
-import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionException;
-import org.wso2.carbon.device.application.mgt.common.exception.LifecycleManagementException;
-import org.wso2.carbon.device.application.mgt.common.exception.RequestValidatingException;
-import org.wso2.carbon.device.application.mgt.common.exception.ResourceManagementException;
-import org.wso2.carbon.device.application.mgt.common.exception.TransactionManagementException;
-import org.wso2.carbon.device.application.mgt.common.response.Application;
-import org.wso2.carbon.device.application.mgt.common.response.ApplicationRelease;
-import org.wso2.carbon.device.application.mgt.common.response.Category;
-import org.wso2.carbon.device.application.mgt.common.response.Tag;
-import org.wso2.carbon.device.application.mgt.common.services.ApplicationManager;
-import org.wso2.carbon.device.application.mgt.common.services.ApplicationStorageManager;
-import org.wso2.carbon.device.application.mgt.common.wrapper.CustomAppReleaseWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.CustomAppWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.EntAppReleaseWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.ApplicationUpdateWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.ApplicationWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.PublicAppReleaseWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.PublicAppWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.WebAppReleaseWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.WebAppWrapper;
-import org.wso2.carbon.device.application.mgt.core.config.ConfigurationManager;
-import org.wso2.carbon.device.application.mgt.core.dao.ApplicationDAO;
-import org.wso2.carbon.device.application.mgt.core.dao.ApplicationReleaseDAO;
-import org.wso2.carbon.device.application.mgt.core.dao.LifecycleStateDAO;
-import org.wso2.carbon.device.application.mgt.core.dao.SubscriptionDAO;
-import org.wso2.carbon.device.application.mgt.core.dao.VisibilityDAO;
-import org.wso2.carbon.device.application.mgt.core.dao.common.ApplicationManagementDAOFactory;
-import org.wso2.carbon.device.application.mgt.core.util.APIUtil;
-import org.wso2.carbon.device.application.mgt.core.exception.ApplicationManagementDAOException;
-import org.wso2.carbon.device.application.mgt.core.exception.BadRequestException;
-import org.wso2.carbon.device.application.mgt.core.exception.ForbiddenException;
-import org.wso2.carbon.device.application.mgt.core.exception.LifeCycleManagementDAOException;
-import org.wso2.carbon.device.application.mgt.core.exception.NotFoundException;
-import org.wso2.carbon.device.application.mgt.core.exception.VisibilityManagementDAOException;
-import org.wso2.carbon.device.application.mgt.core.internal.DataHolder;
-import org.wso2.carbon.device.application.mgt.core.lifecycle.LifecycleStateManager;
-import org.wso2.carbon.device.application.mgt.core.util.ConnectionManagerUtil;
-import org.wso2.carbon.device.application.mgt.core.util.Constants;
-import org.wso2.carbon.device.application.mgt.core.util.StorageManagementUtil;
+import io.entgra.application.mgt.common.ApplicationArtifact;
+import io.entgra.application.mgt.common.ApplicationInstaller;
+import io.entgra.application.mgt.common.DeviceTypes;
+import io.entgra.application.mgt.common.LifecycleChanger;
+import io.entgra.application.mgt.common.Pagination;
+import io.entgra.application.mgt.common.config.RatingConfiguration;
+import io.entgra.application.mgt.common.dto.ApplicationDTO;
+import io.entgra.application.mgt.common.ApplicationList;
+import io.entgra.application.mgt.common.dto.ApplicationReleaseDTO;
+import io.entgra.application.mgt.common.ApplicationSubscriptionType;
+import io.entgra.application.mgt.common.ApplicationType;
+import io.entgra.application.mgt.common.dto.CategoryDTO;
+import io.entgra.application.mgt.common.Filter;
+import io.entgra.application.mgt.common.dto.DeviceSubscriptionDTO;
+import io.entgra.application.mgt.common.LifecycleState;
+import io.entgra.application.mgt.common.dto.TagDTO;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.exception.ApplicationStorageManagementException;
+import io.entgra.application.mgt.common.exception.DBConnectionException;
+import io.entgra.application.mgt.common.exception.LifecycleManagementException;
+import io.entgra.application.mgt.common.exception.RequestValidatingException;
+import io.entgra.application.mgt.common.exception.ResourceManagementException;
+import io.entgra.application.mgt.common.exception.TransactionManagementException;
+import io.entgra.application.mgt.common.response.Application;
+import io.entgra.application.mgt.common.response.ApplicationRelease;
+import io.entgra.application.mgt.common.response.Category;
+import io.entgra.application.mgt.common.response.Tag;
+import io.entgra.application.mgt.common.services.ApplicationManager;
+import io.entgra.application.mgt.common.services.ApplicationStorageManager;
+import io.entgra.application.mgt.common.wrapper.CustomAppReleaseWrapper;
+import io.entgra.application.mgt.common.wrapper.CustomAppWrapper;
+import io.entgra.application.mgt.common.wrapper.EntAppReleaseWrapper;
+import io.entgra.application.mgt.common.wrapper.ApplicationUpdateWrapper;
+import io.entgra.application.mgt.common.wrapper.ApplicationWrapper;
+import io.entgra.application.mgt.common.wrapper.PublicAppReleaseWrapper;
+import io.entgra.application.mgt.common.wrapper.PublicAppWrapper;
+import io.entgra.application.mgt.common.wrapper.WebAppReleaseWrapper;
+import io.entgra.application.mgt.common.wrapper.WebAppWrapper;
+import io.entgra.application.mgt.core.config.ConfigurationManager;
+import io.entgra.application.mgt.core.dao.ApplicationDAO;
+import io.entgra.application.mgt.core.dao.ApplicationReleaseDAO;
+import io.entgra.application.mgt.core.dao.LifecycleStateDAO;
+import io.entgra.application.mgt.core.dao.SubscriptionDAO;
+import io.entgra.application.mgt.core.dao.VisibilityDAO;
+import io.entgra.application.mgt.core.dao.common.ApplicationManagementDAOFactory;
+import io.entgra.application.mgt.core.util.APIUtil;
+import io.entgra.application.mgt.core.exception.ApplicationManagementDAOException;
+import io.entgra.application.mgt.core.exception.BadRequestException;
+import io.entgra.application.mgt.core.exception.ForbiddenException;
+import io.entgra.application.mgt.core.exception.LifeCycleManagementDAOException;
+import io.entgra.application.mgt.core.exception.NotFoundException;
+import io.entgra.application.mgt.core.exception.VisibilityManagementDAOException;
+import io.entgra.application.mgt.core.internal.DataHolder;
+import io.entgra.application.mgt.core.lifecycle.LifecycleStateManager;
+import io.entgra.application.mgt.core.util.ConnectionManagerUtil;
+import io.entgra.application.mgt.core.util.Constants;
+import io.entgra.application.mgt.core.util.StorageManagementUtil;
import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException;
import org.wso2.carbon.device.mgt.core.dto.DeviceType;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ApplicationStorageManagerImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/impl/ApplicationStorageManagerImpl.java
similarity index 93%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ApplicationStorageManagerImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/impl/ApplicationStorageManagerImpl.java
index fc58f3c9103..91e3f4579b4 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ApplicationStorageManagerImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/impl/ApplicationStorageManagerImpl.java
@@ -15,28 +15,28 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.impl;
+package io.entgra.application.mgt.core.impl;
import com.dd.plist.NSDictionary;
import net.dongliu.apk.parser.bean.ApkMeta;
import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.ApplicationInstaller;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationReleaseDTO;
-import org.wso2.carbon.device.application.mgt.common.DeviceTypes;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationStorageManagementException;
-import org.wso2.carbon.device.application.mgt.common.exception.ResourceManagementException;
-import org.wso2.carbon.device.application.mgt.common.services.ApplicationStorageManager;
-import org.wso2.carbon.device.application.mgt.core.exception.ParsingException;
-import org.wso2.carbon.device.application.mgt.core.util.ArtifactsParser;
-import org.wso2.carbon.device.application.mgt.core.util.Constants;
-import org.wso2.carbon.device.application.mgt.core.util.StorageManagementUtil;
+import io.entgra.application.mgt.common.ApplicationInstaller;
+import io.entgra.application.mgt.common.dto.ApplicationReleaseDTO;
+import io.entgra.application.mgt.common.DeviceTypes;
+import io.entgra.application.mgt.common.exception.ApplicationStorageManagementException;
+import io.entgra.application.mgt.common.exception.ResourceManagementException;
+import io.entgra.application.mgt.common.services.ApplicationStorageManager;
+import io.entgra.application.mgt.core.exception.ParsingException;
+import io.entgra.application.mgt.core.util.ArtifactsParser;
+import io.entgra.application.mgt.core.util.Constants;
+import io.entgra.application.mgt.core.util.StorageManagementUtil;
import java.io.*;
import java.util.List;
-import static org.wso2.carbon.device.application.mgt.core.util.StorageManagementUtil.saveFile;
+import static io.entgra.application.mgt.core.util.StorageManagementUtil.saveFile;
/**
* This class contains the default concrete implementation of ApplicationStorage Management.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/AppmDataHandlerImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/impl/AppmDataHandlerImpl.java
similarity index 85%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/AppmDataHandlerImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/impl/AppmDataHandlerImpl.java
index bd0f6ad79f1..07006890818 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/AppmDataHandlerImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/impl/AppmDataHandlerImpl.java
@@ -15,22 +15,22 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.impl;
+package io.entgra.application.mgt.core.impl;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.config.LifecycleState;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationStorageManagementException;
-import org.wso2.carbon.device.application.mgt.common.exception.LifecycleManagementException;
-import org.wso2.carbon.device.application.mgt.common.services.ApplicationStorageManager;
-import org.wso2.carbon.device.application.mgt.common.services.AppmDataHandler;
-import org.wso2.carbon.device.application.mgt.core.exception.BadRequestException;
-import org.wso2.carbon.device.application.mgt.core.util.APIUtil;
-import org.wso2.carbon.device.application.mgt.core.exception.NotFoundException;
-import org.wso2.carbon.device.application.mgt.core.internal.DataHolder;
-import org.wso2.carbon.device.application.mgt.core.lifecycle.LifecycleStateManager;
+import io.entgra.application.mgt.common.config.LifecycleState;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.exception.ApplicationStorageManagementException;
+import io.entgra.application.mgt.common.exception.LifecycleManagementException;
+import io.entgra.application.mgt.common.services.ApplicationStorageManager;
+import io.entgra.application.mgt.common.services.AppmDataHandler;
+import io.entgra.application.mgt.core.exception.BadRequestException;
+import io.entgra.application.mgt.core.util.APIUtil;
+import io.entgra.application.mgt.core.exception.NotFoundException;
+import io.entgra.application.mgt.core.internal.DataHolder;
+import io.entgra.application.mgt.core.lifecycle.LifecycleStateManager;
import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException;
import org.wso2.carbon.device.mgt.core.dto.DeviceType;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ReviewManagerImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/impl/ReviewManagerImpl.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ReviewManagerImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/impl/ReviewManagerImpl.java
index 92e281fd6b2..69b6a2b21b0 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ReviewManagerImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/impl/ReviewManagerImpl.java
@@ -15,36 +15,36 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.impl;
+package io.entgra.application.mgt.core.impl;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.context.PrivilegedCarbonContext;
-import org.wso2.carbon.device.application.mgt.common.Rating;
-import org.wso2.carbon.device.application.mgt.common.ReviewNode;
-import org.wso2.carbon.device.application.mgt.common.PaginationRequest;
-import org.wso2.carbon.device.application.mgt.common.PaginationResult;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationDTO;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationReleaseDTO;
-import org.wso2.carbon.device.application.mgt.common.dto.ReviewDTO;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
-import org.wso2.carbon.device.application.mgt.common.exception.ReviewManagementException;
-import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionException;
-import org.wso2.carbon.device.application.mgt.common.exception.TransactionManagementException;
-import org.wso2.carbon.device.application.mgt.common.response.Review;
-import org.wso2.carbon.device.application.mgt.common.services.*;
-import org.wso2.carbon.device.application.mgt.common.wrapper.ReviewWrapper;
-import org.wso2.carbon.device.application.mgt.core.dao.ApplicationDAO;
-import org.wso2.carbon.device.application.mgt.core.dao.ApplicationReleaseDAO;
-import org.wso2.carbon.device.application.mgt.core.dao.ReviewDAO;
-import org.wso2.carbon.device.application.mgt.core.dao.common.ApplicationManagementDAOFactory;
-import org.wso2.carbon.device.application.mgt.core.exception.ApplicationManagementDAOException;
-import org.wso2.carbon.device.application.mgt.core.exception.BadRequestException;
-import org.wso2.carbon.device.application.mgt.core.exception.ForbiddenException;
-import org.wso2.carbon.device.application.mgt.core.exception.NotFoundException;
-import org.wso2.carbon.device.application.mgt.core.exception.ReviewManagementDAOException;
-import org.wso2.carbon.device.application.mgt.core.util.ConnectionManagerUtil;
-import org.wso2.carbon.device.application.mgt.core.util.Constants;
+import io.entgra.application.mgt.common.Rating;
+import io.entgra.application.mgt.common.ReviewNode;
+import io.entgra.application.mgt.common.PaginationRequest;
+import io.entgra.application.mgt.common.PaginationResult;
+import io.entgra.application.mgt.common.dto.ApplicationDTO;
+import io.entgra.application.mgt.common.dto.ApplicationReleaseDTO;
+import io.entgra.application.mgt.common.dto.ReviewDTO;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.exception.ReviewManagementException;
+import io.entgra.application.mgt.common.exception.DBConnectionException;
+import io.entgra.application.mgt.common.exception.TransactionManagementException;
+import io.entgra.application.mgt.common.response.Review;
+import io.entgra.application.mgt.common.services.*;
+import io.entgra.application.mgt.common.wrapper.ReviewWrapper;
+import io.entgra.application.mgt.core.dao.ApplicationDAO;
+import io.entgra.application.mgt.core.dao.ApplicationReleaseDAO;
+import io.entgra.application.mgt.core.dao.ReviewDAO;
+import io.entgra.application.mgt.core.dao.common.ApplicationManagementDAOFactory;
+import io.entgra.application.mgt.core.exception.ApplicationManagementDAOException;
+import io.entgra.application.mgt.core.exception.BadRequestException;
+import io.entgra.application.mgt.core.exception.ForbiddenException;
+import io.entgra.application.mgt.core.exception.NotFoundException;
+import io.entgra.application.mgt.core.exception.ReviewManagementDAOException;
+import io.entgra.application.mgt.core.util.ConnectionManagerUtil;
+import io.entgra.application.mgt.core.util.Constants;
import java.util.ArrayList;
import java.util.Comparator;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/SubscriptionManagerImpl.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/impl/SubscriptionManagerImpl.java
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/SubscriptionManagerImpl.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/impl/SubscriptionManagerImpl.java
index 2de1094c1ff..95cfbe48e03 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/SubscriptionManagerImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/impl/SubscriptionManagerImpl.java
@@ -15,7 +15,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.impl;
+package io.entgra.application.mgt.core.impl;
import com.google.gson.Gson;
import org.apache.commons.httpclient.HttpClient;
@@ -30,41 +30,41 @@ import org.json.JSONObject;
import org.wso2.carbon.apimgt.application.extension.dto.ApiApplicationKey;
import org.wso2.carbon.apimgt.application.extension.exception.APIManagerException;
import org.wso2.carbon.context.PrivilegedCarbonContext;
-import org.wso2.carbon.device.application.mgt.common.ApplicationInstallResponse;
-import org.wso2.carbon.device.application.mgt.common.ApplicationSubscriptionInfo;
-import org.wso2.carbon.device.application.mgt.common.ApplicationType;
-import org.wso2.carbon.device.application.mgt.common.DeviceSubscriptionData;
-import org.wso2.carbon.device.application.mgt.common.DeviceTypes;
-import org.wso2.carbon.device.application.mgt.common.ExecutionStatus;
-import org.wso2.carbon.device.application.mgt.common.SubAction;
-import org.wso2.carbon.device.application.mgt.common.SubscriptionType;
-import org.wso2.carbon.device.application.mgt.common.SubscribingDeviceIdHolder;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationDTO;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationPolicyDTO;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationReleaseDTO;
-import org.wso2.carbon.device.application.mgt.common.dto.DeviceSubscriptionDTO;
-import org.wso2.carbon.device.application.mgt.common.dto.ScheduledSubscriptionDTO;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
-import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionException;
-import org.wso2.carbon.device.application.mgt.common.exception.LifecycleManagementException;
-import org.wso2.carbon.device.application.mgt.common.exception.SubscriptionManagementException;
-import org.wso2.carbon.device.application.mgt.common.exception.TransactionManagementException;
-import org.wso2.carbon.device.application.mgt.common.response.Application;
-import org.wso2.carbon.device.application.mgt.common.services.SubscriptionManager;
-import org.wso2.carbon.device.application.mgt.core.dao.ApplicationDAO;
-import org.wso2.carbon.device.application.mgt.core.dao.SubscriptionDAO;
-import org.wso2.carbon.device.application.mgt.core.dao.common.ApplicationManagementDAOFactory;
-import org.wso2.carbon.device.application.mgt.core.exception.ApplicationManagementDAOException;
-import org.wso2.carbon.device.application.mgt.core.exception.BadRequestException;
-import org.wso2.carbon.device.application.mgt.core.exception.ForbiddenException;
-import org.wso2.carbon.device.application.mgt.core.exception.NotFoundException;
-import org.wso2.carbon.device.application.mgt.core.internal.DataHolder;
-import org.wso2.carbon.device.application.mgt.core.lifecycle.LifecycleStateManager;
-import org.wso2.carbon.device.application.mgt.core.util.APIUtil;
-import org.wso2.carbon.device.application.mgt.core.util.ConnectionManagerUtil;
-import org.wso2.carbon.device.application.mgt.core.util.Constants;
-import org.wso2.carbon.device.application.mgt.core.util.HelperUtil;
-import org.wso2.carbon.device.application.mgt.core.util.OAuthUtils;
+import io.entgra.application.mgt.common.ApplicationInstallResponse;
+import io.entgra.application.mgt.common.ApplicationSubscriptionInfo;
+import io.entgra.application.mgt.common.ApplicationType;
+import io.entgra.application.mgt.common.DeviceSubscriptionData;
+import io.entgra.application.mgt.common.DeviceTypes;
+import io.entgra.application.mgt.common.ExecutionStatus;
+import io.entgra.application.mgt.common.SubAction;
+import io.entgra.application.mgt.common.SubscriptionType;
+import io.entgra.application.mgt.common.SubscribingDeviceIdHolder;
+import io.entgra.application.mgt.common.dto.ApplicationDTO;
+import io.entgra.application.mgt.common.dto.ApplicationPolicyDTO;
+import io.entgra.application.mgt.common.dto.ApplicationReleaseDTO;
+import io.entgra.application.mgt.common.dto.DeviceSubscriptionDTO;
+import io.entgra.application.mgt.common.dto.ScheduledSubscriptionDTO;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.exception.DBConnectionException;
+import io.entgra.application.mgt.common.exception.LifecycleManagementException;
+import io.entgra.application.mgt.common.exception.SubscriptionManagementException;
+import io.entgra.application.mgt.common.exception.TransactionManagementException;
+import io.entgra.application.mgt.common.response.Application;
+import io.entgra.application.mgt.common.services.SubscriptionManager;
+import io.entgra.application.mgt.core.dao.ApplicationDAO;
+import io.entgra.application.mgt.core.dao.SubscriptionDAO;
+import io.entgra.application.mgt.core.dao.common.ApplicationManagementDAOFactory;
+import io.entgra.application.mgt.core.exception.ApplicationManagementDAOException;
+import io.entgra.application.mgt.core.exception.BadRequestException;
+import io.entgra.application.mgt.core.exception.ForbiddenException;
+import io.entgra.application.mgt.core.exception.NotFoundException;
+import io.entgra.application.mgt.core.internal.DataHolder;
+import io.entgra.application.mgt.core.lifecycle.LifecycleStateManager;
+import io.entgra.application.mgt.core.util.APIUtil;
+import io.entgra.application.mgt.core.util.ConnectionManagerUtil;
+import io.entgra.application.mgt.core.util.Constants;
+import io.entgra.application.mgt.core.util.HelperUtil;
+import io.entgra.application.mgt.core.util.OAuthUtils;
import org.wso2.carbon.device.mgt.common.*;
import org.wso2.carbon.device.mgt.common.app.mgt.App;
import org.wso2.carbon.device.mgt.common.app.mgt.MobileAppTypes;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/internal/ApplicationManagementServiceComponent.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/internal/ApplicationManagementServiceComponent.java
similarity index 87%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/internal/ApplicationManagementServiceComponent.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/internal/ApplicationManagementServiceComponent.java
index 7f07edba77a..e56f73e1cb8 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/internal/ApplicationManagementServiceComponent.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/internal/ApplicationManagementServiceComponent.java
@@ -15,24 +15,24 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.internal;
+package io.entgra.application.mgt.core.internal;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.osgi.framework.BundleContext;
import org.osgi.service.component.ComponentContext;
-import org.wso2.carbon.device.application.mgt.common.config.LifecycleState;
-import org.wso2.carbon.device.application.mgt.common.services.ApplicationManager;
-import org.wso2.carbon.device.application.mgt.common.services.ApplicationStorageManager;
-import org.wso2.carbon.device.application.mgt.common.services.AppmDataHandler;
-import org.wso2.carbon.device.application.mgt.common.services.ReviewManager;
-import org.wso2.carbon.device.application.mgt.common.services.SubscriptionManager;
-import org.wso2.carbon.device.application.mgt.core.config.ConfigurationManager;
-import org.wso2.carbon.device.application.mgt.core.dao.common.ApplicationManagementDAOFactory;
-import org.wso2.carbon.device.application.mgt.core.impl.AppmDataHandlerImpl;
-import org.wso2.carbon.device.application.mgt.core.lifecycle.LifecycleStateManager;
-import org.wso2.carbon.device.application.mgt.core.task.ScheduledAppSubscriptionTaskManager;
-import org.wso2.carbon.device.application.mgt.core.util.ApplicationManagementUtil;
+import io.entgra.application.mgt.common.config.LifecycleState;
+import io.entgra.application.mgt.common.services.ApplicationManager;
+import io.entgra.application.mgt.common.services.ApplicationStorageManager;
+import io.entgra.application.mgt.common.services.AppmDataHandler;
+import io.entgra.application.mgt.common.services.ReviewManager;
+import io.entgra.application.mgt.common.services.SubscriptionManager;
+import io.entgra.application.mgt.core.config.ConfigurationManager;
+import io.entgra.application.mgt.core.dao.common.ApplicationManagementDAOFactory;
+import io.entgra.application.mgt.core.impl.AppmDataHandlerImpl;
+import io.entgra.application.mgt.core.lifecycle.LifecycleStateManager;
+import io.entgra.application.mgt.core.task.ScheduledAppSubscriptionTaskManager;
+import io.entgra.application.mgt.core.util.ApplicationManagementUtil;
import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService;
import org.wso2.carbon.ndatasource.core.DataSourceService;
import org.wso2.carbon.ntask.core.service.TaskService;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/internal/DataHolder.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/internal/DataHolder.java
similarity index 87%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/internal/DataHolder.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/internal/DataHolder.java
index 81132a7009c..3c675db85a7 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/internal/DataHolder.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/internal/DataHolder.java
@@ -15,14 +15,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.internal;
-
-import org.wso2.carbon.device.application.mgt.common.services.ApplicationManager;
-import org.wso2.carbon.device.application.mgt.common.services.ApplicationStorageManager;
-import org.wso2.carbon.device.application.mgt.common.services.AppmDataHandler;
-import org.wso2.carbon.device.application.mgt.common.services.ReviewManager;
-import org.wso2.carbon.device.application.mgt.common.services.SubscriptionManager;
-import org.wso2.carbon.device.application.mgt.core.lifecycle.LifecycleStateManager;
+package io.entgra.application.mgt.core.internal;
+
+import io.entgra.application.mgt.common.services.ApplicationManager;
+import io.entgra.application.mgt.common.services.ApplicationStorageManager;
+import io.entgra.application.mgt.common.services.AppmDataHandler;
+import io.entgra.application.mgt.common.services.ReviewManager;
+import io.entgra.application.mgt.common.services.SubscriptionManager;
+import io.entgra.application.mgt.core.lifecycle.LifecycleStateManager;
import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService;
import org.wso2.carbon.ntask.core.service.TaskService;
import org.wso2.carbon.user.core.service.RealmService;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/lifecycle/LifecycleStateManager.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/lifecycle/LifecycleStateManager.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/lifecycle/LifecycleStateManager.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/lifecycle/LifecycleStateManager.java
index e0f9a2f796c..a44c708fc39 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/lifecycle/LifecycleStateManager.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/lifecycle/LifecycleStateManager.java
@@ -15,13 +15,13 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.lifecycle;
+package io.entgra.application.mgt.core.lifecycle;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.exception.LifecycleManagementException;
-import org.wso2.carbon.device.application.mgt.core.internal.DataHolder;
-import org.wso2.carbon.device.application.mgt.common.config.LifecycleState;
+import io.entgra.application.mgt.common.exception.LifecycleManagementException;
+import io.entgra.application.mgt.core.internal.DataHolder;
+import io.entgra.application.mgt.common.config.LifecycleState;
import org.wso2.carbon.device.mgt.common.permission.mgt.PermissionManagementException;
import org.wso2.carbon.device.mgt.core.permission.mgt.PermissionUtils;
import org.wso2.carbon.device.mgt.core.search.mgt.Constants;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/task/ScheduledAppSubscriptionCleanupTask.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/task/ScheduledAppSubscriptionCleanupTask.java
similarity index 85%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/task/ScheduledAppSubscriptionCleanupTask.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/task/ScheduledAppSubscriptionCleanupTask.java
index 351a4477b20..1860d2f7ff7 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/task/ScheduledAppSubscriptionCleanupTask.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/task/ScheduledAppSubscriptionCleanupTask.java
@@ -16,13 +16,13 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.task;
+package io.entgra.application.mgt.core.task;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.exception.SubscriptionManagementException;
-import org.wso2.carbon.device.application.mgt.common.services.SubscriptionManager;
-import org.wso2.carbon.device.application.mgt.core.impl.SubscriptionManagerImpl;
+import io.entgra.application.mgt.common.exception.SubscriptionManagementException;
+import io.entgra.application.mgt.common.services.SubscriptionManager;
+import io.entgra.application.mgt.core.impl.SubscriptionManagerImpl;
import org.wso2.carbon.device.mgt.core.task.impl.RandomlyAssignedScheduleTask;
import java.util.Map;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/task/ScheduledAppSubscriptionTask.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/task/ScheduledAppSubscriptionTask.java
similarity index 90%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/task/ScheduledAppSubscriptionTask.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/task/ScheduledAppSubscriptionTask.java
index d8f491e37dc..fc9b5b35cb2 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/task/ScheduledAppSubscriptionTask.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/task/ScheduledAppSubscriptionTask.java
@@ -16,7 +16,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.task;
+package io.entgra.application.mgt.core.task;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
@@ -24,14 +24,14 @@ import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.context.PrivilegedCarbonContext;
-import org.wso2.carbon.device.application.mgt.common.ExecutionStatus;
-import org.wso2.carbon.device.application.mgt.common.SubscriptionType;
-import org.wso2.carbon.device.application.mgt.common.dto.ScheduledSubscriptionDTO;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
-import org.wso2.carbon.device.application.mgt.common.exception.SubscriptionManagementException;
-import org.wso2.carbon.device.application.mgt.common.services.SubscriptionManager;
-import org.wso2.carbon.device.application.mgt.core.impl.SubscriptionManagerImpl;
-import org.wso2.carbon.device.application.mgt.core.util.Constants;
+import io.entgra.application.mgt.common.ExecutionStatus;
+import io.entgra.application.mgt.common.SubscriptionType;
+import io.entgra.application.mgt.common.dto.ScheduledSubscriptionDTO;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.exception.SubscriptionManagementException;
+import io.entgra.application.mgt.common.services.SubscriptionManager;
+import io.entgra.application.mgt.core.impl.SubscriptionManagerImpl;
+import io.entgra.application.mgt.core.util.Constants;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.core.task.impl.RandomlyAssignedScheduleTask;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/task/ScheduledAppSubscriptionTaskManager.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/task/ScheduledAppSubscriptionTaskManager.java
similarity index 92%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/task/ScheduledAppSubscriptionTaskManager.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/task/ScheduledAppSubscriptionTaskManager.java
index b274b1850f3..932bbe626d2 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/task/ScheduledAppSubscriptionTaskManager.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/task/ScheduledAppSubscriptionTaskManager.java
@@ -16,7 +16,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.task;
+package io.entgra.application.mgt.core.task;
import com.google.gson.Gson;
import org.apache.commons.codec.digest.DigestUtils;
@@ -24,22 +24,20 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.quartz.CronExpression;
import org.wso2.carbon.context.PrivilegedCarbonContext;
-import org.wso2.carbon.device.application.mgt.common.SubAction;
-import org.wso2.carbon.device.application.mgt.common.SubscriptionType;
-import org.wso2.carbon.device.application.mgt.common.dto.ScheduledSubscriptionDTO;
-import org.wso2.carbon.device.application.mgt.common.exception.SubscriptionManagementException;
-import org.wso2.carbon.device.application.mgt.common.services.SubscriptionManager;
-import org.wso2.carbon.device.application.mgt.core.exception.ApplicationOperationTaskException;
-import org.wso2.carbon.device.application.mgt.core.impl.SubscriptionManagerImpl;
-import org.wso2.carbon.device.application.mgt.core.internal.DataHolder;
-import org.wso2.carbon.device.application.mgt.core.util.Constants;
+import io.entgra.application.mgt.common.SubAction;
+import io.entgra.application.mgt.common.SubscriptionType;
+import io.entgra.application.mgt.common.dto.ScheduledSubscriptionDTO;
+import io.entgra.application.mgt.common.exception.SubscriptionManagementException;
+import io.entgra.application.mgt.common.services.SubscriptionManager;
+import io.entgra.application.mgt.core.exception.ApplicationOperationTaskException;
+import io.entgra.application.mgt.core.impl.SubscriptionManagerImpl;
+import io.entgra.application.mgt.core.internal.DataHolder;
+import io.entgra.application.mgt.core.util.Constants;
import org.wso2.carbon.ntask.common.TaskException;
import org.wso2.carbon.ntask.core.TaskInfo;
import org.wso2.carbon.ntask.core.TaskManager;
import org.wso2.carbon.ntask.core.service.TaskService;
-import java.time.LocalDateTime;
-import java.time.format.TextStyle;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/APIUtil.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/APIUtil.java
similarity index 93%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/APIUtil.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/APIUtil.java
index 97e83d3128f..0afcc85ab50 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/APIUtil.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/APIUtil.java
@@ -16,34 +16,34 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.util;
+package io.entgra.application.mgt.core.util;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.commons.validator.routines.UrlValidator;
import org.wso2.carbon.context.PrivilegedCarbonContext;
-import org.wso2.carbon.device.application.mgt.common.ApplicationType;
-import org.wso2.carbon.device.application.mgt.common.config.MDMConfig;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationDTO;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationReleaseDTO;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
-import org.wso2.carbon.device.application.mgt.common.response.Application;
-import org.wso2.carbon.device.application.mgt.common.response.ApplicationRelease;
-import org.wso2.carbon.device.application.mgt.common.services.*;
-import org.wso2.carbon.device.application.mgt.common.ErrorResponse;
-import org.wso2.carbon.device.application.mgt.common.wrapper.CustomAppReleaseWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.CustomAppWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.EntAppReleaseWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.ApplicationWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.PublicAppReleaseWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.PublicAppWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.WebAppReleaseWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.WebAppWrapper;
-import org.wso2.carbon.device.application.mgt.core.config.ConfigurationManager;
-import org.wso2.carbon.device.application.mgt.core.exception.BadRequestException;
-import org.wso2.carbon.device.application.mgt.core.exception.UnexpectedServerErrorException;
-import org.wso2.carbon.device.application.mgt.core.internal.DataHolder;
+import io.entgra.application.mgt.common.ApplicationType;
+import io.entgra.application.mgt.common.config.MDMConfig;
+import io.entgra.application.mgt.common.dto.ApplicationDTO;
+import io.entgra.application.mgt.common.dto.ApplicationReleaseDTO;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.response.Application;
+import io.entgra.application.mgt.common.response.ApplicationRelease;
+import io.entgra.application.mgt.common.services.*;
+import io.entgra.application.mgt.common.ErrorResponse;
+import io.entgra.application.mgt.common.wrapper.CustomAppReleaseWrapper;
+import io.entgra.application.mgt.common.wrapper.CustomAppWrapper;
+import io.entgra.application.mgt.common.wrapper.EntAppReleaseWrapper;
+import io.entgra.application.mgt.common.wrapper.ApplicationWrapper;
+import io.entgra.application.mgt.common.wrapper.PublicAppReleaseWrapper;
+import io.entgra.application.mgt.common.wrapper.PublicAppWrapper;
+import io.entgra.application.mgt.common.wrapper.WebAppReleaseWrapper;
+import io.entgra.application.mgt.common.wrapper.WebAppWrapper;
+import io.entgra.application.mgt.core.config.ConfigurationManager;
+import io.entgra.application.mgt.core.exception.BadRequestException;
+import io.entgra.application.mgt.core.exception.UnexpectedServerErrorException;
+import io.entgra.application.mgt.core.internal.DataHolder;
import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException;
import org.wso2.carbon.device.mgt.core.dto.DeviceType;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/ApplicationManagementUtil.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/ApplicationManagementUtil.java
similarity index 85%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/ApplicationManagementUtil.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/ApplicationManagementUtil.java
index db4e749e930..11d8adb2ce4 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/ApplicationManagementUtil.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/ApplicationManagementUtil.java
@@ -15,18 +15,18 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.util;
+package io.entgra.application.mgt.core.util;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.exception.InvalidConfigurationException;
-import org.wso2.carbon.device.application.mgt.common.services.ApplicationManager;
-import org.wso2.carbon.device.application.mgt.common.services.ApplicationStorageManager;
-import org.wso2.carbon.device.application.mgt.common.services.ReviewManager;
-import org.wso2.carbon.device.application.mgt.common.services.SubscriptionManager;
-import org.wso2.carbon.device.application.mgt.core.config.ConfigurationManager;
-import org.wso2.carbon.device.application.mgt.core.config.Extension;
-import org.wso2.carbon.device.application.mgt.core.lifecycle.LifecycleStateManager;
+import io.entgra.application.mgt.common.exception.InvalidConfigurationException;
+import io.entgra.application.mgt.common.services.ApplicationManager;
+import io.entgra.application.mgt.common.services.ApplicationStorageManager;
+import io.entgra.application.mgt.common.services.ReviewManager;
+import io.entgra.application.mgt.common.services.SubscriptionManager;
+import io.entgra.application.mgt.core.config.ConfigurationManager;
+import io.entgra.application.mgt.core.config.Extension;
+import io.entgra.application.mgt.core.lifecycle.LifecycleStateManager;
import java.lang.reflect.Constructor;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/ApplicationMgtDatabaseCreator.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/ApplicationMgtDatabaseCreator.java
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/ApplicationMgtDatabaseCreator.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/ApplicationMgtDatabaseCreator.java
index 95f2119870b..82678ada0a7 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/ApplicationMgtDatabaseCreator.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/ApplicationMgtDatabaseCreator.java
@@ -16,7 +16,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.util;
+package io.entgra.application.mgt.core.util;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/ArtifactsParser.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/ArtifactsParser.java
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/ArtifactsParser.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/ArtifactsParser.java
index 32de0f80068..d9f0ad02341 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/ArtifactsParser.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/ArtifactsParser.java
@@ -16,7 +16,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.util;
+package io.entgra.application.mgt.core.util;
import com.dd.plist.BinaryPropertyListParser;
import com.dd.plist.NSDictionary;
@@ -27,7 +27,7 @@ import net.dongliu.apk.parser.bean.ApkMeta;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.commons.io.IOUtils;
-import org.wso2.carbon.device.application.mgt.core.exception.ParsingException;
+import io.entgra.application.mgt.core.exception.ParsingException;
import java.io.ByteArrayOutputStream;
import java.io.File;
@@ -38,7 +38,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.util.UUID;
-import java.nio.file.Files;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/ConnectionManagerUtil.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/ConnectionManagerUtil.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/ConnectionManagerUtil.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/ConnectionManagerUtil.java
index d8c0d66f3a9..cbfa27f63e4 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/ConnectionManagerUtil.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/ConnectionManagerUtil.java
@@ -15,13 +15,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.util;
+package io.entgra.application.mgt.core.util;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionException;
-import org.wso2.carbon.device.application.mgt.common.exception.IllegalTransactionStateException;
-import org.wso2.carbon.device.application.mgt.common.exception.TransactionManagementException;
+import io.entgra.application.mgt.common.exception.DBConnectionException;
+import io.entgra.application.mgt.common.exception.IllegalTransactionStateException;
+import io.entgra.application.mgt.common.exception.TransactionManagementException;
import java.sql.Connection;
import java.sql.SQLException;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/Constants.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/Constants.java
similarity index 99%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/Constants.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/Constants.java
index 27498f77bb7..3a5956ea0eb 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/Constants.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/Constants.java
@@ -16,7 +16,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.util;
+package io.entgra.application.mgt.core.util;
import org.wso2.carbon.utils.CarbonUtils;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/DAOUtil.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/DAOUtil.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/DAOUtil.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/DAOUtil.java
index 4950fe3c6e7..012a289528e 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/DAOUtil.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/DAOUtil.java
@@ -15,22 +15,22 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.util;
+package io.entgra.application.mgt.core.util;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.json.JSONException;
-import org.wso2.carbon.device.application.mgt.common.ExecutionStatus;
-import org.wso2.carbon.device.application.mgt.common.SubscriptionType;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationDTO;
+import io.entgra.application.mgt.common.ExecutionStatus;
+import io.entgra.application.mgt.common.SubscriptionType;
+import io.entgra.application.mgt.common.dto.ApplicationDTO;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationReleaseDTO;
-import org.wso2.carbon.device.application.mgt.common.dto.DeviceSubscriptionDTO;
-import org.wso2.carbon.device.application.mgt.common.dto.ReviewDTO;
-import org.wso2.carbon.device.application.mgt.common.dto.ScheduledSubscriptionDTO;
-import org.wso2.carbon.device.application.mgt.core.exception.UnexpectedServerErrorException;
+import io.entgra.application.mgt.common.dto.ApplicationReleaseDTO;
+import io.entgra.application.mgt.common.dto.DeviceSubscriptionDTO;
+import io.entgra.application.mgt.common.dto.ReviewDTO;
+import io.entgra.application.mgt.common.dto.ScheduledSubscriptionDTO;
+import io.entgra.application.mgt.core.exception.UnexpectedServerErrorException;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import java.sql.PreparedStatement;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/HelperUtil.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/HelperUtil.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/HelperUtil.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/HelperUtil.java
index fcc76981692..25fedae716d 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/HelperUtil.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/HelperUtil.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.util;
+package io.entgra.application.mgt.core.util;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/JSONUtil.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/JSONUtil.java
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/JSONUtil.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/JSONUtil.java
index 34fedf190ea..4e57a96c779 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/JSONUtil.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/JSONUtil.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.util;
+package io.entgra.application.mgt.core.util;
import org.json.JSONArray;
import org.json.JSONException;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/MDMAppConstants.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/MDMAppConstants.java
similarity index 98%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/MDMAppConstants.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/MDMAppConstants.java
index 0892f0909dd..46a5f4fd8d5 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/MDMAppConstants.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/MDMAppConstants.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.util;
+package io.entgra.application.mgt.core.util;
public class MDMAppConstants {
public static final String USER = "user";
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/OAuthUtils.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/OAuthUtils.java
similarity index 94%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/OAuthUtils.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/OAuthUtils.java
index b57ffebeb7a..71eb214ecc8 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/OAuthUtils.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/OAuthUtils.java
@@ -16,7 +16,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.util;
+package io.entgra.application.mgt.core.util;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -24,7 +24,7 @@ import org.wso2.carbon.apimgt.application.extension.APIManagementProviderService
import org.wso2.carbon.apimgt.application.extension.dto.ApiApplicationKey;
import org.wso2.carbon.apimgt.application.extension.exception.APIManagerException;
import org.wso2.carbon.context.PrivilegedCarbonContext;
-import org.wso2.carbon.device.application.mgt.common.dto.ApiRegistrationProfile;
+import io.entgra.application.mgt.common.dto.ApiRegistrationProfile;
import org.wso2.carbon.identity.jwt.client.extension.JWTClient;
import org.wso2.carbon.identity.jwt.client.extension.dto.AccessTokenInfo;
import org.wso2.carbon.identity.jwt.client.extension.exception.JWTClientException;
@@ -63,7 +63,7 @@ public class OAuthUtils {
apiApplicationKeyInfo = apiManagementProviderService.
generateAndRetrieveApplicationKeys(registrationProfile.getApplicationName(),
registrationProfile.getTags(), Constants.ApplicationInstall.DEFAULT_TOKEN_TYPE,
- registrationProfile.getApplicationName(), registrationProfile.isAllowedToAllDomains(),
+ null, registrationProfile.isAllowedToAllDomains(),
Constants.ApplicationInstall.DEFAULT_VALIDITY_PERIOD);
} finally {
PrivilegedCarbonContext.endTenantFlow();
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/StorageManagementUtil.java b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/StorageManagementUtil.java
similarity index 94%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/StorageManagementUtil.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/StorageManagementUtil.java
index 97b36aba28b..f0819dbd807 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/StorageManagementUtil.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/java/io/entgra/application/mgt/core/util/StorageManagementUtil.java
@@ -16,16 +16,16 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.util;
+package io.entgra.application.mgt.core.util;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.ImageArtifact;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationStorageManagementException;
-import org.wso2.carbon.device.application.mgt.common.exception.ResourceManagementException;
+import io.entgra.application.mgt.common.ImageArtifact;
+import io.entgra.application.mgt.common.exception.ApplicationStorageManagementException;
+import io.entgra.application.mgt.common.exception.ResourceManagementException;
import java.io.File;
import java.io.FileInputStream;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/resources/META-INF/component.xml b/components/application-mgt/io.entgra.application.mgt.core/src/main/resources/META-INF/component.xml
similarity index 94%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/resources/META-INF/component.xml
rename to components/application-mgt/io.entgra.application.mgt.core/src/main/resources/META-INF/component.xml
index 2f5770f0bfe..857df5b4026 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/resources/META-INF/component.xml
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/main/resources/META-INF/component.xml
@@ -20,7 +20,7 @@
platforms
xml
- org.wso2.carbon.device.application.mgt.core.deployer.PlatformDeployer
+ io.entgra.application.mgt.core.deployer.PlatformDeployer
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/ArtifactParserTest.java b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/ArtifactParserTest.java
similarity index 93%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/ArtifactParserTest.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/ArtifactParserTest.java
index f252a882b18..6fa36dab723 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/ArtifactParserTest.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/ArtifactParserTest.java
@@ -16,14 +16,14 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core;
+package io.entgra.application.mgt.core;
import com.dd.plist.NSDictionary;
import net.dongliu.apk.parser.bean.ApkMeta;
import org.testng.Assert;
import org.testng.annotations.Test;
-import org.wso2.carbon.device.application.mgt.core.exception.ParsingException;
-import org.wso2.carbon.device.application.mgt.core.util.ArtifactsParser;
+import io.entgra.application.mgt.core.exception.ParsingException;
+import io.entgra.application.mgt.core.util.ArtifactsParser;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/BaseTestCase.java b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/BaseTestCase.java
similarity index 89%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/BaseTestCase.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/BaseTestCase.java
index c7577247120..fcb9a0dd3be 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/BaseTestCase.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/BaseTestCase.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core;
+package io.entgra.application.mgt.core;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -24,15 +24,15 @@ import org.testng.annotations.BeforeSuite;
import org.w3c.dom.Document;
import org.wso2.carbon.base.MultitenantConstants;
import org.wso2.carbon.context.PrivilegedCarbonContext;
-import org.wso2.carbon.device.application.mgt.common.config.LifecycleState;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
-import org.wso2.carbon.device.application.mgt.core.common.DataSourceConfig;
-import org.wso2.carbon.device.application.mgt.core.config.ConfigurationManager;
-import org.wso2.carbon.device.application.mgt.core.dao.common.ApplicationManagementDAOFactory;
-import org.wso2.carbon.device.application.mgt.core.internal.DataHolder;
-import org.wso2.carbon.device.application.mgt.core.lifecycle.LifecycleStateManager;
-import org.wso2.carbon.device.application.mgt.core.util.ApplicationManagementUtil;
-import org.wso2.carbon.device.application.mgt.core.util.ConnectionManagerUtil;
+import io.entgra.application.mgt.common.config.LifecycleState;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.core.common.DataSourceConfig;
+import io.entgra.application.mgt.core.config.ConfigurationManager;
+import io.entgra.application.mgt.core.dao.common.ApplicationManagementDAOFactory;
+import io.entgra.application.mgt.core.internal.DataHolder;
+import io.entgra.application.mgt.core.lifecycle.LifecycleStateManager;
+import io.entgra.application.mgt.core.util.ApplicationManagementUtil;
+import io.entgra.application.mgt.core.util.ConnectionManagerUtil;
import org.wso2.carbon.device.mgt.core.authorization.DeviceAccessAuthorizationServiceImpl;
import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager;
import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory;
@@ -130,7 +130,7 @@ public abstract class BaseTestCase {
try {
conn = this.getDataSource().getConnection();
stmt = conn.createStatement();
- stmt.executeUpdate("RUNSCRIPT FROM '../../../features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/h2.sql'");
+ stmt.executeUpdate("RUNSCRIPT FROM '../../../features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/h2.sql'");
stmt.executeUpdate("RUNSCRIPT FROM '../../../features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/h2.sql'");
} finally {
@@ -161,7 +161,7 @@ public abstract class BaseTestCase {
if (file.exists()) {
System.setProperty("carbon.home", file.getAbsolutePath());
}
- file = new File("../resources/carbon-home");
+ file = new File("io.entgra.application.mgt.core/src/test/resources/carbon-home");
if (file.exists()) {
System.setProperty("carbon.home", file.getAbsolutePath());
}
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/ConfigurationTest.java b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/ConfigurationTest.java
similarity index 85%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/ConfigurationTest.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/ConfigurationTest.java
index b14958f1051..9a8609f1ae1 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/ConfigurationTest.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/ConfigurationTest.java
@@ -15,13 +15,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core;
+package io.entgra.application.mgt.core;
import org.junit.Assert;
import org.testng.annotations.Test;
-import org.wso2.carbon.device.application.mgt.core.config.Configuration;
-import org.wso2.carbon.device.application.mgt.core.config.ConfigurationManager;
-import org.wso2.carbon.device.application.mgt.common.config.LifecycleState;
+import io.entgra.application.mgt.core.config.Configuration;
+import io.entgra.application.mgt.core.config.ConfigurationManager;
+import io.entgra.application.mgt.common.config.LifecycleState;
import java.util.List;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/InitTest.java b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/InitTest.java
similarity index 83%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/InitTest.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/InitTest.java
index 8d207b555cd..2db5d9fa981 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/InitTest.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/InitTest.java
@@ -15,11 +15,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core;
+package io.entgra.application.mgt.core;
import org.testng.annotations.BeforeSuite;
-import org.wso2.carbon.device.application.mgt.common.exception.InvalidConfigurationException;
-import org.wso2.carbon.device.application.mgt.core.config.ConfigurationManager;
+import io.entgra.application.mgt.common.exception.InvalidConfigurationException;
+import io.entgra.application.mgt.core.config.ConfigurationManager;
import java.io.File;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/LifeCycleStateManagerTest.java b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/LifeCycleStateManagerTest.java
similarity index 86%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/LifeCycleStateManagerTest.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/LifeCycleStateManagerTest.java
index 75a3d3d04d3..248cd1929fe 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/LifeCycleStateManagerTest.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/LifeCycleStateManagerTest.java
@@ -15,10 +15,10 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core;
+package io.entgra.application.mgt.core;
-import org.wso2.carbon.device.application.mgt.core.lifecycle.LifecycleStateManager;
-import org.wso2.carbon.device.application.mgt.common.config.LifecycleState;
+import io.entgra.application.mgt.core.lifecycle.LifecycleStateManager;
+import io.entgra.application.mgt.common.config.LifecycleState;
import java.util.HashMap;
import java.util.List;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/LifecycleManagementTest.java b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/LifecycleManagementTest.java
similarity index 92%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/LifecycleManagementTest.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/LifecycleManagementTest.java
index a0b816489fd..6080982a5d7 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/LifecycleManagementTest.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/LifecycleManagementTest.java
@@ -15,16 +15,16 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core;
+package io.entgra.application.mgt.core;
import org.junit.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
-import org.wso2.carbon.device.application.mgt.common.exception.LifecycleManagementException;
-import org.wso2.carbon.device.application.mgt.core.config.Configuration;
-import org.wso2.carbon.device.application.mgt.core.config.ConfigurationManager;
-import org.wso2.carbon.device.application.mgt.core.lifecycle.LifecycleStateManager;
-import org.wso2.carbon.device.application.mgt.common.config.LifecycleState;
+import io.entgra.application.mgt.common.exception.LifecycleManagementException;
+import io.entgra.application.mgt.core.config.Configuration;
+import io.entgra.application.mgt.core.config.ConfigurationManager;
+import io.entgra.application.mgt.core.lifecycle.LifecycleStateManager;
+import io.entgra.application.mgt.common.config.LifecycleState;
import java.util.List;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/StorageManagementUtilTest.java b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/StorageManagementUtilTest.java
similarity index 91%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/StorageManagementUtilTest.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/StorageManagementUtilTest.java
index 88d3fa4ecb7..08644a5fab4 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/StorageManagementUtilTest.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/StorageManagementUtilTest.java
@@ -16,14 +16,14 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core;
+package io.entgra.application.mgt.core;
import org.junit.Assert;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-import org.wso2.carbon.device.application.mgt.common.exception.ResourceManagementException;
-import org.wso2.carbon.device.application.mgt.core.util.StorageManagementUtil;
+import io.entgra.application.mgt.common.exception.ResourceManagementException;
+import io.entgra.application.mgt.core.util.StorageManagementUtil;
import java.io.File;
import java.io.FileInputStream;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/TestUtils.java b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/TestUtils.java
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/TestUtils.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/TestUtils.java
index ceeb41902a5..8ae7ba5e61e 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/TestUtils.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/TestUtils.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core;
+package io.entgra.application.mgt.core;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org/wso2/carbon/device/application/mgt/core/common/DataSourceConfig.java b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/common/DataSourceConfig.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org/wso2/carbon/device/application/mgt/core/common/DataSourceConfig.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/common/DataSourceConfig.java
index 7b1f2c32bc4..14aa81c13aa 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org/wso2/carbon/device/application/mgt/core/common/DataSourceConfig.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/common/DataSourceConfig.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.common;
+package io.entgra.application.mgt.core.common;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/dao/ApplicationManagementDAOTest.java b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/dao/ApplicationManagementDAOTest.java
similarity index 84%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/dao/ApplicationManagementDAOTest.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/dao/ApplicationManagementDAOTest.java
index bee26a37b8a..be76b9c0b79 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/dao/ApplicationManagementDAOTest.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/dao/ApplicationManagementDAOTest.java
@@ -15,19 +15,19 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dao;
+package io.entgra.application.mgt.core.dao;
import junit.framework.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
-import org.wso2.carbon.device.application.mgt.core.BaseTestCase;
-import org.wso2.carbon.device.application.mgt.core.config.ConfigurationManager;
-import org.wso2.carbon.device.application.mgt.core.dao.common.ApplicationManagementDAOFactory;
-import org.wso2.carbon.device.application.mgt.core.dto.ApplicationsDTO;
-import org.wso2.carbon.device.application.mgt.core.dto.DeviceTypeCreator;
-import org.wso2.carbon.device.application.mgt.core.util.ConnectionManagerUtil;
+import io.entgra.application.mgt.core.BaseTestCase;
+import io.entgra.application.mgt.core.config.ConfigurationManager;
+import io.entgra.application.mgt.core.dao.common.ApplicationManagementDAOFactory;
+import io.entgra.application.mgt.core.dto.ApplicationsDTO;
+import io.entgra.application.mgt.core.dto.DeviceTypeCreator;
+import io.entgra.application.mgt.core.util.ConnectionManagerUtil;
import org.wso2.carbon.device.mgt.common.exceptions.TransactionManagementException;
import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOException;
import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/dto/ApplicationsDTO.java b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/dto/ApplicationsDTO.java
similarity index 90%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/dto/ApplicationsDTO.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/dto/ApplicationsDTO.java
index 74f598a8316..d13d288b62a 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/dto/ApplicationsDTO.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/dto/ApplicationsDTO.java
@@ -15,9 +15,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dto;
+package io.entgra.application.mgt.core.dto;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationDTO;
+import io.entgra.application.mgt.common.dto.ApplicationDTO;
import java.util.ArrayList;
import java.util.List;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/dto/DeviceTypeCreator.java b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/dto/DeviceTypeCreator.java
similarity index 94%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/dto/DeviceTypeCreator.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/dto/DeviceTypeCreator.java
index 3ecd1aa6752..d1a862afec4 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/dto/DeviceTypeCreator.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/dto/DeviceTypeCreator.java
@@ -16,7 +16,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.dto;
+package io.entgra.application.mgt.core.dto;
import org.wso2.carbon.device.mgt.core.dto.DeviceType;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/management/ApplicationManagementTest.java b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/management/ApplicationManagementTest.java
similarity index 78%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/management/ApplicationManagementTest.java
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/management/ApplicationManagementTest.java
index 4ebdf3ce6c8..998e10e5b13 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/java/org.wso2.carbon.device.application.mgt.core/management/ApplicationManagementTest.java
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/test/java/io/entgra/application/mgt/core/management/ApplicationManagementTest.java
@@ -15,31 +15,33 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.core.management;
+package io.entgra.application.mgt.core.management;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
+import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
-import org.wso2.carbon.device.application.mgt.common.*;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationDTO;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
-import org.wso2.carbon.device.application.mgt.common.exception.RequestValidatingException;
-import org.wso2.carbon.device.application.mgt.common.response.Application;
-import org.wso2.carbon.device.application.mgt.common.response.ApplicationRelease;
-import org.wso2.carbon.device.application.mgt.common.response.Category;
-import org.wso2.carbon.device.application.mgt.common.response.Tag;
-import org.wso2.carbon.device.application.mgt.common.services.ApplicationManager;
-import org.wso2.carbon.device.application.mgt.common.wrapper.EntAppReleaseWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.ApplicationUpdateWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.ApplicationWrapper;
-import org.wso2.carbon.device.application.mgt.core.BaseTestCase;
-import org.wso2.carbon.device.application.mgt.core.dao.ApplicationDAO;
-import org.wso2.carbon.device.application.mgt.core.dao.common.ApplicationManagementDAOFactory;
-import org.wso2.carbon.device.application.mgt.core.dto.ApplicationsDTO;
-import org.wso2.carbon.device.application.mgt.core.impl.ApplicationManagerImpl;
-import org.wso2.carbon.device.application.mgt.core.internal.DataHolder;
-import org.wso2.carbon.device.application.mgt.core.util.ConnectionManagerUtil;
+import io.entgra.application.mgt.common.*;
+import io.entgra.application.mgt.common.dto.ApplicationDTO;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.exception.RequestValidatingException;
+import io.entgra.application.mgt.common.response.Application;
+import io.entgra.application.mgt.common.response.ApplicationRelease;
+import io.entgra.application.mgt.common.response.Category;
+import io.entgra.application.mgt.common.response.Tag;
+import io.entgra.application.mgt.common.services.ApplicationManager;
+import io.entgra.application.mgt.common.wrapper.EntAppReleaseWrapper;
+import io.entgra.application.mgt.common.wrapper.ApplicationUpdateWrapper;
+import io.entgra.application.mgt.common.wrapper.ApplicationWrapper;
+import io.entgra.application.mgt.core.BaseTestCase;
+import io.entgra.application.mgt.core.dao.ApplicationDAO;
+import io.entgra.application.mgt.core.dao.common.ApplicationManagementDAOFactory;
+import io.entgra.application.mgt.core.dto.ApplicationsDTO;
+import io.entgra.application.mgt.core.impl.ApplicationManagerImpl;
+import io.entgra.application.mgt.core.internal.DataHolder;
+import io.entgra.application.mgt.core.util.ConnectionManagerUtil;
+import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException;
import org.wso2.carbon.device.mgt.core.dto.DeviceType;
import org.wso2.carbon.device.mgt.core.dto.DeviceTypeVersion;
@@ -68,7 +70,7 @@ public class ApplicationManagementTest extends BaseTestCase {
ConnectionManagerUtil.closeDBConnection();
}
- @Test(dependsOnMethods = ("addApplicationCategories"))
+ @Test(dependsOnMethods = "addApplicationCategories")
public void createApplication() throws Exception {
log.debug("Creating the first application ....!");
@@ -124,102 +126,117 @@ public class ApplicationManagementTest extends BaseTestCase {
manager.createEntApp(applicationWrapper, applicationArtifact);
}
- @Test
+ @DataProvider(name = "applicationIdDataProvider")
+ public static Object[][] applicationId() {
+ return new Object[][] {{-1}};
+ }
+
+ @DataProvider(name = "updateApplicationDataProvider")
+ public static Object[][] updateApplicationDataProvider() {
+ return new Object[][] {{-1, new ApplicationUpdateWrapper()}};
+ }
+
+ @DataProvider(name = "uuidDataProvider")
+ public static Object[][] uuidDataProvider() {
+ return new Object[][] {{"TEST_APP_UUID"}};
+ }
+
+ @Test(enabled = false)
public void updateApplication(int applicationId, ApplicationUpdateWrapper applicationUpdateWrapper) throws ApplicationManagementException {
}
- @Test
+ @Test(enabled = false)
public void deleteApplication(int applicationId) throws ApplicationManagementException {
}
- @Test
+ @Test(enabled = false)
public void retireApplication(int applicationId) throws ApplicationManagementException {
}
- @Test
+ @Test(enabled = false)
public void deleteApplicationRelease(String releaseUuid) throws ApplicationManagementException {
}
- @Test
+ @Test(enabled = false)
public ApplicationList getApplications(Filter filter) throws ApplicationManagementException {
return null;
}
- @Test
+ @Test(enabled = false)
public Application getApplicationById(int id, String state) throws ApplicationManagementException {
return null;
}
- @Test
+ @Test(enabled = false)
public ApplicationRelease getApplicationReleaseByUUID(String uuid) throws ApplicationManagementException {
return null;
}
- @Test
+ @Test(enabled = false)
public ApplicationDTO getApplicationByUuid(String uuid, String state) throws ApplicationManagementException {
return null;
}
- @Test
+ @Test(enabled = false)
public ApplicationDTO getApplicationByRelease(String appReleaseUUID) throws ApplicationManagementException {
return null;
}
- @Test
+ @Test(enabled = false)
public List getLifecycleStateChangeFlow(String releaseUuid) throws ApplicationManagementException {
return null;
}
- @Test
+ @Test(enabled = false)
public void changeLifecycleState(String releaseUuid, String stateName) throws ApplicationManagementException {
}
- @Test
+ @Test(enabled = false)
public void updateApplicationImageArtifact(String uuid, ApplicationArtifact applicationArtifact) throws ApplicationManagementException {
}
- @Test
+ @Test(enabled = false)
public void updateApplicationArtifact(String deviceType, String appType, String uuid, ApplicationArtifact applicationArtifact) throws ApplicationManagementException {
}
- @Test
+ @Test(enabled = false)
public ApplicationRelease createRelease(int applicationId, EntAppReleaseWrapper entAppReleaseWrapper, ApplicationArtifact applicationArtifact) throws ApplicationManagementException {
return null;
}
- @Test
+ @Test(enabled = false)
public boolean updateRelease(String deviceType, String applicationType, String releaseUuid, EntAppReleaseWrapper entAppReleaseWrapper, ApplicationArtifact applicationArtifact) throws ApplicationManagementException {
return false;
}
- @Test
+ @Test(enabled = false)
public void validateAppCreatingRequest(ApplicationWrapper applicationWrapper) throws RequestValidatingException {
}
- @Test
+ @Test(enabled = false)
public void validateReleaseCreatingRequest(EntAppReleaseWrapper entAppReleaseWrapper, String applicationType) throws RequestValidatingException {
}
- @Test
+ @Test(enabled = false)
public void validateImageArtifacts(Attachment iconFile, Attachment bannerFile, List attachmentList) throws RequestValidatingException {
}
- @Test
+ @Test(enabled = false)
public void validateBinaryArtifact(Attachment binaryFile, String applicationType) throws RequestValidatingException {
}
- @Test(dependsOnMethods = ("addDeviceVersions"))
+ @Test(dependsOnMethods = "addDeviceVersions")
public void addApplicationCategories() throws ApplicationManagementException {
List categories = new ArrayList<>();
categories.add("Test Category");
@@ -264,17 +281,17 @@ public class ApplicationManagementTest extends BaseTestCase {
}
}
- @Test
+ @Test(enabled = false)
public List getRegisteredTags() throws ApplicationManagementException {
return null;
}
- @Test
+ @Test(enabled = false)
public List getRegisteredCategories() throws ApplicationManagementException {
return null;
}
- @Test
+ @Test(enabled = false)
public void deleteTagMapping(int appId, String tagName) throws ApplicationManagementException {
}
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/Platform.xml b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/Platform.xml
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/Platform.xml
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/Platform.xml
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/application-mgt.xml b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/application-mgt.xml
similarity index 91%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/application-mgt.xml
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/application-mgt.xml
index 60a8b0448b9..d80e94c2230 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/application-mgt.xml
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/application-mgt.xml
@@ -23,19 +23,19 @@
- org.wso2.carbon.device.application.mgt.core.impl.ApplicationManagerImpl
+ io.entgra.application.mgt.core.impl.ApplicationManagerImpl
- org.wso2.carbon.device.application.mgt.core.impl.ReviewManagerImpl
+ io.entgra.application.mgt.core.impl.ReviewManagerImpl
- org.wso2.carbon.device.application.mgt.core.lifecycle.LifecycleStateManager
+ io.entgra.application.mgt.core.lifecycle.LifecycleStateManager
- org.wso2.carbon.device.application.mgt.core.impl.SubscriptionManagerImpl
+ io.entgra.application.mgt.core.impl.SubscriptionManagerImpl
- org.wso2.carbon.device.application.mgt.core.impl.ApplicationStorageManagerImpl
+ io.entgra.application.mgt.core.impl.ApplicationStorageManagerImpl
repository/resources/apps/
6
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/dbscripts/h2.sql b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/dbscripts/h2.sql
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/dbscripts/h2.sql
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/dbscripts/h2.sql
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/application-mgt.xml b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/application-mgt.xml
similarity index 91%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/application-mgt.xml
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/application-mgt.xml
index a94190bda4a..aafbdb712e1 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/application-mgt.xml
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/application-mgt.xml
@@ -23,19 +23,19 @@
- org.wso2.carbon.device.application.mgt.core.impl.ApplicationManagerImpl
+ io.entgra.application.mgt.core.impl.ApplicationManagerImpl
- org.wso2.carbon.device.application.mgt.core.impl.ReviewManagerImpl
+ io.entgra.application.mgt.core.impl.ReviewManagerImpl
- org.wso2.carbon.device.application.mgt.core.lifecycle.LifecycleStateManager
+ io.entgra.application.mgt.core.lifecycle.LifecycleStateManager
- org.wso2.carbon.device.application.mgt.core.impl.SubscriptionManagerImpl
+ io.entgra.application.mgt.core.impl.SubscriptionManagerImpl
- org.wso2.carbon.device.application.mgt.core.impl.ApplicationStorageManagerImpl
+ io.entgra.application.mgt.core.impl.ApplicationStorageManagerImpl
/tmp/apps/
6
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/axis2/axis2.xml b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/axis2/axis2.xml
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/axis2/axis2.xml
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/axis2/axis2.xml
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/axis2/axis2_client.xml b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/axis2/axis2_client.xml
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/axis2/axis2_client.xml
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/axis2/axis2_client.xml
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/axis2/tenant-axis2.xml b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/axis2/tenant-axis2.xml
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/axis2/tenant-axis2.xml
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/axis2/tenant-axis2.xml
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/carbon.xml b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/carbon.xml
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/carbon.xml
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/carbon.xml
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/cdm-config.xml b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/cdm-config.xml
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/cdm-config.xml
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/cdm-config.xml
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/datasources/master-datasources.xml b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/datasources/master-datasources.xml
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/datasources/master-datasources.xml
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/datasources/master-datasources.xml
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/bundle-config/README.txt b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/bundle-config/README.txt
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/bundle-config/README.txt
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/bundle-config/README.txt
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/carboncontext-osgi-services.properties b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/carboncontext-osgi-services.properties
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/carboncontext-osgi-services.properties
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/carboncontext-osgi-services.properties
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/config-validation.xml b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/config-validation.xml
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/config-validation.xml
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/config-validation.xml
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/jmx.xml b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/jmx.xml
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/jmx.xml
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/jmx.xml
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/launch.ini b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/launch.ini
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/launch.ini
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/launch.ini
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/logging-bridge.properties b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/logging-bridge.properties
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/logging-bridge.properties
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/logging-bridge.properties
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/mime.mappings b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/mime.mappings
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/mime.mappings
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/mime.mappings
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/mime.types b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/mime.types
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/mime.types
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/mime.types
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/osgi-debug.options b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/osgi-debug.options
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/osgi-debug.options
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/osgi-debug.options
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/tasks-config.xml b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/tasks-config.xml
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/tasks-config.xml
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/etc/tasks-config.xml
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/log4j.properties b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/log4j.properties
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/log4j.properties
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/log4j.properties
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/registry.xml b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/registry.xml
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/registry.xml
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/registry.xml
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/security/authenticators.xml b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/security/authenticators.xml
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/security/authenticators.xml
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/security/authenticators.xml
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/tomcat/carbon/META-INF/context.xml b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/tomcat/carbon/META-INF/context.xml
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/tomcat/carbon/META-INF/context.xml
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/tomcat/carbon/META-INF/context.xml
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/tomcat/carbon/WEB-INF/web.xml b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/tomcat/carbon/WEB-INF/web.xml
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/tomcat/carbon/WEB-INF/web.xml
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/tomcat/carbon/WEB-INF/web.xml
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/tomcat/catalina-server.xml b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/tomcat/catalina-server.xml
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/tomcat/catalina-server.xml
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/tomcat/catalina-server.xml
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/tomcat/tomcat-users.xml b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/tomcat/tomcat-users.xml
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/tomcat/tomcat-users.xml
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/tomcat/tomcat-users.xml
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/tomcat/web.xml b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/tomcat/web.xml
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/tomcat/web.xml
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/tomcat/web.xml
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/user-mgt.xml b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/user-mgt.xml
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/carbon-home/repository/conf/user-mgt.xml
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/carbon-home/repository/conf/user-mgt.xml
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/datasource/data-source-config.xml b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/datasource/data-source-config.xml
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/datasource/data-source-config.xml
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/datasource/data-source-config.xml
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/h2.sql b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/h2.sql
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/h2.sql
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/h2.sql
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/log4j.properties b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/log4j.properties
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/log4j.properties
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/log4j.properties
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/samples/app1/banner1.jpg b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/samples/app1/banner1.jpg
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/samples/app1/banner1.jpg
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/samples/app1/banner1.jpg
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/samples/app1/icon.png b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/samples/app1/icon.png
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/samples/app1/icon.png
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/samples/app1/icon.png
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/samples/app1/sample.apk b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/samples/app1/sample.apk
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/samples/app1/sample.apk
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/samples/app1/sample.apk
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/samples/app1/shot1.png b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/samples/app1/shot1.png
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/samples/app1/shot1.png
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/samples/app1/shot1.png
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/samples/app1/shot2.png b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/samples/app1/shot2.png
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/samples/app1/shot2.png
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/samples/app1/shot2.png
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/samples/app1/shot3.png b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/samples/app1/shot3.png
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/samples/app1/shot3.png
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/samples/app1/shot3.png
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/samples/app2/banner1.jpg b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/samples/app2/banner1.jpg
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/samples/app2/banner1.jpg
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/samples/app2/banner1.jpg
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/samples/app2/icon.png b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/samples/app2/icon.png
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/samples/app2/icon.png
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/samples/app2/icon.png
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/samples/app2/sample_4.0.6.apk b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/samples/app2/sample_4.0.6.apk
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/samples/app2/sample_4.0.6.apk
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/samples/app2/sample_4.0.6.apk
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/samples/app2/shot1.png b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/samples/app2/shot1.png
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/samples/app2/shot1.png
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/samples/app2/shot1.png
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/samples/app2/shot2.png b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/samples/app2/shot2.png
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/samples/app2/shot2.png
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/samples/app2/shot2.png
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/samples/app2/shot3.png b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/samples/app2/shot3.png
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/samples/app2/shot3.png
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/samples/app2/shot3.png
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/testng.xml b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/testng.xml
similarity index 53%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/testng.xml
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/testng.xml
index b9fad1fe6a1..e8b627e8257 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/testng.xml
+++ b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/testng.xml
@@ -22,14 +22,14 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/user-test/user-mgt-registry-test.xml b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/user-test/user-mgt-registry-test.xml
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/user-test/user-mgt-registry-test.xml
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/user-test/user-mgt-registry-test.xml
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/util/app-debug.apk b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/util/app-debug.apk
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/util/app-debug.apk
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/util/app-debug.apk
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/util/iOSMDMAgent.ipa b/components/application-mgt/io.entgra.application.mgt.core/src/test/resources/util/iOSMDMAgent.ipa
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/test/resources/util/iOSMDMAgent.ipa
rename to components/application-mgt/io.entgra.application.mgt.core/src/test/resources/util/iOSMDMAgent.ipa
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/pom.xml b/components/application-mgt/io.entgra.application.mgt.publisher.api/pom.xml
similarity index 93%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/pom.xml
rename to components/application-mgt/io.entgra.application.mgt.publisher.api/pom.xml
index cc88e042564..f7d8c058664 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/pom.xml
+++ b/components/application-mgt/io.entgra.application.mgt.publisher.api/pom.xml
@@ -22,16 +22,15 @@
application-mgt
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
- org.wso2.carbon.device.application.mgt.publisher.api
- 4.1.16-SNAPSHOT
+ io.entgra.application.mgt.publisher.api
war
- WSO2 Carbon - Application Management Publisher API
- WSO2 Carbon - Application Management Publisher API
+ Entgra - Application Management Publisher API
+ Entgra - Application Management Publisher API
https://entgra.io
@@ -155,12 +154,12 @@
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.core
+ io.entgra.application.mgt.core
provided
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.common
+ io.entgra.application.mgt.common
provided
@@ -219,7 +218,7 @@
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.addons
+ io.entgra.application.mgt.addons
\ No newline at end of file
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/ApplicationManagementPublisherAPI.java b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/ApplicationManagementPublisherAPI.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/ApplicationManagementPublisherAPI.java
rename to components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/ApplicationManagementPublisherAPI.java
index 00533b2a982..f82ce53f2d0 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/ApplicationManagementPublisherAPI.java
+++ b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/ApplicationManagementPublisherAPI.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.publisher.api.services;
+package io.entgra.application.mgt.publisher.api.services;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -31,22 +31,22 @@ import org.apache.cxf.jaxrs.ext.multipart.Attachment;
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.apimgt.annotations.api.Scopes;
-import org.wso2.carbon.device.application.mgt.common.ApplicationList;
-import org.wso2.carbon.device.application.mgt.common.ErrorResponse;
-import org.wso2.carbon.device.application.mgt.common.Filter;
-import org.wso2.carbon.device.application.mgt.common.LifecycleChanger;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationDTO;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationReleaseDTO;
-import org.wso2.carbon.device.application.mgt.common.response.ApplicationRelease;
-import org.wso2.carbon.device.application.mgt.common.wrapper.CustomAppReleaseWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.CustomAppWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.EntAppReleaseWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.ApplicationUpdateWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.ApplicationWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.PublicAppReleaseWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.PublicAppWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.WebAppReleaseWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.WebAppWrapper;
+import io.entgra.application.mgt.common.ApplicationList;
+import io.entgra.application.mgt.common.ErrorResponse;
+import io.entgra.application.mgt.common.Filter;
+import io.entgra.application.mgt.common.LifecycleChanger;
+import io.entgra.application.mgt.common.dto.ApplicationDTO;
+import io.entgra.application.mgt.common.dto.ApplicationReleaseDTO;
+import io.entgra.application.mgt.common.response.ApplicationRelease;
+import io.entgra.application.mgt.common.wrapper.CustomAppReleaseWrapper;
+import io.entgra.application.mgt.common.wrapper.CustomAppWrapper;
+import io.entgra.application.mgt.common.wrapper.EntAppReleaseWrapper;
+import io.entgra.application.mgt.common.wrapper.ApplicationUpdateWrapper;
+import io.entgra.application.mgt.common.wrapper.ApplicationWrapper;
+import io.entgra.application.mgt.common.wrapper.PublicAppReleaseWrapper;
+import io.entgra.application.mgt.common.wrapper.PublicAppWrapper;
+import io.entgra.application.mgt.common.wrapper.WebAppReleaseWrapper;
+import io.entgra.application.mgt.common.wrapper.WebAppWrapper;
import java.util.List;
import javax.validation.Valid;
@@ -86,12 +86,14 @@ import javax.ws.rs.core.Response;
name = "Get ApplicationDTO Details",
description = "Get application details",
key = "perm:app:publisher:view",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/app-mgt/publisher/application/view"}
),
@Scope(
name = "Update an ApplicationDTO",
description = "Update an application",
key = "perm:app:publisher:update",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/app-mgt/publisher/application/update"}
)
}
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/admin/ApplicationManagementPublisherAdminAPI.java b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/admin/ApplicationManagementPublisherAdminAPI.java
similarity index 98%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/admin/ApplicationManagementPublisherAdminAPI.java
rename to components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/admin/ApplicationManagementPublisherAdminAPI.java
index 9f69bc152f8..c3db07a21b0 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/admin/ApplicationManagementPublisherAdminAPI.java
+++ b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/admin/ApplicationManagementPublisherAdminAPI.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.publisher.api.services.admin;
+package io.entgra.application.mgt.publisher.api.services.admin;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -29,8 +29,8 @@ import io.swagger.annotations.SwaggerDefinition;
import io.swagger.annotations.Tag;
import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.apimgt.annotations.api.Scopes;
-import org.wso2.carbon.device.application.mgt.common.ApplicationList;
-import org.wso2.carbon.device.application.mgt.common.ErrorResponse;
+import io.entgra.application.mgt.common.ApplicationList;
+import io.entgra.application.mgt.common.ErrorResponse;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
@@ -68,6 +68,7 @@ import java.util.List;
name = "Delete Application Release",
description = "Delete Application Release",
key = "perm:admin:app:publisher:update",
+ roles = {"Internal/devicemgt-admin"},
permissions = {"/app-mgt/publisher/admin/application/update"}
)
}
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/admin/ReviewManagementPublisherAdminAPI.java b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/admin/ReviewManagementPublisherAdminAPI.java
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/admin/ReviewManagementPublisherAdminAPI.java
rename to components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/admin/ReviewManagementPublisherAdminAPI.java
index 286b979dca8..6ae6cdbaebe 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/admin/ReviewManagementPublisherAdminAPI.java
+++ b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/admin/ReviewManagementPublisherAdminAPI.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.publisher.api.services.admin;
+package io.entgra.application.mgt.publisher.api.services.admin;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -28,8 +28,8 @@ import io.swagger.annotations.SwaggerDefinition;
import io.swagger.annotations.Tag;
import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.apimgt.annotations.api.Scopes;
-import org.wso2.carbon.device.application.mgt.common.ErrorResponse;
-import org.wso2.carbon.device.application.mgt.common.PaginationResult;
+import io.entgra.application.mgt.common.ErrorResponse;
+import io.entgra.application.mgt.common.PaginationResult;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
@@ -65,12 +65,14 @@ scopes = {
name = "Update a Review",
description = "Update a Review of application.",
key = "perm:admin:app:review:update",
+ roles = {"Internal/devicemgt-admin"},
permissions = {"/app-mgt/publisher/admin/review/update"}
),
@Scope(
name = "Get Review Details",
description = "Get review details of application.",
key = "perm:admin:app:review:view",
+ roles = {"Internal/devicemgt-admin"},
permissions = {"/app-mgt/publisher/admin/review/view"}
)
}
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/ApplicationManagementPublisherAPIImpl.java b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/impl/ApplicationManagementPublisherAPIImpl.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/ApplicationManagementPublisherAPIImpl.java
rename to components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/impl/ApplicationManagementPublisherAPIImpl.java
index 74f4b4ee752..f88c005fb16 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/ApplicationManagementPublisherAPIImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/impl/ApplicationManagementPublisherAPIImpl.java
@@ -14,39 +14,39 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.publisher.api.services.impl;
+package io.entgra.application.mgt.publisher.api.services.impl;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
import org.apache.cxf.jaxrs.ext.multipart.Multipart;
-import org.wso2.carbon.device.application.mgt.common.*;
-import org.wso2.carbon.device.application.mgt.common.LifecycleState;
-import org.wso2.carbon.device.application.mgt.common.exception.LifecycleManagementException;
-import org.wso2.carbon.device.application.mgt.common.exception.RequestValidatingException;
-import org.wso2.carbon.device.application.mgt.common.response.Application;
-import org.wso2.carbon.device.application.mgt.common.response.ApplicationRelease;
-import org.wso2.carbon.device.application.mgt.common.response.Category;
-import org.wso2.carbon.device.application.mgt.common.response.Tag;
-import org.wso2.carbon.device.application.mgt.common.services.AppmDataHandler;
-import org.wso2.carbon.device.application.mgt.common.wrapper.CustomAppReleaseWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.CustomAppWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.EntAppReleaseWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.ApplicationUpdateWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.ApplicationWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.PublicAppReleaseWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.PublicAppWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.WebAppReleaseWrapper;
-import org.wso2.carbon.device.application.mgt.common.wrapper.WebAppWrapper;
-import org.wso2.carbon.device.application.mgt.core.exception.BadRequestException;
-import org.wso2.carbon.device.application.mgt.core.exception.ForbiddenException;
-import org.wso2.carbon.device.application.mgt.core.exception.UnexpectedServerErrorException;
-import org.wso2.carbon.device.application.mgt.core.util.APIUtil;
-import org.wso2.carbon.device.application.mgt.core.util.Constants;
-import org.wso2.carbon.device.application.mgt.publisher.api.services.ApplicationManagementPublisherAPI;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
-import org.wso2.carbon.device.application.mgt.common.services.ApplicationManager;
-import org.wso2.carbon.device.application.mgt.core.exception.NotFoundException;
+import io.entgra.application.mgt.common.*;
+import io.entgra.application.mgt.common.LifecycleState;
+import io.entgra.application.mgt.common.exception.LifecycleManagementException;
+import io.entgra.application.mgt.common.exception.RequestValidatingException;
+import io.entgra.application.mgt.common.response.Application;
+import io.entgra.application.mgt.common.response.ApplicationRelease;
+import io.entgra.application.mgt.common.response.Category;
+import io.entgra.application.mgt.common.response.Tag;
+import io.entgra.application.mgt.common.services.AppmDataHandler;
+import io.entgra.application.mgt.common.wrapper.CustomAppReleaseWrapper;
+import io.entgra.application.mgt.common.wrapper.CustomAppWrapper;
+import io.entgra.application.mgt.common.wrapper.EntAppReleaseWrapper;
+import io.entgra.application.mgt.common.wrapper.ApplicationUpdateWrapper;
+import io.entgra.application.mgt.common.wrapper.ApplicationWrapper;
+import io.entgra.application.mgt.common.wrapper.PublicAppReleaseWrapper;
+import io.entgra.application.mgt.common.wrapper.PublicAppWrapper;
+import io.entgra.application.mgt.common.wrapper.WebAppReleaseWrapper;
+import io.entgra.application.mgt.common.wrapper.WebAppWrapper;
+import io.entgra.application.mgt.core.exception.BadRequestException;
+import io.entgra.application.mgt.core.exception.ForbiddenException;
+import io.entgra.application.mgt.core.exception.UnexpectedServerErrorException;
+import io.entgra.application.mgt.core.util.APIUtil;
+import io.entgra.application.mgt.core.util.Constants;
+import io.entgra.application.mgt.publisher.api.services.ApplicationManagementPublisherAPI;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.services.ApplicationManager;
+import io.entgra.application.mgt.core.exception.NotFoundException;
import java.io.IOException;
import java.io.InputStream;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/admin/ApplicationManagementPublisherAdminAPIImpl.java b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/impl/admin/ApplicationManagementPublisherAdminAPIImpl.java
similarity index 93%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/admin/ApplicationManagementPublisherAdminAPIImpl.java
rename to components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/impl/admin/ApplicationManagementPublisherAdminAPIImpl.java
index 8e739f16024..9799ab9a7fe 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/admin/ApplicationManagementPublisherAdminAPIImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/impl/admin/ApplicationManagementPublisherAdminAPIImpl.java
@@ -15,17 +15,17 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.publisher.api.services.impl.admin;
+package io.entgra.application.mgt.publisher.api.services.impl.admin;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
-import org.wso2.carbon.device.application.mgt.common.services.ApplicationManager;
-import org.wso2.carbon.device.application.mgt.core.exception.BadRequestException;
-import org.wso2.carbon.device.application.mgt.core.exception.ForbiddenException;
-import org.wso2.carbon.device.application.mgt.core.exception.NotFoundException;
-import org.wso2.carbon.device.application.mgt.core.util.APIUtil;
-import org.wso2.carbon.device.application.mgt.publisher.api.services.admin.ApplicationManagementPublisherAdminAPI;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.services.ApplicationManager;
+import io.entgra.application.mgt.core.exception.BadRequestException;
+import io.entgra.application.mgt.core.exception.ForbiddenException;
+import io.entgra.application.mgt.core.exception.NotFoundException;
+import io.entgra.application.mgt.core.util.APIUtil;
+import io.entgra.application.mgt.publisher.api.services.admin.ApplicationManagementPublisherAdminAPI;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/admin/ReviewManagementPublisherAdminAPIImpl.java b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/impl/admin/ReviewManagementPublisherAdminAPIImpl.java
similarity index 84%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/admin/ReviewManagementPublisherAdminAPIImpl.java
rename to components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/impl/admin/ReviewManagementPublisherAdminAPIImpl.java
index c572004e1e2..d6be1a9f897 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/admin/ReviewManagementPublisherAdminAPIImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/impl/admin/ReviewManagementPublisherAdminAPIImpl.java
@@ -14,19 +14,19 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.publisher.api.services.impl.admin;
+package io.entgra.application.mgt.publisher.api.services.impl.admin;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.PaginationRequest;
-import org.wso2.carbon.device.application.mgt.common.PaginationResult;
-import org.wso2.carbon.device.application.mgt.common.Rating;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
-import org.wso2.carbon.device.application.mgt.common.exception.ReviewManagementException;
-import org.wso2.carbon.device.application.mgt.common.services.ReviewManager;
-import org.wso2.carbon.device.application.mgt.core.exception.NotFoundException;
-import org.wso2.carbon.device.application.mgt.core.util.APIUtil;
-import org.wso2.carbon.device.application.mgt.publisher.api.services.admin.ReviewManagementPublisherAdminAPI;
+import io.entgra.application.mgt.common.PaginationRequest;
+import io.entgra.application.mgt.common.PaginationResult;
+import io.entgra.application.mgt.common.Rating;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.exception.ReviewManagementException;
+import io.entgra.application.mgt.common.services.ReviewManager;
+import io.entgra.application.mgt.core.exception.NotFoundException;
+import io.entgra.application.mgt.core.util.APIUtil;
+import io.entgra.application.mgt.publisher.api.services.admin.ReviewManagementPublisherAdminAPI;
import javax.ws.rs.DefaultValue;
import javax.ws.rs.GET;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/webapp/META-INF/permissions.xml b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/webapp/META-INF/permissions.xml
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/webapp/META-INF/permissions.xml
rename to components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/webapp/META-INF/permissions.xml
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/webapp/META-INF/webapp-classloading.xml b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/webapp/META-INF/webapp-classloading.xml
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/webapp/META-INF/webapp-classloading.xml
rename to components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/webapp/META-INF/webapp-classloading.xml
index da8baef61fd..7a713954453 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/webapp/META-INF/webapp-classloading.xml
+++ b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/webapp/META-INF/webapp-classloading.xml
@@ -31,5 +31,5 @@
Tomcat environment is the default and every webapps gets it even if they didn't specify it.
e.g. If a webapps requires CXF, they will get both Tomcat and CXF.
-->
- CXF,Carbon
+ CXF3,Carbon
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/webapp/WEB-INF/cxf-servlet.xml b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/webapp/WEB-INF/cxf-servlet.xml
similarity index 71%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/webapp/WEB-INF/cxf-servlet.xml
rename to components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/webapp/WEB-INF/cxf-servlet.xml
index c9275715045..47dcef91e1b 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/webapp/WEB-INF/cxf-servlet.xml
+++ b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/webapp/WEB-INF/cxf-servlet.xml
@@ -38,7 +38,7 @@
-
+
@@ -50,19 +50,19 @@
-
+
-
-
-
-
-
+
+
+
+
+
-
+
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/webapp/WEB-INF/web.xml b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/webapp/WEB-INF/web.xml
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/webapp/WEB-INF/web.xml
rename to components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/webapp/WEB-INF/web.xml
index fb8b266948c..634df3e71a1 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/webapp/WEB-INF/web.xml
+++ b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/webapp/WEB-INF/web.xml
@@ -73,7 +73,7 @@
ApiOriginFilter
- org.wso2.carbon.device.application.mgt.addons.ApiOriginFilter
+ io.entgra.application.mgt.addons.ApiOriginFilter
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/pom.xml b/components/application-mgt/io.entgra.application.mgt.store.api/pom.xml
similarity index 94%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/pom.xml
rename to components/application-mgt/io.entgra.application.mgt.store.api/pom.xml
index c23da83cb23..7fc3f3da7e4 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/pom.xml
+++ b/components/application-mgt/io.entgra.application.mgt.store.api/pom.xml
@@ -22,16 +22,15 @@
application-mgt
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
- org.wso2.carbon.device.application.mgt.store.api
- 4.1.16-SNAPSHOT
+ io.entgra.application.mgt.store.api
war
- WSO2 Carbon - Application Management Store API
- WSO2 Carbon - Application Management Store API
+ Entgra - Application Management Store API
+ Entgra - Application Management Store API
https://entgra.io
@@ -155,17 +154,17 @@
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.core
+ io.entgra.application.mgt.core
provided
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.common
+ io.entgra.application.mgt.common
provided
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.addons
+ io.entgra.application.mgt.addons
org.wso2.carbon.devicemgt
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/ApplicationManagementAPI.java b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/ApplicationManagementAPI.java
similarity index 94%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/ApplicationManagementAPI.java
rename to components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/ApplicationManagementAPI.java
index 2a163a5fb0b..eb11be7a409 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/ApplicationManagementAPI.java
+++ b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/ApplicationManagementAPI.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.store.api.services;
+package io.entgra.application.mgt.store.api.services;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -28,10 +28,10 @@ import io.swagger.annotations.SwaggerDefinition;
import io.swagger.annotations.Tag;
import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.apimgt.annotations.api.Scopes;
-import org.wso2.carbon.device.application.mgt.common.ErrorResponse;
-import org.wso2.carbon.device.application.mgt.common.Filter;
-import org.wso2.carbon.device.application.mgt.common.dto.ApplicationDTO;
-import org.wso2.carbon.device.application.mgt.common.ApplicationList;
+import io.entgra.application.mgt.common.ErrorResponse;
+import io.entgra.application.mgt.common.Filter;
+import io.entgra.application.mgt.common.dto.ApplicationDTO;
+import io.entgra.application.mgt.common.ApplicationList;
import javax.validation.Valid;
import javax.ws.rs.Consumes;
@@ -68,6 +68,7 @@ import javax.ws.rs.core.Response;
name = "Get Application Details",
description = "Get application details",
key = "perm:app:store:view",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/app-mgt/store/application/view"}
)
}
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/ReviewManagementAPI.java b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/ReviewManagementAPI.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/ReviewManagementAPI.java
rename to components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/ReviewManagementAPI.java
index bb16d01c71e..3f0cde85f05 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/ReviewManagementAPI.java
+++ b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/ReviewManagementAPI.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.store.api.services;
+package io.entgra.application.mgt.store.api.services;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.Api;
@@ -29,10 +29,10 @@ import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.apimgt.annotations.api.Scopes;
-import org.wso2.carbon.device.application.mgt.common.PaginationResult;
-import org.wso2.carbon.device.application.mgt.common.ErrorResponse;
-import org.wso2.carbon.device.application.mgt.common.response.Review;
-import org.wso2.carbon.device.application.mgt.common.wrapper.ReviewWrapper;
+import io.entgra.application.mgt.common.PaginationResult;
+import io.entgra.application.mgt.common.ErrorResponse;
+import io.entgra.application.mgt.common.response.Review;
+import io.entgra.application.mgt.common.wrapper.ReviewWrapper;
import javax.validation.Valid;
import javax.ws.rs.Path;
@@ -73,12 +73,14 @@ import java.util.List;
name = "Get Review Details",
description = "Get review details from application store.",
key = "perm:app:review:view",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/app-mgt/store/review/view"}
),
@Scope(
name = "Update a Review",
description = "Update a Review from the application store.",
key = "perm:app:review:update",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/app-mgt/store/review/update"}
),
}
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/SubscriptionManagementAPI.java b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/SubscriptionManagementAPI.java
similarity index 98%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/SubscriptionManagementAPI.java
rename to components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/SubscriptionManagementAPI.java
index 174b6921ee1..00866b508bb 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/SubscriptionManagementAPI.java
+++ b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/SubscriptionManagementAPI.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.store.api.services;
+package io.entgra.application.mgt.store.api.services;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -27,8 +27,9 @@ import io.swagger.annotations.ExtensionProperty;
import io.swagger.annotations.Info;
import io.swagger.annotations.SwaggerDefinition;
import io.swagger.annotations.Tag;
+import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.apimgt.annotations.api.Scopes;
-import org.wso2.carbon.device.application.mgt.common.ErrorResponse;
+import io.entgra.application.mgt.common.ErrorResponse;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import javax.validation.Valid;
@@ -65,16 +66,18 @@ import java.util.List;
)
@Scopes(
scopes = {
- @org.wso2.carbon.apimgt.annotations.api.Scope(
+ @Scope(
name = "Install an ApplicationDTO",
description = "Install an application",
key = "perm:app:subscription:install",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/app-mgt/store/subscription/install"}
),
- @org.wso2.carbon.apimgt.annotations.api.Scope(
+ @Scope(
name = "Uninstall an Application",
description = "Uninstall an application",
key = "perm:app:subscription:uninstall",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/app-mgt/store/subscription/uninstall"}
)
}
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/admin/ReviewManagementStoreAdminAPI.java b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/admin/ReviewManagementStoreAdminAPI.java
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/admin/ReviewManagementStoreAdminAPI.java
rename to components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/admin/ReviewManagementStoreAdminAPI.java
index 359d633e043..7ab8cc071ec 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/admin/ReviewManagementStoreAdminAPI.java
+++ b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/admin/ReviewManagementStoreAdminAPI.java
@@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.store.api.services.admin;
+package io.entgra.application.mgt.store.api.services.admin;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -28,7 +28,7 @@ import io.swagger.annotations.SwaggerDefinition;
import io.swagger.annotations.Tag;
import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.apimgt.annotations.api.Scopes;
-import org.wso2.carbon.device.application.mgt.common.ErrorResponse;
+import io.entgra.application.mgt.common.ErrorResponse;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
@@ -63,6 +63,7 @@ scopes = {
name = "Update a Review",
description = "Update a Review of applications.",
key = "perm:admin:app:review:update",
+ roles = {"Internal/devicemgt-admin"},
permissions = {"/app-mgt/store/admin/review/update"}
)
}
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/admin/SubscriptionManagementAdminAPI.java b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/admin/SubscriptionManagementAdminAPI.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/admin/SubscriptionManagementAdminAPI.java
rename to components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/admin/SubscriptionManagementAdminAPI.java
index 97f6f6851e5..fc7719bc632 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/admin/SubscriptionManagementAdminAPI.java
+++ b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/admin/SubscriptionManagementAdminAPI.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.store.api.services.admin;
+package io.entgra.application.mgt.store.api.services.admin;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -29,7 +29,7 @@ import io.swagger.annotations.SwaggerDefinition;
import io.swagger.annotations.Tag;
import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.apimgt.annotations.api.Scopes;
-import org.wso2.carbon.device.application.mgt.common.ErrorResponse;
+import io.entgra.application.mgt.common.ErrorResponse;
import javax.validation.constraints.Size;
import javax.ws.rs.Consumes;
@@ -67,6 +67,7 @@ import java.util.List;
name = "View Application Subscriptions",
description = "View Application Subscriptions.",
key = "perm:admin:app:subscription:view",
+ roles = {"Internal/devicemgt-admin"},
permissions = {"/app-mgt/store/admin/subscription/view"}
)
}
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/ApplicationManagementAPIImpl.java b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/impl/ApplicationManagementAPIImpl.java
similarity index 82%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/ApplicationManagementAPIImpl.java
rename to components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/impl/ApplicationManagementAPIImpl.java
index ac0b3b283b0..735df25c924 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/ApplicationManagementAPIImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/impl/ApplicationManagementAPIImpl.java
@@ -14,20 +14,20 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.store.api.services.impl;
+package io.entgra.application.mgt.store.api.services.impl;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.ApplicationList;
-import org.wso2.carbon.device.application.mgt.common.Filter;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
-import org.wso2.carbon.device.application.mgt.common.response.Application;
-import org.wso2.carbon.device.application.mgt.common.services.ApplicationManager;
-import org.wso2.carbon.device.application.mgt.core.exception.BadRequestException;
-import org.wso2.carbon.device.application.mgt.core.exception.NotFoundException;
-import org.wso2.carbon.device.application.mgt.core.exception.UnexpectedServerErrorException;
-import org.wso2.carbon.device.application.mgt.core.util.APIUtil;
-import org.wso2.carbon.device.application.mgt.store.api.services.ApplicationManagementAPI;
+import io.entgra.application.mgt.common.ApplicationList;
+import io.entgra.application.mgt.common.Filter;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.response.Application;
+import io.entgra.application.mgt.common.services.ApplicationManager;
+import io.entgra.application.mgt.core.exception.BadRequestException;
+import io.entgra.application.mgt.core.exception.NotFoundException;
+import io.entgra.application.mgt.core.exception.UnexpectedServerErrorException;
+import io.entgra.application.mgt.core.util.APIUtil;
+import io.entgra.application.mgt.store.api.services.ApplicationManagementAPI;
import javax.validation.Valid;
import javax.ws.rs.Consumes;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/ReviewManagementAPIImpl.java b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/impl/ReviewManagementAPIImpl.java
similarity index 92%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/ReviewManagementAPIImpl.java
rename to components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/impl/ReviewManagementAPIImpl.java
index c617671de77..8aa8b728af9 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/ReviewManagementAPIImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/impl/ReviewManagementAPIImpl.java
@@ -15,24 +15,24 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.store.api.services.impl;
+package io.entgra.application.mgt.store.api.services.impl;
import io.swagger.annotations.ApiParam;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.PaginationResult;
-import org.wso2.carbon.device.application.mgt.common.Rating;
-import org.wso2.carbon.device.application.mgt.common.response.Review;
-import org.wso2.carbon.device.application.mgt.common.services.ReviewManager;
-import org.wso2.carbon.device.application.mgt.common.wrapper.ReviewWrapper;
-import org.wso2.carbon.device.application.mgt.core.exception.BadRequestException;
-import org.wso2.carbon.device.application.mgt.core.exception.ForbiddenException;
-import org.wso2.carbon.device.application.mgt.core.exception.NotFoundException;
-import org.wso2.carbon.device.application.mgt.store.api.services.ReviewManagementAPI;
-import org.wso2.carbon.device.application.mgt.common.PaginationRequest;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
-import org.wso2.carbon.device.application.mgt.common.exception.ReviewManagementException;
-import org.wso2.carbon.device.application.mgt.core.util.APIUtil;
+import io.entgra.application.mgt.common.PaginationResult;
+import io.entgra.application.mgt.common.Rating;
+import io.entgra.application.mgt.common.response.Review;
+import io.entgra.application.mgt.common.services.ReviewManager;
+import io.entgra.application.mgt.common.wrapper.ReviewWrapper;
+import io.entgra.application.mgt.core.exception.BadRequestException;
+import io.entgra.application.mgt.core.exception.ForbiddenException;
+import io.entgra.application.mgt.core.exception.NotFoundException;
+import io.entgra.application.mgt.store.api.services.ReviewManagementAPI;
+import io.entgra.application.mgt.common.PaginationRequest;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.exception.ReviewManagementException;
+import io.entgra.application.mgt.core.util.APIUtil;
import javax.ws.rs.DefaultValue;
import javax.ws.rs.Path;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/SubscriptionManagementAPIImpl.java b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/impl/SubscriptionManagementAPIImpl.java
similarity index 93%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/SubscriptionManagementAPIImpl.java
rename to components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/impl/SubscriptionManagementAPIImpl.java
index 4a51353997a..b64a9fad9b7 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/SubscriptionManagementAPIImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/impl/SubscriptionManagementAPIImpl.java
@@ -16,30 +16,30 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.store.api.services.impl;
+package io.entgra.application.mgt.store.api.services.impl;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.ApplicationInstallResponse;
-import org.wso2.carbon.device.application.mgt.common.ErrorResponse;
-import org.wso2.carbon.device.application.mgt.common.SubAction;
-import org.wso2.carbon.device.application.mgt.common.SubscriptionType;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
-import org.wso2.carbon.device.application.mgt.common.services.SubscriptionManager;
-import org.wso2.carbon.device.application.mgt.core.exception.ApplicationOperationTaskException;
-import org.wso2.carbon.device.application.mgt.common.DeviceList;
-import org.wso2.carbon.device.application.mgt.common.BasicUserInfo;
-import org.wso2.carbon.device.application.mgt.common.BasicUserInfoList;
-import org.wso2.carbon.device.application.mgt.common.RoleList;
-import org.wso2.carbon.device.application.mgt.common.DeviceGroupList;
-import org.wso2.carbon.device.application.mgt.store.api.services.impl.util.RequestValidationUtil;
-import org.wso2.carbon.device.application.mgt.core.exception.BadRequestException;
-import org.wso2.carbon.device.application.mgt.core.exception.ForbiddenException;
-import org.wso2.carbon.device.application.mgt.core.exception.NotFoundException;
-import org.wso2.carbon.device.application.mgt.core.task.ScheduledAppSubscriptionTaskManager;
-import org.wso2.carbon.device.application.mgt.core.util.APIUtil;
-import org.wso2.carbon.device.application.mgt.store.api.services.SubscriptionManagementAPI;
+import io.entgra.application.mgt.common.ApplicationInstallResponse;
+import io.entgra.application.mgt.common.ErrorResponse;
+import io.entgra.application.mgt.common.SubAction;
+import io.entgra.application.mgt.common.SubscriptionType;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.services.SubscriptionManager;
+import io.entgra.application.mgt.core.exception.ApplicationOperationTaskException;
+import io.entgra.application.mgt.common.DeviceList;
+import io.entgra.application.mgt.common.BasicUserInfo;
+import io.entgra.application.mgt.common.BasicUserInfoList;
+import io.entgra.application.mgt.common.RoleList;
+import io.entgra.application.mgt.common.DeviceGroupList;
+import io.entgra.application.mgt.store.api.services.impl.util.RequestValidationUtil;
+import io.entgra.application.mgt.core.exception.BadRequestException;
+import io.entgra.application.mgt.core.exception.ForbiddenException;
+import io.entgra.application.mgt.core.exception.NotFoundException;
+import io.entgra.application.mgt.core.task.ScheduledAppSubscriptionTaskManager;
+import io.entgra.application.mgt.core.util.APIUtil;
+import io.entgra.application.mgt.store.api.services.SubscriptionManagementAPI;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.MDMAppConstants;
@@ -260,9 +260,9 @@ public class SubscriptionManagementAPIImpl implements SubscriptionManagementAPI{
* either {@link org.wso2.carbon.device.mgt.common.DeviceIdentifier} if {@param subType} is
* equal to DEVICE or {@link String} if {@param subType} is USER, ROLE or GROUP
* @param subType subscription type. E.g. DEVICE, USER, ROLE, GROUP
- * {@see {@link org.wso2.carbon.device.application.mgt.common.SubscriptionType}}
+ * {@see {@link io.entgra.application.mgt.common.SubscriptionType}}
* @param subAction action subscription action. E.g. INSTALL/UNINSTALL
- * {@see {@link org.wso2.carbon.device.application.mgt.common.SubAction}}
+ * {@see {@link io.entgra.application.mgt.common.SubAction}}
* @param timestamp timestamp to schedule the application subscription
* @return {@link Response} of the operation
*/
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/admin/ReviewManagementStoreAdminAPIImpl.java b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/impl/admin/ReviewManagementStoreAdminAPIImpl.java
similarity index 81%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/admin/ReviewManagementStoreAdminAPIImpl.java
rename to components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/impl/admin/ReviewManagementStoreAdminAPIImpl.java
index 5cca42852f9..2585edaf1aa 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/admin/ReviewManagementStoreAdminAPIImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/impl/admin/ReviewManagementStoreAdminAPIImpl.java
@@ -14,16 +14,16 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.store.api.services.impl.admin;
+package io.entgra.application.mgt.store.api.services.impl.admin;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
-import org.wso2.carbon.device.application.mgt.common.exception.ReviewManagementException;
-import org.wso2.carbon.device.application.mgt.common.services.ReviewManager;
-import org.wso2.carbon.device.application.mgt.core.exception.NotFoundException;
-import org.wso2.carbon.device.application.mgt.core.util.APIUtil;
-import org.wso2.carbon.device.application.mgt.store.api.services.admin.ReviewManagementStoreAdminAPI;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.exception.ReviewManagementException;
+import io.entgra.application.mgt.common.services.ReviewManager;
+import io.entgra.application.mgt.core.exception.NotFoundException;
+import io.entgra.application.mgt.core.util.APIUtil;
+import io.entgra.application.mgt.store.api.services.admin.ReviewManagementStoreAdminAPI;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/admin/SubscriptionManagementAdminAPIImpl.java b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/impl/admin/SubscriptionManagementAdminAPIImpl.java
similarity index 86%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/admin/SubscriptionManagementAdminAPIImpl.java
rename to components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/impl/admin/SubscriptionManagementAdminAPIImpl.java
index 681b3b5f389..b767c39ccda 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/admin/SubscriptionManagementAdminAPIImpl.java
+++ b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/impl/admin/SubscriptionManagementAdminAPIImpl.java
@@ -16,18 +16,18 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.store.api.services.impl.admin;
+package io.entgra.application.mgt.store.api.services.impl.admin;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
-import org.wso2.carbon.device.application.mgt.common.services.SubscriptionManager;
-import org.wso2.carbon.device.application.mgt.core.exception.BadRequestException;
-import org.wso2.carbon.device.application.mgt.core.exception.NotFoundException;
-import org.wso2.carbon.device.application.mgt.core.util.APIUtil;
-import org.wso2.carbon.device.application.mgt.store.api.services.admin.SubscriptionManagementAdminAPI;
-import org.wso2.carbon.device.application.mgt.store.api.services.impl.util.RequestValidationUtil;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.services.SubscriptionManager;
+import io.entgra.application.mgt.core.exception.BadRequestException;
+import io.entgra.application.mgt.core.exception.NotFoundException;
+import io.entgra.application.mgt.core.util.APIUtil;
+import io.entgra.application.mgt.store.api.services.admin.SubscriptionManagementAdminAPI;
+import io.entgra.application.mgt.store.api.services.impl.util.RequestValidationUtil;
import org.wso2.carbon.device.mgt.common.PaginationRequest;
import org.wso2.carbon.device.mgt.common.PaginationResult;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/util/RequestValidationUtil.java b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/impl/util/RequestValidationUtil.java
similarity index 95%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/util/RequestValidationUtil.java
rename to components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/impl/util/RequestValidationUtil.java
index 2a59d220a4c..aeff5fe9f81 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/util/RequestValidationUtil.java
+++ b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/services/impl/util/RequestValidationUtil.java
@@ -16,12 +16,12 @@
* under the License.
*
*/
-package org.wso2.carbon.device.application.mgt.store.api.services.impl.util;
+package io.entgra.application.mgt.store.api.services.impl.util;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.core.exception.BadRequestException;
-import org.wso2.carbon.device.application.mgt.store.api.util.Constants;
+import io.entgra.application.mgt.core.exception.BadRequestException;
+import io.entgra.application.mgt.store.api.util.Constants;
import java.util.List;
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/util/Constants.java b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/util/Constants.java
similarity index 98%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/util/Constants.java
rename to components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/util/Constants.java
index a78c16077fe..3c06f365d25 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/util/Constants.java
+++ b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/java/io/entgra/application/mgt/store/api/util/Constants.java
@@ -33,7 +33,7 @@
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.store.api.util;
+package io.entgra.application.mgt.store.api.util;
/**
* Holds the constants used by DeviceImpl Management Admin web application.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/webapp/META-INF/permissions.xml b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/webapp/META-INF/permissions.xml
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/webapp/META-INF/permissions.xml
rename to components/application-mgt/io.entgra.application.mgt.store.api/src/main/webapp/META-INF/permissions.xml
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/webapp/META-INF/webapp-classloading.xml b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/webapp/META-INF/webapp-classloading.xml
similarity index 96%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/webapp/META-INF/webapp-classloading.xml
rename to components/application-mgt/io.entgra.application.mgt.store.api/src/main/webapp/META-INF/webapp-classloading.xml
index da8baef61fd..7a713954453 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/webapp/META-INF/webapp-classloading.xml
+++ b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/webapp/META-INF/webapp-classloading.xml
@@ -31,5 +31,5 @@
Tomcat environment is the default and every webapps gets it even if they didn't specify it.
e.g. If a webapps requires CXF, they will get both Tomcat and CXF.
-->
- CXF,Carbon
+ CXF3,Carbon
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/webapp/WEB-INF/cxf-servlet.xml b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/webapp/WEB-INF/cxf-servlet.xml
similarity index 67%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/webapp/WEB-INF/cxf-servlet.xml
rename to components/application-mgt/io.entgra.application.mgt.store.api/src/main/webapp/WEB-INF/cxf-servlet.xml
index 3488f6e8bcf..47d03da5989 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/webapp/WEB-INF/cxf-servlet.xml
+++ b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/webapp/WEB-INF/cxf-servlet.xml
@@ -39,7 +39,7 @@
-
+
@@ -51,21 +51,21 @@
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/webapp/WEB-INF/web.xml b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/webapp/WEB-INF/web.xml
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/webapp/WEB-INF/web.xml
rename to components/application-mgt/io.entgra.application.mgt.store.api/src/main/webapp/WEB-INF/web.xml
index 93903ed95a6..09dc9ca61f9 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/webapp/WEB-INF/web.xml
+++ b/components/application-mgt/io.entgra.application.mgt.store.api/src/main/webapp/WEB-INF/web.xml
@@ -73,7 +73,7 @@
ApiOriginFilter
- org.wso2.carbon.device.application.mgt.addons.ApiOriginFilter
+ io.entgra.application.mgt.addons.ApiOriginFilter
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/test/java/org/wso2/carbon/device/application/mgt/store/api/services/util/CommentMgtTestHelper.java b/components/application-mgt/io.entgra.application.mgt.store.api/src/test/java/io/entgra/application/mgt/store/api/services/CommentMgtTestHelper.java
similarity index 91%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/test/java/org/wso2/carbon/device/application/mgt/store/api/services/util/CommentMgtTestHelper.java
rename to components/application-mgt/io.entgra.application.mgt.store.api/src/test/java/io/entgra/application/mgt/store/api/services/CommentMgtTestHelper.java
index beae02de6d0..d586b5f5cb1 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/test/java/org/wso2/carbon/device/application/mgt/store/api/services/util/CommentMgtTestHelper.java
+++ b/components/application-mgt/io.entgra.application.mgt.store.api/src/test/java/io/entgra/application/mgt/store/api/services/CommentMgtTestHelper.java
@@ -15,9 +15,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.store.api.services.util;
+package io.entgra.application.mgt.store.api.services;
-import org.wso2.carbon.device.application.mgt.common.response.Review;
+import io.entgra.application.mgt.common.response.Review;
/**
* Helper class for Review Management API test cases.
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/test/java/org/wso2/carbon/device/application/mgt/store/api/services/ReviewManagementAPITest.java b/components/application-mgt/io.entgra.application.mgt.store.api/src/test/java/io/entgra/application/mgt/store/api/services/ReviewManagementAPITest.java
similarity index 97%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/test/java/org/wso2/carbon/device/application/mgt/store/api/services/ReviewManagementAPITest.java
rename to components/application-mgt/io.entgra.application.mgt.store.api/src/test/java/io/entgra/application/mgt/store/api/services/ReviewManagementAPITest.java
index 86b4730c73a..52b6e5e0517 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/test/java/org/wso2/carbon/device/application/mgt/store/api/services/ReviewManagementAPITest.java
+++ b/components/application-mgt/io.entgra.application.mgt.store.api/src/test/java/io/entgra/application/mgt/store/api/services/ReviewManagementAPITest.java
@@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.wso2.carbon.device.application.mgt.store.api.services;
+package io.entgra.application.mgt.store.api.services;
import junit.framework.TestCase;
import org.apache.commons.logging.Log;
@@ -24,12 +24,12 @@ import org.junit.Ignore;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.core.classloader.annotations.SuppressStaticInitializationFor;
-import org.wso2.carbon.device.application.mgt.common.services.ReviewManager;
-import org.wso2.carbon.device.application.mgt.core.util.APIUtil;
+import io.entgra.application.mgt.common.services.ReviewManager;
+import io.entgra.application.mgt.core.util.APIUtil;
@PowerMockIgnore("javax.ws.rs.*")
@SuppressStaticInitializationFor({
- "org.wso2.carbon.device.application.mgt.api.APIUtil" })
+ "io.entgra.application.mgt.api.APIUtil" })
@PrepareForTest({ APIUtil.class, ReviewManager.class,
ReviewManagementAPITest.class})
@Ignore("Since comment manager logic is invalid temporarily added Ignore annotation to skip running comment management test cases") public class ReviewManagementAPITest
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/test/resources/log4j.properties b/components/application-mgt/io.entgra.application.mgt.store.api/src/test/resources/log4j.properties
similarity index 100%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/test/resources/log4j.properties
rename to components/application-mgt/io.entgra.application.mgt.store.api/src/test/resources/log4j.properties
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/test/resources/testng.xml b/components/application-mgt/io.entgra.application.mgt.store.api/src/test/resources/testng.xml
similarity index 89%
rename from components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/test/resources/testng.xml
rename to components/application-mgt/io.entgra.application.mgt.store.api/src/test/resources/testng.xml
index 3513acff4eb..68732a014cb 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/test/resources/testng.xml
+++ b/components/application-mgt/io.entgra.application.mgt.store.api/src/test/resources/testng.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/components/application-mgt/pom.xml b/components/application-mgt/pom.xml
index 8d202751165..56489b23104 100644
--- a/components/application-mgt/pom.xml
+++ b/components/application-mgt/pom.xml
@@ -22,25 +22,24 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../../pom.xml
4.0.0
application-mgt
- 4.1.16-SNAPSHOT
pom
WSO2 Carbon - Application Management Component
WSO2 Carbon - Application Management Component
http://wso2.org
- org.wso2.carbon.device.application.mgt.core
- org.wso2.carbon.device.application.mgt.common
- org.wso2.carbon.device.application.mgt.addons
- org.wso2.carbon.device.application.mgt.publisher.api
- org.wso2.carbon.device.application.mgt.store.api
- org.wso2.carbon.device.application.mgt.api
+ io.entgra.application.mgt.common
+ io.entgra.application.mgt.core
+ io.entgra.application.mgt.addons
+ io.entgra.application.mgt.publisher.api
+ io.entgra.application.mgt.store.api
+ io.entgra.application.mgt.api
diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml
index fa191390bee..2e4defe98cf 100644
--- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml
+++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml
@@ -22,7 +22,7 @@
certificate-mgt
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
@@ -133,10 +133,17 @@
+
+ org.springframework
+ spring-web
+ provided
+
org.apache.cxf
- cxf-rt-frontend-jaxws
+ cxf-bundle-jaxrs
+ provided
+
commons-codec.wso2
commons-codec
@@ -147,24 +154,11 @@
-
- org.apache.cxf
- cxf-rt-frontend-jaxrs
-
-
- org.apache.cxf
- cxf-rt-transports-http
-
junit
junit
test
-
- javax.ws.rs
- jsr311-api
- provided
-
org.wso2.carbon
org.wso2.carbon.logging
@@ -207,11 +201,6 @@
-
- javax.servlet
- javax.servlet-api
- provided
-
org.wso2.carbon.devicemgt
org.wso2.carbon.apimgt.annotations
diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/src/main/java/org/wso2/carbon/certificate/mgt/jaxrs/api/CertificateMgtService.java b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/src/main/java/org/wso2/carbon/certificate/mgt/jaxrs/api/CertificateMgtService.java
index 2357d61044c..b6ec9993fe0 100644
--- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/src/main/java/org/wso2/carbon/certificate/mgt/jaxrs/api/CertificateMgtService.java
+++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/src/main/java/org/wso2/carbon/certificate/mgt/jaxrs/api/CertificateMgtService.java
@@ -41,6 +41,7 @@ import javax.ws.rs.core.Response;
name = "Sign CSR",
description = "Sign CSR",
key = "perm:sign-csr",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/certificates/manage"}
)
}
diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/src/main/webapp/META-INF/webapp-classloading.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/src/main/webapp/META-INF/webapp-classloading.xml
index ed2ed216247..60db8782e9b 100644
--- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/src/main/webapp/META-INF/webapp-classloading.xml
+++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/src/main/webapp/META-INF/webapp-classloading.xml
@@ -31,5 +31,5 @@
Tomcat environment is the default and every webapps gets it even if they didn't specify it.
e.g. If a webapps requires CXF, they will get both Tomcat and CXF.
-->
- CXF,Carbon
+ CXF3,Carbon
diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml
index cbe533dd6df..d5e645e24f1 100644
--- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml
+++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml
@@ -22,7 +22,7 @@
certificate-mgt
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
@@ -133,9 +133,15 @@
+
+ org.springframework
+ spring-web
+ provided
+
org.apache.cxf
- cxf-rt-frontend-jaxws
+ cxf-bundle-jaxrs
+ provided
commons-codec.wso2
@@ -147,14 +153,6 @@
-
- org.apache.cxf
- cxf-rt-frontend-jaxrs
-
-
- org.apache.cxf
- cxf-rt-transports-http
-
junit
junit
@@ -204,11 +202,6 @@
-
- javax.servlet
- javax.servlet-api
- provided
-
org.wso2.carbon.devicemgt
org.wso2.carbon.apimgt.annotations
diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/src/main/java/org/wso2/carbon/certificate/mgt/cert/jaxrs/api/CertificateManagementAdminService.java b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/src/main/java/org/wso2/carbon/certificate/mgt/cert/jaxrs/api/CertificateManagementAdminService.java
index 993060707a1..5204205dc1a 100644
--- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/src/main/java/org/wso2/carbon/certificate/mgt/cert/jaxrs/api/CertificateManagementAdminService.java
+++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/src/main/java/org/wso2/carbon/certificate/mgt/cert/jaxrs/api/CertificateManagementAdminService.java
@@ -45,30 +45,35 @@ import javax.ws.rs.core.Response;
name = "Adding a new SSL certificate",
description = "Adding a new SSL certificate",
key = "perm:admin:certificates:add",
+ roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/admin/certificates/add"}
),
@Scope(
name = "Getting Details of an SSL Certificate",
description = "Getting Details of an SSL Certificate",
key = "perm:admin:certificates:details",
+ roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/admin/certificates/details"}
),
@Scope(
name = "Getting Details of Certificates",
description = "Getting Details of Certificates",
key = "perm:admin:certificates:view",
+ roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/admin/certificates/view"}
),
@Scope(
name = "Deleting an SSL Certificate",
description = "Deleting an SSL Certificate",
key = "perm:admin:certificates:delete",
+ roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/admin/certificates/delete"}
),
@Scope(
name = "Verify SSL certificate",
description = "Verify SSL certificate",
key = "perm:admin:certificates:verify",
+ roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/admin/certificates/verify"}
)
}
diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/src/main/webapp/META-INF/webapp-classloading.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/src/main/webapp/META-INF/webapp-classloading.xml
index ed2ed216247..60db8782e9b 100644
--- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/src/main/webapp/META-INF/webapp-classloading.xml
+++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/src/main/webapp/META-INF/webapp-classloading.xml
@@ -31,5 +31,5 @@
Tomcat environment is the default and every webapps gets it even if they didn't specify it.
e.g. If a webapps requires CXF, they will get both Tomcat and CXF.
-->
- CXF,Carbon
+ CXF3,Carbon
diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml
index 6942c86d849..9f7a444da1a 100644
--- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml
+++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml
@@ -38,13 +38,12 @@
org.wso2.carbon.devicemgt
certificate-mgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.certificate.mgt.core
- 4.1.16-SNAPSHOT
bundle
WSO2 Carbon - Certificate Management Core
WSO2 Carbon - Certificate Management Core
@@ -72,8 +71,8 @@
org.wso2.carbon.certificate.mgt.core.util
- org.osgi.framework,
- org.osgi.service.component,
+ org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
+ org.osgi.service.*;version="${imp.package.version.osgi.service}",
org.apache.commons.logging,
org.apache.commons.collections.map,
javax.security.auth.x500,
@@ -201,6 +200,12 @@
h2-database-engine
test
+
+ org.wso2.carbon
+ org.wso2.carbon.securevault
+
+ test
+
org.powermock
powermock-api-mockito
diff --git a/components/certificate-mgt/pom.xml b/components/certificate-mgt/pom.xml
index df7948b53f9..ebb7bae8baf 100644
--- a/components/certificate-mgt/pom.xml
+++ b/components/certificate-mgt/pom.xml
@@ -22,14 +22,13 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
certificate-mgt
- 4.1.16-SNAPSHOT
pom
WSO2 Carbon - Certificate Management Component
http://wso2.org
diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml
index 6c47262ab06..6116d38fc51 100644
--- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml
+++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml
@@ -22,7 +22,7 @@
device-mgt-extensions
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
@@ -140,8 +140,8 @@
org.apache.axis2.deployment.*,
org.apache.commons.lang;version="${commons-lang.wso2.osgi.version.range}",
org.apache.commons.logging,
- org.osgi.framework,
- org.osgi.service.component,
+ org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
+ org.osgi.service.*;version="${imp.package.version.osgi.service}",
org.w3c.dom,
org.wso2.carbon.context,
org.wso2.carbon.device.mgt.common.*,
diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml
index 14a9d8c308b..00eeee8d19f 100644
--- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml
+++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml
@@ -22,7 +22,7 @@
device-mgt-extensions
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
@@ -56,7 +56,7 @@
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.common
+ io.entgra.application.mgt.common
provided
@@ -82,17 +82,17 @@
org.wso2.carbon.device.mgt.extensions.pull.notification.*
- org.osgi.framework,
- org.osgi.service.component,
+ org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
+ org.osgi.service.*;version="${imp.package.version.osgi.service}",
org.apache.commons.logging,
org.wso2.carbon.device.mgt.common.*,
org.wso2.carbon.device.mgt.core.service
- org.wso2.carbon.policy.mgt.core.*,
- org.wso2.carbon.policy.mgt.core,
- com.google.gson,
- org.wso2.carbon.device.mgt.core.service.*,
- org.wso2.carbon.device.application.mgt.common.*,
- org.wso2.carbon.device.application.mgt.common.services.*
+ org.wso2.carbon.policy.mgt.core.*,
+ org.wso2.carbon.policy.mgt.core,
+ com.google.gson,
+ org.wso2.carbon.device.mgt.core.service.*,
+ io.entgra.application.mgt.common.*,
+ io.entgra.application.mgt.common.services.*
diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/src/main/java/org/wso2/carbon/device/mgt/extensions/pull/notification/PullNotificationSubscriberImpl.java b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/src/main/java/org/wso2/carbon/device/mgt/extensions/pull/notification/PullNotificationSubscriberImpl.java
index 620757ace15..4ad59f212d8 100644
--- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/src/main/java/org/wso2/carbon/device/mgt/extensions/pull/notification/PullNotificationSubscriberImpl.java
+++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/src/main/java/org/wso2/carbon/device/mgt/extensions/pull/notification/PullNotificationSubscriberImpl.java
@@ -24,11 +24,9 @@ import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
+import io.entgra.application.mgt.common.exception.ApplicationManagementException;
import org.wso2.carbon.device.mgt.common.Device;
-import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
-import org.wso2.carbon.device.application.mgt.common.services.ApplicationManager;
-import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException;
+import io.entgra.application.mgt.common.services.ApplicationManager;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
import org.wso2.carbon.device.mgt.common.policy.mgt.monitor.ComplianceFeature;
diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/src/main/java/org/wso2/carbon/device/mgt/extensions/pull/notification/internal/PullNotificationDataHolder.java b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/src/main/java/org/wso2/carbon/device/mgt/extensions/pull/notification/internal/PullNotificationDataHolder.java
index fd257ea28c1..453325d5cdd 100644
--- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/src/main/java/org/wso2/carbon/device/mgt/extensions/pull/notification/internal/PullNotificationDataHolder.java
+++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/src/main/java/org/wso2/carbon/device/mgt/extensions/pull/notification/internal/PullNotificationDataHolder.java
@@ -18,7 +18,7 @@
*/
package org.wso2.carbon.device.mgt.extensions.pull.notification.internal;
-import org.wso2.carbon.device.application.mgt.common.services.ApplicationManager;
+import io.entgra.application.mgt.common.services.ApplicationManager;
import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService;
import org.wso2.carbon.policy.mgt.core.PolicyManagerService;
diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/src/main/java/org/wso2/carbon/device/mgt/extensions/pull/notification/internal/PullNotificationServiceComponent.java b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/src/main/java/org/wso2/carbon/device/mgt/extensions/pull/notification/internal/PullNotificationServiceComponent.java
index 4c3971bf7d2..b7b94c01996 100644
--- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/src/main/java/org/wso2/carbon/device/mgt/extensions/pull/notification/internal/PullNotificationServiceComponent.java
+++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/src/main/java/org/wso2/carbon/device/mgt/extensions/pull/notification/internal/PullNotificationServiceComponent.java
@@ -21,7 +21,7 @@ package org.wso2.carbon.device.mgt.extensions.pull.notification.internal;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.osgi.service.component.ComponentContext;
-import org.wso2.carbon.device.application.mgt.common.services.ApplicationManager;
+import io.entgra.application.mgt.common.services.ApplicationManager;
import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService;
import org.wso2.carbon.policy.mgt.core.PolicyManagerService;
@@ -40,7 +40,7 @@ import org.wso2.carbon.policy.mgt.core.PolicyManagerService;
* bind="setPolicyManagerService"
* unbind="unsetPolicyManagerService"
* @scr.reference name="org.wso2.carbon.application.mgt.service"
- * interface="org.wso2.carbon.device.application.mgt.common.services.ApplicationManager"
+ * interface="io.entgra.application.mgt.common.services.ApplicationManager"
* cardinality="1..1"
* policy="dynamic"
* bind="setApplicationManagerService"
diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml
index b102c68e139..821389cf347 100644
--- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml
+++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml
@@ -22,7 +22,7 @@
device-mgt-extensions
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
@@ -135,7 +135,8 @@
com.google.gson,
- org.osgi.service.component,
+ org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
+ org.osgi.service.*;version="${imp.package.version.osgi.service}",
org.wso2.carbon.device.mgt.common.operation.mgt,
org.wso2.carbon.device.mgt.common.push.notification,
org.apache.commons.logging,
diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml
index 447951938b0..4490ef70faa 100644
--- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml
+++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml
@@ -22,7 +22,7 @@
device-mgt-extensions
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
@@ -126,13 +126,13 @@
org.apache.commons.logging,
- org.osgi.service.component,
+ org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
+ org.osgi.service.*;version="${imp.package.version.osgi.service}",
org.wso2.carbon.context,
org.wso2.carbon.device.mgt.common.operation.mgt,
org.wso2.carbon.device.mgt.common.push.notification,
org.wso2.carbon.device.mgt.common,
org.wso2.carbon.device.mgt.core.service,
- org.osgi.framework,
org.wso2.carbon.device.mgt.core.operation.mgt,
org.wso2.carbon.core,
com.google.gson,
diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml
index a59a3728a5c..b87fe21f8e7 100644
--- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml
+++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml
@@ -22,7 +22,7 @@
device-mgt-extensions
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
@@ -113,7 +113,7 @@
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.common
+ io.entgra.application.mgt.common
provided
@@ -148,7 +148,8 @@
org.apache.commons.logging,
- org.osgi.service.component,
+ org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
+ org.osgi.service.*;version="${imp.package.version.osgi.service}",
org.wso2.carbon.context,
org.wso2.carbon.device.mgt.common.operation.mgt,
org.wso2.carbon.device.mgt.common.push.notification,
@@ -157,11 +158,10 @@
org.wso2.carbon.device.mgt.core.service,
org.wso2.carbon.event.output.adapter.core,
org.wso2.carbon.event.output.adapter.core.exception,
- org.osgi.framework,
org.wso2.carbon.device.mgt.core.operation.mgt,
org.wso2.carbon.core,
- org.wso2.carbon.device.application.mgt.common.*,
- org.wso2.carbon.device.application.mgt.common.services.*
+ io.entgra.application.mgt.common.*,
+ io.entgra.application.mgt.common.services.*
diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml
index 1a6e1a58ab0..9150709a6b4 100644
--- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml
+++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml
@@ -22,7 +22,7 @@
device-mgt-extensions
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
@@ -135,14 +135,14 @@
org.apache.commons.logging,
- org.osgi.service.component,
+ org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
+ org.osgi.service.*;version="${imp.package.version.osgi.service}",
org.wso2.carbon.context,
org.wso2.carbon.device.mgt.common.operation.mgt,
org.wso2.carbon.device.mgt.common.push.notification,
- org.wso2.carbon.device.mgt.core.service,
+ org.wso2.carbon.device.mgt.core.*,
org.wso2.carbon.event.output.adapter.core,
org.wso2.carbon.event.output.adapter.core.exception,
- org.osgi.framework,
org.wso2.carbon.core,
org.wso2.carbon.device.mgt.common.*
diff --git a/components/device-mgt-extensions/pom.xml b/components/device-mgt-extensions/pom.xml
index d55cf9ea49c..f76390dbee2 100644
--- a/components/device-mgt-extensions/pom.xml
+++ b/components/device-mgt-extensions/pom.xml
@@ -22,7 +22,7 @@
carbon-devicemgt
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../../pom.xml
diff --git a/components/device-mgt/io.entgra.carbon.device.mgt.config.api/pom.xml b/components/device-mgt/io.entgra.carbon.device.mgt.config.api/pom.xml
index bd43c8b6269..85c915cd666 100644
--- a/components/device-mgt/io.entgra.carbon.device.mgt.config.api/pom.xml
+++ b/components/device-mgt/io.entgra.carbon.device.mgt.config.api/pom.xml
@@ -22,7 +22,7 @@
device-mgt
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
@@ -146,13 +146,13 @@
- org.apache.cxf
- cxf-rt-frontend-jaxrs
+ org.springframework
+ spring-web
provided
org.apache.cxf
- cxf-rt-transports-http
+ cxf-bundle-jaxrs
provided
diff --git a/components/device-mgt/io.entgra.carbon.device.mgt.config.api/src/main/java/io/entgra/carbon/device/mgt/config/jaxrs/service/DeviceManagementConfigService.java b/components/device-mgt/io.entgra.carbon.device.mgt.config.api/src/main/java/io/entgra/carbon/device/mgt/config/jaxrs/service/DeviceManagementConfigService.java
index 9f9e4665627..d5fe117a63a 100644
--- a/components/device-mgt/io.entgra.carbon.device.mgt.config.api/src/main/java/io/entgra/carbon/device/mgt/config/jaxrs/service/DeviceManagementConfigService.java
+++ b/components/device-mgt/io.entgra.carbon.device.mgt.config.api/src/main/java/io/entgra/carbon/device/mgt/config/jaxrs/service/DeviceManagementConfigService.java
@@ -71,24 +71,28 @@ import java.util.List;
name = "View configurations",
description = "",
key = "perm:view-configuration",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/platform-configurations/view"}
),
@Scope(
name = "Manage configurations",
description = "",
key = "perm:manage-configuration",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/platform-configurations/manage"}
),
@Scope(
name = "Getting Details of Device tenants",
description = "Getting Details of Device tenants",
key = "perm:admin:tenant:view",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/tenants/view"}
),
@Scope(
name = "Add a permission to the permission tree",
description = "Add a permission to the permission tree",
key = "perm:admin:permissions:add",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/permissions/add"}
)
}
diff --git a/components/device-mgt/io.entgra.carbon.device.mgt.config.api/src/main/java/io/entgra/carbon/device/mgt/config/jaxrs/service/impl/DeviceManagementConfigServiceImpl.java b/components/device-mgt/io.entgra.carbon.device.mgt.config.api/src/main/java/io/entgra/carbon/device/mgt/config/jaxrs/service/impl/DeviceManagementConfigServiceImpl.java
index 9ccbecda3d8..4f13273e217 100644
--- a/components/device-mgt/io.entgra.carbon.device.mgt.config.api/src/main/java/io/entgra/carbon/device/mgt/config/jaxrs/service/impl/DeviceManagementConfigServiceImpl.java
+++ b/components/device-mgt/io.entgra.carbon.device.mgt.config.api/src/main/java/io/entgra/carbon/device/mgt/config/jaxrs/service/impl/DeviceManagementConfigServiceImpl.java
@@ -37,13 +37,13 @@ import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.exceptions.DeviceNotFoundException;
import org.wso2.carbon.device.mgt.common.general.TenantDetail;
import org.wso2.carbon.device.mgt.common.permission.mgt.PermissionManagementException;
-import org.wso2.carbon.device.mgt.common.permission.mgt.PermissionManagerService;
import org.wso2.carbon.device.mgt.core.DeviceManagementConstants;
import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager;
import org.wso2.carbon.device.mgt.core.config.DeviceManagementConfig;
import org.wso2.carbon.device.mgt.core.config.keymanager.KeyManagerConfigurations;
import org.wso2.carbon.device.mgt.core.config.ui.UIConfiguration;
import org.wso2.carbon.device.mgt.core.config.ui.UIConfigurationManager;
+import org.wso2.carbon.device.mgt.core.permission.mgt.PermissionUtils;
import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService;
import org.wso2.carbon.device.mgt.core.util.DeviceManagerUtil;
import org.wso2.carbon.identity.jwt.client.extension.dto.AccessTokenInfo;
@@ -274,15 +274,9 @@ public class DeviceManagementConfigServiceImpl implements DeviceManagementConfig
@Path("/permissions")
@Produces({MediaType.APPLICATION_JSON})
public Response addPermission(List permissions) {
- PermissionManagerService permissionService = DeviceMgtAPIUtils.getPermissionManagerService();
- org.wso2.carbon.device.mgt.common.permission.mgt.Permission permission = new org
- .wso2.carbon.device.mgt.common.permission.mgt.Permission();
-
for (String path : permissions) {
- permission.setPath(path);
- permission.setUrl(path);
try {
- permissionService.addPermission(permission);
+ PermissionUtils.putPermission(path);
} catch (PermissionManagementException e) {
String msg = "Error occurred adding permission";
log.error(msg, e);
diff --git a/components/device-mgt/io.entgra.carbon.device.mgt.config.api/src/main/java/io/entgra/carbon/device/mgt/config/jaxrs/util/DeviceMgtAPIUtils.java b/components/device-mgt/io.entgra.carbon.device.mgt.config.api/src/main/java/io/entgra/carbon/device/mgt/config/jaxrs/util/DeviceMgtAPIUtils.java
index 96ef7c0cbcf..cf098c6edc8 100644
--- a/components/device-mgt/io.entgra.carbon.device.mgt.config.api/src/main/java/io/entgra/carbon/device/mgt/config/jaxrs/util/DeviceMgtAPIUtils.java
+++ b/components/device-mgt/io.entgra.carbon.device.mgt.config.api/src/main/java/io/entgra/carbon/device/mgt/config/jaxrs/util/DeviceMgtAPIUtils.java
@@ -21,7 +21,6 @@ package io.entgra.carbon.device.mgt.config.jaxrs.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.common.permission.mgt.PermissionManagerService;
import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService;
import org.wso2.carbon.user.core.service.RealmService;
@@ -33,7 +32,6 @@ public class DeviceMgtAPIUtils {
private static final Log log = LogFactory.getLog(DeviceMgtAPIUtils.class);
private static DeviceManagementProviderService deviceManagementProviderService = null;
- private static PermissionManagerService permissionManagerService = null;
private static RealmService realmService = null;
public static DeviceManagementProviderService getDeviceManagementService() {
@@ -50,20 +48,6 @@ public class DeviceMgtAPIUtils {
return deviceManagementProviderService;
}
- public static PermissionManagerService getPermissionManagerService() {
- if (permissionManagerService == null) {
- PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
- permissionManagerService =
- (PermissionManagerService) ctx.getOSGiService(PermissionManagerService.class, null);
- if (permissionManagerService == null) {
- String msg = "Permission Management provider service has not initialized.";
- log.error(msg);
- throw new IllegalStateException(msg);
- }
- }
- return permissionManagerService;
- }
-
public static RealmService getRealmService() {
if (realmService == null) {
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
diff --git a/components/device-mgt/io.entgra.carbon.device.mgt.config.api/src/main/webapp/META-INF/webapp-classloading.xml b/components/device-mgt/io.entgra.carbon.device.mgt.config.api/src/main/webapp/META-INF/webapp-classloading.xml
index 01aceabde5b..a16c0a9cbfd 100644
--- a/components/device-mgt/io.entgra.carbon.device.mgt.config.api/src/main/webapp/META-INF/webapp-classloading.xml
+++ b/components/device-mgt/io.entgra.carbon.device.mgt.config.api/src/main/webapp/META-INF/webapp-classloading.xml
@@ -31,5 +31,5 @@
Tomcat environment is the default and every webapps gets it even if they didn't specify it.
e.g. If a webapps requires CXF, they will get both Tomcat and CXF.
-->
- CXF,Carbon
+ CXF3,Carbon
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml
index 7e7060e5b2e..2606d543c8f 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
device-mgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
@@ -107,8 +107,8 @@
org.wso2.carbon.device.mgt.analytics.data.publisher.*;version="${carbon.device.mgt.version}"
- org.osgi.framework,
- org.osgi.service.component,
+ org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
+ org.osgi.service.*;version="${imp.package.version.osgi.service}",
org.apache.commons.logging.*,
org.wso2.carbon.utils.multitenancy,
org.wso2.carbon.context;version="${carbon.kernel.version.range}",
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/pom.xml
index bf9eedf2a7e..4c495596d59 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/pom.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/pom.xml
@@ -20,7 +20,7 @@
device-mgt
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
4.0.0
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml
index d2992949d2a..3c9272a596f 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml
@@ -22,7 +22,7 @@
device-mgt
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
@@ -146,18 +146,24 @@
- org.apache.cxf
- cxf-rt-frontend-jaxws
+ org.testng
+ testng
+ test
+
+
+ org.springframework
+ spring-web
provided
org.apache.cxf
- cxf-rt-frontend-jaxrs
- provided
+ cxf-bundle
+ 3.0.0-milestone2
+ test
org.apache.cxf
- cxf-rt-transports-http
+ cxf-bundle-jaxrs
provided
@@ -165,11 +171,6 @@
commons-httpclient
provided
-
- javax.ws.rs
- jsr311-api
- provided
-
org.wso2.carbon
org.wso2.carbon.utils
@@ -200,16 +201,11 @@
org.wso2.carbon.device.mgt.common
provided
-
- org.wso2.carbon.devicemgt
- org.wso2.carbon.device.mgt.analytics.data.publisher
- provided
-
-
- org.wso2.carbon.devicemgt
- org.wso2.carbon.device.mgt.extensions
- provided
-
+
+ org.wso2.carbon.devicemgt
+ org.wso2.carbon.device.mgt.extensions
+ provided
+
org.wso2.carbon.devicemgt
org.wso2.carbon.device.mgt.core
@@ -340,27 +336,28 @@
javax.ws.rs
javax.ws.rs-api
+ provided
+
+
+ javax.ws.rs
+ jsr311-api
+ provided
+
+
+ org.wso2.carbon.commons
+ org.wso2.carbon.application.mgt.stub
+ provided
-
- org.wso2.carbon.commons
- org.wso2.carbon.application.mgt.stub
- provided
-
org.wso2.carbon.analytics
org.wso2.carbon.analytics.api
provided
- org.wso2.carbon.analytics
- org.wso2.carbon.analytics.datasource.commons
+ org.wso2.carbon.devicemgt
+ org.wso2.carbon.identity.jwt.client.extension
provided
-
- org.wso2.carbon.devicemgt
- org.wso2.carbon.identity.jwt.client.extension
- provided
-
org.wso2.carbon
org.wso2.carbon.registry.core
@@ -377,34 +374,29 @@
${carbon.identity.framework.version}
provided
-
- org.wso2.carbon.analytics
- org.wso2.carbon.analytics.dataservice.commons
- provided
-
-
- org.wso2.carbon.analytics-common
- org.wso2.carbon.event.receiver.stub
- provided
-
-
- org.wso2.carbon.analytics-common
- org.wso2.carbon.event.stream.stub
- provided
-
-
- org.wso2.carbon.analytics-common
- org.wso2.carbon.event.publisher.stub
- provided
-
-
- org.wso2.carbon.analytics-common
- org.wso2.carbon.event.stream.persistence.stub
- provided
-
+
+
+
+
+
- org.wso2.carbon.devicemgt
- org.wso2.carbon.apimgt.integration.client
+ org.wso2.carbon.analytics-common
+ org.wso2.carbon.event.receiver.stub
+ provided
+
+
+ org.wso2.carbon.analytics-common
+ org.wso2.carbon.event.stream.stub
+ provided
+
+
+ org.wso2.carbon.analytics-common
+ org.wso2.carbon.event.publisher.stub
+ provided
+
+
+ org.wso2.carbon.analytics-common
+ org.wso2.carbon.event.stream.persistence.stub
provided
@@ -425,13 +417,13 @@
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.common
+ io.entgra.application.mgt.common
provided
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.core
+ io.entgra.application.mgt.core
provided
-
+
\ No newline at end of file
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ActivityInfoProviderService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ActivityInfoProviderService.java
index 18241eab75c..43bd7e847b5 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ActivityInfoProviderService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ActivityInfoProviderService.java
@@ -76,6 +76,7 @@ import javax.ws.rs.core.Response;
name = "Get activities",
description = "Get activities",
key = "perm:get-activity",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/owning-device/view"}
)
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/AnalyticsArtifactsManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/AnalyticsArtifactsManagementService.java
index 9ff8ecc44d8..608d19fb923 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/AnalyticsArtifactsManagementService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/AnalyticsArtifactsManagementService.java
@@ -68,41 +68,49 @@ import javax.ws.rs.core.Response;
name = "Create Event Stream Artifact",
description = "Create Event Stream Artifact",
key = "perm:analytics:artifacts:stream",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/analytics/artifacts/stream/add"}),
@Scope(
name = "Delete Stream Artifact",
description = "Delete Stream Artifact",
key = "perm:analytics:artifacts:stream:delete",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/analytics/artifacts/stream/delete"}),
@Scope(
name = "Create Event Receiver Artifact",
description = "Create Event Receiver Artifact",
key = "perm:analytics:artifacts:receiver",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/analytics/artifacts/receiver/add"}),
@Scope(
name = "Delete Receiver Artifact",
description = "Delete Receiver Artifact",
key = "perm:analytics:artifacts:receiver:delete",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/analytics/artifacts/receiver/delete"}),
@Scope(
name = "Create Event Publisher Artifact",
description = "Create Event Publisher Artifact",
key = "perm:analytics:artifacts:publisher",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/analytics/artifacts/publisher/add"}),
@Scope(
name = "Delete Publisher Artifact",
description = "Delete Publisher Artifact",
key = "perm:analytics:artifacts:publisher:delete",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/analytics/artifacts/publisher/delete"}),
@Scope(
name = "Create Siddhi Script Artifact",
description = "Create Siddhi Script Artifact",
key = "perm:analytics:artifacts:siddhi",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/analytics/artifacts/siddhi-script/add"}),
@Scope(
name = "Delete Siddhi Script Artifact",
description = "Delete Siddhi Script Artifact",
key = "perm:analytics:artifacts:siddhi:delete",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/analytics/artifacts/siddhi-script/delete"})
}
)
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ConfigurationManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ConfigurationManagementService.java
index ce744e42bb9..fe328f9f8cf 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ConfigurationManagementService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ConfigurationManagementService.java
@@ -69,12 +69,14 @@ import javax.ws.rs.core.Response;
name = "View configurations",
description = "",
key = "perm:view-configuration",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/platform-configurations/view"}
),
@Scope(
name = "Manage configurations",
description = "",
key = "perm:manage-configuration",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/platform-configurations/manage"}
)
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceAgentService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceAgentService.java
index 0cf94395f74..467ae522a20 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceAgentService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceAgentService.java
@@ -77,30 +77,35 @@ import java.util.Map;
name = "Enroll Device",
description = "Register a device",
key = "perm:device:enroll",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/owning-device/add"}
),
@Scope(
name = "Modify Device",
description = "Modify a device",
key = "perm:device:modify",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/owning-device/modify"}
),
@Scope(
name = "Disenroll Device",
description = "Disenroll a device",
key = "perm:device:disenroll",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/owning-device/remove"}
),
@Scope(
name = "Publish Event",
description = "publish device event",
key = "perm:device:publish-event",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/owning-device/event"}
),
@Scope(
name = "Getting Device Operation Details",
description = "Getting Device Operation Details",
key = "perm:device:operations",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/owning-device/view"}
)
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceEventManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceEventManagementService.java
index 9eddd91aeba..dbba4be604e 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceEventManagementService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceEventManagementService.java
@@ -51,12 +51,14 @@ import javax.ws.rs.core.Response;
name = "Add or Delete Event Definition for device type",
description = "Add or Delete Event Definition for device type",
key = "perm:device-types:events",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/device-type/add"}
),
@Scope(
name = "Get Events Details of a Device Type",
description = "Get Events Details of a Device Type",
key = "perm:device-types:events:view",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/owning-device/view"}
)
}
@@ -67,64 +69,65 @@ import javax.ws.rs.core.Response;
@Consumes(MediaType.APPLICATION_JSON)
public interface DeviceEventManagementService {
- @POST
- @Path("/{type}")
- @ApiOperation(
- produces = MediaType.APPLICATION_JSON,
- httpMethod = "POST",
- value = "Adding the Event Type Definition",
- notes = "Add the event definition for a device.",
- tags = "Device Event Management",
- extensions = {
- @Extension(properties = {
- @ExtensionProperty(name = Constants.SCOPE, value = "perm:device-types:events")
- })
- }
- )
- @ApiResponses(
- value = {
- @ApiResponse(
- code = 200,
- message = "OK. \n Successfully added the event defintion.",
- responseHeaders = {
- @ResponseHeader(
- name = "Content-Type",
- description = "The content type of the body"),
- @ResponseHeader(
- name = "ETag",
- description = "Entity Tag of the response resource.\n" +
- "Used by caches, or in conditional requests."),
- @ResponseHeader(
- name = "Last-Modified",
- description =
- "Date and time the resource was last modified.\n" +
- "Used by caches, or in conditional requests."),
- }
- ),
- @ApiResponse(
- code = 400,
- message =
- "Bad Request. \n"),
- @ApiResponse(
- code = 406,
- message = "Not Acceptable.\n The requested media type is not supported"),
- @ApiResponse(
- code = 500,
- message = "Internal Server Error. \n Server error occurred while fetching the " +
- "list of supported device types.",
- response = ErrorResponse.class)
- }
- )
- Response deployDeviceTypeEventDefinition(
- @ApiParam(name = "type", value = "The device type, such as android, ios, and windows.")
- @PathParam("type")String deviceType,
- @ApiParam(name = "skipPersist", value = "Is it required to persist the data or not")
- @QueryParam("skipPersist") boolean skipPersist,
- @ApiParam(name = "isSharedWithAllTenants", value = "Should artifacts be available to all tenants")
- @QueryParam("isSharedWithAllTenants") boolean isSharedWithAllTenants,
- @ApiParam(name = "deviceTypeEvent", value = "Add the data to complete the DeviceTypeEvent object.",
- required = true)
- @Valid DeviceTypeEvent deviceTypeEvent);
+ //todo:amalka
+// @POST
+// @Path("/{type}")
+// @ApiOperation(
+// produces = MediaType.APPLICATION_JSON,
+// httpMethod = "POST",
+// value = "Adding the Event Type Definition",
+// notes = "Add the event definition for a device.",
+// tags = "Device Event Management",
+// extensions = {
+// @Extension(properties = {
+// @ExtensionProperty(name = Constants.SCOPE, value = "perm:device-types:events")
+// })
+// }
+// )
+// @ApiResponses(
+// value = {
+// @ApiResponse(
+// code = 200,
+// message = "OK. \n Successfully added the event defintion.",
+// responseHeaders = {
+// @ResponseHeader(
+// name = "Content-Type",
+// description = "The content type of the body"),
+// @ResponseHeader(
+// name = "ETag",
+// description = "Entity Tag of the response resource.\n" +
+// "Used by caches, or in conditional requests."),
+// @ResponseHeader(
+// name = "Last-Modified",
+// description =
+// "Date and time the resource was last modified.\n" +
+// "Used by caches, or in conditional requests."),
+// }
+// ),
+// @ApiResponse(
+// code = 400,
+// message =
+// "Bad Request. \n"),
+// @ApiResponse(
+// code = 406,
+// message = "Not Acceptable.\n The requested media type is not supported"),
+// @ApiResponse(
+// code = 500,
+// message = "Internal Server Error. \n Server error occurred while fetching the " +
+// "list of supported device types.",
+// response = ErrorResponse.class)
+// }
+// )
+// Response deployDeviceTypeEventDefinition(
+// @ApiParam(name = "type", value = "The device type, such as android, ios, and windows.")
+// @PathParam("type")String deviceType,
+// @ApiParam(name = "skipPersist", value = "Is it required to persist the data or not")
+// @QueryParam("skipPersist") boolean skipPersist,
+// @ApiParam(name = "isSharedWithAllTenants", value = "Should artifacts be available to all tenants")
+// @QueryParam("isSharedWithAllTenants") boolean isSharedWithAllTenants,
+// @ApiParam(name = "deviceTypeEvent", value = "Add the data to complete the DeviceTypeEvent object.",
+// required = true)
+// @Valid DeviceTypeEvent deviceTypeEvent);
@DELETE
@Path("/{type}")
@@ -178,183 +181,186 @@ public interface DeviceEventManagementService {
"ios, and windows.", required = false)
@PathParam("type")String deviceType);
- @GET
- @Path("/{type}/{deviceId}")
- @ApiOperation(
- produces = MediaType.APPLICATION_JSON,
- httpMethod = "GET",
- value = "Getting Device Events",
- notes = "Get the events for the device.",
- tags = "Device Event Management",
- extensions = {
- @Extension(properties = {
- @ExtensionProperty(name = Constants.SCOPE, value = "perm:device-types:events:view")
- })
- }
- )
- @ApiResponses(
- value = {
- @ApiResponse(
- code = 200,
- message = "OK. \n Successfully fetched the event definition.",
- response = EventRecords.class,
- responseHeaders = {
- @ResponseHeader(
- name = "Content-Type",
- description = "The content type of the body"),
- @ResponseHeader(
- name = "ETag",
- description = "Entity Tag of the response resource.\n" +
- "Used by caches, or in conditional requests."),
- @ResponseHeader(
- name = "Last-Modified",
- description =
- "Date and time the resource was last modified.\n" +
- "Used by caches, or in conditional requests."),
- }
- ),
- @ApiResponse(
- code = 400,
- message =
- "Bad Request. \n"),
- @ApiResponse(
- code = 406,
- message = "Not Acceptable.\n The requested media type is not supported"),
- @ApiResponse(
- code = 500,
- message = "Internal Server Error. \n Server error occurred while fetching the " +
- "list of supported device types.",
- response = ErrorResponse.class)
- }
- )
- Response getData(@ApiParam(name = "deviceId", value = "id of the device ", required = false)
- @PathParam("deviceId") String deviceId,
- @ApiParam(name = "from", value = "unix timestamp to retrieve", required = false)
- @QueryParam("from") long from,
- @ApiParam(name = "to", value = "unix time to retrieve", required = false)
- @QueryParam("to") long to,
- @ApiParam(name = "type", value = "name of the device type", required = false)
- @PathParam("type") String deviceType,
- @ApiParam(name = "offset", value = "offset of the records that needs to be picked up", required = false)
- @QueryParam("offset") int offset,
- @ApiParam(name = "limit", value = "limit of the records that needs to be picked up", required = false)
- @QueryParam("limit") int limit);
+ //todo:amalka
+// @GET
+// @Path("/{type}/{deviceId}")
+// @ApiOperation(
+// produces = MediaType.APPLICATION_JSON,
+// httpMethod = "GET",
+// value = "Getting Device Events",
+// notes = "Get the events for the device.",
+// tags = "Device Event Management",
+// extensions = {
+// @Extension(properties = {
+// @ExtensionProperty(name = Constants.SCOPE, value = "perm:device-types:events:view")
+// })
+// }
+// )
+// @ApiResponses(
+// value = {
+// @ApiResponse(
+// code = 200,
+// message = "OK. \n Successfully fetched the event definition.",
+// response = EventRecords.class,
+// responseHeaders = {
+// @ResponseHeader(
+// name = "Content-Type",
+// description = "The content type of the body"),
+// @ResponseHeader(
+// name = "ETag",
+// description = "Entity Tag of the response resource.\n" +
+// "Used by caches, or in conditional requests."),
+// @ResponseHeader(
+// name = "Last-Modified",
+// description =
+// "Date and time the resource was last modified.\n" +
+// "Used by caches, or in conditional requests."),
+// }
+// ),
+// @ApiResponse(
+// code = 400,
+// message =
+// "Bad Request. \n"),
+// @ApiResponse(
+// code = 406,
+// message = "Not Acceptable.\n The requested media type is not supported"),
+// @ApiResponse(
+// code = 500,
+// message = "Internal Server Error. \n Server error occurred while fetching the " +
+// "list of supported device types.",
+// response = ErrorResponse.class)
+// }
+// )
+// Response getData(@ApiParam(name = "deviceId", value = "id of the device ", required = false)
+// @PathParam("deviceId") String deviceId,
+// @ApiParam(name = "from", value = "unix timestamp to retrieve", required = false)
+// @QueryParam("from") long from,
+// @ApiParam(name = "to", value = "unix time to retrieve", required = false)
+// @QueryParam("to") long to,
+// @ApiParam(name = "type", value = "name of the device type", required = false)
+// @PathParam("type") String deviceType,
+// @ApiParam(name = "offset", value = "offset of the records that needs to be picked up", required = false)
+// @QueryParam("offset") int offset,
+// @ApiParam(name = "limit", value = "limit of the records that needs to be picked up", required = false)
+// @QueryParam("limit") int limit);
- @GET
- @Path("last-known/{type}/{deviceId}")
- @ApiOperation(
- produces = MediaType.APPLICATION_JSON,
- httpMethod = "GET",
- value = "Getting Last Known Device Events",
- notes = "Get the last known events for the device.",
- tags = "Device Event Management",
- extensions = {
- @Extension(properties = {
- @ExtensionProperty(name = Constants.SCOPE, value = "perm:device-types:events:view")
- })
- }
- )
- @ApiResponses(
- value = {
- @ApiResponse(
- code = 200,
- message = "OK. \n Successfully fetched the event.",
- response = EventRecords.class,
- responseHeaders = {
- @ResponseHeader(
- name = "Content-Type",
- description = "The content type of the body"),
- @ResponseHeader(
- name = "ETag",
- description = "Entity Tag of the response resource.\n" +
- "Used by caches, or in conditional requests."),
- @ResponseHeader(
- name = "Last-Modified",
- description =
- "Date and time the resource was last modified.\n" +
- "Used by caches, or in conditional requests."),
- }
- ),
- @ApiResponse(
- code = 400,
- message =
- "Bad Request. \n"),
- @ApiResponse(
- code = 406,
- message = "Not Acceptable.\n The requested media type is not supported"),
- @ApiResponse(
- code = 500,
- message = "Internal Server Error. \n Server error occurred while fetching the " +
- "list of supported device types.",
- response = ErrorResponse.class)
- }
- )
- Response getLastKnownData(@ApiParam(name = "deviceId", value = "id of the device ", required = true)
- @PathParam("deviceId") String deviceId,
- @ApiParam(name = "type", value = "name of the device type", required = true)
- @PathParam("type") String deviceType,
- @ApiParam(name = "limit", value = "limit of the records that needs to be picked up", required = false)
- @QueryParam("limit") int limit);
+ //todo:amalka
+// @GET
+// @Path("last-known/{type}/{deviceId}")
+// @ApiOperation(
+// produces = MediaType.APPLICATION_JSON,
+// httpMethod = "GET",
+// value = "Getting Last Known Device Events",
+// notes = "Get the last known events for the device.",
+// tags = "Device Event Management",
+// extensions = {
+// @Extension(properties = {
+// @ExtensionProperty(name = Constants.SCOPE, value = "perm:device-types:events:view")
+// })
+// }
+// )
+// @ApiResponses(
+// value = {
+// @ApiResponse(
+// code = 200,
+// message = "OK. \n Successfully fetched the event.",
+// response = EventRecords.class,
+// responseHeaders = {
+// @ResponseHeader(
+// name = "Content-Type",
+// description = "The content type of the body"),
+// @ResponseHeader(
+// name = "ETag",
+// description = "Entity Tag of the response resource.\n" +
+// "Used by caches, or in conditional requests."),
+// @ResponseHeader(
+// name = "Last-Modified",
+// description =
+// "Date and time the resource was last modified.\n" +
+// "Used by caches, or in conditional requests."),
+// }
+// ),
+// @ApiResponse(
+// code = 400,
+// message =
+// "Bad Request. \n"),
+// @ApiResponse(
+// code = 406,
+// message = "Not Acceptable.\n The requested media type is not supported"),
+// @ApiResponse(
+// code = 500,
+// message = "Internal Server Error. \n Server error occurred while fetching the " +
+// "list of supported device types.",
+// response = ErrorResponse.class)
+// }
+// )
+// Response getLastKnownData(@ApiParam(name = "deviceId", value = "id of the device ", required = true)
+// @PathParam("deviceId") String deviceId,
+// @ApiParam(name = "type", value = "name of the device type", required = true)
+// @PathParam("type") String deviceType,
+// @ApiParam(name = "limit", value = "limit of the records that needs to be picked up", required = false)
+// @QueryParam("limit") int limit);
- @GET
- @Path("filter/{type}/{parameter}")
- @ApiOperation(
- produces = MediaType.APPLICATION_JSON,
- httpMethod = "GET",
- value = "Getting the filtered devices",
- notes = "Get the list of devices based on the filter parameter",
- tags = "Device Event Management",
- extensions = {
- @Extension(properties = {
- @ExtensionProperty(name = Constants.SCOPE, value = "perm:device-types:events:view")
- })
- }
- )
- @ApiResponses(
- value = {
- @ApiResponse(
- code = 200,
- message = "OK. \n Successfully fetched the event.",
- response = EventRecords.class,
- responseHeaders = {
- @ResponseHeader(
- name = "Content-Type",
- description = "The content type of the body"),
- @ResponseHeader(
- name = "ETag",
- description = "Entity Tag of the response resource.\n" +
- "Used by caches, or in conditional requests."),
- @ResponseHeader(
- name = "Last-Modified",
- description =
- "Date and time the resource was last modified.\n" +
- "Used by caches, or in conditional requests."),
- }
- ),
- @ApiResponse(
- code = 400,
- message =
- "Bad Request. \n"),
- @ApiResponse(
- code = 406,
- message = "Not Acceptable.\n The requested media type is not supported"),
- @ApiResponse(
- code = 500,
- message = "Internal Server Error. \n Server error occurred while fetching the " +
- "list of supported device types.",
- response = ErrorResponse.class)
- }
- )
- Response getFilteredDevices(
- @ApiParam(name = "type", value = "name of the device type", required = true)
- @PathParam("type") String deviceType,
- @ApiParam(name = "type", value = "name of the parameter", required = true)
- @PathParam("type") String parameter,
- @ApiParam(name = "limit", value = "minimum value the parameter can have", required = false)
- @QueryParam("min") double min,
- @ApiParam(name = "max", value = "max value the parameter can have", required = false)
- @QueryParam("max") double max
- );
+ //todo:amalka
+// @GET
+// @Path("filter/{type}/{parameter}")
+// @ApiOperation(
+// produces = MediaType.APPLICATION_JSON,
+// httpMethod = "GET",
+// value = "Getting the filtered devices",
+// notes = "Get the list of devices based on the filter parameter",
+// tags = "Device Event Management",
+// extensions = {
+// @Extension(properties = {
+// @ExtensionProperty(name = Constants.SCOPE, value = "perm:device-types:events:view")
+// })
+// }
+// )
+// @ApiResponses(
+// value = {
+// @ApiResponse(
+// code = 200,
+// message = "OK. \n Successfully fetched the event.",
+// response = EventRecords.class,
+// responseHeaders = {
+// @ResponseHeader(
+// name = "Content-Type",
+// description = "The content type of the body"),
+// @ResponseHeader(
+// name = "ETag",
+// description = "Entity Tag of the response resource.\n" +
+// "Used by caches, or in conditional requests."),
+// @ResponseHeader(
+// name = "Last-Modified",
+// description =
+// "Date and time the resource was last modified.\n" +
+// "Used by caches, or in conditional requests."),
+// }
+// ),
+// @ApiResponse(
+// code = 400,
+// message =
+// "Bad Request. \n"),
+// @ApiResponse(
+// code = 406,
+// message = "Not Acceptable.\n The requested media type is not supported"),
+// @ApiResponse(
+// code = 500,
+// message = "Internal Server Error. \n Server error occurred while fetching the " +
+// "list of supported device types.",
+// response = ErrorResponse.class)
+// }
+// )
+// Response getFilteredDevices(
+// @ApiParam(name = "type", value = "name of the device type", required = true)
+// @PathParam("type") String deviceType,
+// @ApiParam(name = "type", value = "name of the parameter", required = true)
+// @PathParam("type") String parameter,
+// @ApiParam(name = "limit", value = "minimum value the parameter can have", required = false)
+// @QueryParam("min") double min,
+// @ApiParam(name = "max", value = "max value the parameter can have", required = false)
+// @QueryParam("max") double max
+// );
@GET
@Path("/{type}")
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java
index 01145b05ec1..eb1d9524916 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java
@@ -107,68 +107,86 @@ import java.util.List;
name = "Getting Details of Registered Devices",
description = "Getting Details of Registered Devices",
key = "perm:devices:view",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/owning-device/view"}
),
@Scope(
name = "Getting Details of a Device",
description = "Getting Details of a Device",
key = "perm:devices:details",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/owning-device/view"}
),
@Scope(
name = "Update the device specified by device id",
description = "Update the device specified by device id",
key = "perm:devices:update",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/owning-device/view"}
),
@Scope(
name = "Delete the device specified by device id",
description = "Delete the device specified by device id",
key = "perm:devices:delete",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/owning-device/view"}
),
@Scope(
name = "Getting Feature Details of a Device",
description = "Getting Feature Details of a Device",
key = "perm:devices:features",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/owning-device/view"}
),
@Scope(
name = "Advanced Search for Devices",
description = "Advanced Search for Devices",
key = "perm:devices:search",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/owning-device/view"}
),
@Scope(
name = "Getting Installed Application Details of a Device",
description = "Getting Installed Application Details of a Device",
key = "perm:devices:applications",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/owning-device/view"}
),
@Scope(
name = "Getting Device Operation Details",
description = "Getting Device Operation Details",
key = "perm:devices:operations",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/owning-device/view"}
),
@Scope(
name = "Get the details of the policy that is enforced on a device.",
description = "Get the details of the policy that is enforced on a device.",
key = "perm:devices:effective-policy",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/owning-device/view"}
),
@Scope(
name = "Getting Policy Compliance Details of a Device",
description = "Getting Policy Compliance Details of a Device",
key = "perm:devices:compliance-data",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/owning-device/view"}
),
@Scope(
name = "Change device status.",
description = "Change device status.",
key = "perm:devices:change-status",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/change-status"}
),
+ @Scope(
+ name = "Enroll Device",
+ description = "Register a device",
+ key = "perm:device:enroll",
+ roles = {"Internal/devicemgt-user"},
+ permissions = {"/device-mgt/devices/owning-device/add"}
+ ),
}
)
@Path("/devices")
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceTypeManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceTypeManagementService.java
index c3284335966..933ce64517e 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceTypeManagementService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceTypeManagementService.java
@@ -87,24 +87,28 @@ import javax.ws.rs.core.Response;
name = "Getting the Supported Device Platforms",
description = "Getting the Supported Device Platforms",
key = "perm:device-types:types",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/device-type/view"}
),
@Scope(
name = "Get Feature Details of a Device Type",
description = "Get Feature Details of a Device Type",
key = "perm:device-types:features",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/device-type/features/view"}
),
@Scope(
name = "Get Config Details of a Device Type",
description = "Get Config Details of a Device Type",
key = "perm:device-types:configs",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/device-type/config/view"}
),
@Scope(
name = "Getting Details of Policies",
description = "Getting Details of Policies",
key = "perm:policies:get-details",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/policies/view"}
)
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GeoLocationBasedService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GeoLocationBasedService.java
index a2a69798032..75fb07ef871 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GeoLocationBasedService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GeoLocationBasedService.java
@@ -73,18 +73,21 @@ import java.util.List;
name = "View Analytics",
description = "",
key = "perm:geo-service:analytics-view",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/owning-device/view-analytics"}
),
@Scope(
name = "Manage Alerts",
description = "",
key = "perm:geo-service:alerts-manage",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/owning-device/manage-alerts"}
),
@Scope(
name = "Manage Geo Fences",
description = "",
key = "perm:geo-service:geo-fence",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/owning-device/manage-geo-fence"}
)
}
@@ -96,71 +99,72 @@ public interface GeoLocationBasedService {
/**
* Retrieve Analytics for the device type
*/
- @GET
- @Path("stats/{deviceType}/{deviceId}")
- @ApiOperation(
- consumes = "application/json",
- produces = "application/json",
- httpMethod = "GET",
- value = "Getting the Location Details of a Device",
- notes = "Get the location details of a device during a define time period.",
- response = Response.class,
- tags = "Geo Service Management",
- extensions = {
- @Extension(properties = {
- @ExtensionProperty(name = Constants.SCOPE, value = "perm:geo-service:analytics-view")
- })
- }
- )
- @ApiResponses(value = {
- @ApiResponse(
- code = 200,
- message = "OK.",
- response = Response.class,
- responseHeaders = {
- @ResponseHeader(
- name = "Content-Type",
- description = "The content type of the body"),
- @ResponseHeader(
- name = "Last-Modified",
- description = "Date and time the resource was last modified.\n" +
- "Used by caches, or in conditional requests."),
- }),
- @ApiResponse(
- code = 400,
- message = "Bad Request. \n Invalid Device Identifiers found.",
- response = Response.class),
- @ApiResponse(
- code = 401,
- message = "Unauthorized. \n Unauthorized request."),
- @ApiResponse(
- code = 500,
- message = "Internal Server Error. \n Error on retrieving stats",
- response = Response.class)
- })
- Response getGeoDeviceStats(
- @ApiParam(
- name = "deviceId",
- value = "The device ID.",
- required = true)
- @PathParam("deviceId") String deviceId,
- @ApiParam(
- name = "device-type",
- value = "The device type, such as ios, android, or windows.",
- required = true)
- @PathParam("deviceType")
- @Size(max = 45)
- String deviceType,
- @ApiParam(
- name = "from",
- value = "Define the time to start getting the geo location history of the device in the Epoch or UNIX format.",
- required = true)
- @QueryParam("from") long from,
- @ApiParam(
- name = "to",
- value = "Define the time to finish getting the geo location history of the device in the Epoch or UNIX format.",
- required = true)
- @QueryParam("to") long to);
+ //todo:amalka
+// @GET
+// @Path("stats/{deviceType}/{deviceId}")
+// @ApiOperation(
+// consumes = "application/json",
+// produces = "application/json",
+// httpMethod = "GET",
+// value = "Getting the Location Details of a Device",
+// notes = "Get the location details of a device during a define time period.",
+// response = Response.class,
+// tags = "Geo Service Management",
+// extensions = {
+// @Extension(properties = {
+// @ExtensionProperty(name = Constants.SCOPE, value = "perm:geo-service:analytics-view")
+// })
+// }
+// )
+// @ApiResponses(value = {
+// @ApiResponse(
+// code = 200,
+// message = "OK.",
+// response = Response.class,
+// responseHeaders = {
+// @ResponseHeader(
+// name = "Content-Type",
+// description = "The content type of the body"),
+// @ResponseHeader(
+// name = "Last-Modified",
+// description = "Date and time the resource was last modified.\n" +
+// "Used by caches, or in conditional requests."),
+// }),
+// @ApiResponse(
+// code = 400,
+// message = "Bad Request. \n Invalid Device Identifiers found.",
+// response = Response.class),
+// @ApiResponse(
+// code = 401,
+// message = "Unauthorized. \n Unauthorized request."),
+// @ApiResponse(
+// code = 500,
+// message = "Internal Server Error. \n Error on retrieving stats",
+// response = Response.class)
+// })
+// Response getGeoDeviceStats(
+// @ApiParam(
+// name = "deviceId",
+// value = "The device ID.",
+// required = true)
+// @PathParam("deviceId") String deviceId,
+// @ApiParam(
+// name = "device-type",
+// value = "The device type, such as ios, android, or windows.",
+// required = true)
+// @PathParam("deviceType")
+// @Size(max = 45)
+// String deviceType,
+// @ApiParam(
+// name = "from",
+// value = "Define the time to start getting the geo location history of the device in the Epoch or UNIX format.",
+// required = true)
+// @QueryParam("from") long from,
+// @ApiParam(
+// name = "to",
+// value = "Define the time to finish getting the geo location history of the device in the Epoch or UNIX format.",
+// required = true)
+// @QueryParam("to") long to);
/**
* Get data to show device locations in a map
@@ -720,128 +724,130 @@ public interface GeoLocationBasedService {
/**
* Retrieve Geo alerts history
*/
- @GET
- @Path("alerts/history/{deviceType}/{deviceId}")
- @ApiOperation(
- consumes = "application/json",
- produces = "application/json",
- httpMethod = "GET",
- value = "Getting the Geo Service Alert History of a Device",
- notes = "Get the geo alert history of a device during the defined time period.",
- response = Response.class,
- tags = "Geo Service Management",
- extensions = {
- @Extension(properties = {
- @ExtensionProperty(name = Constants.SCOPE, value = "perm:geo-service:alerts-manage")
- })
- }
- )
- @ApiResponses(value = {
- @ApiResponse(
- code = 200,
- message = "OK.",
- response = Response.class,
- responseHeaders = {
- @ResponseHeader(
- name = "Content-Type",
- description = "The content type of the body"),
- @ResponseHeader(
- name = "Last-Modified",
- description = "Date and time the resource was last modified.\n" +
- "Used by caches, or in conditional requests.")
- }),
- @ApiResponse(
- code = 400,
- message = "Bad Request. \n Invalid Device Identifiers found.",
- response = Response.class),
- @ApiResponse(
- code = 401,
- message = "Unauthorized. \n Unauthorized request."),
- @ApiResponse(
- code = 500,
- message = "Internal Server Error. \n Error on retrieving stats",
- response = Response.class)
- })
- Response getGeoAlertsHistory(
- @ApiParam(
- name = "deviceId",
- value = "The device ID.",
- required = true)
- @PathParam("deviceId") String deviceId,
- @ApiParam(
- name = "device-type",
- value = "The device type, such as ios, android, or windows.",
- required = true)
- @PathParam("deviceType")
- @Size(max = 45)
- String deviceType,
- @ApiParam(
- name = "from",
- value = "Define the time to start getting the geo location history of the device in the Epoch or UNIX format.",
- required = true)
- @QueryParam("from") long from,
- @ApiParam(
- name = "to",
- value = "Define the time to finish getting the geo location history of the device in the Epoch or UNIX format.",
- required = true)
- @QueryParam("to") long to);
+ //todo:amalka
+// @GET
+// @Path("alerts/history/{deviceType}/{deviceId}")
+// @ApiOperation(
+// consumes = "application/json",
+// produces = "application/json",
+// httpMethod = "GET",
+// value = "Getting the Geo Service Alert History of a Device",
+// notes = "Get the geo alert history of a device during the defined time period.",
+// response = Response.class,
+// tags = "Geo Service Management",
+// extensions = {
+// @Extension(properties = {
+// @ExtensionProperty(name = Constants.SCOPE, value = "perm:geo-service:alerts-manage")
+// })
+// }
+// )
+// @ApiResponses(value = {
+// @ApiResponse(
+// code = 200,
+// message = "OK.",
+// response = Response.class,
+// responseHeaders = {
+// @ResponseHeader(
+// name = "Content-Type",
+// description = "The content type of the body"),
+// @ResponseHeader(
+// name = "Last-Modified",
+// description = "Date and time the resource was last modified.\n" +
+// "Used by caches, or in conditional requests.")
+// }),
+// @ApiResponse(
+// code = 400,
+// message = "Bad Request. \n Invalid Device Identifiers found.",
+// response = Response.class),
+// @ApiResponse(
+// code = 401,
+// message = "Unauthorized. \n Unauthorized request."),
+// @ApiResponse(
+// code = 500,
+// message = "Internal Server Error. \n Error on retrieving stats",
+// response = Response.class)
+// })
+// Response getGeoAlertsHistory(
+// @ApiParam(
+// name = "deviceId",
+// value = "The device ID.",
+// required = true)
+// @PathParam("deviceId") String deviceId,
+// @ApiParam(
+// name = "device-type",
+// value = "The device type, such as ios, android, or windows.",
+// required = true)
+// @PathParam("deviceType")
+// @Size(max = 45)
+// String deviceType,
+// @ApiParam(
+// name = "from",
+// value = "Define the time to start getting the geo location history of the device in the Epoch or UNIX format.",
+// required = true)
+// @QueryParam("from") long from,
+// @ApiParam(
+// name = "to",
+// value = "Define the time to finish getting the geo location history of the device in the Epoch or UNIX format.",
+// required = true)
+// @QueryParam("to") long to);
/**
* Retrieve Geo alerts history for geo clusters
*/
- @GET
- @Path("alerts/history")
- @ApiOperation(
- consumes = "application/json",
- produces = "application/json",
- httpMethod = "GET",
- value = "Retrieve Geo alerts history for geo clusters",
- notes = "Retrieving geo alert history of all defined alerts for geo clusters",
- response = Response.class,
- tags = "Geo Service Management",
- extensions = {
- @Extension(properties = {
- @ExtensionProperty(name = Constants.SCOPE, value = "perm:geo-service:alerts-manage")
- })
- }
- )
- @ApiResponses(value = {
- @ApiResponse(
- code = 200,
- message = "OK.",
- response = Response.class,
- responseHeaders = {
- @ResponseHeader(
- name = "Content-Type",
- description = "The content type of the body"),
- @ResponseHeader(
- name = "Last-Modified",
- description = "Date and time the resource was last modified.\n" +
- "Used by caches, or in conditional requests.")
- }),
- @ApiResponse(
- code = 400,
- message = "Bad Request. \n Invalid Device Identifiers found.",
- response = Response.class),
- @ApiResponse(
- code = 401,
- message = "Unauthorized. \n Unauthorized request."),
- @ApiResponse(
- code = 500,
- message = "Internal Server Error. \n Error on retrieving stats",
- response = Response.class)
- })
- Response getGeoAlertsHistoryForGeoClusters(
- @ApiParam(
- name = "from",
- value = "Get stats from what time",
- required = true)
- @QueryParam("from") long from,
- @ApiParam(
- name = "to",
- value = "Get stats up to what time",
- required = true)
- @QueryParam("to") long to);
+ //todo:amalka
+// @GET
+// @Path("alerts/history")
+// @ApiOperation(
+// consumes = "application/json",
+// produces = "application/json",
+// httpMethod = "GET",
+// value = "Retrieve Geo alerts history for geo clusters",
+// notes = "Retrieving geo alert history of all defined alerts for geo clusters",
+// response = Response.class,
+// tags = "Geo Service Management",
+// extensions = {
+// @Extension(properties = {
+// @ExtensionProperty(name = Constants.SCOPE, value = "perm:geo-service:alerts-manage")
+// })
+// }
+// )
+// @ApiResponses(value = {
+// @ApiResponse(
+// code = 200,
+// message = "OK.",
+// response = Response.class,
+// responseHeaders = {
+// @ResponseHeader(
+// name = "Content-Type",
+// description = "The content type of the body"),
+// @ResponseHeader(
+// name = "Last-Modified",
+// description = "Date and time the resource was last modified.\n" +
+// "Used by caches, or in conditional requests.")
+// }),
+// @ApiResponse(
+// code = 400,
+// message = "Bad Request. \n Invalid Device Identifiers found.",
+// response = Response.class),
+// @ApiResponse(
+// code = 401,
+// message = "Unauthorized. \n Unauthorized request."),
+// @ApiResponse(
+// code = 500,
+// message = "Internal Server Error. \n Error on retrieving stats",
+// response = Response.class)
+// })
+// Response getGeoAlertsHistoryForGeoClusters(
+// @ApiParam(
+// name = "from",
+// value = "Get stats from what time",
+// required = true)
+// @QueryParam("from") long from,
+// @ApiParam(
+// name = "to",
+// value = "Get stats up to what time",
+// required = true)
+// @QueryParam("to") long to);
/**
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GroupManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GroupManagementService.java
index 6ad3b14bd7d..78b299346b8 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GroupManagementService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GroupManagementService.java
@@ -99,84 +99,98 @@ import java.util.List;
name = "Get the list of groups belongs to current user.",
description = "Get the list of groups belongs to current user.",
key = "perm:groups:groups",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/groups/view"}
),
@Scope(
name = "Get the count of groups belongs to current user.",
description = "Get the count of groups belongs to current user.",
key = "perm:groups:count",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/groups/view"}
),
@Scope(
name = "Add new device group to the system.",
description = "Add new device group to the system.",
key = "perm:groups:add",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/groups/add"}
),
@Scope(
name = "View group specified",
description = "View group specified",
key = "perm:groups:groups-view",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/groups/view"}
),
@Scope(
name = "Update a group",
description = "Update a group",
key = "perm:groups:update",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/groups/update"}
),
@Scope(
name = "Delete a group",
description = "Delete a group",
key = "perm:groups:remove",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/groups/remove"}
),
@Scope(
name = "Manage group sharing with a user",
description = "Manage group sharing with a user",
key = "perm:groups:share",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/groups/share"}
),
@Scope(
name = "View list of roles of a device group",
description = "View list of roles of a device group",
key = "perm:groups:roles",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/groups/roles/view"}
),
@Scope(
name = "View list of devices in the device group",
description = "View list of devices in the device group",
key = "perm:groups:devices",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/groups/devices/view"}
),
@Scope(
name = "View list of device count in the device group",
description = "View list of device count in the device group",
key = "perm:groups:devices-count",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/groups/devices/view"}
),
@Scope(
name = "Add devices to group",
description = "Add devices to group",
key = "perm:groups:devices-add",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/groups/devices/add"}
),
@Scope(
name = "Remove devices from group",
description = "Remove devices from group",
key = "perm:groups:devices-remove",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/groups/devices/remove"}
),
@Scope(
name = "Assign devices to groups",
description = "Assign devices to groups",
key = "perm:groups:assign",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/groups/devices/add"}
),
@Scope(
name = "List of groups that have the device",
description = "List of groups that have the device",
key = "perm:groups:device",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/groups/devices/view"}
)
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/MetadataService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/MetadataService.java
index 3a22364ed56..446944729ba 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/MetadataService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/MetadataService.java
@@ -73,24 +73,28 @@ import javax.ws.rs.core.Response;
name = "View metadata records",
description = "View metadata records",
key = "perm:metadata:view",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/metadata/view"}
),
@Scope(
name = "Create a metadata record",
description = "Create a metadata record",
key = "perm:metadata:create",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/metadata/create"}
),
@Scope(
name = "Update a metadata record",
description = "Updating a specified metadata record",
key = "perm:metadata:update",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/metadata/update"}
),
@Scope(
name = "Delete a metadata record",
description = "Delete a specified metadata record",
key = "perm:metadata:remove",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/metadata/remove"}
)
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/NotificationManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/NotificationManagementService.java
index 71d173c11f0..7de2265e59a 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/NotificationManagementService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/NotificationManagementService.java
@@ -73,12 +73,14 @@ import javax.ws.rs.core.Response;
name = "Getting All Device Notification Details",
description = "Getting All Device Notification Details",
key = "perm:notifications:view",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/notifications/view"}
),
@Scope(
name = "Updating the Device Notification Status",
description = "Updating the Device Notification Status",
key = "perm:notifications:mark-checked",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/notifications/view"}
)
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/PolicyManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/PolicyManagementService.java
index 607a4a8ef0b..a84d4e7f038 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/PolicyManagementService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/PolicyManagementService.java
@@ -79,60 +79,70 @@ import java.util.List;
name = "Adding a Policy",
description = "Adding a Policy",
key = "perm:policies:manage",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/policies/manage"}
),
@Scope(
name = "Getting Details of Policies",
description = "Getting Details of Policies",
key = "perm:policies:get-details",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/policies/view"}
),
@Scope(
name = "Getting Details of a Policy",
description = "Getting Details of a Policy",
key = "perm:policies:get-policy-details",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/policies/view"}
),
@Scope(
name = "Updating a Policy",
description = "Updating a Policy",
key = "perm:policies:update",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/policies/manage"}
),
@Scope(
name = "Removing Multiple Policies",
description = "Removing Multiple Policies",
key = "perm:policies:remove",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/policies/manage"}
),
@Scope(
name = "Activating Policies",
description = "Activating Policies",
key = "perm:policies:activate",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/policies/manage"}
),
@Scope(
name = "Deactivating Policies",
description = "Deactivating Policies",
key = "perm:policies:deactivate",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/policies/manage"}
),
@Scope(
name = "Applying Changes on Policies",
description = "Applying Changes on Policies",
key = "perm:policies:changes",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/policies/manage"}
),
@Scope(
name = "Updating the Policy Priorities",
description = "Updating the Policy Priorities",
key = "perm:policies:priorities",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/policies/manage"}
),
@Scope(
name = "Fetching the Effective Policy",
description = "Fetching the Effective Policy",
key = "perm:policies:effective-policy",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/policies/view"}
)
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RemoteSessionService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RemoteSessionService.java
index 9717ce1c27f..010e7ffecaa 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RemoteSessionService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RemoteSessionService.java
@@ -61,6 +61,7 @@ import javax.ws.rs.core.Response;
name = "Remote Session Connection",
description = "",
key = "perm:remote-session-service:connect",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/owning-device/remote-session"}
)
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ReportManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ReportManagementService.java
index 3f1f88a6c6b..00929b71b08 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ReportManagementService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ReportManagementService.java
@@ -66,6 +66,7 @@ import java.util.List;
name = "Getting Details of Registered Devices",
description = "Getting Details of Registered Devices",
key = "perm:devices:view",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/owning-device/view"}
),
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RoleManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RoleManagementService.java
index ebc4c49984a..d0e8f0d2013 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RoleManagementService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RoleManagementService.java
@@ -53,48 +53,56 @@ import java.util.List;
name = "Getting the List of Roles",
description = "Getting the List of Roles",
key = "perm:roles:view",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/roles/view"}
),
@Scope(
name = "Getting Permission Details of a Role",
description = "Getting Permission Details of a Role",
key = "perm:roles:permissions",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/roles/view"}
),
@Scope(
name = "Getting the List of Roles",
description = "Getting the List of Roles",
key = "perm:roles:details",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/roles/view"}
),
@Scope(
name = "Adding a Role",
description = "Adding a Role",
key = "perm:roles:add",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/roles/manage"}
),
@Scope(
name = "Adding a combined Role",
description = "Adding a combined Role",
key = "perm:roles:create-combined-role",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/roles/manage"}
),
@Scope(
name = "Updating Role Details",
description = "Updating Role Details",
key = "perm:roles:update",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/roles/manage"}
),
@Scope(
name = "Deleting a Role",
description = "Deleting a Role",
key = "perm:roles:delete",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/roles/manage"}
),
@Scope(
name = "Adding Users to a Role",
description = "Adding Users to a Role",
key = "perm:roles:add-users",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/roles/manage"}
)
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/UserManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/UserManagementService.java
index 5e580f6a066..f27d7400992 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/UserManagementService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/UserManagementService.java
@@ -97,78 +97,91 @@ import javax.ws.rs.core.Response;
name = "Adding a User",
description = "Adding a User",
key = "perm:users:add",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/users/manage"}
),
@Scope(
name = "Getting Details of a User",
description = "Getting Details of a User",
key = "perm:users:details",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/users/view"}
),
@Scope(
name = "Updating Details of a User",
description = "Updating Details of a User",
key = "perm:users:update",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/users/manage"}
),
@Scope(
name = "Deleting a User",
description = "Deleting a User",
key = "perm:users:delete",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/users/manage"}
),
@Scope(
name = "Getting the Role Details of a User",
description = "Getting the Role Details of a User",
key = "perm:users:roles",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/users/view"}
),
@Scope(
name = "Getting Details of Users",
description = "Getting Details of Users",
key = "perm:users:user-details",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/users/view"}
),
@Scope(
name = "Getting the User Count",
description = "Getting the User Count",
key = "perm:users:count",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/users/view"}
),
@Scope(
name = "Getting the User existence status",
description = "Getting the User existence status",
key = "perm:users:is-exist",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/users/view"}
),
@Scope(
name = "Searching for a User Name",
description = "Searching for a User Name",
key = "perm:users:search",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/users/view"}
),
@Scope(
name = "Changing the User Password",
description = "Adding a User",
key = "perm:users:credentials",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/login"}
),
@Scope(
name = "Sending Enrollment Invitations to Users",
description = "Sending Enrollment Invitations to Users",
key = "perm:users:send-invitation",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/users/manage"}
),
@Scope(
name = "Get activities",
description = "Get activities",
key = "perm:get-activity",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/owning-device/view"}
),
@Scope(
name = "Getting the Permissions of the User",
description = "Getting the Permissions of the User",
key = "perm:user:permission-view",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/login"}
)
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/ApplicationManagementAdminService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/ApplicationManagementAdminService.java
index 92c42bfb3bf..f87d256ef55 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/ApplicationManagementAdminService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/ApplicationManagementAdminService.java
@@ -67,12 +67,14 @@ import javax.ws.rs.core.Response;
name = "Installing an Application (Internal API)",
description = "Installing an Application (Internal API)",
key = "perm:applications:install",
+ roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/applications/manage"}
),
@Scope(
name = "Uninstalling an Application (Internal API)",
description = "Uninstalling an Application (Internal API)",
key = "perm:applications:uninstall",
+ roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/applications/manage"}
)
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceAccessAuthorizationAdminService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceAccessAuthorizationAdminService.java
index 6a4b12d72ea..45a8fe606be 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceAccessAuthorizationAdminService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceAccessAuthorizationAdminService.java
@@ -67,6 +67,7 @@ import javax.ws.rs.core.Response;
name = "Verify device authorization",
description = "Verify device authorization",
key = "perm:authorization:verify",
+ roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/authorization/verify"}
)
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceAnalyticsArtifactUploaderAdminService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceAnalyticsArtifactUploaderAdminService.java
index 94220ef8cd2..0deeafb2b59 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceAnalyticsArtifactUploaderAdminService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceAnalyticsArtifactUploaderAdminService.java
@@ -57,6 +57,7 @@ import javax.ws.rs.core.Response;
name = "Devicetype deployment",
description = "Deploy devicetype",
key = "perm:devicetype:deployment",
+ roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devicetype/deploy"}
)
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceManagementAdminService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceManagementAdminService.java
index a5d8adf59cc..3079dd4ad3f 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceManagementAdminService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceManagementAdminService.java
@@ -94,18 +94,21 @@ import java.util.List;
name = "Getting Details of a Device",
description = "Getting Details of a Device",
key = "perm:admin:devices:view",
+ roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/view"}
),
@Scope(
name = "Update the Device Owner",
description = "Update the ownership of the device",
key = "perm:admin:devices:update-enrollment",
+ roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/admin/devices/update-enrollment"}
),
@Scope(
name = "Permanently Delete the device specified by device id",
description = "Permanently Delete the device specified by device id",
key = "perm:devices:permanent-delete",
+ roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/admin/devices/permanent-delete"}
)
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceTypeManagementAdminService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceTypeManagementAdminService.java
index 899f84ec70a..4449f1e60d3 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceTypeManagementAdminService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceTypeManagementAdminService.java
@@ -92,18 +92,21 @@ import javax.ws.rs.core.Response;
name = "Manage a Device Type",
description = "Add, Edit or View a Device Type",
key = "perm:admin:device-type",
+ roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/admin/device-type"}
),
@Scope(
name = "Getting Details of a Device Type",
description = "Getting Details of a Device Type",
key = "perm:admin:device-type:view",
+ roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/admin/device-type/view"}
),
@Scope(
name = "Add Device Type Config",
description = "Add Platform Config of a Device Type",
key = "perm:admin:device-type:configs",
+ roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/admin/device-type/config"}
)
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/GroupManagementAdminService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/GroupManagementAdminService.java
index d7b8553b204..8fd956e9fcc 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/GroupManagementAdminService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/GroupManagementAdminService.java
@@ -86,18 +86,21 @@ import javax.ws.rs.core.Response;
name = "View groups",
description = "",
key = "perm:admin-groups:view",
+ roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/admin/groups/view"}
),
@Scope(
name = "Count groups",
description = "",
key = "perm:admin-groups:count",
+ roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/admin/groups/view"}
),
@Scope(
name = "Add groups",
description = "",
key = "perm:admin-groups:add",
+ roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/admin/groups/add"}
)
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/UserManagementAdminService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/UserManagementAdminService.java
index bbe64367c45..29260f31e08 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/UserManagementAdminService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/UserManagementAdminService.java
@@ -53,12 +53,14 @@ import javax.ws.rs.core.Response;
name = "View Users",
description = "View Users",
key = "perm:admin-users:view",
+ roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/users/manage"}
),
@Scope(
name = "Delete Users Device Information",
description = "Delete users device details",
key = "perm:admin-users:remove",
+ roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/users/manage"}
)
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceAgentServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceAgentServiceImpl.java
index f759ed13a9c..47126e22dad 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceAgentServiceImpl.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceAgentServiceImpl.java
@@ -26,7 +26,6 @@ import org.apache.axis2.AxisFault;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.context.PrivilegedCarbonContext;
-import org.wso2.carbon.device.mgt.analytics.data.publisher.exception.DataPublisherConfigurationException;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
@@ -36,7 +35,6 @@ import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.exceptions.InvalidConfigurationException;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
-import org.wso2.carbon.device.mgt.common.policy.mgt.Policy;
import org.wso2.carbon.device.mgt.common.policy.mgt.monitor.ComplianceFeature;
import org.wso2.carbon.device.mgt.common.policy.mgt.monitor.PolicyComplianceException;
import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService;
@@ -52,7 +50,6 @@ import org.wso2.carbon.event.stream.stub.types.EventStreamAttributeDto;
import org.wso2.carbon.event.stream.stub.types.EventStreamDefinitionDto;
import org.wso2.carbon.identity.jwt.client.extension.exception.JWTClientException;
import org.wso2.carbon.policy.mgt.common.PolicyAdministratorPoint;
-import org.wso2.carbon.policy.mgt.common.PolicyEvaluationException;
import org.wso2.carbon.policy.mgt.common.PolicyManagementException;
import org.wso2.carbon.user.api.UserStoreException;
@@ -280,19 +277,20 @@ public class DeviceAgentServiceImpl implements DeviceAgentService {
i++;
}
- if (DeviceMgtAPIUtils.getEventPublisherService().publishEvent(DeviceMgtAPIUtils.getStreamDefinition(type
- , PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain())
- , Constants.DEFAULT_STREAM_VERSION, metaData
- , null, payloadData)) {
+ // todo: amalka: commented data publishing
+// if (DeviceMgtAPIUtils.getEventPublisherService().publishEvent(DeviceMgtAPIUtils.getStreamDefinition(type
+// , PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain())
+// , Constants.DEFAULT_STREAM_VERSION, metaData
+// , null, payloadData)) {
return Response.status(Response.Status.OK).build();
- } else {
- String msg = "Error occurred while publishing the event.";
- return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build();
- }
- } catch (DataPublisherConfigurationException e) {
- String msg = "Error occurred while publishing the event.";
- log.error(msg, e);
- return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build();
+// } else {
+// String msg = "Error occurred while publishing the event.";
+// return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build();
+// }
+// } catch (DataPublisherConfigurationException e) {
+// String msg = "Error occurred while publishing the event.";
+// log.error(msg, e);
+// return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build();
} catch (DeviceAccessAuthorizationException e) {
String msg = "Error occurred when checking for authorization";
log.error(msg, e);
@@ -380,19 +378,20 @@ public class DeviceAgentServiceImpl implements DeviceAgentService {
i++;
}
- if (DeviceMgtAPIUtils.getEventPublisherService().publishEvent(DeviceMgtAPIUtils.getStreamDefinition(type
- , PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain())
- , Constants.DEFAULT_STREAM_VERSION, metaData
- , null, payloadData)) {
+ // todo: amalka: commented data publishing
+// if (DeviceMgtAPIUtils.getEventPublisherService().publishEvent(DeviceMgtAPIUtils.getStreamDefinition(type
+// , PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain())
+// , Constants.DEFAULT_STREAM_VERSION, metaData
+// , null, payloadData)) {
return Response.status(Response.Status.OK).build();
- } else {
- String msg = "Error occurred while publishing the event.";
- return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build();
- }
- } catch (DataPublisherConfigurationException e) {
- String msg = "Error occurred while publishing the event.";
- log.error(msg, e);
- return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build();
+// } else {
+// String msg = "Error occurred while publishing the event.";
+// return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build();
+// }
+// } catch (DataPublisherConfigurationException e) {
+// String msg = "Error occurred while publishing the event.";
+// log.error(msg, e);
+// return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build();
} catch (DeviceAccessAuthorizationException e) {
String msg = "Error occurred when checking for authorization";
log.error(msg, e);
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceEventManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceEventManagementServiceImpl.java
index 6c04581110d..eda7ee48224 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceEventManagementServiceImpl.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceEventManagementServiceImpl.java
@@ -4,29 +4,13 @@ import org.apache.axis2.AxisFault;
import org.apache.axis2.client.Stub;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.analytics.api.AnalyticsDataAPI;
-import org.wso2.carbon.analytics.api.AnalyticsDataAPIUtil;
-import org.wso2.carbon.analytics.dataservice.commons.AnalyticsDataResponse;
-import org.wso2.carbon.analytics.dataservice.commons.SearchResultEntry;
-import org.wso2.carbon.analytics.dataservice.commons.SortByField;
-import org.wso2.carbon.analytics.dataservice.commons.SortType;
-import org.wso2.carbon.analytics.datasource.commons.Record;
-import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException;
-import org.wso2.carbon.analytics.stream.persistence.stub.EventStreamPersistenceAdminServiceEventStreamPersistenceAdminServiceExceptionException;
-import org.wso2.carbon.analytics.stream.persistence.stub.EventStreamPersistenceAdminServiceStub;
-import org.wso2.carbon.analytics.stream.persistence.stub.dto.AnalyticsTable;
-import org.wso2.carbon.analytics.stream.persistence.stub.dto.AnalyticsTableRecord;
import org.wso2.carbon.base.MultitenantConstants;
-import org.wso2.carbon.context.CarbonContext;
import org.wso2.carbon.context.PrivilegedCarbonContext;
-import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException;
-import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationException;
import org.wso2.carbon.device.mgt.jaxrs.beans.analytics.Attribute;
import org.wso2.carbon.device.mgt.jaxrs.beans.analytics.AttributeType;
import org.wso2.carbon.device.mgt.jaxrs.beans.analytics.DeviceTypeEvent;
import org.wso2.carbon.device.mgt.jaxrs.beans.analytics.EventAttributeList;
-import org.wso2.carbon.device.mgt.jaxrs.beans.analytics.EventRecords;
import org.wso2.carbon.device.mgt.jaxrs.beans.analytics.TransportType;
import org.wso2.carbon.device.mgt.jaxrs.service.api.DeviceEventManagementService;
import org.wso2.carbon.device.mgt.jaxrs.util.Constants;
@@ -43,21 +27,14 @@ import org.wso2.carbon.event.stream.stub.types.EventStreamDefinitionDto;
import org.wso2.carbon.identity.jwt.client.extension.exception.JWTClientException;
import org.wso2.carbon.user.api.UserStoreException;
-import javax.validation.Valid;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
-import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
-import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Response;
import java.rmi.RemoteException;
import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Comparator;
-import java.util.HashSet;
import java.util.List;
-import java.util.Set;
/**
@@ -81,49 +58,50 @@ public class DeviceEventManagementServiceImpl implements DeviceEventManagementSe
private static final String MQTT_CONTENT_VALIDATOR = "default";
private static final String TIMESTAMP_FIELD_NAME = "_timestamp";
- private static AnalyticsDataAPI getAnalyticsDataAPI() {
- PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
- AnalyticsDataAPI analyticsDataAPI =
- (AnalyticsDataAPI) ctx.getOSGiService(AnalyticsDataAPI.class, null);
- if (analyticsDataAPI == null) {
- String msg = "Analytics api service has not initialized.";
- log.error(msg);
- throw new IllegalStateException(msg);
- }
- return analyticsDataAPI;
- }
-
- private static EventRecords getAllEventsForDevice(String tableName, String query, List sortByFields
- , int offset, int limit) throws AnalyticsException {
- int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId();
- AnalyticsDataAPI analyticsDataAPI = getAnalyticsDataAPI();
- EventRecords eventRecords = new EventRecords();
- int eventCount = analyticsDataAPI.searchCount(tenantId, tableName, query);
- if (eventCount == 0) {
- eventRecords.setCount(0);
- }
- List resultEntries = analyticsDataAPI.search(tenantId, tableName, query, offset, limit,
- sortByFields);
- List recordIds = getRecordIds(resultEntries);
- AnalyticsDataResponse response = analyticsDataAPI.get(tenantId, tableName, 1, null, recordIds);
- eventRecords.setCount(eventCount);
- List records = AnalyticsDataAPIUtil.listRecords(analyticsDataAPI, response);
- records.sort(new Comparator() {
- @Override public int compare(Record r1, Record r2) {
- return Long.compare(r2.getTimestamp(), r1.getTimestamp());
- }
- });
- eventRecords.setList(records);
- return eventRecords;
- }
-
- private static List getRecordIds(List searchResults) {
- List ids = new ArrayList<>();
- for (SearchResultEntry searchResult : searchResults) {
- ids.add(searchResult.getId());
- }
- return ids;
- }
+ //todo:amalka
+// private static AnalyticsDataAPI getAnalyticsDataAPI() {
+// PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
+// AnalyticsDataAPI analyticsDataAPI =
+// (AnalyticsDataAPI) ctx.getOSGiService(AnalyticsDataAPI.class, null);
+// if (analyticsDataAPI == null) {
+// String msg = "Analytics api service has not initialized.";
+// log.error(msg);
+// throw new IllegalStateException(msg);
+// }
+// return analyticsDataAPI;
+// }
+
+// private static EventRecords getAllEventsForDevice(String tableName, String query, List sortByFields
+// , int offset, int limit) throws AnalyticsException {
+// int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId();
+// AnalyticsDataAPI analyticsDataAPI = getAnalyticsDataAPI();
+// EventRecords eventRecords = new EventRecords();
+// int eventCount = analyticsDataAPI.searchCount(tenantId, tableName, query);
+// if (eventCount == 0) {
+// eventRecords.setCount(0);
+// }
+// List resultEntries = analyticsDataAPI.search(tenantId, tableName, query, offset, limit,
+// sortByFields);
+// List recordIds = getRecordIds(resultEntries);
+// AnalyticsDataResponse response = analyticsDataAPI.get(tenantId, tableName, 1, null, recordIds);
+// eventRecords.setCount(eventCount);
+// List records = AnalyticsDataAPIUtil.listRecords(analyticsDataAPI, response);
+// records.sort(new Comparator() {
+// @Override public int compare(Record r1, Record r2) {
+// return Long.compare(r2.getTimestamp(), r1.getTimestamp());
+// }
+// });
+// eventRecords.setList(records);
+// return eventRecords;
+// }
+
+// private static List getRecordIds(List searchResults) {
+// List ids = new ArrayList<>();
+// for (SearchResultEntry searchResult : searchResults) {
+// ids.add(searchResult.getId());
+// }
+// return ids;
+// }
/**
* Retrieves the stream definition from das for the given device type.
@@ -195,65 +173,66 @@ public class DeviceEventManagementServiceImpl implements DeviceEventManagementSe
/**
* Deploy Event Stream, Receiver, Publisher and Store Configuration.
*/
- @POST
- @Path("/{type}")
- @Override
- public Response deployDeviceTypeEventDefinition(@PathParam("type") String deviceType,
- @QueryParam("skipPersist") boolean skipPersist,
- @QueryParam("isSharedWithAllTenants") boolean isSharedWithAllTenants,
- @Valid DeviceTypeEvent deviceTypeEvent) {
- TransportType transportType = deviceTypeEvent.getTransportType();
- EventAttributeList eventAttributes = deviceTypeEvent.getEventAttributeList();
- String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain();
- try {
- if (eventAttributes == null || eventAttributes.getList() == null || eventAttributes.getList().size() == 0 ||
- deviceType == null || transportType == null ||
- !DeviceMgtAPIUtils.getDeviceManagementService().getAvailableDeviceTypes().contains(deviceType)) {
- String errorMessage = "Invalid Payload";
- log.error(errorMessage);
- return Response.status(Response.Status.BAD_REQUEST).build();
- }
- String streamName = DeviceMgtAPIUtils.getStreamDefinition(deviceType, tenantDomain);
- String streamNameWithVersion = streamName + ":" + Constants.DEFAULT_STREAM_VERSION;
- publishStreamDefinitons(streamName, Constants.DEFAULT_STREAM_VERSION, deviceType, eventAttributes);
- publishEventReceivers(streamNameWithVersion, transportType, tenantDomain, isSharedWithAllTenants, deviceType);
- if (!skipPersist) {
- publishEventStore(streamName, Constants.DEFAULT_STREAM_VERSION, eventAttributes);
- }
- publishWebsocketPublisherDefinition(streamNameWithVersion, deviceType);
- try {
- PrivilegedCarbonContext.startTenantFlow();
- PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(
- MultitenantConstants.SUPER_TENANT_DOMAIN_NAME, true);
- if (!MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
- publishStreamDefinitons(streamName, Constants.DEFAULT_STREAM_VERSION, deviceType, eventAttributes);
- publishEventReceivers(streamNameWithVersion, transportType, tenantDomain, isSharedWithAllTenants, deviceType);
- }
- } finally {
- PrivilegedCarbonContext.endTenantFlow();
- }
- return Response.ok().build();
- } catch (AxisFault e) {
- log.error("Failed to create event definitions for tenantDomain:" + tenantDomain, e);
- return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
- } catch (RemoteException e) {
- log.error("Failed to connect with the remote services:" + tenantDomain, e);
- return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
- } catch (JWTClientException e) {
- log.error("Failed to generate jwt token for tenantDomain:" + tenantDomain, e);
- return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
- } catch (UserStoreException e) {
- log.error("Failed to connect with the user store, tenantDomain: " + tenantDomain, e);
- return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
- } catch (DeviceManagementException e) {
- log.error("Failed to access device management service, tenantDomain: " + tenantDomain, e);
- return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
- } catch (EventStreamPersistenceAdminServiceEventStreamPersistenceAdminServiceExceptionException e) {
- log.error("Failed to create event store for, tenantDomain: " + tenantDomain + " deviceType" + deviceType,
- e);
- return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
- }
- }
+ //todo:amalka
+// @POST
+// @Path("/{type}")
+// @Override
+// public Response deployDeviceTypeEventDefinition(@PathParam("type") String deviceType,
+// @QueryParam("skipPersist") boolean skipPersist,
+// @QueryParam("isSharedWithAllTenants") boolean isSharedWithAllTenants,
+// @Valid DeviceTypeEvent deviceTypeEvent) {
+// TransportType transportType = deviceTypeEvent.getTransportType();
+// EventAttributeList eventAttributes = deviceTypeEvent.getEventAttributeList();
+// String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain();
+// try {
+// if (eventAttributes == null || eventAttributes.getList() == null || eventAttributes.getList().size() == 0 ||
+// deviceType == null || transportType == null ||
+// !DeviceMgtAPIUtils.getDeviceManagementService().getAvailableDeviceTypes().contains(deviceType)) {
+// String errorMessage = "Invalid Payload";
+// log.error(errorMessage);
+// return Response.status(Response.Status.BAD_REQUEST).build();
+// }
+// String streamName = DeviceMgtAPIUtils.getStreamDefinition(deviceType, tenantDomain);
+// String streamNameWithVersion = streamName + ":" + Constants.DEFAULT_STREAM_VERSION;
+// publishStreamDefinitons(streamName, Constants.DEFAULT_STREAM_VERSION, deviceType, eventAttributes);
+// publishEventReceivers(streamNameWithVersion, transportType, tenantDomain, isSharedWithAllTenants, deviceType);
+// if (!skipPersist) {
+// publishEventStore(streamName, Constants.DEFAULT_STREAM_VERSION, eventAttributes);
+// }
+// publishWebsocketPublisherDefinition(streamNameWithVersion, deviceType);
+// try {
+// PrivilegedCarbonContext.startTenantFlow();
+// PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(
+// MultitenantConstants.SUPER_TENANT_DOMAIN_NAME, true);
+// if (!MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
+// publishStreamDefinitons(streamName, Constants.DEFAULT_STREAM_VERSION, deviceType, eventAttributes);
+// publishEventReceivers(streamNameWithVersion, transportType, tenantDomain, isSharedWithAllTenants, deviceType);
+// }
+// } finally {
+// PrivilegedCarbonContext.endTenantFlow();
+// }
+// return Response.ok().build();
+// } catch (AxisFault e) {
+// log.error("Failed to create event definitions for tenantDomain:" + tenantDomain, e);
+// return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
+// } catch (RemoteException e) {
+// log.error("Failed to connect with the remote services:" + tenantDomain, e);
+// return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
+// } catch (JWTClientException e) {
+// log.error("Failed to generate jwt token for tenantDomain:" + tenantDomain, e);
+// return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
+// } catch (UserStoreException e) {
+// log.error("Failed to connect with the user store, tenantDomain: " + tenantDomain, e);
+// return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
+// } catch (DeviceManagementException e) {
+// log.error("Failed to access device management service, tenantDomain: " + tenantDomain, e);
+// return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
+// } catch (EventStreamPersistenceAdminServiceEventStreamPersistenceAdminServiceExceptionException e) {
+// log.error("Failed to create event store for, tenantDomain: " + tenantDomain + " deviceType" + deviceType,
+// e);
+// return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
+// }
+// }
/**
* Delete device type specific artifacts from DAS.
@@ -349,175 +328,178 @@ public class DeviceEventManagementServiceImpl implements DeviceEventManagementSe
/**
* Returns device specific data for the give period of time.
*/
- @GET
- @Path("/{type}/{deviceId}")
- @Override
- public Response getData(@PathParam("deviceId") String deviceId, @QueryParam("from") long from,
- @QueryParam("to") long to, @PathParam("type") String deviceType, @QueryParam("offset")
- int offset, @QueryParam("limit") int limit) {
- if (from == 0 || to == 0) {
- String errorMessage = "Invalid values for from/to";
- return Response.status(Response.Status.BAD_REQUEST).entity(errorMessage).build();
- }
- if (limit == 0) {
- String errorMessage = "Invalid values for offset/limit";
- return Response.status(Response.Status.BAD_REQUEST).entity(errorMessage).build();
- }
- String fromDate = String.valueOf(from);
- String toDate = String.valueOf(to);
- String query = DEFAULT_META_DEVICE_ID_ATTRIBUTE + ":" + deviceId
- + " AND _timestamp : [" + fromDate + " TO " + toDate + "]";
- String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain();
- String sensorTableName = getTableName(DeviceMgtAPIUtils.getStreamDefinition(deviceType, tenantDomain));
- try {
- if (deviceType == null ||
- !DeviceMgtAPIUtils.getDeviceManagementService().getAvailableDeviceTypes().contains(deviceType)) {
- String errorMessage = "Invalid device type";
- log.error(errorMessage);
- return Response.status(Response.Status.BAD_REQUEST).build();
- }
- if (!DeviceMgtAPIUtils.getDeviceAccessAuthorizationService().isUserAuthorized(
- new DeviceIdentifier(deviceId, deviceType))) {
- return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build();
- }
- List sortByFields = new ArrayList<>();
- SortByField sortByField = new SortByField(TIMESTAMP_FIELD_NAME, SortType.DESC);
- sortByFields.add(sortByField);
- EventRecords eventRecords = getAllEventsForDevice(sensorTableName, query, sortByFields, offset, limit);
- return Response.status(Response.Status.OK.getStatusCode()).entity(eventRecords).build();
- } catch (AnalyticsException e) {
- String errorMsg = "Error on retrieving stats on table " + sensorTableName + " with query " + query;
- log.error(errorMsg);
- return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).entity(errorMsg).build();
- } catch (DeviceAccessAuthorizationException e) {
- log.error(e.getErrorMessage(), e);
- return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
- } catch (DeviceManagementException e) {
- String errorMsg = "Error on retrieving stats on table " + sensorTableName + " with query " + query;
- log.error(errorMsg);
- return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).entity(errorMsg).build();
- }
- }
+ //todo:amalka
+// @GET
+// @Path("/{type}/{deviceId}")
+// @Override
+// public Response getData(@PathParam("deviceId") String deviceId, @QueryParam("from") long from,
+// @QueryParam("to") long to, @PathParam("type") String deviceType, @QueryParam("offset")
+// int offset, @QueryParam("limit") int limit) {
+// if (from == 0 || to == 0) {
+// String errorMessage = "Invalid values for from/to";
+// return Response.status(Response.Status.BAD_REQUEST).entity(errorMessage).build();
+// }
+// if (limit == 0) {
+// String errorMessage = "Invalid values for offset/limit";
+// return Response.status(Response.Status.BAD_REQUEST).entity(errorMessage).build();
+// }
+// String fromDate = String.valueOf(from);
+// String toDate = String.valueOf(to);
+// String query = DEFAULT_META_DEVICE_ID_ATTRIBUTE + ":" + deviceId
+// + " AND _timestamp : [" + fromDate + " TO " + toDate + "]";
+// String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain();
+// String sensorTableName = getTableName(DeviceMgtAPIUtils.getStreamDefinition(deviceType, tenantDomain));
+// try {
+// if (deviceType == null ||
+// !DeviceMgtAPIUtils.getDeviceManagementService().getAvailableDeviceTypes().contains(deviceType)) {
+// String errorMessage = "Invalid device type";
+// log.error(errorMessage);
+// return Response.status(Response.Status.BAD_REQUEST).build();
+// }
+// if (!DeviceMgtAPIUtils.getDeviceAccessAuthorizationService().isUserAuthorized(
+// new DeviceIdentifier(deviceId, deviceType))) {
+// return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build();
+// }
+// List sortByFields = new ArrayList<>();
+// SortByField sortByField = new SortByField(TIMESTAMP_FIELD_NAME, SortType.DESC);
+// sortByFields.add(sortByField);
+// EventRecords eventRecords = getAllEventsForDevice(sensorTableName, query, sortByFields, offset, limit);
+// return Response.status(Response.Status.OK.getStatusCode()).entity(eventRecords).build();
+// } catch (AnalyticsException e) {
+// String errorMsg = "Error on retrieving stats on table " + sensorTableName + " with query " + query;
+// log.error(errorMsg);
+// return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).entity(errorMsg).build();
+// } catch (DeviceAccessAuthorizationException e) {
+// log.error(e.getErrorMessage(), e);
+// return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
+// } catch (DeviceManagementException e) {
+// String errorMsg = "Error on retrieving stats on table " + sensorTableName + " with query " + query;
+// log.error(errorMsg);
+// return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).entity(errorMsg).build();
+// }
+// }
/**
* Returns last known data points up to the limit if limit is specified. Otherwise returns last known data point.
* Limit parameter needs to be zero or positive.
*/
- @GET
- @Path("/last-known/{type}/{deviceId}")
- @Override
- public Response getLastKnownData(@PathParam("deviceId") String deviceId, @PathParam("type") String deviceType, @QueryParam("limit") int limit) {
- String query = DEFAULT_META_DEVICE_ID_ATTRIBUTE + ":" + deviceId;
- String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain();
- String sensorTableName = getTableName(DeviceMgtAPIUtils.getStreamDefinition(deviceType, tenantDomain));
- try {
- if (deviceType == null ||
- !DeviceMgtAPIUtils.getDeviceManagementService().getAvailableDeviceTypes().contains(deviceType)) {
- String errorMessage = "Invalid device type";
- log.error(errorMessage);
- return Response.status(Response.Status.BAD_REQUEST).build();
- }
- if (!DeviceMgtAPIUtils.getDeviceAccessAuthorizationService().isUserAuthorized(
- new DeviceIdentifier(deviceId, deviceType))) {
- return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build();
- }
- List sortByFields = new ArrayList<>();
- SortByField sortByField = new SortByField(TIMESTAMP_FIELD_NAME, SortType.DESC);
- sortByFields.add(sortByField);
- if (limit == 0) {
- EventRecords eventRecords = getAllEventsForDevice(sensorTableName, query, sortByFields, 0, 1);
- return Response.status(Response.Status.OK.getStatusCode()).entity(eventRecords).build();
- } else if (limit > 0) {
- EventRecords eventRecords = getAllEventsForDevice(sensorTableName, query, sortByFields, 0, limit);
- return Response.status(Response.Status.OK.getStatusCode()).entity(eventRecords).build();
- } else {
- String errorMessage = "Invalid limit value";
- return Response.status(Response.Status.BAD_REQUEST).entity(errorMessage).build();
- }
- } catch (AnalyticsException e) {
- String errorMsg = "Error on retrieving stats on table " + sensorTableName + " with query " + query;
- log.error(errorMsg);
- return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).entity(errorMsg).build();
- } catch (DeviceAccessAuthorizationException e) {
- log.error(e.getErrorMessage(), e);
- return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
- } catch (DeviceManagementException e) {
- String errorMsg = "Error on retrieving stats on table " + sensorTableName + " with query " + query;
- log.error(errorMsg);
- return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).entity(errorMsg).build();
- }
- }
+ //todo:amalka
+// @GET
+// @Path("/last-known/{type}/{deviceId}")
+// @Override
+// public Response getLastKnownData(@PathParam("deviceId") String deviceId, @PathParam("type") String deviceType, @QueryParam("limit") int limit) {
+// String query = DEFAULT_META_DEVICE_ID_ATTRIBUTE + ":" + deviceId;
+// String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain();
+// String sensorTableName = getTableName(DeviceMgtAPIUtils.getStreamDefinition(deviceType, tenantDomain));
+// try {
+// if (deviceType == null ||
+// !DeviceMgtAPIUtils.getDeviceManagementService().getAvailableDeviceTypes().contains(deviceType)) {
+// String errorMessage = "Invalid device type";
+// log.error(errorMessage);
+// return Response.status(Response.Status.BAD_REQUEST).build();
+// }
+// if (!DeviceMgtAPIUtils.getDeviceAccessAuthorizationService().isUserAuthorized(
+// new DeviceIdentifier(deviceId, deviceType))) {
+// return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build();
+// }
+// List sortByFields = new ArrayList<>();
+// SortByField sortByField = new SortByField(TIMESTAMP_FIELD_NAME, SortType.DESC);
+// sortByFields.add(sortByField);
+// if (limit == 0) {
+// EventRecords eventRecords = getAllEventsForDevice(sensorTableName, query, sortByFields, 0, 1);
+// return Response.status(Response.Status.OK.getStatusCode()).entity(eventRecords).build();
+// } else if (limit > 0) {
+// EventRecords eventRecords = getAllEventsForDevice(sensorTableName, query, sortByFields, 0, limit);
+// return Response.status(Response.Status.OK.getStatusCode()).entity(eventRecords).build();
+// } else {
+// String errorMessage = "Invalid limit value";
+// return Response.status(Response.Status.BAD_REQUEST).entity(errorMessage).build();
+// }
+// } catch (AnalyticsException e) {
+// String errorMsg = "Error on retrieving stats on table " + sensorTableName + " with query " + query;
+// log.error(errorMsg);
+// return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).entity(errorMsg).build();
+// } catch (DeviceAccessAuthorizationException e) {
+// log.error(e.getErrorMessage(), e);
+// return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
+// } catch (DeviceManagementException e) {
+// String errorMsg = "Error on retrieving stats on table " + sensorTableName + " with query " + query;
+// log.error(errorMsg);
+// return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).entity(errorMsg).build();
+// }
+// }
/**
* Returns the filterd device list. Devices are filterd using the paramter given and the timestamp of the record.
* parameter should given as a range.
*/
- @GET
- @Path("filter/{type}/{parameter}")
- @Override
- public Response getFilteredDevices(@PathParam("type") String deviceType, @PathParam("parameter") String parameter,
- @QueryParam("min") double min, @QueryParam("max") double max) {
- String query;
- Calendar c = java.util.Calendar.getInstance();
- long currentTimestamp = c.getTimeInMillis();
- long previousTimestamp = currentTimestamp - 300 * 1000;
- String fromDate = String.valueOf(previousTimestamp);
- String toDate = String.valueOf(currentTimestamp);
- if (min != 0 & max != 0) {
- query = parameter + " : [" + min + " TO " + max + "]" +
- " AND _timestamp : [" + fromDate + " TO " + toDate + "]";
- } else {
- String errorMessage = "The of range values need to be given";
- log.error(errorMessage);
- return Response.status(Response.Status.BAD_REQUEST).build();
- }
-
- String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain();
- String sensorTableName = getTableName(DeviceMgtAPIUtils.getStreamDefinition(deviceType, tenantDomain));
- try {
- if (deviceType == null ||
- !DeviceMgtAPIUtils.getDeviceManagementService().getAvailableDeviceTypes().contains(deviceType)) {
- String errorMessage = "Invalid device type";
- log.error(errorMessage);
- return Response.status(Response.Status.BAD_REQUEST).build();
- }
-
- List sortByFields = new ArrayList<>();
- SortByField sortByField = new SortByField(TIMESTAMP_FIELD_NAME, SortType.DESC);
- sortByFields.add(sortByField);
- EventRecords eventRecords = getAllEventsForDevice(sensorTableName, query, sortByFields, 0, 100);
- List filterdEvents = eventRecords.getRecord();
- List uniqueFilterdEvents = new ArrayList();
- Set devices = new HashSet<>();
-
- for (int i = 0; i < filterdEvents.size(); i++) {
- String deviceid = (String) filterdEvents.get(i).getValue("meta_deviceId");
- if (!devices.contains(deviceid) && DeviceMgtAPIUtils.getDeviceAccessAuthorizationService().isUserAuthorized(
- new DeviceIdentifier(deviceid, deviceType))) {
- devices.add(deviceid);
- uniqueFilterdEvents.add(filterdEvents.get(i));
- }
- }
-
- EventRecords filterdRecords = new EventRecords();
- filterdRecords.setList(uniqueFilterdEvents);
- return Response.status(Response.Status.OK.getStatusCode()).entity(filterdRecords).build();
-
- } catch (AnalyticsException e) {
- String errorMsg = "Error on retrieving stats on table " + sensorTableName + " with query " + query;
- log.error(errorMsg);
- return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).entity(errorMsg).build();
- } catch (DeviceManagementException e) {
- String errorMsg = "Error on retrieving stats on table " + sensorTableName + " with query " + query;
- log.error(errorMsg);
- return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).entity(errorMsg).build();
- } catch (DeviceAccessAuthorizationException e) {
- String errorMsg = "Error on retrieving stats on table " + sensorTableName + " with query " + query;
- log.error(errorMsg);
- return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build();
- }
- }
+ //todo:amalka
+// @GET
+// @Path("filter/{type}/{parameter}")
+// @Override
+// public Response getFilteredDevices(@PathParam("type") String deviceType, @PathParam("parameter") String parameter,
+// @QueryParam("min") double min, @QueryParam("max") double max) {
+// String query;
+// Calendar c = java.util.Calendar.getInstance();
+// long currentTimestamp = c.getTimeInMillis();
+// long previousTimestamp = currentTimestamp - 300 * 1000;
+// String fromDate = String.valueOf(previousTimestamp);
+// String toDate = String.valueOf(currentTimestamp);
+// if (min != 0 & max != 0) {
+// query = parameter + " : [" + min + " TO " + max + "]" +
+// " AND _timestamp : [" + fromDate + " TO " + toDate + "]";
+// } else {
+// String errorMessage = "The of range values need to be given";
+// log.error(errorMessage);
+// return Response.status(Response.Status.BAD_REQUEST).build();
+// }
+//
+// String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain();
+// String sensorTableName = getTableName(DeviceMgtAPIUtils.getStreamDefinition(deviceType, tenantDomain));
+// try {
+// if (deviceType == null ||
+// !DeviceMgtAPIUtils.getDeviceManagementService().getAvailableDeviceTypes().contains(deviceType)) {
+// String errorMessage = "Invalid device type";
+// log.error(errorMessage);
+// return Response.status(Response.Status.BAD_REQUEST).build();
+// }
+//
+// List sortByFields = new ArrayList<>();
+// SortByField sortByField = new SortByField(TIMESTAMP_FIELD_NAME, SortType.DESC);
+// sortByFields.add(sortByField);
+// EventRecords eventRecords = getAllEventsForDevice(sensorTableName, query, sortByFields, 0, 100);
+// List filterdEvents = eventRecords.getRecord();
+// List uniqueFilterdEvents = new ArrayList();
+// Set devices = new HashSet<>();
+//
+// for (int i = 0; i < filterdEvents.size(); i++) {
+// String deviceid = (String) filterdEvents.get(i).getValue("meta_deviceId");
+// if (!devices.contains(deviceid) && DeviceMgtAPIUtils.getDeviceAccessAuthorizationService().isUserAuthorized(
+// new DeviceIdentifier(deviceid, deviceType))) {
+// devices.add(deviceid);
+// uniqueFilterdEvents.add(filterdEvents.get(i));
+// }
+// }
+//
+// EventRecords filterdRecords = new EventRecords();
+// filterdRecords.setList(uniqueFilterdEvents);
+// return Response.status(Response.Status.OK.getStatusCode()).entity(filterdRecords).build();
+//
+// } catch (AnalyticsException e) {
+// String errorMsg = "Error on retrieving stats on table " + sensorTableName + " with query " + query;
+// log.error(errorMsg);
+// return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).entity(errorMsg).build();
+// } catch (DeviceManagementException e) {
+// String errorMsg = "Error on retrieving stats on table " + sensorTableName + " with query " + query;
+// log.error(errorMsg);
+// return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).entity(errorMsg).build();
+// } catch (DeviceAccessAuthorizationException e) {
+// String errorMsg = "Error on retrieving stats on table " + sensorTableName + " with query " + query;
+// log.error(errorMsg);
+// return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build();
+// }
+// }
private void publishEventReceivers(String streamNameWithVersion, TransportType transportType
@@ -613,47 +595,48 @@ public class DeviceEventManagementServiceImpl implements DeviceEventManagementSe
}
}
- private void publishEventStore(String streamName, String version, EventAttributeList eventAttributes)
- throws RemoteException, UserStoreException, JWTClientException,
- EventStreamPersistenceAdminServiceEventStreamPersistenceAdminServiceExceptionException {
- EventStreamPersistenceAdminServiceStub eventStreamPersistenceAdminServiceStub =
- DeviceMgtAPIUtils.getEventStreamPersistenceAdminServiceStub();
- try {
- AnalyticsTable analyticsTable = new AnalyticsTable();
- analyticsTable.setRecordStoreName(DEFAULT_EVENT_STORE_NAME);
- analyticsTable.setStreamVersion(version);
- analyticsTable.setTableName(streamName);
- analyticsTable.setMergeSchema(false);
- analyticsTable.setPersist(true);
- AnalyticsTableRecord analyticsTableRecords[] = new AnalyticsTableRecord[eventAttributes.getList().size() + 1];
- int i = 0;
- for (Attribute attribute : eventAttributes.getList()) {
- AnalyticsTableRecord analyticsTableRecord = new AnalyticsTableRecord();
- analyticsTableRecord.setColumnName(attribute.getName());
- analyticsTableRecord.setColumnType(attribute.getType().toString().toUpperCase());
- analyticsTableRecord.setFacet(false);
- analyticsTableRecord.setIndexed(false);
- analyticsTableRecord.setPersist(true);
- analyticsTableRecord.setPrimaryKey(false);
- analyticsTableRecord.setScoreParam(false);
- analyticsTableRecords[i] = analyticsTableRecord;
- i++;
- }
- AnalyticsTableRecord analyticsTableRecord = new AnalyticsTableRecord();
- analyticsTableRecord.setColumnName(DEFAULT_META_DEVICE_ID_ATTRIBUTE);
- analyticsTableRecord.setColumnType(AttributeType.STRING.toString().toUpperCase());
- analyticsTableRecord.setFacet(false);
- analyticsTableRecord.setIndexed(true);
- analyticsTableRecord.setPersist(true);
- analyticsTableRecord.setPrimaryKey(false);
- analyticsTableRecord.setScoreParam(false);
- analyticsTableRecords[i] = analyticsTableRecord;
- analyticsTable.setAnalyticsTableRecords(analyticsTableRecords);
- eventStreamPersistenceAdminServiceStub.addAnalyticsTable(analyticsTable);
- } finally {
- cleanup(eventStreamPersistenceAdminServiceStub);
- }
- }
+ //todo:amalka
+// private void publishEventStore(String streamName, String version, EventAttributeList eventAttributes)
+// throws RemoteException, UserStoreException, JWTClientException,
+// EventStreamPersistenceAdminServiceEventStreamPersistenceAdminServiceExceptionException {
+// EventStreamPersistenceAdminServiceStub eventStreamPersistenceAdminServiceStub =
+// DeviceMgtAPIUtils.getEventStreamPersistenceAdminServiceStub();
+// try {
+// AnalyticsTable analyticsTable = new AnalyticsTable();
+// analyticsTable.setRecordStoreName(DEFAULT_EVENT_STORE_NAME);
+// analyticsTable.setStreamVersion(version);
+// analyticsTable.setTableName(streamName);
+// analyticsTable.setMergeSchema(false);
+// analyticsTable.setPersist(true);
+// AnalyticsTableRecord analyticsTableRecords[] = new AnalyticsTableRecord[eventAttributes.getList().size() + 1];
+// int i = 0;
+// for (Attribute attribute : eventAttributes.getList()) {
+// AnalyticsTableRecord analyticsTableRecord = new AnalyticsTableRecord();
+// analyticsTableRecord.setColumnName(attribute.getName());
+// analyticsTableRecord.setColumnType(attribute.getType().toString().toUpperCase());
+// analyticsTableRecord.setFacet(false);
+// analyticsTableRecord.setIndexed(false);
+// analyticsTableRecord.setPersist(true);
+// analyticsTableRecord.setPrimaryKey(false);
+// analyticsTableRecord.setScoreParam(false);
+// analyticsTableRecords[i] = analyticsTableRecord;
+// i++;
+// }
+// AnalyticsTableRecord analyticsTableRecord = new AnalyticsTableRecord();
+// analyticsTableRecord.setColumnName(DEFAULT_META_DEVICE_ID_ATTRIBUTE);
+// analyticsTableRecord.setColumnType(AttributeType.STRING.toString().toUpperCase());
+// analyticsTableRecord.setFacet(false);
+// analyticsTableRecord.setIndexed(true);
+// analyticsTableRecord.setPersist(true);
+// analyticsTableRecord.setPrimaryKey(false);
+// analyticsTableRecord.setScoreParam(false);
+// analyticsTableRecords[i] = analyticsTableRecord;
+// analyticsTable.setAnalyticsTableRecords(analyticsTableRecords);
+// eventStreamPersistenceAdminServiceStub.addAnalyticsTable(analyticsTable);
+// } finally {
+// cleanup(eventStreamPersistenceAdminServiceStub);
+// }
+// }
private void publishWebsocketPublisherDefinition(String streamNameWithVersion, String deviceType)
throws RemoteException, UserStoreException, JWTClientException {
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java
index c0a5a4a6b4b..5d039f27a6b 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java
@@ -43,11 +43,11 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.context.CarbonContext;
import org.wso2.carbon.context.PrivilegedCarbonContext;
-import org.wso2.carbon.device.application.mgt.common.ApplicationInstallResponse;
-import org.wso2.carbon.device.application.mgt.common.SubscriptionType;
-import org.wso2.carbon.device.application.mgt.common.exception.SubscriptionManagementException;
-import org.wso2.carbon.device.application.mgt.common.services.SubscriptionManager;
-import org.wso2.carbon.device.application.mgt.core.util.HelperUtil;
+import io.entgra.application.mgt.common.ApplicationInstallResponse;
+import io.entgra.application.mgt.common.SubscriptionType;
+import io.entgra.application.mgt.common.exception.SubscriptionManagementException;
+import io.entgra.application.mgt.common.services.SubscriptionManager;
+import io.entgra.application.mgt.core.util.HelperUtil;
import org.wso2.carbon.device.mgt.common.DeviceFilters;
import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
import org.wso2.carbon.device.mgt.common.OperationLogFilters;
@@ -944,7 +944,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
return Response.serverError().entity(
new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build();
} catch (SubscriptionManagementException |
- org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException
+ io.entgra.application.mgt.common.exception.ApplicationManagementException
e) {
String msg = "Error occurred while getting the " + type + "application is of device " + id + "subscribed " +
"at entgra store";
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GeoLocationBasedServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GeoLocationBasedServiceImpl.java
index 793b83c46c0..2207957a2ac 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GeoLocationBasedServiceImpl.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GeoLocationBasedServiceImpl.java
@@ -27,12 +27,12 @@ import org.apache.commons.logging.LogFactory;
import org.apache.http.HttpStatus;
import org.wso2.carbon.analytics.api.AnalyticsDataAPI;
import org.wso2.carbon.analytics.api.AnalyticsDataAPIUtil;
-import org.wso2.carbon.analytics.dataservice.commons.AnalyticsDataResponse;
-import org.wso2.carbon.analytics.dataservice.commons.SearchResultEntry;
-import org.wso2.carbon.analytics.dataservice.commons.SortByField;
-import org.wso2.carbon.analytics.dataservice.commons.SortType;
-import org.wso2.carbon.analytics.datasource.commons.Record;
-import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException;
+//import org.wso2.carbon.analytics.dataservice.commons.AnalyticsDataResponse;
+//import org.wso2.carbon.analytics.dataservice.commons.SearchResultEntry;
+//import org.wso2.carbon.analytics.dataservice.commons.SortByField;
+//import org.wso2.carbon.analytics.dataservice.commons.SortType;
+//import org.wso2.carbon.analytics.datasource.commons.Record;
+//import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException;
import org.wso2.carbon.context.CarbonContext;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
@@ -103,8 +103,8 @@ public class GeoLocationBasedServiceImpl implements GeoLocationBasedService {
@Consumes("application/json")
@Produces("application/json")
public Response getGeoDeviceStats(@PathParam("deviceId") String deviceId,
- @PathParam("deviceType") String deviceType,
- @QueryParam("from") long from, @QueryParam("to") long to) {
+ @PathParam("deviceType") String deviceType,
+ @QueryParam("from") long from, @QueryParam("to") long to) {
try {
if (!DeviceManagerUtil.isPublishLocationResponseEnabled()) {
return Response.status(Response.Status.BAD_REQUEST.getStatusCode())
@@ -120,40 +120,40 @@ public class GeoLocationBasedServiceImpl implements GeoLocationBasedService {
if (from != 0 || to != 0) {
query += " AND timeStamp : [" + fromDate + " TO " + toDate + "]";
}
- try {
- if (!DeviceMgtAPIUtils.getDeviceAccessAuthorizationService().isUserAuthorized(
- new DeviceIdentifier(deviceId, deviceType),
- DeviceGroupConstants.Permissions.DEFAULT_STATS_MONITOR_PERMISSIONS)) {
- return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build();
- }
- List sortByFields = new ArrayList<>();
- SortByField sortByField = new SortByField("timeStamp", SortType.ASC);
- sortByFields.add(sortByField);
+// try {
+// if (!DeviceMgtAPIUtils.getDeviceAccessAuthorizationService().isUserAuthorized(
+// new DeviceIdentifier(deviceId, deviceType),
+// DeviceGroupConstants.Permissions.DEFAULT_STATS_MONITOR_PERMISSIONS)) {
+// return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build();
+// }
+// List sortByFields = new ArrayList<>();
+// SortByField sortByField = new SortByField("timeStamp", SortType.ASC);
+// sortByFields.add(sortByField);
// this is the user who initiates the request
- String authorizedUser = MultitenantUtils.getTenantAwareUsername(
- CarbonContext.getThreadLocalCarbonContext().getUsername());
+// String authorizedUser = MultitenantUtils.getTenantAwareUsername(
+// CarbonContext.getThreadLocalCarbonContext().getUsername());
- try {
- String tenantDomain = CarbonContext.getThreadLocalCarbonContext().getTenantDomain();
- int tenantId = DeviceMgtAPIUtils.getRealmService().getTenantManager().getTenantId(tenantDomain);
+// try {
+// String tenantDomain = CarbonContext.getThreadLocalCarbonContext().getTenantDomain();
+// int tenantId = DeviceMgtAPIUtils.getRealmService().getTenantManager().getTenantId(tenantDomain);
AnalyticsDataAPI analyticsDataAPI = DeviceMgtAPIUtils.getAnalyticsDataAPI();
- List searchResults = analyticsDataAPI.search(tenantId, tableName, query,
- 0,
- 100,
- sortByFields);
- List events = getEventBeans(analyticsDataAPI, tenantId, tableName, new ArrayList(),
- searchResults);
- return Response.ok().entity(events).build();
- } catch (AnalyticsException | UserStoreException e) {
- log.error("Failed to perform search on table: " + tableName + " : " + e.getMessage(), e);
- throw DeviceMgtUtil.buildBadRequestException(
- Constants.ErrorMessages.STATUS_BAD_REQUEST_MESSAGE_DEFAULT);
- }
- } catch (DeviceAccessAuthorizationException e) {
- log.error(e.getErrorMessage());
+// List searchResults = analyticsDataAPI.search(tenantId, tableName, query,
+// 0,
+// 100,
+// sortByFields);
+// List events = getEventBeans(analyticsDataAPI, tenantId, tableName, new ArrayList(),
+// searchResults);
+// return Response.ok().entity(events).build();
+// } catch (AnalyticsException | UserStoreException e) {
+// log.error("Failed to perform search on table: " + tableName + " : " + e.getMessage(), e);
+// throw DeviceMgtUtil.buildBadRequestException(
+// Constants.ErrorMessages.STATUS_BAD_REQUEST_MESSAGE_DEFAULT);
+// }
+// } catch (DeviceAccessAuthorizationException e) {
+// log.error(e.getErrorMessage());
return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).build();
- }
+// }
}
@Path("stats/device-locations")
@@ -259,8 +259,8 @@ public class GeoLocationBasedServiceImpl implements GeoLocationBasedService {
@Consumes("application/json")
@Produces("application/json")
public Response createGeoAlerts(Alert alert, @PathParam("deviceId") String deviceId,
- @PathParam("deviceType") String deviceType,
- @PathParam("alertType") String alertType) {
+ @PathParam("deviceType") String deviceType,
+ @PathParam("alertType") String alertType) {
try {
if (!DeviceMgtAPIUtils.getDeviceAccessAuthorizationService().isUserAuthorized(
new DeviceIdentifier(deviceId, deviceType),
@@ -326,8 +326,8 @@ public class GeoLocationBasedServiceImpl implements GeoLocationBasedService {
@Consumes("application/json")
@Produces("application/json")
public Response updateGeoAlerts(Alert alert, @PathParam("deviceId") String deviceId,
- @PathParam("deviceType") String deviceType,
- @PathParam("alertType") String alertType) {
+ @PathParam("deviceType") String deviceType,
+ @PathParam("alertType") String alertType) {
try {
if (!DeviceMgtAPIUtils.getDeviceAccessAuthorizationService().isUserAuthorized(
new DeviceIdentifier(deviceId, deviceType),
@@ -391,9 +391,9 @@ public class GeoLocationBasedServiceImpl implements GeoLocationBasedService {
@Consumes("application/json")
@Produces("application/json")
public Response removeGeoAlerts(@PathParam("deviceId") String deviceId,
- @PathParam("deviceType") String deviceType,
- @PathParam("alertType") String alertType,
- @QueryParam("queryName") String queryName) {
+ @PathParam("deviceType") String deviceType,
+ @PathParam("alertType") String alertType,
+ @QueryParam("queryName") String queryName) {
try {
if (!DeviceMgtAPIUtils.getDeviceAccessAuthorizationService().isUserAuthorized(
new DeviceIdentifier(deviceId, deviceType),
@@ -449,8 +449,8 @@ public class GeoLocationBasedServiceImpl implements GeoLocationBasedService {
@Consumes("application/json")
@Produces("application/json")
public Response getGeoAlerts(@PathParam("deviceId") String deviceId,
- @PathParam("deviceType") String deviceType,
- @PathParam("alertType") String alertType) {
+ @PathParam("deviceType") String deviceType,
+ @PathParam("alertType") String alertType) {
try {
if (!DeviceMgtAPIUtils.getDeviceAccessAuthorizationService().isUserAuthorized(
new DeviceIdentifier(deviceId, deviceType),
@@ -515,26 +515,26 @@ public class GeoLocationBasedServiceImpl implements GeoLocationBasedService {
String result = null;
switch (alertType) {
- case GeoServices.ALERT_TYPE_WITHIN:
- alerts = geoService.getWithinAlerts();
- break;
- case GeoServices.ALERT_TYPE_EXIT:
- alerts = geoService.getExitAlerts();
- break;
- case GeoServices.ALERT_TYPE_STATIONARY:
- alerts = geoService.getStationaryAlerts();
- break;
- case GeoServices.ALERT_TYPE_TRAFFIC:
- alerts = geoService.getTrafficAlerts();
- break;
- case GeoServices.ALERT_TYPE_SPEED:
- result = geoService.getSpeedAlerts();
- return Response.ok().entity(result).build();
- case GeoServices.ALERT_TYPE_PROXIMITY:
- result = geoService.getProximityAlerts();
- return Response.ok().entity(result).build();
- default:
- throw new GeoLocationBasedServiceException("Invalid Alert Type");
+ case GeoServices.ALERT_TYPE_WITHIN:
+ alerts = geoService.getWithinAlerts();
+ break;
+ case GeoServices.ALERT_TYPE_EXIT:
+ alerts = geoService.getExitAlerts();
+ break;
+ case GeoServices.ALERT_TYPE_STATIONARY:
+ alerts = geoService.getStationaryAlerts();
+ break;
+ case GeoServices.ALERT_TYPE_TRAFFIC:
+ alerts = geoService.getTrafficAlerts();
+ break;
+ case GeoServices.ALERT_TYPE_SPEED:
+ result = geoService.getSpeedAlerts();
+ return Response.ok().entity(result).build();
+ case GeoServices.ALERT_TYPE_PROXIMITY:
+ result = geoService.getProximityAlerts();
+ return Response.ok().entity(result).build();
+ default:
+ throw new GeoLocationBasedServiceException("Invalid Alert Type");
}
return Response.ok().entity(alerts).build();
@@ -550,8 +550,8 @@ public class GeoLocationBasedServiceImpl implements GeoLocationBasedService {
@Consumes("application/json")
@Produces("application/json")
public Response getGeoAlertsHistory(@PathParam("deviceId") String deviceId,
- @PathParam("deviceType") String deviceType,
- @QueryParam("from") long from, @QueryParam("to") long to) {
+ @PathParam("deviceType") String deviceType,
+ @QueryParam("from") long from, @QueryParam("to") long to) {
String tableName = "IOT_PER_DEVICE_STREAM_GEO_ALERTNOTIFICATIONS";
String fromDate = String.valueOf(from);
String toDate = String.valueOf(to);
@@ -559,40 +559,40 @@ public class GeoLocationBasedServiceImpl implements GeoLocationBasedService {
if (from != 0 || to != 0) {
query += " AND timeStamp : [" + fromDate + " TO " + toDate + "]";
}
- try {
- if (!DeviceMgtAPIUtils.getDeviceAccessAuthorizationService().isUserAuthorized(
- new DeviceIdentifier(deviceId, deviceType),
- DeviceGroupConstants.Permissions.DEFAULT_STATS_MONITOR_PERMISSIONS)) {
- return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build();
- }
- List sortByFields = new ArrayList<>();
- SortByField sortByField = new SortByField("timeStamp", SortType.ASC);
- sortByFields.add(sortByField);
+// try {
+// if (!DeviceMgtAPIUtils.getDeviceAccessAuthorizationService().isUserAuthorized(
+// new DeviceIdentifier(deviceId, deviceType),
+// DeviceGroupConstants.Permissions.DEFAULT_STATS_MONITOR_PERMISSIONS)) {
+// return Response.status(Response.Status.UNAUTHORIZED.getStatusCode()).build();
+// }
+// List sortByFields = new ArrayList<>();
+// SortByField sortByField = new SortByField("timeStamp", SortType.ASC);
+// sortByFields.add(sortByField);
// this is the user who initiates the request
- String authorizedUser = MultitenantUtils.getTenantAwareUsername(
- CarbonContext.getThreadLocalCarbonContext().getUsername());
-
- try {
- String tenantDomain = MultitenantUtils.getTenantDomain(authorizedUser);
- int tenantId = DeviceMgtAPIUtils.getRealmService().getTenantManager().getTenantId(tenantDomain);
- AnalyticsDataAPI analyticsDataAPI = DeviceMgtAPIUtils.getAnalyticsDataAPI();
- List searchResults = analyticsDataAPI.search(tenantId, tableName, query,
- 0,
- 100,
- sortByFields);
- List events = getEventBeans(analyticsDataAPI, tenantId, tableName, new ArrayList(),
- searchResults);
- return Response.ok().entity(events).build();
- } catch (AnalyticsException | UserStoreException e) {
- log.error("Failed to perform search on table: " + tableName + " : " + e.getMessage(), e);
- throw DeviceMgtUtil.buildBadRequestException(
- Constants.ErrorMessages.STATUS_BAD_REQUEST_MESSAGE_DEFAULT);
- }
- } catch (DeviceAccessAuthorizationException e) {
- log.error(e.getErrorMessage());
+// String authorizedUser = MultitenantUtils.getTenantAwareUsername(
+// CarbonContext.getThreadLocalCarbonContext().getUsername());
+
+// try {
+// String tenantDomain = MultitenantUtils.getTenantDomain(authorizedUser);
+// int tenantId = DeviceMgtAPIUtils.getRealmService().getTenantManager().getTenantId(tenantDomain);
+// AnalyticsDataAPI analyticsDataAPI = DeviceMgtAPIUtils.getAnalyticsDataAPI();
+// List searchResults = analyticsDataAPI.search(tenantId, tableName, query,
+// 0,
+// 100,
+// sortByFields);
+// List events = getEventBeans(analyticsDataAPI, tenantId, tableName, new ArrayList(),
+// searchResults);
+// return Response.ok().entity(events).build();
+// } catch (AnalyticsException | UserStoreException e) {
+// log.error("Failed to perform search on table: " + tableName + " : " + e.getMessage(), e);
+// throw DeviceMgtUtil.buildBadRequestException(
+// Constants.ErrorMessages.STATUS_BAD_REQUEST_MESSAGE_DEFAULT);
+// }
+// } catch (DeviceAccessAuthorizationException e) {
+// log.error(e.getErrorMessage());
return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).build();
- }
+// }
}
@Path("alerts/history")
@@ -607,80 +607,80 @@ public class GeoLocationBasedServiceImpl implements GeoLocationBasedService {
if (from != 0 || to != 0) {
query = "timeStamp : [" + fromDate + " TO " + toDate + "]";
}
- try {
- List sortByFields = new ArrayList<>();
- SortByField sortByField = new SortByField("timeStamp", SortType.ASC);
- sortByFields.add(sortByField);
-
- // this is the user who initiates the request
- String authorizedUser = MultitenantUtils.getTenantAwareUsername(
- CarbonContext.getThreadLocalCarbonContext().getUsername());
-
- String tenantDomain = MultitenantUtils.getTenantDomain(authorizedUser);
- int tenantId = DeviceMgtAPIUtils.getRealmService().getTenantManager().getTenantId(tenantDomain);
- AnalyticsDataAPI analyticsDataAPI = DeviceMgtAPIUtils.getAnalyticsDataAPI();
- List searchResults = analyticsDataAPI.search(tenantId, tableName, query,
- 0,
- 100,
- sortByFields);
- List events = getEventBeans(analyticsDataAPI, tenantId, tableName, new ArrayList(),
- searchResults);
- return Response.ok().entity(events).build();
-
- } catch (AnalyticsException | UserStoreException e) {
- log.error("Failed to perform search on table: " + tableName + " : " + e.getMessage(), e);
+// try {
+// List sortByFields = new ArrayList<>();
+// SortByField sortByField = new SortByField("timeStamp", SortType.ASC);
+// sortByFields.add(sortByField);
+//
+// // this is the user who initiates the request
+// String authorizedUser = MultitenantUtils.getTenantAwareUsername(
+// CarbonContext.getThreadLocalCarbonContext().getUsername());
+//
+// String tenantDomain = MultitenantUtils.getTenantDomain(authorizedUser);
+// int tenantId = DeviceMgtAPIUtils.getRealmService().getTenantManager().getTenantId(tenantDomain);
+// AnalyticsDataAPI analyticsDataAPI = DeviceMgtAPIUtils.getAnalyticsDataAPI();
+// List searchResults = analyticsDataAPI.search(tenantId, tableName, query,
+// 0,
+// 100,
+// sortByFields);
+// List events = getEventBeans(analyticsDataAPI, tenantId, tableName, new ArrayList(),
+// searchResults);
+// return Response.ok().entity(events).build();
+//
+// } catch (AnalyticsException | UserStoreException e) {
+// log.error("Failed to perform search on table: " + tableName + " : " + e.getMessage(), e);
throw DeviceMgtUtil.buildBadRequestException(
Constants.ErrorMessages.STATUS_BAD_REQUEST_MESSAGE_DEFAULT);
- }
- }
-
- private List getEventBeans(AnalyticsDataAPI analyticsDataAPI, int tenantId, String tableName,
- List columns,
- List searchResults) throws AnalyticsException {
- List ids = getIds(searchResults);
- List requiredColumns = (columns == null || columns.isEmpty()) ? null : columns;
- AnalyticsDataResponse response = analyticsDataAPI.get(tenantId, tableName, 1, requiredColumns, ids);
- List records = AnalyticsDataAPIUtil.listRecords(analyticsDataAPI, response);
- Map eventBeanMap = getEventBeanKeyedWithIds(records);
- return getSortedEventBeans(eventBeanMap, searchResults);
+// }
}
- private List getSortedEventBeans(Map eventBeanMap,
- List searchResults) {
- List sortedRecords = new ArrayList<>();
- for (SearchResultEntry entry : searchResults) {
- sortedRecords.add(eventBeanMap.get(entry.getId()));
- }
- return sortedRecords;
- }
-
- private Map getEventBeanKeyedWithIds(List records) {
- Map eventBeanMap = new HashMap<>();
- for (Record record : records) {
- Event event = getEventBean(record);
- eventBeanMap.put(event.getId(), event);
- }
- return eventBeanMap;
- }
-
- private List getIds(List searchResults) {
- List ids = new ArrayList<>();
- if (searchResults != null) {
- for (SearchResultEntry resultEntry : searchResults) {
- ids.add(resultEntry.getId());
- }
- }
- return ids;
- }
-
- private static Event getEventBean(Record record) {
- Event eventBean = new Event();
- eventBean.setId(record.getId());
- eventBean.setTableName(record.getTableName());
- eventBean.setTimestamp(record.getTimestamp());
- eventBean.setValues(record.getValues());
- return eventBean;
- }
+// private List getEventBeans(AnalyticsDataAPI analyticsDataAPI, int tenantId, String tableName,
+// List columns,
+// List searchResults) throws AnalyticsException {
+// List ids = getIds(searchResults);
+// List requiredColumns = (columns == null || columns.isEmpty()) ? null : columns;
+// AnalyticsDataResponse response = analyticsDataAPI.get(tenantId, tableName, 1, requiredColumns, ids);
+// List records = AnalyticsDataAPIUtil.listRecords(analyticsDataAPI, response);
+// Map eventBeanMap = getEventBeanKeyedWithIds(records);
+// return getSortedEventBeans(eventBeanMap, searchResults);
+// }
+//
+// private List getSortedEventBeans(Map eventBeanMap,
+// List searchResults) {
+// List sortedRecords = new ArrayList<>();
+// for (SearchResultEntry entry : searchResults) {
+// sortedRecords.add(eventBeanMap.get(entry.getId()));
+// }
+// return sortedRecords;
+// }
+//
+// private Map getEventBeanKeyedWithIds(List records) {
+// Map eventBeanMap = new HashMap<>();
+// for (Record record : records) {
+// Event event = getEventBean(record);
+// eventBeanMap.put(event.getId(), event);
+// }
+// return eventBeanMap;
+// }
+//
+// private List getIds(List searchResults) {
+// List ids = new ArrayList<>();
+// if (searchResults != null) {
+// for (SearchResultEntry resultEntry : searchResults) {
+// ids.add(resultEntry.getId());
+// }
+// }
+// return ids;
+// }
+//
+// private static Event getEventBean(Record record) {
+// Event eventBean = new Event();
+// eventBean.setId(record.getId());
+// eventBean.setTableName(record.getTableName());
+// eventBean.setTimestamp(record.getTimestamp());
+// eventBean.setValues(record.getValues());
+// return eventBean;
+// }
@Path("/geo-fence")
@POST
@@ -739,7 +739,7 @@ public class GeoLocationBasedServiceImpl implements GeoLocationBasedService {
@Consumes("application/json")
@Produces("application/json")
public Response getGeofence(@PathParam("fenceId") int fenceId,
- @QueryParam("requireEventData") boolean requireEventData) {
+ @QueryParam("requireEventData") boolean requireEventData) {
try {
GeoLocationProviderService geoService = DeviceMgtAPIUtils.getGeoService();
GeofenceData geofenceData = geoService.getGeoFences(fenceId);
@@ -822,9 +822,9 @@ public class GeoLocationBasedServiceImpl implements GeoLocationBasedService {
@Consumes("application/json")
@Produces("application/json")
public Response getGeofence(@QueryParam("offset") int offset,
- @QueryParam("limit") int limit,
- @QueryParam("name") String name,
- @QueryParam("requireEventData") boolean requireEventData) {
+ @QueryParam("limit") int limit,
+ @QueryParam("name") String name,
+ @QueryParam("requireEventData") boolean requireEventData) {
try {
GeoLocationProviderService geoService = DeviceMgtAPIUtils.getGeoService();
if (offset >= 0 && limit != 0) {
@@ -893,8 +893,8 @@ public class GeoLocationBasedServiceImpl implements GeoLocationBasedService {
@Consumes("application/json")
@Produces("application/json")
public Response updateGeofence(GeofenceWrapper geofenceWrapper,
- @PathParam("fenceId") int fenceId,
- @QueryParam("eventIds") int[] eventIds) {
+ @PathParam("fenceId") int fenceId,
+ @QueryParam("eventIds") int[] eventIds) {
RequestValidationUtil.validateGeofenceData(geofenceWrapper);
RequestValidationUtil.validateEventConfigurationData(geofenceWrapper.getEventConfig());
try {
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/CredentialManagementResponseBuilder.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/CredentialManagementResponseBuilder.java
index d326802c2a5..19a8e599794 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/CredentialManagementResponseBuilder.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/CredentialManagementResponseBuilder.java
@@ -21,7 +21,6 @@ package org.wso2.carbon.device.mgt.jaxrs.util;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.context.CarbonContext;
-import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse;
import org.wso2.carbon.device.mgt.jaxrs.beans.OldPasswordResetWrapper;
import org.wso2.carbon.device.mgt.jaxrs.beans.PasswordResetWrapper;
@@ -64,8 +63,9 @@ public class CredentialManagementResponseBuilder {
username = CarbonContext.getThreadLocalCarbonContext().getUsername();
userStoreManager.updateCredential(username, credentials.getNewPassword(),
credentials.getOldPassword());
- DeviceMgtAPIUtils.getIntegrationClientService().resetUserInfo(username,
- PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain());
+ //todo:amalka
+// DeviceMgtAPIUtils.getIntegrationClientService().resetUserInfo(username,
+// PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain());
return Response.status(Response.Status.OK).entity("UserImpl password by username: " +
username + " was successfully changed.").build();
} catch (UserStoreException e) {
@@ -108,8 +108,9 @@ public class CredentialManagementResponseBuilder {
new ErrorResponse.ErrorResponseBuilder().setMessage(errorMsg).build()).build();
}
userStoreManager.updateCredentialByAdmin(username, credentials.getNewPassword());
- DeviceMgtAPIUtils.getIntegrationClientService().resetUserInfo(username,
- PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain());
+ //todo:amalka
+// DeviceMgtAPIUtils.getIntegrationClientService().resetUserInfo(username,
+// PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain());
return Response.status(Response.Status.OK).entity("UserImpl password by username: " +
username + " was successfully changed.").build();
} catch (UserStoreException e) {
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/DeviceMgtAPIUtils.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/DeviceMgtAPIUtils.java
index 6a6f5daf882..8275ea01635 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/DeviceMgtAPIUtils.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/DeviceMgtAPIUtils.java
@@ -45,31 +45,28 @@ import org.apache.commons.httpclient.protocol.Protocol;
import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.analytics.api.AnalyticsDataAPI;
import org.wso2.carbon.analytics.stream.persistence.stub.EventStreamPersistenceAdminServiceStub;
-import org.wso2.carbon.apimgt.integration.client.service.IntegrationClientService;
import org.wso2.carbon.base.ServerConfiguration;
-import org.wso2.carbon.analytics.api.AnalyticsDataAPI;
import org.wso2.carbon.context.CarbonContext;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.core.util.Utils;
-import org.wso2.carbon.device.application.mgt.common.services.SubscriptionManager;
-import org.wso2.carbon.device.mgt.analytics.data.publisher.service.EventsPublisherService;
-import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
+import io.entgra.application.mgt.common.services.SubscriptionManager;
import org.wso2.carbon.device.mgt.common.Device;
+import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
-import org.wso2.carbon.device.mgt.common.OperationMonitoringTaskConfig;
import org.wso2.carbon.device.mgt.common.MonitoringOperation;
+import org.wso2.carbon.device.mgt.common.OperationMonitoringTaskConfig;
import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationException;
+import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationService;
+import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry;
+import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration;
+import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfigurationManagementService;
import org.wso2.carbon.device.mgt.common.device.details.DeviceLocationHistory;
import org.wso2.carbon.device.mgt.common.device.details.DeviceLocationHistorySnapshot;
import org.wso2.carbon.device.mgt.common.device.details.DeviceLocationHistorySnapshotWrapper;
-import org.wso2.carbon.device.mgt.common.event.config.EventConfigurationProviderService;
import org.wso2.carbon.device.mgt.common.exceptions.BadRequestException;
import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException;
-import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationService;
-import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry;
-import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration;
-import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfigurationManagementService;
import org.wso2.carbon.device.mgt.common.exceptions.UnAuthorizedException;
import org.wso2.carbon.device.mgt.common.geo.service.GeoLocationProviderService;
import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroup;
@@ -77,7 +74,6 @@ import org.wso2.carbon.device.mgt.common.group.mgt.GroupManagementException;
import org.wso2.carbon.device.mgt.common.metadata.mgt.MetadataManagementService;
import org.wso2.carbon.device.mgt.common.notification.mgt.NotificationManagementService;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
-import org.wso2.carbon.device.mgt.common.permission.mgt.PermissionManagerService;
import org.wso2.carbon.device.mgt.common.report.mgt.ReportManagementService;
import org.wso2.carbon.device.mgt.common.spi.DeviceTypeGeneratorService;
import org.wso2.carbon.device.mgt.common.spi.OTPManagementService;
@@ -171,7 +167,7 @@ public class DeviceMgtAPIUtils {
private static KeyStore trustStore;
private static char[] keyStorePassword;
- private static IntegrationClientService integrationClientService;
+// private static IntegrationClientService integrationClientService;
private static MetadataManagementService metadataManagementService;
private static OTPManagementService otpManagementService;
@@ -373,24 +369,6 @@ public class DeviceMgtAPIUtils {
return privacyComplianceProvider;
}
-
- public static IntegrationClientService getIntegrationClientService() {
- if (integrationClientService == null) {
- synchronized (DeviceMgtAPIUtils.class) {
- if (integrationClientService == null) {
- PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
- integrationClientService = (IntegrationClientService) ctx.getOSGiService(IntegrationClientService.class, null);
- if (integrationClientService == null) {
- String msg = "IntegrationClientService is not initialized";
- log.error(msg);
- throw new IllegalStateException(msg);
- }
- }
- }
- }
- return integrationClientService;
- }
-
/**
* Initializing and accessing method for OTPManagementService.
*
@@ -570,16 +548,6 @@ public class DeviceMgtAPIUtils {
return searchManagerService;
}
- public static PermissionManagerService getPermissionManagerService() {
- PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
- PermissionManagerService PermissionManagerService =
- (PermissionManagerService) ctx.getOSGiService(PermissionManagerService.class, null);
- if (PermissionManagerService == null) {
- throw new IllegalStateException("Permission manager service is not initialized.");
- }
- return PermissionManagerService;
- }
-
public static GeoLocationProviderService getGeoService() {
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
GeoLocationProviderService
@@ -626,17 +594,18 @@ public class DeviceMgtAPIUtils {
return username;
}
- public static EventsPublisherService getEventPublisherService() {
- PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
- EventsPublisherService eventsPublisherService =
- (EventsPublisherService) ctx.getOSGiService(EventsPublisherService.class, null);
- if (eventsPublisherService == null) {
- String msg = "Event Publisher service has not initialized.";
- log.error(msg);
- throw new IllegalStateException(msg);
- }
- return eventsPublisherService;
- }
+ // todo: amalka: commented
+// public static EventsPublisherService getEventPublisherService() {
+// PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
+// EventsPublisherService eventsPublisherService =
+// (EventsPublisherService) ctx.getOSGiService(EventsPublisherService.class, null);
+// if (eventsPublisherService == null) {
+// String msg = "Event Publisher service has not initialized.";
+// log.error(msg);
+// throw new IllegalStateException(msg);
+// }
+// return eventsPublisherService;
+// }
public static String getStreamDefinition(String deviceType, String tenantDomain) {
return STREAM_DEFINITION_PREFIX + tenantDomain + "." + deviceType.replace(" ", ".");
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/webapp/META-INF/webapp-classloading.xml b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/webapp/META-INF/webapp-classloading.xml
index ed2ed216247..60db8782e9b 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/webapp/META-INF/webapp-classloading.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/webapp/META-INF/webapp-classloading.xml
@@ -31,5 +31,5 @@
Tomcat environment is the default and every webapps gets it even if they didn't specify it.
e.g. If a webapps requires CXF, they will get both Tomcat and CXF.
-->
- CXF,Carbon
+ CXF3,Carbon
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceAgentServiceTest.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceAgentServiceTest.java
index 729b1827cdd..05415a96714 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceAgentServiceTest.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceAgentServiceTest.java
@@ -34,9 +34,6 @@ import org.wso2.carbon.base.MultitenantConstants;
import org.wso2.carbon.caching.impl.CacheImpl;
import org.wso2.carbon.context.CarbonContext;
import org.wso2.carbon.context.PrivilegedCarbonContext;
-import org.wso2.carbon.device.mgt.analytics.data.publisher.exception.DataPublisherConfigurationException;
-import org.wso2.carbon.device.mgt.analytics.data.publisher.service.EventsPublisherService;
-import org.wso2.carbon.device.mgt.analytics.data.publisher.service.EventsPublisherServiceImpl;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
@@ -482,125 +479,6 @@ public class DeviceAgentServiceTest {
Mockito.reset(eventStreamAdminServiceStub);
}
- @Test(description = "Test the error scenario of Publishing Events with null event attributes.")
- public void testEventPublishWithEventAttributesNULLAndPublishEventsFailure() throws
- DeviceAccessAuthorizationException, RemoteException {
- PowerMockito.stub(PowerMockito.method(PrivilegedCarbonContext.class, "getThreadLocalCarbonContext"))
- .toReturn(this.privilegedCarbonContext);
- PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class,
- "getDeviceAccessAuthorizationService")).toReturn(this.deviceAccessAuthorizationService);
- Mockito.when(this.deviceAccessAuthorizationService.isUserAuthorized(Mockito.any(DeviceIdentifier.class)))
- .thenReturn(true);
- PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getEventStreamAdminServiceStub"))
- .toReturn(this.eventStreamAdminServiceStub);
- EventStreamAttributeDto eventStreamAttributeDto = Mockito.mock(EventStreamAttributeDto.class,
- Mockito.RETURNS_MOCKS);
- EventStreamDefinitionDto eventStreamDefinitionDto = Mockito.mock(EventStreamDefinitionDto.class,
- Mockito.RETURNS_MOCKS);
- Mockito.when(this.eventStreamAdminServiceStub.getStreamDefinitionDto(Mockito.anyString()))
- .thenReturn(eventStreamDefinitionDto);
- Mockito.when(eventStreamDefinitionDto.getPayloadData()).thenReturn(new EventStreamAttributeDto[]{});
- EventsPublisherService eventPublisherService = Mockito.mock(EventsPublisherServiceImpl.class,
- Mockito.RETURNS_MOCKS);
- PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getEventPublisherService"))
- .toReturn(eventPublisherService);
- Map payload = new HashMap<>();
- CacheImpl cache = Mockito.mock(CacheImpl.class);
- PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDynamicEventCache"))
- .toReturn(cache);
- Response response = this.deviceAgentService.publishEvents(payload, TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER);
- Assert.assertNotNull(response, "Response should not be null");
- Assert.assertEquals(response.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(),
- "The response status should be 500");
- List
-
- org.wso2.carbon.analytics
- org.wso2.carbon.analytics.api
-
-
- org.wso2.carbon.analytics
- org.wso2.carbon.analytics.datasource.commons
-
com.google.code.gson
gson
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/permission/mgt/Permission.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/permission/mgt/Permission.java
index ff194a7b86f..241d8039e39 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/permission/mgt/Permission.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/permission/mgt/Permission.java
@@ -18,9 +18,6 @@
package org.wso2.carbon.device.mgt.common.permission.mgt;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
/**
* This class represents the information related to permission.
*/
@@ -30,6 +27,7 @@ public class Permission {
private String path; // permission string
private String url; // url of the resource
private String method; // http method
+ private String urlPattern;
public String getUrl() {
return url;
@@ -62,4 +60,12 @@ public class Permission {
public void setPath(String path) {
this.path = path;
}
+
+ public String getUrlPattern() {
+ return urlPattern;
+ }
+
+ public void setUrlPattern(String urlPattern) {
+ this.urlPattern = urlPattern;
+ }
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/permission/mgt/PermissionManagerService.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/permission/mgt/PermissionManagerService.java
index 68b81a9de42..2c765c68245 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/permission/mgt/PermissionManagerService.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/permission/mgt/PermissionManagerService.java
@@ -18,7 +18,7 @@
package org.wso2.carbon.device.mgt.common.permission.mgt;
-import java.util.Properties;
+import java.util.List;
/**
* This represents the Permission management functionality which should be implemented by
@@ -26,22 +26,8 @@ import java.util.Properties;
*/
public interface PermissionManagerService {
- /**
- * Adds a permission.
- *
- * @param permission - Permission to be added
- * @return A boolean indicating the status of the operation.
- * @throws PermissionManagementException If some unusual behaviour is observed while adding the permission.
- */
- boolean addPermission(Permission permission) throws PermissionManagementException;
+ boolean addPermission(String context, List permissions) throws PermissionManagementException;
- /**
- * Fetches a given permission.
- *
- * @param properties - Properties of the permission to be fetched.
- * @return The matched Permission object.
- * @throws PermissionManagementException If some unusual behaviour is observed while fetching the permission.
- */
- Permission getPermission(Properties properties) throws PermissionManagementException;
+ List getPermission(String context) throws PermissionManagementException;
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml
index d9b34a770d1..8f78ea30642 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
device-mgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
@@ -78,8 +78,8 @@
org.wso2.carbon.device.mgt.core.internal
org.apache.axis2.*;version="${axis2.osgi.version.range}",
- org.osgi.framework,
- org.osgi.service.component,
+ org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
+ org.osgi.service.*;version="${imp.package.version.osgi.service}",
org.apache.commons.logging,
javax.naming,
javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional,
@@ -90,7 +90,6 @@
org.wso2.carbon.core,
org.wso2.carbon.utils.*,
org.wso2.carbon.device.mgt.common.*,
- org.wso2.carbon.device.mgt.analytics.data.publisher.service,
org.wso2.carbon.user.api,
org.wso2.carbon.user.core.*,
org.wso2.carbon.registry.core.service,
@@ -104,8 +103,6 @@
org.wso2.carbon.ndatasource.core,
org.wso2.carbon.ntask.core.*,
org.wso2.carbon.ntask.common,
- org.apache.catalina,
- org.apache.catalina.core,
org.apache.commons.collections;version="${commons-collections.version.range}",
org.wso2.carbon.email.sender.*,
io.swagger.annotations.*;resolution:=optional,
@@ -122,9 +119,7 @@
org.wso2.carbon.device.mgt.core.*
- javax.ws.rs-api,
scribe;scope=compile|runtime;inline=false,
- javassist;inline=false
*
@@ -166,32 +161,6 @@
org.wso2.carbon.devicemgt
org.wso2.carbon.device.mgt.common
-
- org.wso2.carbon.devicemgt
- org.wso2.carbon.device.mgt.analytics.data.publisher
-
-
- org.slf4j
- slf4j-api
-
-
- javax.servlet
- javax.servlet-api
-
-
- org.wso2.carbon.registry
- org.wso2.carbon.registry.indexing
-
-
- org.wso2.carbon.identity.framework
- org.wso2.carbon.user.mgt
-
-
- commons-lang
- commons-lang
-
-
-
org.wso2.carbon
org.wso2.carbon.logging
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementConstants.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementConstants.java
index df5f030684d..e9cfa13398a 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementConstants.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementConstants.java
@@ -42,6 +42,7 @@ public final class DeviceManagementConstants {
public static final String DM_CACHE_MANAGER = "DM_CACHE_MANAGER";
public static final String DEVICE_CACHE = "DEVICE_CACHE";
+ public static final String API_RESOURCE_PERMISSION_CACHE = "API_RESOURCE_CACHE_CACHE";
public static final String GEOFENCE_CACHE = "GEOFENCE_CACHE";
public static final String ENROLLMENT_NOTIFICATION_API_ENDPOINT = "/api/device-mgt/enrollment-notification";
public static final String URL_SEPERATOR = "/";
@@ -53,6 +54,8 @@ public final class DeviceManagementConstants {
public static final String SCOPES_FOR_TOKEN = "perm:device:operations perm:device:publish-event perm:windows:enroll";
public static final String IOT_GATEWAY_HOST = "iot.gateway.host";
public static final String IOT_GATEWAY_HTTPS_PORT = "iot.gateway.https.port";
+ public static final String IOT_CORE_HOST = "iot.core.host";
+ public static final String IOT_CORE_HTTPS_PORT = "iot.core.https.port";
public static final String APPLICATION_REGISTRATION_API_ENDPOINT =
"/api-application-registration/register";
public static final String AUTHORIZATION_HEADER = "authorization";
@@ -164,6 +167,7 @@ public final class DeviceManagementConstants {
new Permission("/permission/admin/device-mgt/devices/enroll", "ui.execute"),
new Permission("/permission/admin/device-mgt/devices/disenroll", "ui.execute"),
new Permission("/permission/admin/device-mgt/devices/owning-device/view", "ui.execute"),
+ new Permission("/permission/admin/device-mgt/metadata", "ui.execute"),
new Permission("/permission/admin/manage/portal", "ui.execute")
};
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/identity/IdentityConfigurations.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/identity/IdentityConfigurations.java
index fe7a7c7ae68..5e88ed0f777 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/identity/IdentityConfigurations.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/identity/IdentityConfigurations.java
@@ -17,6 +17,8 @@
*/
package org.wso2.carbon.device.mgt.core.config.identity;
+import org.wso2.carbon.device.mgt.core.util.DeviceManagerUtil;
+
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -31,7 +33,7 @@ public class IdentityConfigurations {
@XmlElement(name = "AdminUsername", required = true)
public String getAdminUsername() {
- return adminUsername;
+ return DeviceManagerUtil.replaceSystemProperty(adminUsername);
}
public void setAdminUsername(String adminUsername) {
@@ -40,7 +42,7 @@ public class IdentityConfigurations {
@XmlElement(name = "AdminPassword", required = true)
public String getAdminPassword() {
- return adminPassword;
+ return DeviceManagerUtil.replaceSystemProperty(adminPassword);
}
public void setAdminPassword(String adminPassword) {
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/keymanager/KeyManagerConfigurations.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/keymanager/KeyManagerConfigurations.java
index b76f932e5b2..8774941acc1 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/keymanager/KeyManagerConfigurations.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/keymanager/KeyManagerConfigurations.java
@@ -17,6 +17,8 @@
*/
package org.wso2.carbon.device.mgt.core.config.keymanager;
+import org.wso2.carbon.device.mgt.core.util.DeviceManagerUtil;
+
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -31,7 +33,7 @@ public class KeyManagerConfigurations {
@XmlElement(name = "AdminUsername", required = true)
public String getAdminUsername() {
- return adminUsername;
+ return DeviceManagerUtil.replaceSystemProperty(adminUsername);
}
public void setAdminUsername(String adminUsername) {
@@ -40,7 +42,7 @@ public class KeyManagerConfigurations {
@XmlElement(name = "AdminPassword", required = true)
public String getAdminPassword() {
- return adminPassword;
+ return DeviceManagerUtil.replaceSystemProperty(adminPassword);
}
public void setAdminPassword(String adminPassword) {
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/permission/AnnotationProcessor.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/permission/AnnotationProcessor.java
index d6a6a84118e..6c680babaa3 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/permission/AnnotationProcessor.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/permission/AnnotationProcessor.java
@@ -67,6 +67,7 @@ public class AnnotationProcessor {
private static final String SWAGGER_ANNOTATIONS_PROPERTIES_DESCRIPTION = "description";
private static final String SWAGGER_ANNOTATIONS_PROPERTIES_KEY = "key";
private static final String SWAGGER_ANNOTATIONS_PROPERTIES_PERMISSIONS = "permissions";
+ private static final String SWAGGER_ANNOTATIONS_PROPERTIES_ROLES = "roles";
private static final String ANNOTATIONS_SCOPES = "scopes";
private static final String ANNOTATIONS_SCOPE = "scope";
private static final String DEFAULT_PERM_NAME = "default";
@@ -239,6 +240,7 @@ public class AnnotationProcessor {
subCtx = makeContextURLReady(resourceRootContext) + makeContextURLReady(subCtx);
}
permission.setUrl(replaceDynamicPathVariables(subCtx));
+ permission.setUrlPattern(permission.getUrl().replace("*", "[a-zA-Z0-9-_.]+"));
String httpMethod;
for (int i = 0; i < annotations.length; i++) {
httpMethod = getHTTPMethodAnnotation(annotations[i]);
@@ -398,7 +400,7 @@ public class AnnotationProcessor {
if (scope != null) {
permission.setName(scope.getName());
//TODO: currently permission tree supports only adding one permission per API point.
- permission.setPath(scope.getRoles().split(" ")[0]);
+ permission.setPath(scope.getPermissions().split(" ")[0]);
} else {
log.warn("No Scope mapping is done for scope key: " + scopeKey);
permission.setName(DEFAULT_PERM_NAME);
@@ -420,8 +422,11 @@ public class AnnotationProcessor {
Scope scope;
String permissions[];
StringBuilder aggregatedPermissions;
+ String roles[];
+ StringBuilder aggregatedRoles;
for(int i=0; i permissions = annotationProcessor.extractPermissions(annotatedAPIClasses);
PermissionManagerService permissionManagerService = PermissionManagerServiceImpl.getInstance();
- if (permissions != null) {
- for (Permission permission : permissions) {
- permissionManagerService.addPermission(permission);
- }
- }
+ permissionManagerService.addPermission(contextPath, permissions);
+
} catch (PermissionManagementException e) {
log.error("Exception occurred while adding the permissions from webapp : "
+ servletContext.getContextPath(), e);
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/device/details/mgt/dao/impl/DeviceDetailsDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/device/details/mgt/dao/impl/DeviceDetailsDAOImpl.java
index 04eda09d86e..d00cb1d1ede 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/device/details/mgt/dao/impl/DeviceDetailsDAOImpl.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/device/details/mgt/dao/impl/DeviceDetailsDAOImpl.java
@@ -286,7 +286,11 @@ public class DeviceDetailsDAOImpl implements DeviceDetailsDAO {
stmt.setString(8, deviceLocation.getState());
stmt.setString(9, deviceLocation.getCountry());
stmt.setString(10, GeoHashGenerator.encodeGeohash(deviceLocation));
- stmt.setLong(11, System.currentTimeMillis());
+ if (deviceLocation.getUpdatedTime() == null) {
+ stmt.setLong(11, System.currentTimeMillis());
+ } else {
+ stmt.setLong(11, deviceLocation.getUpdatedTime().getTime());
+ }
stmt.setInt(12, enrollmentId);
stmt.setDouble(13, deviceLocation.getAltitude());
stmt.setFloat(14, deviceLocation.getSpeed());
@@ -417,7 +421,11 @@ public class DeviceDetailsDAOImpl implements DeviceDetailsDAO {
stmt.setDouble(6, deviceLocation.getLongitude());
stmt.setFloat(7, deviceLocation.getSpeed());
stmt.setFloat(8, deviceLocation.getBearing());
- stmt.setLong(9, System.currentTimeMillis());
+ if (deviceLocation.getUpdatedTime() == null) {
+ stmt.setLong(9, System.currentTimeMillis());
+ } else {
+ stmt.setLong(9, deviceLocation.getUpdatedTime().getTime());
+ }
stmt.setString(10, GeoHashGenerator.encodeGeohash(deviceLocation));
stmt.setString(11, device.getEnrolmentInfo().getOwner());
stmt.setDouble(12, deviceLocation.getAltitude());
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/device/details/mgt/impl/DeviceInformationManagerImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/device/details/mgt/impl/DeviceInformationManagerImpl.java
index b152e65a84b..e1ce6c4f9cd 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/device/details/mgt/impl/DeviceInformationManagerImpl.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/device/details/mgt/impl/DeviceInformationManagerImpl.java
@@ -22,22 +22,17 @@ import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.context.CarbonContext;
-import org.wso2.carbon.context.PrivilegedCarbonContext;
-import org.wso2.carbon.device.mgt.analytics.data.publisher.exception.DataPublisherConfigurationException;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
-import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfigurationManagementService;
-import org.wso2.carbon.device.mgt.common.device.details.DeviceData;
import org.wso2.carbon.device.mgt.common.device.details.DeviceDetailsWrapper;
+import org.wso2.carbon.device.mgt.common.device.details.DeviceInfo;
+import org.wso2.carbon.device.mgt.common.device.details.DeviceLocation;
import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.exceptions.EventPublishingException;
import org.wso2.carbon.device.mgt.common.exceptions.TransactionManagementException;
-import org.wso2.carbon.device.mgt.common.device.details.DeviceInfo;
-import org.wso2.carbon.device.mgt.common.device.details.DeviceLocation;
import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroup;
import org.wso2.carbon.device.mgt.common.group.mgt.GroupManagementException;
import org.wso2.carbon.device.mgt.core.DeviceManagementConstants;
-import org.wso2.carbon.device.mgt.core.config.tenant.PlatformConfigurationManagementServiceImpl;
import org.wso2.carbon.device.mgt.core.dao.DeviceDAO;
import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOException;
import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory;
@@ -46,18 +41,14 @@ import org.wso2.carbon.device.mgt.core.device.details.mgt.DeviceInformationManag
import org.wso2.carbon.device.mgt.core.device.details.mgt.dao.DeviceDetailsDAO;
import org.wso2.carbon.device.mgt.core.device.details.mgt.dao.DeviceDetailsMgtDAOException;
import org.wso2.carbon.device.mgt.core.internal.DeviceManagementDataHolder;
-
-import org.wso2.carbon.device.mgt.core.service.GroupManagementProviderService;
import org.wso2.carbon.device.mgt.core.report.mgt.Constants;
import org.wso2.carbon.device.mgt.core.service.GroupManagementProviderService;
import org.wso2.carbon.device.mgt.core.util.DeviceManagerUtil;
import org.wso2.carbon.device.mgt.core.util.HttpReportingUtil;
-import org.wso2.carbon.user.api.UserRealm;
import org.wso2.carbon.user.api.UserStoreException;
import java.sql.SQLException;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
@@ -178,9 +169,10 @@ public class DeviceInformationManagerImpl implements DeviceInformationManager {
deviceInfo.getAvailableRAMMemory(),
deviceInfo.isPluggedIn()
};
- DeviceManagerUtil.getEventPublisherService().publishEvent(
- DEVICE_INFO_EVENT_STREAM_DEFINITION, "1.0.0", metaData, new Object[0], payload
- );
+ //todo:amalka
+// DeviceManagerUtil.getEventPublisherService().publishEvent(
+// DEVICE_INFO_EVENT_STREAM_DEFINITION, "1.0.0", metaData, new Object[0], payload
+// );
}
} catch (TransactionManagementException e) {
throw new DeviceDetailsMgtException("Transactional error occurred while adding the device information.", e);
@@ -193,8 +185,9 @@ public class DeviceInformationManagerImpl implements DeviceInformationManager {
DeviceManagementDAOFactory.rollbackTransaction();
throw new DeviceDetailsMgtException("Error occurred while updating the last update timestamp of the " +
"device", e);
- } catch (DataPublisherConfigurationException e) {
- throw new DeviceDetailsMgtException("Error occurred while publishing the device location information.", e);
+ //todo:amalka
+// } catch (DataPublisherConfigurationException e) {
+// throw new DeviceDetailsMgtException("Error occurred while publishing the device location information.", e);
} finally {
DeviceManagementDAOFactory.closeConnection();
}
@@ -389,9 +382,10 @@ public class DeviceInformationManagerImpl implements DeviceInformationManager {
deviceLocation.getBearing(),
deviceLocation.getDistance()
};
- DeviceManagerUtil.getEventPublisherService().publishEvent(
- LOCATION_EVENT_STREAM_DEFINITION, "1.0.0", metaData, new Object[0], payload
- );
+ //todo:amalka
+// DeviceManagerUtil.getEventPublisherService().publishEvent(
+// LOCATION_EVENT_STREAM_DEFINITION, "1.0.0", metaData, new Object[0], payload
+// );
}
DeviceManagementDAOFactory.commitTransaction();
} catch (TransactionManagementException e) {
@@ -403,9 +397,10 @@ public class DeviceInformationManagerImpl implements DeviceInformationManager {
} catch (DeviceManagementException e) {
DeviceManagementDAOFactory.rollbackTransaction();
throw new DeviceDetailsMgtException("Error occurred while getting the device information.", e);
- } catch (DataPublisherConfigurationException e) {
- DeviceManagementDAOFactory.rollbackTransaction();
- throw new DeviceDetailsMgtException("Error occurred while publishing the device location information.", e);
+ //todo:amalka
+// } catch (DataPublisherConfigurationException e) {
+// DeviceManagementDAOFactory.rollbackTransaction();
+// throw new DeviceDetailsMgtException("Error occurred while publishing the device location information.", e);
} finally {
DeviceManagementDAOFactory.closeConnection();
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/DeviceManagementServiceComponent.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/DeviceManagementServiceComponent.java
index 5bd7a3730b2..859659bdf5f 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/DeviceManagementServiceComponent.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/DeviceManagementServiceComponent.java
@@ -22,11 +22,12 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.osgi.framework.BundleContext;
import org.osgi.service.component.ComponentContext;
-import org.wso2.carbon.device.mgt.common.event.config.EventConfigurationProviderService;
-import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException;
+import org.wso2.carbon.core.ServerStartupObserver;
import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManagementException;
import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationService;
import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfigurationManagementService;
+import org.wso2.carbon.device.mgt.common.event.config.EventConfigurationProviderService;
+import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.geo.service.GeoLocationProviderService;
import org.wso2.carbon.device.mgt.common.group.mgt.GroupManagementException;
import org.wso2.carbon.device.mgt.common.metadata.mgt.MetadataManagementService;
@@ -48,6 +49,7 @@ import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager;
import org.wso2.carbon.device.mgt.core.config.DeviceManagementConfig;
import org.wso2.carbon.device.mgt.core.config.datasource.DataSourceConfig;
import org.wso2.carbon.device.mgt.core.config.tenant.PlatformConfigurationManagementServiceImpl;
+import org.wso2.carbon.device.mgt.core.config.ui.UIConfigurationManager;
import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory;
import org.wso2.carbon.device.mgt.core.dao.GroupManagementDAOFactory;
import org.wso2.carbon.device.mgt.core.device.details.mgt.DeviceInformationManager;
@@ -75,7 +77,6 @@ import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderServiceIm
import org.wso2.carbon.device.mgt.core.service.GroupManagementProviderService;
import org.wso2.carbon.device.mgt.core.service.GroupManagementProviderServiceImpl;
import org.wso2.carbon.device.mgt.core.task.DeviceTaskManagerService;
-import org.wso2.carbon.device.mgt.core.config.ui.UIConfigurationManager;
import org.wso2.carbon.device.mgt.core.util.DeviceManagementSchemaInitializer;
import org.wso2.carbon.device.mgt.core.util.DeviceManagerUtil;
import org.wso2.carbon.device.mgt.core.util.DeviceMgtTenantMgtListener;
@@ -291,6 +292,9 @@ public class DeviceManagementServiceComponent {
TenantCreateObserver listener = new TenantCreateObserver();
bundleContext.registerService(Axis2ConfigurationContextObserver.class.getName(), listener, null);
+ UserRoleCreateObserver userRoleCreateObserver = new UserRoleCreateObserver();
+ bundleContext.registerService(ServerStartupObserver.class.getName(), userRoleCreateObserver, null);
+
/* Registering Device Management Service */
DeviceManagementProviderService deviceManagementProvider = new DeviceManagementProviderServiceImpl();
DeviceManagementDataHolder.getInstance().setDeviceManagementProvider(deviceManagementProvider);
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/TenantCreateObserver.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/TenantCreateObserver.java
index ffc3724a81b..98dc6c500ed 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/TenantCreateObserver.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/TenantCreateObserver.java
@@ -21,11 +21,15 @@ import org.apache.axis2.context.ConfigurationContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.context.PrivilegedCarbonContext;
+import org.wso2.carbon.device.mgt.core.DeviceManagementConstants;
import org.wso2.carbon.device.mgt.core.DeviceManagementConstants.User;
+import org.wso2.carbon.user.api.AuthorizationManager;
+import org.wso2.carbon.user.api.Permission;
import org.wso2.carbon.user.api.UserRealm;
import org.wso2.carbon.user.api.UserStoreException;
import org.wso2.carbon.user.api.UserStoreManager;
import org.wso2.carbon.utils.AbstractAxis2ConfigurationContextObserver;
+import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
/**
* Load configuration files to tenant's registry.
@@ -48,10 +52,36 @@ public class TenantCreateObserver extends AbstractAxis2ConfigurationContextObser
UserStoreManager userStoreManager =
DeviceManagementDataHolder.getInstance().getRealmService().getTenantUserRealm(tenantId)
.getUserStoreManager();
+ AuthorizationManager authorizationManager = DeviceManagementDataHolder.getInstance().getRealmService()
+ .getTenantUserRealm(MultitenantConstants.SUPER_TENANT_ID).getAuthorizationManager();
+
String tenantAdminName = userRealm.getRealmConfiguration().getAdminUserName();
- userStoreManager.addRole(User.DEFAULT_DEVICE_USER, null, User.PERMISSIONS_FOR_DEVICE_USER);
- userStoreManager.addRole(User.DEFAULT_DEVICE_ADMIN, new String[]{tenantAdminName},
- User.PERMISSIONS_FOR_DEVICE_ADMIN);
+
+ if (!userStoreManager.isExistingRole(DeviceManagementConstants.User.DEFAULT_DEVICE_ADMIN)) {
+ userStoreManager.addRole(
+ DeviceManagementConstants.User.DEFAULT_DEVICE_ADMIN,
+ null,
+ DeviceManagementConstants.User.PERMISSIONS_FOR_DEVICE_ADMIN);
+ } else {
+ for (Permission permission : DeviceManagementConstants.User.PERMISSIONS_FOR_DEVICE_ADMIN) {
+ authorizationManager.authorizeRole(DeviceManagementConstants.User.DEFAULT_DEVICE_ADMIN,
+ permission.getResourceId(), permission.getAction());
+ }
+ }
+ if (!userStoreManager.isExistingRole(DeviceManagementConstants.User.DEFAULT_DEVICE_USER)) {
+ userStoreManager.addRole(
+ DeviceManagementConstants.User.DEFAULT_DEVICE_USER,
+ null,
+ DeviceManagementConstants.User.PERMISSIONS_FOR_DEVICE_USER);
+ } else {
+ for (Permission permission : DeviceManagementConstants.User.PERMISSIONS_FOR_DEVICE_USER) {
+ authorizationManager.authorizeRole(DeviceManagementConstants.User.DEFAULT_DEVICE_USER,
+ permission.getResourceId(), permission.getAction());
+ }
+ }
+ userStoreManager.updateRoleListOfUser(tenantAdminName, null,
+ new String[] {DeviceManagementConstants.User.DEFAULT_DEVICE_ADMIN,
+ DeviceManagementConstants.User.DEFAULT_DEVICE_USER});
if (log.isDebugEnabled()) {
log.debug("Device management roles: " + User.DEFAULT_DEVICE_USER + ", " + User.DEFAULT_DEVICE_ADMIN +
" created for the tenant:" + tenantDomain + "."
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/UserRoleCreateObserver.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/UserRoleCreateObserver.java
new file mode 100644
index 00000000000..5fb9509629e
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/UserRoleCreateObserver.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * WSO2 Inc. 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.wso2.carbon.device.mgt.core.internal;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.core.ServerStartupObserver;
+import org.wso2.carbon.device.mgt.core.DeviceManagementConstants;
+import org.wso2.carbon.user.api.AuthorizationManager;
+import org.wso2.carbon.user.api.Permission;
+import org.wso2.carbon.user.api.UserStoreException;
+import org.wso2.carbon.user.api.UserStoreManager;
+import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
+
+public class UserRoleCreateObserver implements ServerStartupObserver {
+ private static final Log log = LogFactory.getLog(UserRoleCreateObserver.class);
+ @Override
+ public void completingServerStartup() {
+
+ }
+
+ @Override
+ public void completedServerStartup() {
+ String tenantDomain = MultitenantConstants.SUPER_TENANT_DOMAIN_NAME;
+
+ try {
+ UserStoreManager userStoreManager =
+ DeviceManagementDataHolder.getInstance().getRealmService().getTenantUserRealm(
+ MultitenantConstants.SUPER_TENANT_ID).getUserStoreManager();
+ String tenantAdminName =
+ DeviceManagementDataHolder.getInstance().getRealmService().getTenantUserRealm(
+ MultitenantConstants.SUPER_TENANT_ID).getRealmConfiguration().getAdminUserName();
+ AuthorizationManager authorizationManager = DeviceManagementDataHolder.getInstance().getRealmService()
+ .getTenantUserRealm(MultitenantConstants.SUPER_TENANT_ID).getAuthorizationManager();
+
+ if (!userStoreManager.isExistingRole(DeviceManagementConstants.User.DEFAULT_DEVICE_ADMIN)) {
+ userStoreManager.addRole(
+ DeviceManagementConstants.User.DEFAULT_DEVICE_ADMIN,
+ null,
+ DeviceManagementConstants.User.PERMISSIONS_FOR_DEVICE_ADMIN);
+ } else {
+ for (Permission permission : DeviceManagementConstants.User.PERMISSIONS_FOR_DEVICE_ADMIN) {
+ authorizationManager.authorizeRole(DeviceManagementConstants.User.DEFAULT_DEVICE_ADMIN,
+ permission.getResourceId(), permission.getAction());
+ }
+ }
+ if (!userStoreManager.isExistingRole(DeviceManagementConstants.User.DEFAULT_DEVICE_USER)) {
+ userStoreManager.addRole(
+ DeviceManagementConstants.User.DEFAULT_DEVICE_USER,
+ null,
+ DeviceManagementConstants.User.PERMISSIONS_FOR_DEVICE_USER);
+ } else {
+ for (Permission permission : DeviceManagementConstants.User.PERMISSIONS_FOR_DEVICE_USER) {
+ authorizationManager.authorizeRole(DeviceManagementConstants.User.DEFAULT_DEVICE_USER,
+ permission.getResourceId(), permission.getAction());
+ }
+ }
+ userStoreManager.updateRoleListOfUser(tenantAdminName, null,
+ new String[] {DeviceManagementConstants.User.DEFAULT_DEVICE_ADMIN,
+ DeviceManagementConstants.User.DEFAULT_DEVICE_USER});
+
+ if (log.isDebugEnabled()) {
+ log.debug("Device management roles: " + DeviceManagementConstants.User.DEFAULT_DEVICE_USER + ", " +
+ DeviceManagementConstants.User.DEFAULT_DEVICE_ADMIN + " created for the tenant:" + tenantDomain + "."
+ );
+ log.debug("Tenant administrator: " + tenantAdminName + "@" + tenantDomain +
+ " is assigned to the role:" + DeviceManagementConstants.User.DEFAULT_DEVICE_ADMIN + "."
+ );
+ }
+ } catch (UserStoreException e) {
+ log.error("Error occurred while creating roles for the tenant: " + tenantDomain + ".");
+ }
+ }
+}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/permission/mgt/APIResourcePermissions.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/permission/mgt/APIResourcePermissions.java
new file mode 100644
index 00000000000..703d9f6eda8
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/permission/mgt/APIResourcePermissions.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * WSO2 Inc. 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.wso2.carbon.device.mgt.core.permission.mgt;
+
+import org.wso2.carbon.device.mgt.common.permission.mgt.Permission;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class APIResourcePermissions {
+ private Map> apiResourcePermissions;
+
+ public APIResourcePermissions() {
+ apiResourcePermissions = new HashMap<>();
+ }
+
+ public void addPermissionList(String context, List permissions){
+ apiResourcePermissions.put(context, permissions);
+ }
+
+ public List getPermissions(String context) {
+ return apiResourcePermissions.get(context);
+ }
+}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/permission/mgt/PermissionManagerServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/permission/mgt/PermissionManagerServiceImpl.java
index 07865c50953..8a222ea3f1b 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/permission/mgt/PermissionManagerServiceImpl.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/permission/mgt/PermissionManagerServiceImpl.java
@@ -22,9 +22,7 @@ import org.wso2.carbon.device.mgt.common.permission.mgt.Permission;
import org.wso2.carbon.device.mgt.common.permission.mgt.PermissionManagementException;
import org.wso2.carbon.device.mgt.common.permission.mgt.PermissionManagerService;
-import java.util.HashSet;
-import java.util.Properties;
-import java.util.Set;
+import java.util.List;
/**
* This class will add, update custom permissions defined in permission.xml in webapps and it will
@@ -32,11 +30,8 @@ import java.util.Set;
*/
public class PermissionManagerServiceImpl implements PermissionManagerService {
- public static final String URL_PROPERTY = "URL";
- public static final String HTTP_METHOD_PROPERTY = "HTTP_METHOD";
private static PermissionManagerServiceImpl registryBasedPermissionManager;
- private static PermissionTree permissionTree; // holds the permissions at runtime.
-
+ private static APIResourcePermissions apiResourcePermissions;
private PermissionManagerServiceImpl() {
}
@@ -45,7 +40,7 @@ public class PermissionManagerServiceImpl implements PermissionManagerService {
synchronized (PermissionManagerServiceImpl.class) {
if (registryBasedPermissionManager == null) {
registryBasedPermissionManager = new PermissionManagerServiceImpl();
- permissionTree = new PermissionTree();
+ apiResourcePermissions = new APIResourcePermissions();
}
}
}
@@ -53,21 +48,20 @@ public class PermissionManagerServiceImpl implements PermissionManagerService {
}
@Override
- public boolean addPermission(Permission permission) throws PermissionManagementException {
- // adding a permission to the tree
- permission.setPath(permission.getPath());
- permissionTree.addPermission(permission);
- return PermissionUtils.putPermission(permission);
+ public boolean addPermission(String context, List permissions) throws PermissionManagementException {
+ try {
+ for (Permission permission : permissions) {
+ PermissionUtils.putPermission(permission);
+ }
+ apiResourcePermissions.addPermissionList(context, permissions);
+ } catch (PermissionManagementException e) {
+ return false;
+ }
+ return true;
}
@Override
- public Permission getPermission(Properties properties) throws PermissionManagementException {
- String url = (String) properties.get(URL_PROPERTY);
- String httpMethod = (String) properties.get(HTTP_METHOD_PROPERTY);
-
- if (url == null || url.isEmpty() || httpMethod == null || httpMethod.isEmpty()) {
- throw new PermissionManagementException("Resource URI/HTTP method is empty");
- }
- return permissionTree.getPermission(url, httpMethod);
+ public List getPermission(String context) throws PermissionManagementException {
+ return apiResourcePermissions.getPermissions(context);
}
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java
index 70cbee4731a..42cbb9369bd 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java
@@ -49,7 +49,6 @@ import org.apache.http.protocol.HTTP;
import org.wso2.carbon.CarbonConstants;
import org.wso2.carbon.context.CarbonContext;
import org.wso2.carbon.context.PrivilegedCarbonContext;
-import org.wso2.carbon.device.mgt.analytics.data.publisher.exception.DataPublisherConfigurationException;
import org.wso2.carbon.device.mgt.common.ActivityPaginationRequest;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceEnrollmentInfoNotification;
@@ -164,6 +163,8 @@ import java.util.Map;
import java.util.Properties;
import java.util.stream.Collectors;
+//import org.wso2.carbon.device.mgt.analytics.data.publisher.exception.DataPublisherConfigurationException;
+
public class DeviceManagementProviderServiceImpl implements DeviceManagementProviderService,
PluginInitializationListener {
@@ -1965,20 +1966,22 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
operation.getStatus() != null ? operation.getStatus().toString() : null,
operation.getOperationResponse()
};
- DeviceManagerUtil.getEventPublisherService().publishEvent(
- OPERATION_RESPONSE_EVENT_STREAM_DEFINITION, "1.0.0", metaData, new Object[0], payload
- );
+ //todo:amalka
+// DeviceManagerUtil.getEventPublisherService().publishEvent(
+// OPERATION_RESPONSE_EVENT_STREAM_DEFINITION, "1.0.0", metaData, new Object[0], payload
+// );
}
}
} catch (DeviceManagementException e) {
String msg = "Error occurred while reading configs.";
log.error(msg, e);
throw new OperationManagementException(msg, e);
- } catch (DataPublisherConfigurationException e) {
- String msg = "Error occurred while publishing event.";
- log.error(msg, e);
- throw new OperationManagementException(msg, e);
- }
+ //todo:amalka
+ } //catch (DataPublisherConfigurationException e) {
+// String msg = "Error occurred while publishing event.";
+// log.error(msg, e);
+// throw new OperationManagementException(msg, e);
+// }
}
@Override
@@ -2007,20 +2010,22 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
operation.getStatus() != null ? operation.getStatus().toString() : null,
operation.getOperationResponse()
};
- DeviceManagerUtil.getEventPublisherService().publishEvent(
- OPERATION_RESPONSE_EVENT_STREAM_DEFINITION, "1.0.0", metaData, new Object[0], payload
- );
+ //todo:amalka
+// DeviceManagerUtil.getEventPublisherService().publishEvent(
+// OPERATION_RESPONSE_EVENT_STREAM_DEFINITION, "1.0.0", metaData, new Object[0], payload
+// );
}
}
} catch (DeviceManagementException e) {
String msg = "Error occurred while reading configs.";
log.error(msg, e);
throw new OperationManagementException(msg, e);
- } catch (DataPublisherConfigurationException e) {
- String msg = "Error occurred while publishing event.";
- log.error(msg, e);
- throw new OperationManagementException(msg, e);
- }
+ //todo:amalka
+ } //catch (DataPublisherConfigurationException e) {
+// String msg = "Error occurred while publishing event.";
+// log.error(msg, e);
+// throw new OperationManagementException(msg, e);
+// }
}
@Override
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/DeviceManagerUtil.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/DeviceManagerUtil.java
index 36315a13151..8a88d53ac0d 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/DeviceManagerUtil.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/util/DeviceManagerUtil.java
@@ -50,7 +50,6 @@ import org.wso2.carbon.base.MultitenantConstants;
import org.wso2.carbon.caching.impl.CacheImpl;
import org.wso2.carbon.context.CarbonContext;
import org.wso2.carbon.context.PrivilegedCarbonContext;
-import org.wso2.carbon.device.mgt.analytics.data.publisher.service.EventsPublisherService;
import org.wso2.carbon.device.mgt.common.AppRegistrationCredentials;
import org.wso2.carbon.device.mgt.common.ApplicationRegistration;
import org.wso2.carbon.device.mgt.common.ApplicationRegistrationException;
@@ -67,12 +66,12 @@ import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration
import org.wso2.carbon.device.mgt.common.event.config.EventConfigurationProviderService;
import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.exceptions.DeviceNotFoundException;
+import org.wso2.carbon.device.mgt.common.exceptions.MetadataManagementException;
import org.wso2.carbon.device.mgt.common.exceptions.TransactionManagementException;
import org.wso2.carbon.device.mgt.common.geo.service.GeofenceData;
import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroup;
import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroupConstants;
import org.wso2.carbon.device.mgt.common.group.mgt.GroupManagementException;
-import org.wso2.carbon.device.mgt.common.exceptions.MetadataManagementException;
import org.wso2.carbon.device.mgt.common.notification.mgt.NotificationManagementException;
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
import org.wso2.carbon.device.mgt.common.type.mgt.DeviceTypeMetaDefinition;
@@ -97,10 +96,12 @@ import org.wso2.carbon.identity.jwt.client.extension.JWTClient;
import org.wso2.carbon.identity.jwt.client.extension.dto.AccessTokenInfo;
import org.wso2.carbon.identity.jwt.client.extension.exception.JWTClientException;
import org.wso2.carbon.identity.jwt.client.extension.service.JWTClientManagerService;
+import org.wso2.carbon.user.api.RealmConfiguration;
import org.wso2.carbon.user.api.TenantManager;
import org.wso2.carbon.user.api.UserRealm;
import org.wso2.carbon.user.api.UserStoreException;
import org.wso2.carbon.user.api.UserStoreManager;
+import org.wso2.carbon.user.core.config.RealmConfigXMLProcessor;
import org.wso2.carbon.utils.CarbonUtils;
import org.wso2.carbon.utils.ConfigurationContextService;
import org.wso2.carbon.utils.NetworkUtils;
@@ -136,6 +137,7 @@ public final class DeviceManagerUtil {
public static final String GENERAL_CONFIG_RESOURCE_PATH = "general";
private static boolean isDeviceCacheInitialized = false;
+ private static boolean isAPIResourcePermissionCacheInitialized = false;
private static boolean isGeoFenceCacheInitialized = false;
public static Document convertToDocument(File file) throws DeviceManagementException {
@@ -596,18 +598,6 @@ public final class DeviceManagerUtil {
return Caching.getCacheManagerFactory().getCacheManager(DeviceManagementConstants.DM_CACHE_MANAGER);
}
- public static EventsPublisherService getEventPublisherService() {
- PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
- EventsPublisherService eventsPublisherService =
- (EventsPublisherService) ctx.getOSGiService(EventsPublisherService.class, null);
- if (eventsPublisherService == null) {
- String msg = "Event Publisher service has not initialized.";
- log.error(msg);
- throw new IllegalStateException(msg);
- }
- return eventsPublisherService;
- }
-
/**
* Retrieve EventConfigurationProviderService osgi service component
* @return {@link EventConfigurationProviderService} service component
@@ -1164,6 +1154,57 @@ public final class DeviceManagerUtil {
return userStoreManager.getUserClaimValue(username, claimUri, null);
}
+ public static String replaceSystemProperty(String text) {
+
+ int indexOfStartingChars = -1;
+ int indexOfClosingBrace;
+
+ // The following condition deals with properties.
+ // Properties are specified as ${system.property},
+ // and are assumed to be System properties
+ while (indexOfStartingChars < text.indexOf("${")
+ && (indexOfStartingChars = text.indexOf("${")) != -1
+ && (indexOfClosingBrace = text.indexOf('}')) != -1) { // Is a
+ // property
+ // used?
+ String sysProp = text.substring(indexOfStartingChars + 2,
+ indexOfClosingBrace);
+ String propValue = System.getProperty(sysProp);
+
+ if (propValue == null) {
+ if ("carbon.context".equals(sysProp)) {
+ propValue = DeviceManagementDataHolder.getInstance().getConfigurationContextService()
+ .getServerConfigContext().getContextRoot();
+ } else if ("admin.username".equals(sysProp) || "admin.password".equals(sysProp)) {
+ try {
+ RealmConfiguration realmConfig =
+ new RealmConfigXMLProcessor().buildRealmConfigurationFromFile();
+ if ("admin.username".equals(sysProp)) {
+ propValue = realmConfig.getAdminUserName();
+ } else {
+ propValue = realmConfig.getAdminPassword();
+ }
+ } catch (UserStoreException e) {
+ // Can't throw an exception because the server is
+ // starting and can't be halted.
+ log.error("Unable to build the Realm Configuration", e);
+ return null;
+ }
+ }
+ }
+ //Derive original text value with resolved system property value
+ if (propValue != null) {
+ text = text.substring(0, indexOfStartingChars) + propValue
+ + text.substring(indexOfClosingBrace + 1);
+ }
+ if ("carbon.home".equals(sysProp) && propValue != null
+ && ".".equals(propValue)) {
+ text = new File(".").getAbsolutePath() + File.separator + text;
+ }
+ }
+ return text;
+ }
+
/**
* Create the parent path that the children groups can have
* @param deviceGroup parent group
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/authorization/DeviceAccessAuthorizationServiceTest.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/authorization/DeviceAccessAuthorizationServiceTest.java
index eb8bf8ce0ae..759bb1b48b6 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/authorization/DeviceAccessAuthorizationServiceTest.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/authorization/DeviceAccessAuthorizationServiceTest.java
@@ -157,7 +157,7 @@ public class DeviceAccessAuthorizationServiceTest {
//Adding a non Admin User
userStoreManager.addUser(NON_ADMIN_ALLOWED_USER, PASSWORD, null, defaultUserClaims, null);
//Adding a normal user
- userStoreManager.addUser(NORMAL_USER, PASSWORD, null, defaultUserClaims, null);
+ userStoreManager.addUser(NORMAL_USER, PASSWORD, null, buildDefaultUserClaims(FIRST_NAME, LAST_NAME, EMAIL), null);
//Adding role with permission to Admin user
userStoreManager.addRole(ADMIN_ROLE, new String[]{ADMIN_USER}, new Permission[]{adminPermission});
//Adding role with permission to non Admin user
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/permission/mgt/PermissionManagerServiceTest.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/permission/mgt/PermissionManagerServiceTest.java
index 0bdcc6fb5ce..12ebfa503a4 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/permission/mgt/PermissionManagerServiceTest.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/permission/mgt/PermissionManagerServiceTest.java
@@ -31,6 +31,8 @@ import org.wso2.carbon.device.mgt.common.permission.mgt.PermissionManagementExce
import org.wso2.carbon.device.mgt.common.permission.mgt.PermissionManagerService;
import org.wso2.carbon.registry.core.exceptions.RegistryException;
+import java.util.ArrayList;
+import java.util.List;
import java.util.Properties;
import static org.mockito.MockitoAnnotations.initMocks;
@@ -46,11 +48,15 @@ public class PermissionManagerServiceTest {
private static final String PERMISSION_PATH = "permission/admin/device-mgt/test/testPermission";
private static final String PERMISSION_METHOD = "ui.execute";
private static final String PERMISSION_NAME = "Test Permission";
+ private static final String PERMISSION_CONTEXT = "permission/admin/device-mgt/test/testPermission";
+ private static final String INVALID_PERMISSION_CONTEXT = "permission/INVALID";
+
//For create properties to retrieve permission.
private static final String HTTP_METHOD = "HTTP_METHOD";
private static final String URL = "URL";
private Permission permission;
+ private final List permissionList = new ArrayList<>();
private PermissionManagerService permissionManagerService;
@ObjectFactory
@@ -61,12 +67,13 @@ public class PermissionManagerServiceTest {
@BeforeClass
public void init() throws RegistryException {
initMocks(this);
- permissionManagerService = PermissionManagerServiceImpl.getInstance();
+ this.permissionManagerService = PermissionManagerServiceImpl.getInstance();
this.permission = new Permission();
- permission.setName(PERMISSION_NAME);
- permission.setPath(PERMISSION_PATH);
- permission.setMethod(PERMISSION_METHOD);
- permission.setUrl(PERMISSION_URL);
+ this.permission.setName(PERMISSION_NAME);
+ this.permission.setPath(PERMISSION_PATH);
+ this.permission.setMethod(PERMISSION_METHOD);
+ this.permission.setUrl(PERMISSION_URL);
+ this.permissionList.add(this.permission);
}
@Test (description = "Create a new permission in the permission tree.")
@@ -74,7 +81,7 @@ public class PermissionManagerServiceTest {
try {
PowerMockito.mockStatic(PermissionUtils.class);
PowerMockito.when(PermissionUtils.putPermission(permission)).thenReturn(true);
- Assert.assertTrue(permissionManagerService.addPermission(permission));
+ Assert.assertTrue(permissionManagerService.addPermission(PERMISSION_CONTEXT, this.permissionList));
} catch (PermissionManagementException e) {
log.error("Error creating permission " + e.getErrorMessage());
}
@@ -83,39 +90,18 @@ public class PermissionManagerServiceTest {
@Test (dependsOnMethods = {"testCreatePermission"}, description = "Test for retrieving the created permission " +
"from the permission tree.")
public void testGetPermission() throws PermissionManagementException {
- Permission permission = permissionManagerService.getPermission(createProperties());
- Assert.assertEquals(permission.getMethod(), PERMISSION_METHOD);
- Assert.assertEquals(permission.getName(), PERMISSION_NAME);
- Assert.assertEquals(permission.getPath(), PERMISSION_PATH);
- Assert.assertEquals(permission.getUrl(), PERMISSION_URL);
+ List permissions = permissionManagerService.getPermission(PERMISSION_CONTEXT);
+ for (Permission permission : permissions) {
+ Assert.assertEquals(permission.getMethod(), PERMISSION_METHOD);
+ Assert.assertEquals(permission.getName(), PERMISSION_NAME);
+ Assert.assertEquals(permission.getPath(), PERMISSION_PATH);
+ Assert.assertEquals(permission.getUrl(), PERMISSION_URL);
+ }
}
- @Test (dependsOnMethods = {"testCreatePermission"},
- expectedExceptions = {PermissionManagementException.class},
- expectedExceptionsMessageRegExp = "Resource URI/HTTP method is empty")
+ @Test (dependsOnMethods = {"testCreatePermission"})
public void testGetPermissionError() throws PermissionManagementException {
- Permission permission = permissionManagerService.getPermission(createErrorProperty());
- }
-
- /**
- * Create a Property object which will be passed to getPermission method to retrieve a permission.
- * @return : Property object which contains permission url and method.
- * */
- private Properties createProperties() {
- Properties properties = new Properties();
- properties.setProperty(URL, PERMISSION_URL);
- properties.setProperty(HTTP_METHOD, PERMISSION_METHOD);
- return properties;
- }
-
- /**
- * Creates property object with empty properties.
- * @return : Properties object with empty set of properties.
- * */
- private Properties createErrorProperty() {
- Properties properties = new Properties();
- properties.setProperty(URL, "");
- properties.setProperty(HTTP_METHOD, "");
- return properties;
+ List permissions = permissionManagerService.getPermission(INVALID_PERMISSION_CONTEXT);
+ Assert.assertNull(permissions);
}
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderServiceTest.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderServiceTest.java
index b645eac9a0d..3073b5ee3da 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderServiceTest.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderServiceTest.java
@@ -37,6 +37,7 @@ package org.wso2.carbon.device.mgt.core.service;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
+import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
@@ -101,91 +102,91 @@ public class GroupManagementProviderServiceTest extends BaseDeviceManagementTest
groupManagementProviderService.createGroup(TestUtils.createDeviceGroup4(), DEFAULT_ADMIN_ROLE, DEFAULT_ADMIN_PERMISSIONS);
}
- @Test(dependsOnMethods = ("createGroup"))
+ @Test(dependsOnMethods = "createGroup")
public void updateGroup() throws GroupManagementException, GroupNotExistException {
DeviceGroup deviceGroup = groupManagementProviderService.getGroup(TestUtils.createDeviceGroup1().getName(), false);
deviceGroup.setName(deviceGroup.getName() + "_UPDATED");
groupManagementProviderService.updateGroup(deviceGroup, deviceGroup.getGroupId());
}
- @Test(dependsOnMethods = ("createGroup"), expectedExceptions = {GroupManagementException.class})
+ @Test(dependsOnMethods = "createGroup", expectedExceptions = {GroupManagementException.class})
public void getGroupNull() throws GroupManagementException, GroupNotExistException {
groupManagementProviderService.getGroup(null, false);
}
// Rename again to use in different place.
- @Test(dependsOnMethods = ("updateGroup"))
+ @Test(dependsOnMethods = "updateGroup")
public void updateGroupSecondTime() throws GroupManagementException, GroupNotExistException {
DeviceGroup deviceGroup = groupManagementProviderService.getGroup(TestUtils.createDeviceGroup1().getName() + "_UPDATED", true);
deviceGroup.setName(TestUtils.createDeviceGroup1().getName());
groupManagementProviderService.updateGroup(deviceGroup, deviceGroup.getGroupId());
}
- @Test(dependsOnMethods = ("createGroup"), expectedExceptions = {GroupManagementException.class, GroupNotExistException.class})
+ @Test(dependsOnMethods = "createGroup", expectedExceptions = {GroupManagementException.class, GroupNotExistException.class})
public void updateGroupError() throws GroupManagementException, GroupNotExistException {
groupManagementProviderService.updateGroup(null, 1);
}
- @Test(dependsOnMethods = ("createGroup"), expectedExceptions = {GroupManagementException.class, GroupNotExistException.class})
+ @Test(dependsOnMethods = "createGroup", expectedExceptions = {GroupManagementException.class, GroupNotExistException.class})
public void updateGroupErrorNotExist() throws GroupManagementException, GroupNotExistException {
DeviceGroup deviceGroup = groupManagementProviderService.getGroup(TestUtils.createDeviceGroup2().getName(), false);
deviceGroup.setName(deviceGroup.getName() + "_UPDATED");
groupManagementProviderService.updateGroup(deviceGroup, 6);
}
- @Test(dependsOnMethods = ("createGroup"))
+ @Test(dependsOnMethods = "createGroup")
public void deleteGroup() throws GroupManagementException {
DeviceGroup deviceGroup = groupManagementProviderService.getGroup(TestUtils.createDeviceGroup4().getName(), false);
Assert.assertTrue(groupManagementProviderService.deleteGroup(deviceGroup.getGroupId(), false));
}
- @Test(dependsOnMethods = ("createGroup"))
+ @Test(dependsOnMethods = "createGroup")
public void deleteGroupNotExists() throws GroupManagementException {
groupManagementProviderService.deleteGroup(8, false);
}
- @Test(dependsOnMethods = ("createGroup"))
+ @Test(dependsOnMethods = "createGroup")
public void getGroup() throws GroupManagementException {
DeviceGroup deviceGroup = groupManagementProviderService.getGroup(TestUtils.createDeviceGroup3().getName(), false);
Assert.assertNotNull(groupManagementProviderService.getGroup(deviceGroup.getGroupId(), false));
}
- @Test(dependsOnMethods = ("createGroup"))
+ @Test(dependsOnMethods = "createGroup")
public void getGroupByName() throws GroupManagementException {
Assert.assertNotNull(groupManagementProviderService.getGroup(TestUtils.createDeviceGroup3().getName(), false));
}
- @Test(dependsOnMethods = ("createGroup"))
+ @Test(dependsOnMethods = "createGroup")
public void getGroups() throws GroupManagementException {
List deviceGroups = groupManagementProviderService.getGroups(true);
Assert.assertNotNull(deviceGroups);
}
- @Test(dependsOnMethods = ("createGroup"))
+ @Test(dependsOnMethods = "createGroup")
public void getGroupsByUsername() throws GroupManagementException {
List deviceGroups = groupManagementProviderService.getGroups("admin", true);
Assert.assertNotNull(deviceGroups);
}
- @Test(dependsOnMethods = ("createGroup"), expectedExceptions = {GroupManagementException.class})
+ @Test(dependsOnMethods = "createGroup", expectedExceptions = {GroupManagementException.class})
public void getGroupsByUsernameError() throws GroupManagementException {
groupManagementProviderService.getGroups((String) null, false);
}
- @Test(dependsOnMethods = ("createGroup"))
+ @Test(dependsOnMethods = "createGroup")
public void getGroupsByPagination() throws GroupManagementException {
PaginationResult result = groupManagementProviderService.getGroups(TestUtils.createPaginationRequest(), true);
Assert.assertNotNull(result);
}
- @Test(dependsOnMethods = ("createGroup"), expectedExceptions = {GroupManagementException.class})
+ @Test(dependsOnMethods = "createGroup", expectedExceptions = {GroupManagementException.class})
public void getGroupsByPaginationError() throws GroupManagementException {
groupManagementProviderService.getGroups((GroupPaginationRequest) null, true);
}
- @Test(dependsOnMethods = ("createGroup"))
+ @Test(dependsOnMethods = "createGroup")
public void getGroupsByUsernameAndPagination()
throws GroupManagementException {
PaginationResult result = groupManagementProviderService.getGroups("admin", TestUtils.createPaginationRequest(), false);
@@ -193,25 +194,30 @@ public class GroupManagementProviderServiceTest extends BaseDeviceManagementTest
}
- @Test(dependsOnMethods = ("createGroup"), expectedExceptions = {GroupManagementException.class})
+ @Test(dependsOnMethods = "createGroup", expectedExceptions = {GroupManagementException.class})
public void getGroupsByUsernameAndPaginationError()
throws GroupManagementException {
groupManagementProviderService.getGroups(null, TestUtils.createPaginationRequest(), true);
}
- @Test(dependsOnMethods = ("createGroup"))
+ @Test(dependsOnMethods = "createGroup")
public void getGroupCount() throws GroupManagementException {
int x = groupManagementProviderService.getGroupCount();
Assert.assertNotNull(x);
}
- @Test(dependsOnMethods = ("createGroup"))
+ @DataProvider(name = "getGroupCountByUsernameProvider")
+ public static Object[][] userName() {
+ return new Object[][] {{"admin"}};
+ }
+
+ @Test(dependsOnMethods = "createGroup", dataProvider = "getGroupCountByUsernameProvider")
public void getGroupCountByUsername(String username) throws GroupManagementException {
int x = groupManagementProviderService.getGroupCount(username, null);
- Assert.assertNotNull(x);
+ Assert.assertNotEquals(x, 0);
}
- @Test(dependsOnMethods = ("updateGroupSecondTime"))
+ @Test(dependsOnMethods = "updateGroupSecondTime")
public void manageGroupSharing() throws GroupManagementException, RoleDoesNotExistException, UserStoreException {
groupManagementProviderService.manageGroupSharing(0, null);
List newRoles = new ArrayList<>();
@@ -234,25 +240,25 @@ public class GroupManagementProviderServiceTest extends BaseDeviceManagementTest
TestUtils.createDeviceGroup1().getName(), false).getGroupId(), newRoles);
}
- @Test(dependsOnMethods = ("createGroup"))
+ @Test(dependsOnMethods = "createGroup")
public void getRoles() throws GroupManagementException {
List roles = groupManagementProviderService.getRoles(1);
Assert.assertNotNull(roles);
}
- @Test(dependsOnMethods = ("createGroup"))
+ @Test(dependsOnMethods = "createGroup")
public void getDevices() throws GroupManagementException {
List devices = groupManagementProviderService.getDevices(1, 1, 50, false);
Assert.assertNotNull(devices);
}
- @Test(dependsOnMethods = ("createGroup"))
+ @Test(dependsOnMethods = "createGroup")
public void getDeviceCount() throws GroupManagementException {
int x = groupManagementProviderService.getDeviceCount(1);
Assert.assertEquals(0, x);
}
- @Test(dependsOnMethods = ("createGroup"))
+ @Test(dependsOnMethods = "createGroup")
public void addDevices() throws GroupManagementException, DeviceNotFoundException {
DeviceCacheConfiguration configuration = new DeviceCacheConfiguration();
@@ -268,7 +274,7 @@ public class GroupManagementProviderServiceTest extends BaseDeviceManagementTest
TestUtils.createDeviceGroup3().getName(), false).getGroupId(), list);
}
- @Test(dependsOnMethods = ("addDevices"))
+ @Test(dependsOnMethods = "addDevices")
public void removeDevice() throws GroupManagementException, DeviceNotFoundException {
List list = TestUtils.getDeviceIdentifiersList();
groupManagementProviderService.removeDevice(groupManagementProviderService.getGroup(
@@ -277,13 +283,13 @@ public class GroupManagementProviderServiceTest extends BaseDeviceManagementTest
TestUtils.createDeviceGroup3().getName(), false).getGroupId(), list);
}
- @Test(dependsOnMethods = ("createGroup"))
+ @Test(dependsOnMethods = "createGroup")
public void getGroupsByUsernameAndPermissions() throws GroupManagementException {
List groups = groupManagementProviderService.getGroups("admin", "/permission/device-mgt/admin/groups", true);
Assert.assertNotNull(groups);
}
- @Test(dependsOnMethods = ("addDevices"))
+ @Test(dependsOnMethods = "addDevices")
public void getGroupsByDeviceIdentifier() throws GroupManagementException {
DeviceIdentifier identifier = new DeviceIdentifier();
identifier.setId("12345");
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml
index 43353e14686..f98e8672e11 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml
@@ -22,7 +22,7 @@
device-mgt
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
@@ -83,7 +83,7 @@
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.common
+ io.entgra.application.mgt.common
test
@@ -178,15 +178,15 @@
javax.xml.stream,
javax.xml.parsers;resolution:=optional,
org.apache.commons.lang,
- org.osgi.service.component,
+ org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
+ org.osgi.service.*;version="${imp.package.version.osgi.service}",
org.w3c.dom,
org.wso2.carbon.ndatasource.core,
org.wso2.carbon.registry.core.service,
org.wso2.carbon.utils.dbcreator,
org.wso2.carbon.utils.multitenancy,
org.wso2.carbon.device.mgt.core.service,
- com.google.gson,
- org.osgi.framework
+ com.google.gson
org.wso2.carbon.device.mgt.extensions.pull.notification,
org.wso2.carbon.device.mgt.extensions.pull.notification.*
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml
index 402dedb384b..cda668636f4 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml
@@ -22,7 +22,7 @@
device-mgt
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml
index b3bef7291a8..981a5383b35 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml
@@ -23,7 +23,7 @@
device-mgt
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
@@ -61,8 +61,8 @@
IoT Server Impl Bundle
org.wso2.carbon.device.mgt.url.printer.internal
- org.osgi.framework,
- org.osgi.service.component,
+ org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
+ org.osgi.service.*;version="${imp.package.version.osgi.service}",
org.apache.commons.logging,
org.apache.axis2.*;version="${axis2.osgi.version.range}",
org.wso2.carbon.core,
diff --git a/components/device-mgt/pom.xml b/components/device-mgt/pom.xml
index 2d489faa9ec..0e362501db6 100644
--- a/components/device-mgt/pom.xml
+++ b/components/device-mgt/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../../pom.xml
@@ -36,11 +36,8 @@
org.wso2.carbon.device.mgt.core
org.wso2.carbon.device.mgt.common
org.wso2.carbon.device.mgt.extensions
- org.wso2.carbon.device.mgt.ui
org.wso2.carbon.device.mgt.api
- org.wso2.carbon.device.mgt.analytics.data.publisher
org.wso2.carbon.device.mgt.url.printer
- org.wso2.carbon.device.mgt.analytics.wsproxy
io.entgra.carbon.device.mgt.config.api
diff --git a/components/heartbeat-management/io.entgra.server.bootup.heartbeat.beacon/pom.xml b/components/heartbeat-management/io.entgra.server.bootup.heartbeat.beacon/pom.xml
index 70cdb932162..2a660006e60 100644
--- a/components/heartbeat-management/io.entgra.server.bootup.heartbeat.beacon/pom.xml
+++ b/components/heartbeat-management/io.entgra.server.bootup.heartbeat.beacon/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
heartbeat-management
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
@@ -53,20 +53,14 @@
org.apache.axis2.*;version="${axis2.osgi.version.range}",
org.apache.axiom.*; version="${axiom.osgi.version.range}",
- org.osgi.framework,
- org.osgi.service.component,
+ org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
+ org.osgi.service.*;version="${imp.package.version.osgi.service}",
org.apache.commons.logging,
javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional,
org.wso2.carbon.context,
org.wso2.carbon.utils.*,
org.wso2.carbon.ndatasource.core,
org.w3c.dom,
- org.apache.velocity;version="${velocity.version}",
- org.apache.velocity.app;version="${velocity.version}",
- org.apache.velocity.context;version="${velocity.version}",
- org.apache.velocity.exception;version="${velocity.version}",
- org.apache.velocity.runtime.resource;version="${velocity.version}",
- org.apache.velocity.runtime.resource.loader;version="${velocity.version}",
org.apache.commons.io,
org.apache.axis2.transport.mail,
org.apache.commons.collections,
@@ -149,10 +143,6 @@
org.apache.axis2.wso2
axis2
-
- org.wso2.orbit.org.apache.velocity
- velocity
-
commons-io.wso2
commons-io
diff --git a/components/heartbeat-management/pom.xml b/components/heartbeat-management/pom.xml
index 08477b29cbf..dae6112b778 100644
--- a/components/heartbeat-management/pom.xml
+++ b/components/heartbeat-management/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../../pom.xml
diff --git a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml
index ae46c74805c..2a9d3b6c2f7 100644
--- a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml
+++ b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml
@@ -22,13 +22,12 @@
org.wso2.carbon.devicemgt
identity-extensions
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.oauth.extensions
- 4.1.16-SNAPSHOT
bundle
WSO2 Carbon - OAuth Extensions
http://wso2.org
@@ -45,10 +44,6 @@
org.wso2.carbon
org.wso2.carbon.user.core
-
-
- org.wso2.carbon.apimgt
- org.wso2.carbon.apimgt.keymgt
com.googlecode.json-simple.wso2
@@ -104,7 +99,7 @@
org.wso2.carbon.utils,
org.wso2.carbon.context,
org.wso2.carbon.identity.oauth.*;version="${carbon.identity.framework.version.range}",
- org.wso2.carbon.apimgt.keymgt.*;version="${carbon.api.mgt.version.range}",
+
org.wso2.carbon.base,
org.wso2.carbon.identity.application.authentication.framework.model;version="${carbon.identity.framework.version.range}",
org.wso2.carbon.identity.base;version="${carbon.identity.framework.version.range}",
diff --git a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/handlers/grant/AccessTokenGrantHandler.java b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/handlers/grant/AccessTokenGrantHandler.java
index 1153cb0561f..92dd1ad8144 100644
--- a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/handlers/grant/AccessTokenGrantHandler.java
+++ b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/handlers/grant/AccessTokenGrantHandler.java
@@ -21,7 +21,6 @@ package org.wso2.carbon.device.mgt.oauth.extensions.handlers.grant;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.apimgt.keymgt.ScopesIssuer;
import org.wso2.carbon.device.mgt.oauth.extensions.handlers.grant.oauth.validator.LocalOAuthValidator;
import org.wso2.carbon.device.mgt.oauth.extensions.handlers.grant.oauth.validator.OAuthValidationResponse;
import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticatedUser;
@@ -57,11 +56,6 @@ public class AccessTokenGrantHandler extends AbstractAuthorizationGrantHandler {
}
}
- @Override
- public boolean validateScope(OAuthTokenReqMessageContext tokReqMsgCtx) {
- return ScopesIssuer.getInstance().setScopes(tokReqMsgCtx);
- }
-
@Override
public boolean validateGrant(OAuthTokenReqMessageContext tokReqMsgCtx) throws IdentityOAuth2Exception {
if (!super.validateGrant(tokReqMsgCtx)) {
diff --git a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/handlers/grant/ExtendedJWTGrantHandler.java b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/handlers/grant/ExtendedJWTGrantHandler.java
index 006317f1794..0fe613fa31d 100644
--- a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/handlers/grant/ExtendedJWTGrantHandler.java
+++ b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/handlers/grant/ExtendedJWTGrantHandler.java
@@ -20,14 +20,10 @@ package org.wso2.carbon.device.mgt.oauth.extensions.handlers.grant;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.apimgt.keymgt.ScopesIssuer;
-import org.wso2.carbon.base.MultitenantConstants;
-import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticatedUser;
import org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception;
import org.wso2.carbon.identity.oauth2.grant.jwt.JWTBearerGrantHandler;
import org.wso2.carbon.identity.oauth2.model.RequestParameter;
import org.wso2.carbon.identity.oauth2.token.OAuthTokenReqMessageContext;
-import org.wso2.carbon.utils.multitenancy.MultitenantUtils;
/**
* This sets up user with tenant aware username.
@@ -37,11 +33,6 @@ public class ExtendedJWTGrantHandler extends JWTBearerGrantHandler {
private static Log log = LogFactory.getLog(ExtendedJWTGrantHandler.class);
private static final String TENANT_DOMAIN_KEY = "tenantDomain";
- @Override
- public boolean validateScope(OAuthTokenReqMessageContext tokReqMsgCtx) {
- return ScopesIssuer.getInstance().setScopes(tokReqMsgCtx);
- }
-
@Override
public boolean validateGrant(OAuthTokenReqMessageContext tokReqMsgCtx) throws IdentityOAuth2Exception {
diff --git a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/handlers/grant/ExtendedSAML2BearerGrantHandler.java b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/handlers/grant/ExtendedSAML2BearerGrantHandler.java
index 5caededdafd..749cf841470 100644
--- a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/handlers/grant/ExtendedSAML2BearerGrantHandler.java
+++ b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/handlers/grant/ExtendedSAML2BearerGrantHandler.java
@@ -20,7 +20,6 @@ package org.wso2.carbon.device.mgt.oauth.extensions.handlers.grant;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.apimgt.keymgt.ScopesIssuer;
import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticatedUser;
import org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception;
import org.wso2.carbon.identity.oauth2.token.OAuthTokenReqMessageContext;
@@ -34,11 +33,6 @@ import org.wso2.carbon.utils.multitenancy.MultitenantUtils;
public class ExtendedSAML2BearerGrantHandler extends SAML2BearerGrantHandler {
private static Log log = LogFactory.getLog(ExtendedSAML2BearerGrantHandler.class);
- @Override
- public boolean validateScope(OAuthTokenReqMessageContext tokReqMsgCtx) {
- return ScopesIssuer.getInstance().setScopes(tokReqMsgCtx);
- }
-
@Override
public boolean validateGrant(OAuthTokenReqMessageContext tokReqMsgCtx) throws IdentityOAuth2Exception {
if(!super.validateGrant(tokReqMsgCtx)){
diff --git a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml
index 4adb6539aba..33286cd1e68 100644
--- a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml
+++ b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml
@@ -21,7 +21,7 @@
identity-extensions
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
4.0.0
diff --git a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml
index b793b016fa0..dcabec21e4e 100644
--- a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml
+++ b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
identity-extensions
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
@@ -185,8 +185,8 @@
org.wso2.carbon.identity.jwt.client.extension.*
- org.osgi.framework,
- org.osgi.service.component,
+ org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
+ org.osgi.service.*;version="${imp.package.version.osgi.service}",
org.wso2.carbon.context,
org.wso2.carbon.registry.core,
org.wso2.carbon.registry.core.exceptions,
diff --git a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/src/main/java/org/wso2/carbon/identity/jwt/client/extension/util/JWTClientUtil.java b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/src/main/java/org/wso2/carbon/identity/jwt/client/extension/util/JWTClientUtil.java
index 93f6e6fd171..f9980d21223 100644
--- a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/src/main/java/org/wso2/carbon/identity/jwt/client/extension/util/JWTClientUtil.java
+++ b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/src/main/java/org/wso2/carbon/identity/jwt/client/extension/util/JWTClientUtil.java
@@ -232,18 +232,18 @@ public class JWTClientUtil {
}
List aud = jwtConfig.getAudiences();
//set up the basic claims
- JWTClaimsSet claimsSet = new JWTClaimsSet();
- claimsSet.setIssueTime(new Date(iat));
- claimsSet.setExpirationTime(new Date(exp));
- claimsSet.setIssuer(iss);
- claimsSet.setSubject(username);
- claimsSet.setNotBeforeTime(new Date(nbf));
- claimsSet.setJWTID(jti);
- claimsSet.setAudience(aud);
- claimsSet.setClaim(SIGNED_JWT_AUTH_USERNAME, username);
+ JWTClaimsSet.Builder claimsSet = new JWTClaimsSet.Builder();
+ claimsSet.issueTime(new Date(iat));
+ claimsSet.expirationTime(new Date(exp));
+ claimsSet.issuer(iss);
+ claimsSet.subject(username);
+ claimsSet.notBeforeTime(new Date(nbf));
+ claimsSet.jwtID(jti);
+ claimsSet.audience(aud);
+ claimsSet.claim(SIGNED_JWT_AUTH_USERNAME, username);
if (customClaims != null && !customClaims.isEmpty()) {
for (String key : customClaims.keySet()) {
- claimsSet.setClaim(key, customClaims.get(key));
+ claimsSet.claim(key, customClaims.get(key));
}
}
@@ -280,7 +280,7 @@ public class JWTClientUtil {
}
}
JWSSigner signer = new RSASSASigner(rsaPrivateKey);
- SignedJWT signedJWT = new SignedJWT(new JWSHeader(JWSAlgorithm.RS256), claimsSet);
+ SignedJWT signedJWT = new SignedJWT(new JWSHeader(JWSAlgorithm.RS256), claimsSet.build());
signedJWT.sign(signer);
String assertion = signedJWT.serialize();
return assertion;
diff --git a/components/identity-extensions/pom.xml b/components/identity-extensions/pom.xml
index e10007a1ac6..05a00e3768a 100644
--- a/components/identity-extensions/pom.xml
+++ b/components/identity-extensions/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../../pom.xml
@@ -33,7 +33,6 @@
http://wso2.org
- org.wso2.carbon.identity.authenticator.backend.oauth
org.wso2.carbon.device.mgt.oauth.extensions
org.wso2.carbon.identity.jwt.client.extension
diff --git a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml
index 4823875d183..6e0f87666d2 100644
--- a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml
+++ b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml
@@ -22,14 +22,13 @@
org.wso2.carbon.devicemgt
policy-mgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.complex.policy.decision.point
- 4.1.16-SNAPSHOT
bundle
WSO2 Carbon - Policy Decision Point
WSO2 Carbon - Policy Decision Point
diff --git a/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml
index 89a475e2597..8c43b569f96 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml
+++ b/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml
@@ -3,14 +3,13 @@
org.wso2.carbon.devicemgt
policy-mgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.policy.decision.point
- 4.1.16-SNAPSHOT
bundle
WSO2 Carbon - Policy Decision Point
WSO2 Carbon - Policy Decision Point
@@ -35,9 +34,9 @@
Policy Decision Point Bundle
org.wso2.carbon.policy.decision.point.internal
- org.wso2.carbon.context.*;
- org.osgi.framework,
- org.osgi.service.component,
+ org.wso2.carbon.context;version="${carbon.kernel.version.range}",
+ org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
+ org.osgi.service.*;version="${imp.package.version.osgi.service}",
org.apache.commons.logging,
org.wso2.carbon.policy.mgt.common.*,
org.wso2.carbon.policy.mgt.core.*,
diff --git a/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml
index 91e54e19aee..00a3b9c9254 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml
+++ b/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml
@@ -3,7 +3,7 @@
org.wso2.carbon.devicemgt
policy-mgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
@@ -11,7 +11,6 @@
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.policy.information.point
- 4.1.16-SNAPSHOT
bundle
WSO2 Carbon - Policy Information Point
WSO2 Carbon - Policy Information Point
diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml
index 7430fd32119..8aa6a915177 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml
+++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml
@@ -22,14 +22,13 @@
org.wso2.carbon.devicemgt
policy-mgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.policy.mgt.common
- 4.1.16-SNAPSHOT
bundle
WSO2 Carbon - Policy Management Common
WSO2 Carbon - Policy Management Common
diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml
index 20aab933b05..2efdf89d5f6 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml
+++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml
@@ -22,13 +22,12 @@
org.wso2.carbon.devicemgt
policy-mgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.policy.mgt.core
- 4.1.16-SNAPSHOT
bundle
WSO2 Carbon - Policy Management Core
WSO2 Carbon - Policy Management Core
@@ -53,8 +52,8 @@
Policy Management Core Bundle
org.wso2.carbon.policy.mgt.core.internal
- org.osgi.framework,
- org.osgi.service.component,
+ org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
+ org.osgi.service.*;version="${imp.package.version.osgi.service}",
org.apache.commons.logging,
javax.sql,
javax.cache,
diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/PolicyEvaluationTestCase.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/PolicyEvaluationTestCase.java
index bf7a5bb7602..cebfef03c7a 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/PolicyEvaluationTestCase.java
+++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/PolicyEvaluationTestCase.java
@@ -23,6 +23,7 @@ import junit.framework.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.testng.annotations.BeforeClass;
+import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
@@ -90,7 +91,12 @@ public class PolicyEvaluationTestCase extends BasePolicyManagementDAOTest {
//administratorPoint.publishChanges();
}
- @Test(dependsOnMethods = ("activatePolicies"))
+ @DataProvider(name = "deviceIdentifierDataProvider")
+ public static Object[][] deviceIdentifierData() {
+ return new Object[][] {{new DeviceIdentifier()}};
+ }
+
+ @Test(dependsOnMethods = "activatePolicies", dataProvider = "deviceIdentifierDataProvider")
public void getEffectivePolicy(DeviceIdentifier identifier) throws DeviceManagementException, PolicyEvaluationException {
log.debug("Getting effective policy for device started ..........");
diff --git a/components/policy-mgt/pom.xml b/components/policy-mgt/pom.xml
index dd4d6e80c83..4f1db3f6aee 100644
--- a/components/policy-mgt/pom.xml
+++ b/components/policy-mgt/pom.xml
@@ -23,13 +23,12 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../../pom.xml
4.0.0
policy-mgt
- 4.1.16-SNAPSHOT
pom
WSO2 Carbon - Policy Management Component
http://wso2.org
@@ -39,7 +38,7 @@
org.wso2.carbon.policy.mgt.core
org.wso2.carbon.policy.information.point
org.wso2.carbon.policy.decision.point
- org.wso2.carbon.complex.policy.decision.point
+
diff --git a/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/pom.xml b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/pom.xml
index 1888660a535..592564cc0a9 100644
--- a/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/pom.xml
+++ b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
email-sender
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
@@ -53,8 +53,8 @@
org.apache.axis2.*;version="${axis2.osgi.version.range}",
org.apache.axiom.*; version="${axiom.osgi.version.range}",
- org.osgi.framework,
- org.osgi.service.component,
+ org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
+ org.osgi.service.*;version="${imp.package.version.osgi.service}",
org.apache.commons.logging,
javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional,
org.wso2.carbon.context,
diff --git a/components/transport-mgt/email-sender/pom.xml b/components/transport-mgt/email-sender/pom.xml
index 61e795d747f..da5fdb82a1f 100644
--- a/components/transport-mgt/email-sender/pom.xml
+++ b/components/transport-mgt/email-sender/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
transport-mgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
diff --git a/components/transport-mgt/pom.xml b/components/transport-mgt/pom.xml
index b307febc12b..fc1c94aaef3 100644
--- a/components/transport-mgt/pom.xml
+++ b/components/transport-mgt/pom.xml
@@ -3,7 +3,7 @@
carbon-devicemgt
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../../pom.xml
diff --git a/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/pom.xml b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/pom.xml
index d4f72461b44..c4bdb628f53 100644
--- a/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/pom.xml
+++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
sms-handler
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
@@ -87,18 +87,13 @@
- org.apache.cxf
- cxf-rt-frontend-jaxws
- provided
-
-
- org.apache.cxf
- cxf-rt-frontend-jaxrs
+ org.springframework
+ spring-web
provided
org.apache.cxf
- cxf-rt-transports-http
+ cxf-bundle-jaxrs
provided
diff --git a/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/java/io/entgra/transport/mgt/sms/handler/api/service/ConfigurationManagementService.java b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/java/io/entgra/transport/mgt/sms/handler/api/service/ConfigurationManagementService.java
index 3a771222c7a..18d295b53a8 100644
--- a/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/java/io/entgra/transport/mgt/sms/handler/api/service/ConfigurationManagementService.java
+++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/java/io/entgra/transport/mgt/sms/handler/api/service/ConfigurationManagementService.java
@@ -64,6 +64,7 @@ import javax.ws.rs.core.Response;
name = "View configurations",
description = "",
key = "perm:sms-handler:view-configuration",
+ roles = {"Internal/devicemgt-user"},
permissions = {"/sms-handler/platform-configurations/view"}
)
})
diff --git a/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/webapp/META-INF/webapp-classloading.xml b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/webapp/META-INF/webapp-classloading.xml
index d0d7a01621f..c0925583a39 100644
--- a/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/webapp/META-INF/webapp-classloading.xml
+++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/webapp/META-INF/webapp-classloading.xml
@@ -31,5 +31,5 @@
Tomcat environment is the default and every webapps gets it even if they didn't specify it.
e.g. If a webapps requires CXF, they will get both Tomcat and CXF.
-->
- CXF,Carbon
+ CXF3,Carbon
diff --git a/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/pom.xml b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/pom.xml
index 8edc2d7a44c..ac4edf6955f 100644
--- a/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/pom.xml
+++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
sms-handler
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
diff --git a/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/pom.xml b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/pom.xml
index 49eae641ab3..f88e557184e 100644
--- a/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/pom.xml
+++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
sms-handler
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
diff --git a/components/transport-mgt/sms-handler/pom.xml b/components/transport-mgt/sms-handler/pom.xml
index 2f46ed8dfa2..4c8815afc6a 100644
--- a/components/transport-mgt/sms-handler/pom.xml
+++ b/components/transport-mgt/sms-handler/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
transport-mgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
diff --git a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/pom.xml b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/pom.xml
index d00ef252ad3..45fd0b296bf 100644
--- a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/pom.xml
+++ b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/pom.xml
@@ -21,12 +21,11 @@
ui-request-interceptor
io.entgra.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
4.0.0
io.entgra.ui.request.interceptor
- 4.1.16-SNAPSHOT
war
Entgra - Request Handling Proxy Servlet
Proxy Service for Request Handling in Entgra EMM/IOT Server.
@@ -99,18 +98,23 @@
- org.apache.cxf
- cxf-rt-frontend-jaxws
+ org.wso2.carbon.devicemgt
+ org.wso2.carbon.apimgt.application.extension
provided
- org.apache.cxf
- cxf-rt-frontend-jaxrs
+ org.wso2.carbon.devicemgt
+ org.wso2.carbon.device.mgt.core
+ provided
+
+
+ org.springframework
+ spring-web
provided
org.apache.cxf
- cxf-rt-transports-http
+ cxf-bundle-jaxrs
provided
@@ -140,7 +144,7 @@
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.core
+ io.entgra.application.mgt.core
provided
diff --git a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/DefaultTokenHandler.java b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/DefaultTokenHandler.java
index 7aaae1ca700..7c515456725 100644
--- a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/DefaultTokenHandler.java
+++ b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/DefaultTokenHandler.java
@@ -69,14 +69,10 @@ public class DefaultTokenHandler extends HttpServlet {
String clientId = authData.getClientId();
String clientSecret = authData.getClientSecret();
- String iotsCorePort = System.getProperty("iot.core.https.port");
- if (HandlerConstants.HTTP_PROTOCOL.equals(req.getScheme())) {
- iotsCorePort = System.getProperty("iot.core.http.port");
- }
-
- String tokenUrl =
- req.getScheme() + HandlerConstants.SCHEME_SEPARATOR + System.getProperty("iot.core.host")
- + HandlerConstants.COLON + iotsCorePort + "/api/device-mgt/v1.0/devices/" + clientId
+ String iotsCoreUrl = req.getScheme() + HandlerConstants.SCHEME_SEPARATOR
+ + System.getProperty(HandlerConstants.IOT_GW_HOST_ENV_VAR)
+ + HandlerConstants.COLON + HandlerUtil.getGatewayPort(req.getScheme());
+ String tokenUrl = iotsCoreUrl + "/api/device-mgt/v1.0/devices/" + clientId
+ "/" + clientSecret + "/default-token";
HttpGet defaultTokenRequest = new HttpGet(tokenUrl);
@@ -131,8 +127,8 @@ public class DefaultTokenHandler extends HttpServlet {
URIBuilder ub = new URIBuilder();
ub.setScheme(HandlerConstants.WSS_PROTOCOL);
- ub.setHost(System.getProperty(HandlerConstants.IOT_CORE_HOST_ENV_VAR));
- ub.setPort(Integer.parseInt(System.getProperty(HandlerConstants.IOT_CORE_HTTPS_PORT_ENV_VAR)));
+ ub.setHost(System.getProperty(HandlerConstants.IOT_GW_HOST_ENV_VAR));
+ ub.setPort(Integer.parseInt(System.getProperty(HandlerConstants.IOT_GW_HTTPS_PORT_ENV_VAR)));
ub.setPath(HandlerConstants.REMOTE_SESSION_CONTEXT);
JsonObject responseJsonObj = new JsonObject();
diff --git a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/InvokerHandler.java b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/InvokerHandler.java
index 1100928cc08..7cfe352548d 100644
--- a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/InvokerHandler.java
+++ b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/InvokerHandler.java
@@ -18,6 +18,9 @@
package io.entgra.ui.request.interceptor;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
import io.entgra.ui.request.interceptor.beans.AuthData;
import io.entgra.ui.request.interceptor.util.HandlerConstants;
import io.entgra.ui.request.interceptor.util.HandlerUtil;
@@ -40,6 +43,7 @@ import org.apache.http.client.methods.HttpRequestBase;
import org.apache.http.cookie.SM;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.InputStreamEntity;
+import org.apache.http.entity.StringEntity;
import org.apache.http.entity.mime.HttpMultipartMode;
import org.apache.http.entity.mime.MultipartEntityBuilder;
import org.apache.http.entity.mime.content.InputStreamBody;
@@ -69,6 +73,7 @@ public class InvokerHandler extends HttpServlet {
private static final long serialVersionUID = -6508020875358160165L;
private static AuthData authData;
private static String apiEndpoint;
+ private static String kmManagerUrl;
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) {
@@ -80,7 +85,7 @@ public class InvokerHandler extends HttpServlet {
ProxyResponse proxyResponse = HandlerUtil.execute(postRequest);
if (HandlerConstants.TOKEN_IS_EXPIRED.equals(proxyResponse.getExecutorResponse())) {
- proxyResponse = HandlerUtil.retryRequestWithRefreshedToken(req, resp, postRequest, apiEndpoint);
+ proxyResponse = HandlerUtil.retryRequestWithRefreshedToken(req, resp, postRequest, kmManagerUrl);
if (proxyResponse == null) {
return;
}
@@ -108,14 +113,14 @@ public class InvokerHandler extends HttpServlet {
getRequest.setHeader(HttpHeaders.AUTHORIZATION, HandlerConstants.BEARER + authData.getAccessToken());
ProxyResponse proxyResponse = HandlerUtil.execute(getRequest);
if (HandlerConstants.TOKEN_IS_EXPIRED.equals(proxyResponse.getExecutorResponse())) {
- proxyResponse = HandlerUtil.retryRequestWithRefreshedToken(req, resp, getRequest, apiEndpoint);
+ proxyResponse = HandlerUtil.retryRequestWithRefreshedToken(req, resp, getRequest, kmManagerUrl);
if (proxyResponse == null) {
return;
}
}
if (proxyResponse.getExecutorResponse().contains(HandlerConstants.EXECUTOR_EXCEPTION_PREFIX)) {
if (proxyResponse.getCode() == HttpStatus.SC_UNAUTHORIZED) {
- proxyResponse = HandlerUtil.retryRequestWithRefreshedToken(req, resp, getRequest, apiEndpoint);
+ proxyResponse = HandlerUtil.retryRequestWithRefreshedToken(req, resp, getRequest, kmManagerUrl);
} else {
log.error("Error occurred while invoking the GET API endpoint.");
HandlerUtil.handleError(resp, proxyResponse);
@@ -138,7 +143,7 @@ public class InvokerHandler extends HttpServlet {
headRequest.setHeader(HttpHeaders.AUTHORIZATION, HandlerConstants.BEARER + authData.getAccessToken());
ProxyResponse proxyResponse = HandlerUtil.execute(headRequest);
if (HandlerConstants.TOKEN_IS_EXPIRED.equals(proxyResponse.getExecutorResponse())) {
- proxyResponse = HandlerUtil.retryRequestWithRefreshedToken(req, resp, headRequest, apiEndpoint);
+ proxyResponse = HandlerUtil.retryRequestWithRefreshedToken(req, resp, headRequest, kmManagerUrl);
if (proxyResponse == null) {
return;
}
@@ -165,7 +170,7 @@ public class InvokerHandler extends HttpServlet {
ProxyResponse proxyResponse = HandlerUtil.execute(putRequest);
if (HandlerConstants.TOKEN_IS_EXPIRED.equals(proxyResponse.getExecutorResponse())) {
- proxyResponse = HandlerUtil.retryRequestWithRefreshedToken(req, resp, putRequest, apiEndpoint);
+ proxyResponse = HandlerUtil.retryRequestWithRefreshedToken(req, resp, putRequest, kmManagerUrl);
if (proxyResponse == null) {
return;
}
@@ -193,7 +198,7 @@ public class InvokerHandler extends HttpServlet {
deleteRequest.setHeader(HttpHeaders.AUTHORIZATION, HandlerConstants.BEARER + authData.getAccessToken());
ProxyResponse proxyResponse = HandlerUtil.execute(deleteRequest);
if (HandlerConstants.TOKEN_IS_EXPIRED.equals(proxyResponse.getExecutorResponse())) {
- proxyResponse = HandlerUtil.retryRequestWithRefreshedToken(req, resp, deleteRequest, apiEndpoint);
+ proxyResponse = HandlerUtil.retryRequestWithRefreshedToken(req, resp, deleteRequest, kmManagerUrl);
if (proxyResponse == null) {
return;
}
@@ -297,9 +302,12 @@ public class InvokerHandler extends HttpServlet {
*/
private static boolean validateRequest(HttpServletRequest req, HttpServletResponse resp)
throws IOException {
- apiEndpoint = req.getScheme() + HandlerConstants.SCHEME_SEPARATOR + System.getProperty("iot.gateway.host")
+ apiEndpoint = req.getScheme() + HandlerConstants.SCHEME_SEPARATOR + System.getProperty(HandlerConstants.IOT_GW_HOST_ENV_VAR)
+ HandlerConstants.COLON + HandlerUtil.getGatewayPort(req.getScheme());
+ kmManagerUrl = req.getScheme() + HandlerConstants.SCHEME_SEPARATOR + System.getProperty(HandlerConstants.IOT_KM_HOST_ENV_VAR)
+ + HandlerConstants.COLON + HandlerUtil.getKeymanagerPort(req.getScheme());
+
if (HandlerConstants.REPORTS.equalsIgnoreCase(req.getHeader(HandlerConstants.APP_NAME))){
apiEndpoint = System.getProperty("iot.reporting.webapp.host");
if (StringUtils.isBlank(apiEndpoint)){
@@ -330,4 +338,108 @@ public class InvokerHandler extends HttpServlet {
}
return true;
}
+
+ /**
+ * Retry request again after refreshing the access token
+ *
+ * @param req incoming {@link HttpServletRequest}
+ * @param resp resp {@link HttpServletResponse}
+ * @param httpRequest subclass of {@link HttpRequestBase} related to the current request.
+ * @return {@link ProxyResponse} if successful and null
if failed.
+ * @throws IOException If an error occurs when try to retry the request.
+ */
+ private ProxyResponse retryRequestWithRefreshedToken(HttpServletRequest req, HttpServletResponse resp,
+ HttpRequestBase httpRequest) throws IOException {
+ if (refreshToken(req, resp)) {
+ httpRequest.setHeader(HttpHeaders.AUTHORIZATION, HandlerConstants.BEARER + authData.getAccessToken());
+ ProxyResponse proxyResponse = HandlerUtil.execute(httpRequest);
+ if (proxyResponse.getExecutorResponse().contains(HandlerConstants.EXECUTOR_EXCEPTION_PREFIX)) {
+ log.error("Error occurred while invoking the API after refreshing the token.");
+ HandlerUtil.handleError(resp, proxyResponse);
+ return null;
+ }
+ return proxyResponse;
+ }
+ return null;
+ }
+
+ /***
+ * This method is responsible to get the refresh token
+ *
+ * @param req {@link HttpServletRequest}
+ * @param resp {@link HttpServletResponse}
+ * @return If successfully renew tokens, returns TRUE otherwise return FALSE
+ * @throws IOException If an error occurs while witting error response to client side or invoke token renewal API
+ */
+ private static boolean refreshToken(HttpServletRequest req, HttpServletResponse resp)
+ throws IOException {
+ if (log.isDebugEnabled()) {
+ log.debug("refreshing the token");
+ }
+
+ HttpPost tokenEndpoint = new HttpPost(
+ kmManagerUrl + HandlerConstants.TOKEN_ENDPOINT);
+ HttpSession session = req.getSession(false);
+ if (session == null) {
+ log.error("Couldn't find a session, hence it is required to login and proceed.");
+ handleError(resp, HttpStatus.SC_UNAUTHORIZED);
+ return false;
+ }
+
+ StringEntity tokenEndpointPayload = new StringEntity(
+ "grant_type=refresh_token&refresh_token=" + authData.getRefreshToken() + "&scope=PRODUCTION",
+ ContentType.APPLICATION_FORM_URLENCODED);
+
+ tokenEndpoint.setEntity(tokenEndpointPayload);
+ String encodedClientApp = authData.getEncodedClientApp();
+ tokenEndpoint.setHeader(HttpHeaders.AUTHORIZATION, HandlerConstants.BASIC +
+ encodedClientApp);
+ tokenEndpoint.setHeader(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_FORM_URLENCODED.toString());
+
+ ProxyResponse tokenResultResponse = HandlerUtil.execute(tokenEndpoint);
+ if (tokenResultResponse.getExecutorResponse().contains(HandlerConstants.EXECUTOR_EXCEPTION_PREFIX)) {
+ log.error("Error occurred while refreshing access token.");
+ HandlerUtil.handleError(resp, tokenResultResponse);
+ return false;
+ }
+
+ JsonParser jsonParser = new JsonParser();
+ JsonElement jTokenResult = jsonParser.parse(tokenResultResponse.getData());
+
+ if (jTokenResult.isJsonObject()) {
+ JsonObject jTokenResultAsJsonObject = jTokenResult.getAsJsonObject();
+ AuthData newAuthData = new AuthData();
+
+ newAuthData.setAccessToken(jTokenResultAsJsonObject.get("access_token").getAsString());
+ newAuthData.setRefreshToken(jTokenResultAsJsonObject.get("refresh_token").getAsString());
+ newAuthData.setScope(jTokenResultAsJsonObject.get("scope").getAsString());
+ newAuthData.setClientId(authData.getClientId());
+ newAuthData.setClientSecret(authData.getClientSecret());
+ newAuthData.setEncodedClientApp(authData.getEncodedClientApp());
+ newAuthData.setUsername(authData.getUsername());
+ authData = newAuthData;
+ session.setAttribute(HandlerConstants.SESSION_AUTH_DATA_KEY, newAuthData);
+ return true;
+ }
+
+ log.error("Error Occurred in token renewal process.");
+ handleError(resp, HttpStatus.SC_INTERNAL_SERVER_ERROR);
+ return false;
+ }
+
+ /**
+ * Handle error requests
+ *
+ * @param resp {@link HttpServletResponse}
+ * @param errorCode HTTP error status code
+ * @throws IOException If error occurred when trying to send the error response.
+ */
+ private static void handleError(HttpServletResponse resp, int errorCode)
+ throws IOException {
+ ProxyResponse proxyResponse = new ProxyResponse();
+ proxyResponse.setCode(errorCode);
+ proxyResponse.setExecutorResponse(
+ HandlerConstants.EXECUTOR_EXCEPTION_PREFIX + HandlerUtil.getStatusKey(errorCode));
+ HandlerUtil.handleError(resp, proxyResponse);
+ }
}
diff --git a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/LoginHandler.java b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/LoginHandler.java
index ad6b90ee162..953fbf5a5c3 100644
--- a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/LoginHandler.java
+++ b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/LoginHandler.java
@@ -59,6 +59,8 @@ public class LoginHandler extends HttpServlet {
private static String password;
private static String gatewayUrl;
private static String uiConfigUrl;
+ private static String iotCoreUrl;
+ private static String kmManagerUrl;
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) {
@@ -200,16 +202,16 @@ public class LoginHandler extends HttpServlet {
* Define username and password static parameters.
*/
private static void validateLoginRequest(HttpServletRequest req) throws LoginException {
- String iotsCorePort = System.getProperty(HandlerConstants.IOT_CORE_HTTPS_PORT_ENV_VAR);
- if (HandlerConstants.HTTP_PROTOCOL.equals(req.getScheme())) {
- iotsCorePort = System.getProperty(HandlerConstants.IOT_CORE_HTTP_PORT_ENV_VAR);
- }
username = req.getParameter("username");
password = req.getParameter("password");
gatewayUrl = req.getScheme() + HandlerConstants.SCHEME_SEPARATOR + System.getProperty(HandlerConstants.IOT_GW_HOST_ENV_VAR)
+ HandlerConstants.COLON + HandlerUtil.getGatewayPort(req.getScheme());
- uiConfigUrl = req.getScheme() + HandlerConstants.SCHEME_SEPARATOR + System.getProperty(HandlerConstants.IOT_CORE_HOST_ENV_VAR)
- + HandlerConstants.COLON + iotsCorePort + HandlerConstants.UI_CONFIG_ENDPOINT;
+ iotCoreUrl = req.getScheme() + HandlerConstants.SCHEME_SEPARATOR + System.getProperty(HandlerConstants.IOT_CORE_HOST_ENV_VAR)
+ + HandlerConstants.COLON + HandlerUtil.getCorePort(req.getScheme());
+ uiConfigUrl = iotCoreUrl + HandlerConstants.UI_CONFIG_ENDPOINT;
+ kmManagerUrl = req.getScheme() + HandlerConstants.SCHEME_SEPARATOR + System.getProperty(HandlerConstants.IOT_KM_HOST_ENV_VAR)
+ + HandlerConstants.COLON + HandlerUtil.getKeymanagerPort(req.getScheme());
+
if (username == null || password == null) {
String msg = "Invalid login request. Username or Password is not received for login request.";
log.error(msg);
@@ -226,7 +228,7 @@ public class LoginHandler extends HttpServlet {
* @throws IOException IO exception throws if an error occurred when invoking token endpoint
*/
private ProxyResponse getTokenResult(String encodedClientApp, JsonArray scopes) throws IOException {
- HttpPost tokenEndpoint = new HttpPost(gatewayUrl + HandlerConstants.TOKEN_ENDPOINT);
+ HttpPost tokenEndpoint = new HttpPost(kmManagerUrl+ HandlerConstants.TOKEN_ENDPOINT);
tokenEndpoint.setHeader(HttpHeaders.AUTHORIZATION, HandlerConstants.BASIC + encodedClientApp);
tokenEndpoint.setHeader(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_FORM_URLENCODED.toString());
String scopeString = HandlerUtil.getScopeString(scopes);
diff --git a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/OTPInvokerHandler.java b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/OTPInvokerHandler.java
index 7194001cca9..c852cce259c 100644
--- a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/OTPInvokerHandler.java
+++ b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/OTPInvokerHandler.java
@@ -241,8 +241,8 @@ public class OTPInvokerHandler extends HttpServlet {
private static boolean validateRequest(HttpServletRequest req, HttpServletResponse resp)
throws IOException {
String schema = req.getScheme();
- apiEndpoint = schema + HandlerConstants.SCHEME_SEPARATOR + System.getProperty(HandlerConstants.IOT_CORE_HOST_ENV_VAR)
- + HandlerConstants.COLON + HandlerUtil.getCorePort(schema);
+ apiEndpoint = schema + HandlerConstants.SCHEME_SEPARATOR + System.getProperty(HandlerConstants.IOT_GW_HOST_ENV_VAR)
+ + HandlerConstants.COLON + HandlerUtil.getGatewayPort(schema);
if (StringUtils.isBlank(req.getHeader(HandlerConstants.OTP_HEADER))) {
log.error("Unauthorized, Please provide OTP token.");
diff --git a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/PermissionScopeHandler.java b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/PermissionScopeHandler.java
index 96d1d1151f4..9ccb10c7965 100644
--- a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/PermissionScopeHandler.java
+++ b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/PermissionScopeHandler.java
@@ -59,6 +59,7 @@ public class PermissionScopeHandler extends HttpServlet {
proxyResponse.setCode(HttpStatus.SC_OK);
proxyResponse.setData(jsonObject.toString());
HandlerUtil.handleSuccess(resp, proxyResponse);
+ return;
}
HandlerUtil.handleError(resp, null);
}
diff --git a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/SsoLoginCallbackHandler.java b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/SsoLoginCallbackHandler.java
index c437398d20a..d402f4795e2 100644
--- a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/SsoLoginCallbackHandler.java
+++ b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/SsoLoginCallbackHandler.java
@@ -49,15 +49,11 @@ public class SsoLoginCallbackHandler extends HttpServlet {
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
String code = req.getParameter("code");
HttpSession session = req.getSession(false);
- String iotsCorePort = System.getProperty(HandlerConstants.IOT_CORE_HTTPS_PORT_ENV_VAR);
- if (HandlerConstants.HTTP_PROTOCOL.equals(req.getScheme())) {
- iotsCorePort = System.getProperty(HandlerConstants.IOT_CORE_HTTP_PORT_ENV_VAR);
- }
- String gatewayUrl = req.getScheme() + HandlerConstants.SCHEME_SEPARATOR + System.getProperty(HandlerConstants.IOT_GW_HOST_ENV_VAR)
- + HandlerConstants.COLON + HandlerUtil.getGatewayPort(req.getScheme());
String iotsCoreUrl = req.getScheme() + HandlerConstants.SCHEME_SEPARATOR + System.getProperty(HandlerConstants.IOT_CORE_HOST_ENV_VAR)
- + HandlerConstants.COLON + iotsCorePort;
+ + HandlerConstants.COLON + HandlerUtil.getCorePort(req.getScheme());
+ String keyManagerUrl = req.getScheme() + HandlerConstants.SCHEME_SEPARATOR + System.getProperty(HandlerConstants.IOT_KM_HOST_ENV_VAR)
+ + HandlerConstants.COLON + HandlerUtil.getKeymanagerPort(req.getScheme());
if (session == null) {
String baseContextPath = req.getContextPath();
@@ -72,7 +68,7 @@ public class SsoLoginCallbackHandler extends HttpServlet {
String scope = session.getAttribute("scope").toString();
- HttpPost tokenEndpoint = new HttpPost(gatewayUrl + HandlerConstants.TOKEN_ENDPOINT);
+ HttpPost tokenEndpoint = new HttpPost(keyManagerUrl + HandlerConstants.TOKEN_ENDPOINT);
tokenEndpoint.setHeader(HttpHeaders.AUTHORIZATION, HandlerConstants.BASIC + session.getAttribute("encodedClientApp"));
tokenEndpoint.setHeader(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_FORM_URLENCODED.toString());
diff --git a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/SsoLoginHandler.java b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/SsoLoginHandler.java
index 10a488e2948..f76f72a9586 100644
--- a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/SsoLoginHandler.java
+++ b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/SsoLoginHandler.java
@@ -72,6 +72,8 @@ public class SsoLoginHandler extends HttpServlet {
private static String adminPassword;
private static String gatewayUrl;
private static String iotsCoreUrl;
+ private static String apiMgtUrl;
+ private static String keyManagerUrl;
private static int sessionTimeOut;
private static String encodedAdminCredentials;
private static String encodedClientApp;
@@ -99,14 +101,14 @@ public class SsoLoginHandler extends HttpServlet {
baseContextPath = req.getContextPath();
applicationName = baseContextPath.substring(1, baseContextPath.indexOf("-ui-request-handler"));
- String iotsCorePort = System.getProperty(HandlerConstants.IOT_CORE_HTTPS_PORT_ENV_VAR);
- if (HandlerConstants.HTTP_PROTOCOL.equals(req.getScheme())) {
- iotsCorePort = System.getProperty(HandlerConstants.IOT_CORE_HTTP_PORT_ENV_VAR);
- }
gatewayUrl = req.getScheme() + HandlerConstants.SCHEME_SEPARATOR + System.getProperty(HandlerConstants.IOT_GW_HOST_ENV_VAR)
+ HandlerConstants.COLON + HandlerUtil.getGatewayPort(req.getScheme());
iotsCoreUrl = req.getScheme() + HandlerConstants.SCHEME_SEPARATOR + System.getProperty(HandlerConstants.IOT_CORE_HOST_ENV_VAR)
- + HandlerConstants.COLON + iotsCorePort;
+ + HandlerConstants.COLON + HandlerUtil.getCorePort(req.getScheme());
+ apiMgtUrl = req.getScheme() + HandlerConstants.SCHEME_SEPARATOR + System.getProperty(HandlerConstants.IOT_APIM_HOST_ENV_VAR)
+ + HandlerConstants.COLON + HandlerUtil.getAPIManagerPort(req.getScheme());
+ keyManagerUrl = req.getScheme() + HandlerConstants.SCHEME_SEPARATOR + System.getProperty(HandlerConstants.IOT_KM_HOST_ENV_VAR)
+ + HandlerConstants.COLON + HandlerUtil.getKeymanagerPort(req.getScheme());
// Fetch ui config and persists in session
String uiConfigUrl = iotsCoreUrl + HandlerConstants.UI_CONFIG_ENDPOINT;
@@ -127,7 +129,7 @@ public class SsoLoginHandler extends HttpServlet {
persistAuthSessionData(req, oAuthApp.getClientId(), oAuthApp.getClientSecret(),
oAuthApp.getEncodedClientApp(), scopesSsoString);
- resp.sendRedirect(iotsCoreUrl + HandlerConstants.AUTHORIZATION_ENDPOINT +
+ resp.sendRedirect(keyManagerUrl + HandlerConstants.AUTHORIZATION_ENDPOINT +
"?response_type=code" +
"&client_id=" + clientId +
"&state=" +
@@ -193,7 +195,7 @@ public class SsoLoginHandler extends HttpServlet {
}
// Get the details of the registered application
- String getApplicationEndpointUrl = iotsCoreUrl + HandlerConstants.APIM_APPLICATIONS_ENDPOINT +
+ String getApplicationEndpointUrl = apiMgtUrl + HandlerConstants.APIM_APPLICATIONS_ENDPOINT +
"?query=" + applicationName;
HttpGet getApplicationEndpoint = new HttpGet(getApplicationEndpointUrl);
getApplicationEndpoint.setHeader(HttpHeaders.AUTHORIZATION, HandlerConstants.BEARER +
@@ -224,7 +226,7 @@ public class SsoLoginHandler extends HttpServlet {
}
// Update the grant types of the application
- String url = iotsCoreUrl + HandlerConstants.APIM_APPLICATIONS_ENDPOINT + applicationId + "/keys/" +
+ String url = apiMgtUrl + HandlerConstants.APIM_APPLICATIONS_ENDPOINT + applicationId + "/keys/" +
HandlerConstants.PRODUCTION_KEY;
HttpPut updateApplicationGrantTypesEndpoint = new HttpPut(url);
updateApplicationGrantTypesEndpoint.setHeader(HttpHeaders.AUTHORIZATION, HandlerConstants.BEARER +
@@ -235,7 +237,7 @@ public class SsoLoginHandler extends HttpServlet {
ProxyResponse updateApplicationGrantTypesEndpointResponse = HandlerUtil.execute(updateApplicationGrantTypesEndpoint);
// Update app as a SaaS app
- this.updateSaasApp(applicationName);
+ this.updateSaasApp(applicationId);
if (updateApplicationGrantTypesEndpointResponse.getCode() == HttpStatus.SC_UNAUTHORIZED) {
HandlerUtil.handleError(resp, updateApplicationGrantTypesEndpointResponse);
@@ -265,7 +267,7 @@ public class SsoLoginHandler extends HttpServlet {
* @throws SAXException - Throws when error occur during document parsing
*/
private void initializeAdminCredentials() throws ParserConfigurationException, IOException, SAXException {
- File userMgtConf = new File("conf/user-mgt.xml");
+ File userMgtConf = new File("repository/conf/user-mgt.xml");
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
Document doc = dBuilder.parse(userMgtConf);
@@ -323,7 +325,7 @@ public class SsoLoginHandler extends HttpServlet {
* @throws IOException IO exception throws if an error occurred when invoking token endpoint
*/
private ProxyResponse getTokenResult(String encodedClientApp) throws IOException {
- HttpPost tokenEndpoint = new HttpPost(gatewayUrl + HandlerConstants.TOKEN_ENDPOINT);
+ HttpPost tokenEndpoint = new HttpPost(keyManagerUrl + HandlerConstants.TOKEN_ENDPOINT);
tokenEndpoint.setHeader(HttpHeaders.AUTHORIZATION, HandlerConstants.BASIC + encodedClientApp);
tokenEndpoint.setHeader(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_FORM_URLENCODED.toString());
@@ -372,7 +374,7 @@ public class SsoLoginHandler extends HttpServlet {
*/
private void updateSaasApp(String appName) throws ParserConfigurationException, IOException, SAXException {
File getAppRequestXmlFile = new File(HandlerConstants.PAYLOADS_DIR + "/get-app-request.xml");
- String identityAppMgtUrl = iotsCoreUrl + HandlerConstants.IDENTITY_APP_MGT_ENDPOINT;
+ String identityAppMgtUrl = apiMgtUrl + HandlerConstants.IDENTITY_APP_MGT_ENDPOINT;
HttpPost getApplicationEndpoint = new HttpPost(identityAppMgtUrl);
getApplicationEndpoint.setHeader(HttpHeaders.AUTHORIZATION, HandlerConstants.BASIC +
diff --git a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/UserHandler.java b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/UserHandler.java
index 270cf7c03c3..170030f399b 100644
--- a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/UserHandler.java
+++ b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/UserHandler.java
@@ -33,6 +33,8 @@ import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import io.entgra.ui.request.interceptor.beans.ProxyResponse;
+import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager;
+import org.wso2.carbon.device.mgt.core.config.DeviceManagementConfig;
import javax.servlet.annotation.MultipartConfig;
import javax.servlet.annotation.WebServlet;
@@ -41,6 +43,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
+import java.util.Base64;
@MultipartConfig
@WebServlet("/user")
@@ -51,9 +54,10 @@ public class UserHandler extends HttpServlet {
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) {
try {
- String serverUrl =
- req.getScheme() + HandlerConstants.SCHEME_SEPARATOR + System.getProperty(HandlerConstants.IOT_GW_HOST_ENV_VAR)
- + HandlerConstants.COLON + HandlerUtil.getGatewayPort(req.getScheme());
+ String keymanagerUrl =
+ req.getScheme() + HandlerConstants.SCHEME_SEPARATOR +
+ System.getProperty(HandlerConstants.IOT_KM_HOST_ENV_VAR)
+ + HandlerConstants.COLON + HandlerUtil.getKeymanagerPort(req.getScheme());
HttpSession httpSession = req.getSession(false);
if (httpSession == null) {
HandlerUtil.sendUnAuthorizeResponse(resp);
@@ -68,8 +72,13 @@ public class UserHandler extends HttpServlet {
String accessToken = authData.getAccessToken();
- HttpPost tokenEndpoint = new HttpPost(serverUrl + HandlerConstants.INTROSPECT_ENDPOINT);
+ HttpPost tokenEndpoint = new HttpPost(keymanagerUrl + HandlerConstants.INTROSPECT_ENDPOINT);
tokenEndpoint.setHeader(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_FORM_URLENCODED.toString());
+ DeviceManagementConfig dmc = DeviceConfigurationManager.getInstance().getDeviceManagementConfig();
+ String adminUsername = dmc.getKeyManagerConfigurations().getAdminUsername();
+ String adminPassword = dmc.getKeyManagerConfigurations().getAdminPassword();
+ tokenEndpoint.setHeader(HttpHeaders.AUTHORIZATION, HandlerConstants.BASIC + Base64.getEncoder()
+ .encodeToString((adminUsername + HandlerConstants.COLON + adminPassword).getBytes()));
StringEntity tokenEPPayload = new StringEntity("token=" + accessToken,
ContentType.APPLICATION_FORM_URLENCODED);
tokenEndpoint.setEntity(tokenEPPayload);
@@ -77,7 +86,7 @@ public class UserHandler extends HttpServlet {
if (tokenStatus.getExecutorResponse().contains(HandlerConstants.EXECUTOR_EXCEPTION_PREFIX)) {
if (tokenStatus.getCode() == HttpStatus.SC_UNAUTHORIZED) {
- tokenStatus = HandlerUtil.retryRequestWithRefreshedToken(req, resp, tokenEndpoint, serverUrl);
+ tokenStatus = HandlerUtil.retryRequestWithRefreshedToken(req, resp, tokenEndpoint, keymanagerUrl);
} else {
log.error("Error occurred while invoking the API to get token status.");
HandlerUtil.handleError(resp, tokenStatus);
diff --git a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/util/HandlerConstants.java b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/util/HandlerConstants.java
index feda440f3ba..3b278ffb5ba 100644
--- a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/util/HandlerConstants.java
+++ b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/util/HandlerConstants.java
@@ -22,10 +22,10 @@ public class HandlerConstants {
public static final String PUBLISHER_APPLICATION_NAME = "application-mgt-publisher";
public static final String APP_REG_ENDPOINT = "/api-application-registration/register";
public static final String UI_CONFIG_ENDPOINT = "/api/device-mgt-config/v1.0/configurations/ui-config";
- public static final String TOKEN_ENDPOINT = "/token";
+ public static final String TOKEN_ENDPOINT = "/oauth2/token";
public static final String INTROSPECT_ENDPOINT = "/oauth2/introspect";
public static final String AUTHORIZATION_ENDPOINT = "/oauth2/authorize";
- public static final String APIM_APPLICATIONS_ENDPOINT = "/api/am/store/v0.12/applications/";
+ public static final String APIM_APPLICATIONS_ENDPOINT = "/api/am/devportal/v2/applications/";
public static final String IDENTITY_APP_MGT_ENDPOINT = "/services/IdentityApplicationManagementService.IdentityApplicationManagementServiceHttpsSoap11Endpoint";
public static final String LOGIN_PAGE = "/login";
public static final String SSO_LOGIN_CALLBACK = "/ssoLoginCallback";
@@ -60,6 +60,7 @@ public class HandlerConstants {
public static final String SCHEME_SEPARATOR = "://";
public static final String COLON = ":";
public static final String HTTP_PROTOCOL = "http";
+ public static final String HTTPS_PROTOCOL = "https";
public static final String UNDERSCORE = "_";
public static final int INTERNAL_ERROR_CODE = 500;
@@ -67,7 +68,7 @@ public class HandlerConstants {
public static final String OTP_HEADER = "one-time-token";
- public static final String AX_PREFIX = "ax2317:";
+ public static final String AX_PREFIX = "ax2251:";
public static final String PAYLOADS_DIR = "repository/resources/payloads";
public static final String SOAP_ACTION_HEADER = "SOAPAction";
@@ -77,6 +78,12 @@ public class HandlerConstants {
public static final String IOT_CORE_HOST_ENV_VAR = "iot.core.host";
public static final String IOT_CORE_HTTP_PORT_ENV_VAR = "iot.core.http.port";
public static final String IOT_CORE_HTTPS_PORT_ENV_VAR = "iot.core.https.port";
+ public static final String IOT_APIM_HOST_ENV_VAR = "iot.apim.host";
+ public static final String IOT_APIM_HTTP_PORT_ENV_VAR = "iot.apim.http.port";
+ public static final String IOT_APIM_HTTPS_PORT_ENV_VAR = "iot.apim.https.port";
+ public static final String IOT_KM_HOST_ENV_VAR = "iot.keymanager.host";
+ public static final String IOT_KM_HTTP_PORT_ENV_VAR = "iot.keymanager.http.port";
+ public static final String IOT_KM_HTTPS_PORT_ENV_VAR = "iot.keymanager.https.port";
public static final String IOT_GW_HOST_ENV_VAR = "iot.gateway.host";
public static final String IOT_GW_HTTP_PORT_ENV_VAR = "iot.gateway.http.port";
public static final String IOT_GW_HTTPS_PORT_ENV_VAR = "iot.gateway.https.port";
diff --git a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/util/HandlerUtil.java b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/util/HandlerUtil.java
index ab702eb9ad0..48812430f47 100644
--- a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/util/HandlerUtil.java
+++ b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/util/HandlerUtil.java
@@ -244,6 +244,35 @@ public class HandlerUtil {
}
}
+ /**
+ * Get api manager port according to request received scheme
+ *
+ * @param scheme https or https
+ * @return {@link String} api manager port
+ */
+ public static String getAPIManagerPort(String scheme) {
+ String apiManagerPort = System.getProperty(HandlerConstants.IOT_APIM_HTTPS_PORT_ENV_VAR);
+ if (HandlerConstants.HTTP_PROTOCOL.equals(scheme)) {
+ apiManagerPort = System.getProperty(HandlerConstants.IOT_APIM_HTTP_PORT_ENV_VAR);
+ }
+ return apiManagerPort;
+ }
+
+
+ /**
+ * Get keymanager port according to request received scheme
+ *
+ * @param scheme https or https
+ * @return {@link String} keymanager port
+ */
+ public static String getKeymanagerPort(String scheme) {
+ String keymanagerPort = System.getProperty(HandlerConstants.IOT_KM_HTTPS_PORT_ENV_VAR);
+ if (HandlerConstants.HTTP_PROTOCOL.equals(scheme)) {
+ keymanagerPort = System.getProperty(HandlerConstants.IOT_KM_HTTP_PORT_ENV_VAR);
+ }
+ return keymanagerPort;
+ }
+
/**
* Get gateway port according to request received scheme
*
@@ -502,13 +531,13 @@ public class HandlerUtil {
* @return If successfully renew tokens, returns TRUE otherwise return FALSE
* @throws IOException If an error occurs while witting error response to client side or invoke token renewal API
*/
- private static boolean refreshToken(HttpServletRequest req, HttpServletResponse resp, String gatewayUrl)
+ private static boolean refreshToken(HttpServletRequest req, HttpServletResponse resp, String keymanagerUrl)
throws IOException {
if (log.isDebugEnabled()) {
log.debug("refreshing the token");
}
- HttpPost tokenEndpoint = new HttpPost(
- gatewayUrl + HandlerConstants.TOKEN_ENDPOINT);
+
+ HttpPost tokenEndpoint = new HttpPost(keymanagerUrl + HandlerConstants.TOKEN_ENDPOINT);
HttpSession session = req.getSession(false);
if (session == null) {
log.error("Couldn't find a session, hence it is required to login and proceed.");
diff --git a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/webapp/META-INF/webapp-classloading.xml b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/webapp/META-INF/webapp-classloading.xml
index cc5b3c66d7c..9f50930c4f7 100644
--- a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/webapp/META-INF/webapp-classloading.xml
+++ b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/webapp/META-INF/webapp-classloading.xml
@@ -31,5 +31,5 @@
Tomcat environment is the default and every webapps gets it even if they didn't specify it.
e.g. If a webapps requires CXF, they will get both Tomcat and CXF.
-->
- Carbon
+ CXF3,Carbon
diff --git a/components/ui-request-interceptor/pom.xml b/components/ui-request-interceptor/pom.xml
index cfed28d8b0a..6204dc57d3f 100644
--- a/components/ui-request-interceptor/pom.xml
+++ b/components/ui-request-interceptor/pom.xml
@@ -21,7 +21,7 @@
carbon-devicemgt
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../../pom.xml
diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml
index 2d3df3e061b..0b3c41e0844 100644
--- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml
+++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml
@@ -21,14 +21,13 @@
org.wso2.carbon.devicemgt
webapp-authenticator-framework
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.webapp.authenticator.framework
- 4.1.16-SNAPSHOT
bundle
WSO2 Carbon - Web Application Authenticator Framework Bundle
WSO2 Carbon - Web Application Authenticator Framework Bundle
@@ -56,22 +55,22 @@
org.wso2.carbon.webapp.authenticator.framework.*
- com.nimbusds.jose,
- com.nimbusds.jose.crypto,
- com.nimbusds.jwt,
+ com.nimbusds.jose;version="${nimbus.orbit.version.range}",
+ com.nimbusds.jose.crypto;version="${nimbus.orbit.version.range}",
+ com.nimbusds.jwt;version="${nimbus.orbit.version.range}",
javax.xml.bind,
javax.xml.bind.annotation,
javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional,
javax.xml.validation,
- org.apache.catalina,
- org.apache.catalina.connector,
- org.apache.catalina.util,
+ org.apache.catalina;version="9.0",
+ org.apache.catalina.connector;version="9.0",
+ org.apache.catalina.util;version="9.0",
org.apache.commons.logging,
- org.apache.coyote,
- org.apache.tomcat.util.buf,
- org.apache.tomcat.util.http,
- org.osgi.service.component,
- org.osgi.framework,
+ org.apache.coyote;version="9.0",
+ org.apache.tomcat.util.buf;version="9.0",
+ org.apache.tomcat.util.http;version="9.0",
+ org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
+ org.osgi.service.*;version="${imp.package.version.osgi.service}",
org.w3c.dom,
org.wso2.carbon.context,
org.wso2.carbon.core.util,
@@ -86,15 +85,16 @@
org.wso2.carbon.utils,
org.wso2.carbon.utils.multitenancy,
org.xml.sax,
- com.google.gson.*,
+
javax.servlet,
javax.servlet.http,
javax.xml,
org.apache.axis2.transport.http,
org.wso2.carbon.certificate.mgt.core.*,
- org.wso2.carbon.device.mgt.core.permission.mgt,
+ org.wso2.carbon.device.mgt.core.permission.mgt.*,
+ org.wso2.carbon.device.mgt.core.util.*,
org.wso2.carbon.device.mgt.common.*,
- org.wso2.carbon.device.mgt.common.permission.mgt,
+ org.wso2.carbon.device.mgt.common.permission.mgt.*,
org.apache.axis2,
org.apache.axis2.client,
org.apache.commons.codec.binary;version="${commons-codec.wso2.osgi.version.range}",
@@ -106,7 +106,7 @@
org.apache.commons.pool.impl,
org.apache.http.conn,
org.apache.http.impl.conn,
- javax.xml.soap; version="${javax.xml.soap.imp.pkg.version}",
+
javax.xml.stream,
org.apache.axiom.*; version="${axiom.osgi.version.range}",
org.wso2.carbon.registry.core.*,
@@ -182,6 +182,10 @@
+
+ org.testng
+ testng
+
org.wso2.carbon.identity.framework
org.wso2.carbon.identity.core
@@ -203,6 +207,7 @@
org.wso2.orbit.com.nimbusds
nimbus-jose-jwt
+ compile
org.wso2.carbon.devicemgt
@@ -273,7 +278,17 @@
org.apache.sling.testing.osgi-mock
test
+
+ org.wso2.carbon
+ javax.cache.wso2
+ 4.6.3-m5
+ test
+
+
+
+ true
+
diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/AuthenticationFrameworkUtil.java b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/AuthenticationFrameworkUtil.java
index 7c506737e79..c6d12b9286d 100644
--- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/AuthenticationFrameworkUtil.java
+++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/AuthenticationFrameworkUtil.java
@@ -73,7 +73,7 @@ public class AuthenticationFrameworkUtil {
}
}
- static boolean isUserAuthorized(int tenantId, String tenantDomain, String username, String
+ public static boolean isUserAuthorized(int tenantId, String tenantDomain, String username, String
permission) throws
AuthenticationException {
boolean tenantFlowStarted = false;
diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/Utils/Utils.java b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/Utils/Utils.java
index 52510d5b67d..c3d16672b00 100644
--- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/Utils/Utils.java
+++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/Utils/Utils.java
@@ -21,6 +21,7 @@ package org.wso2.carbon.webapp.authenticator.framework.Utils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.context.PrivilegedCarbonContext;
+import org.wso2.carbon.device.mgt.core.util.DeviceManagerUtil;
import org.wso2.carbon.user.api.TenantManager;
import org.wso2.carbon.user.api.UserStoreException;
import org.wso2.carbon.user.core.service.RealmService;
@@ -98,12 +99,12 @@ public class Utils {
if ((url == null) || (url.isEmpty())) {
throw new IllegalArgumentException("OAuth token validation endpoint url is not provided");
}
- String adminUsername = properties.getProperty("Username");
+ String adminUsername = DeviceManagerUtil.replaceSystemProperty(properties.getProperty("Username"));
if (adminUsername == null) {
throw new IllegalArgumentException(
"Username to connect to the OAuth token validation endpoint is not provided");
}
- String adminPassword = properties.getProperty("Password");
+ String adminPassword = DeviceManagerUtil.replaceSystemProperty(properties.getProperty("Password"));
if (adminPassword == null) {
throw new IllegalArgumentException(
"Password to connect to the OAuth token validation endpoint is not provided");
diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/WebappAuthenticationValve.java b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/WebappAuthenticationValve.java
index 897bba08129..3864954fe92 100644
--- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/WebappAuthenticationValve.java
+++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/WebappAuthenticationValve.java
@@ -33,6 +33,7 @@ import org.wso2.carbon.user.api.Tenant;
import org.wso2.carbon.user.api.UserStoreException;
import org.wso2.carbon.user.core.service.RealmService;
import org.wso2.carbon.webapp.authenticator.framework.authenticator.WebappAuthenticator;
+import org.wso2.carbon.webapp.authenticator.framework.authorizer.PermissionAuthorizer;
import org.wso2.carbon.webapp.authenticator.framework.authorizer.WebappTenantAuthorizer;
import javax.servlet.http.HttpServletResponse;
@@ -133,6 +134,22 @@ public class WebappAuthenticationValve extends CarbonTomcatValve {
}
}
+ // This section will allow to validate a given access token is authenticated to access permission defined per API
+ if (request.getCoyoteRequest() != null
+ && isResourcePermissionValidate(request)
+ && (authenticationInfo.getStatus() == WebappAuthenticator.Status.CONTINUE ||
+ authenticationInfo.getStatus() == WebappAuthenticator.Status.SUCCESS)) {
+ boolean isAllowed;
+ WebappAuthenticator.Status authorizeStatus = PermissionAuthorizer.authorize(request, authenticationInfo);
+ isAllowed = WebappAuthenticator.Status.SUCCESS == authorizeStatus;
+ if (!isAllowed) {
+ log.error("Unauthorized message from user " + authenticationInfo.getUsername());
+ AuthenticationFrameworkUtil.handleResponse(request, response,
+ HttpServletResponse.SC_FORBIDDEN, "Unauthorized to access the API");
+ return;
+ }
+ }
+
Tenant tenant = null;
if (authenticationInfo.getTenantId() != -1) {
try {
@@ -199,6 +216,11 @@ public class WebappAuthenticationValve extends CarbonTomcatValve {
return (param != null && Boolean.parseBoolean(param));
}
+ private boolean isResourcePermissionValidate(Request request) {
+ String param = request.getContext().findParameter("resource-permission-validate");
+ return (param == null) || Boolean.parseBoolean(param);
+ }
+
private boolean isContextSkipped(Request request) {
Context context = request.getContext();
String ctx = context == null ? null :context.getPath();
@@ -216,7 +238,8 @@ public class WebappAuthenticationValve extends CarbonTomcatValve {
ctx = tokenizer.nextToken();
}
}
- return ("carbon".equalsIgnoreCase(ctx) || "services".equalsIgnoreCase(ctx));
+ return ("carbon".equalsIgnoreCase(ctx) || "services".equalsIgnoreCase(ctx)
+ || "oauth2".equalsIgnoreCase(ctx));
}
private boolean isNonSecuredEndPoint(Request request) {
diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authorizer/MatchingResource.java b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authorizer/MatchingResource.java
new file mode 100644
index 00000000000..0c249861710
--- /dev/null
+++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authorizer/MatchingResource.java
@@ -0,0 +1,30 @@
+package org.wso2.carbon.webapp.authenticator.framework.authorizer;
+
+/**
+ * Created by amalka on 6/26/21.
+ */
+public class MatchingResource {
+ private String urlPattern;
+ private String permission;
+
+ public MatchingResource(String urlPattern, String permission) {
+ this.urlPattern = urlPattern;
+ this.permission = permission;
+ }
+
+ public String getUrlPattern() {
+ return urlPattern;
+ }
+
+ public void setUrlPattern(String urlPattern) {
+ this.urlPattern = urlPattern;
+ }
+
+ public String getPermission() {
+ return permission;
+ }
+
+ public void setPermission(String permission) {
+ this.permission = permission;
+ }
+}
diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authorizer/PermissionAuthorizer.java b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authorizer/PermissionAuthorizer.java
new file mode 100644
index 00000000000..eb09e815df2
--- /dev/null
+++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authorizer/PermissionAuthorizer.java
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * WSO2 Inc. 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.wso2.carbon.webapp.authenticator.framework.authorizer;
+
+import org.apache.catalina.connector.Request;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.device.mgt.common.permission.mgt.Permission;
+import org.wso2.carbon.device.mgt.common.permission.mgt.PermissionManagementException;
+import org.wso2.carbon.device.mgt.common.permission.mgt.PermissionManagerService;
+import org.wso2.carbon.device.mgt.core.permission.mgt.PermissionManagerServiceImpl;
+import org.wso2.carbon.webapp.authenticator.framework.AuthenticationException;
+import org.wso2.carbon.webapp.authenticator.framework.AuthenticationFrameworkUtil;
+import org.wso2.carbon.webapp.authenticator.framework.AuthenticationInfo;
+import org.wso2.carbon.webapp.authenticator.framework.authenticator.WebappAuthenticator;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+public class PermissionAuthorizer {
+
+ private static final Log log = LogFactory.getLog(PermissionAuthorizer.class);
+
+ public static WebappAuthenticator.Status authorize(Request request, AuthenticationInfo authenticationInfo) {
+ String requestUri = request.getRequestURI();
+ String requestMethod = request.getMethod();
+ String context = request.getContextPath();
+
+ if (requestUri == null || requestUri.isEmpty() || requestMethod == null || requestMethod.isEmpty()) {
+ return WebappAuthenticator.Status.CONTINUE;
+ }
+
+ if (requestUri.endsWith("/")) {
+ requestUri = requestUri.substring(0, requestUri.length() - 1);
+ }
+
+ PermissionManagerService registryBasedPermissionManager =
+ PermissionManagerServiceImpl.getInstance();
+ List matchingPermissions = null;
+ try {
+ matchingPermissions = registryBasedPermissionManager.getPermission(context);
+ } catch (PermissionManagementException e) {
+ log.error(
+ "Error occurred while fetching the permission for URI : " + requestUri +
+ ", msg = " + e.getMessage());
+ }
+
+ if (matchingPermissions == null) {
+ if (log.isDebugEnabled()) {
+ log.debug("Permission to request '" + requestUri + "' is not defined in the configuration");
+ }
+ return WebappAuthenticator.Status.FAILURE;
+ }
+
+ String requiredPermission = null;
+ List matchingResources = new ArrayList<>();
+ for (Permission permission : matchingPermissions) {
+ if (requestMethod.equals(permission.getMethod()) && requestUri.matches(permission.getUrlPattern())) {
+ if (requestUri.equals(permission.getUrl())) { // is there a exact match
+ requiredPermission = permission.getPath();
+ break;
+ } else { // all templated urls add to a list
+ matchingResources.add(new MatchingResource(permission.getUrlPattern().replace(context, ""), permission.getPath()));
+ }
+ }
+ }
+
+ if (requiredPermission == null) {
+ if (matchingResources.size() == 1) { // only 1 templated url found
+ requiredPermission = matchingResources.get(0).getPermission();
+ }
+
+ if (matchingResources.size() > 1) { // more than 1 templated urls found
+ String urlWithoutContext = requestUri.replace(context, "");
+ StringTokenizer st = new StringTokenizer(urlWithoutContext, "/");
+ int tokenPosition = 1;
+ while (st.hasMoreTokens()) {
+ List tempList = new ArrayList<>();
+ String currentToken = st.nextToken();
+ for (MatchingResource matchingResource : matchingResources) {
+ StringTokenizer stmr = new StringTokenizer(matchingResource.getUrlPattern(), "/");
+ int internalTokenPosition = 1;
+ while (stmr.hasMoreTokens()) {
+ String internalToken = stmr.nextToken();
+ if ((tokenPosition == internalTokenPosition) && currentToken.equals(internalToken)) {
+ tempList.add(matchingResource);
+ }
+ internalTokenPosition++;
+ if (tokenPosition < internalTokenPosition) {
+ break;
+ }
+ }
+ }
+ if (tempList.size() == 1) {
+ requiredPermission = tempList.get(0).getPermission();
+ break;
+ }
+ tokenPosition++;
+ }
+ }
+ }
+
+ if (requiredPermission == null) {
+ if (log.isDebugEnabled()) {
+ log.debug("Matching permission not found for " + requestUri);
+ }
+ return WebappAuthenticator.Status.FAILURE;
+ }
+
+ boolean isUserAuthorized;
+ try {
+ isUserAuthorized = AuthenticationFrameworkUtil.isUserAuthorized(
+ authenticationInfo.getTenantId(), authenticationInfo.getTenantDomain(),
+ authenticationInfo.getUsername(), requiredPermission);
+ } catch (AuthenticationException e) {
+ log.error("Error occurred while retrieving user store. " + e.getMessage());
+ return WebappAuthenticator.Status.FAILURE;
+ }
+
+ if (isUserAuthorized) {
+ return WebappAuthenticator.Status.SUCCESS;
+ } else {
+ return WebappAuthenticator.Status.FAILURE;
+ }
+
+ }
+
+}
+
+
+
diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/test/java/org/wso2/carbon/webapp/authenticator/framework/BaseWebAppAuthenticatorFrameworkTest.java b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/test/java/org/wso2/carbon/webapp/authenticator/framework/BaseWebAppAuthenticatorFrameworkTest.java
index fc437004a00..a956c5f3dcf 100644
--- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/test/java/org/wso2/carbon/webapp/authenticator/framework/BaseWebAppAuthenticatorFrameworkTest.java
+++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/test/java/org/wso2/carbon/webapp/authenticator/framework/BaseWebAppAuthenticatorFrameworkTest.java
@@ -18,6 +18,7 @@
package org.wso2.carbon.webapp.authenticator.framework;
+
import org.testng.annotations.BeforeSuite;
import org.wso2.carbon.CarbonConstants;
import org.wso2.carbon.context.PrivilegedCarbonContext;
diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/test/java/org/wso2/carbon/webapp/authenticator/framework/WebappAuthenticationValveTest.java b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/test/java/org/wso2/carbon/webapp/authenticator/framework/WebappAuthenticationValveTest.java
index 91dfad24cac..bd94dad56c6 100644
--- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/test/java/org/wso2/carbon/webapp/authenticator/framework/WebappAuthenticationValveTest.java
+++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/test/java/org/wso2/carbon/webapp/authenticator/framework/WebappAuthenticationValveTest.java
@@ -106,12 +106,9 @@ public class WebappAuthenticationValveTest {
@Test(description = "This method tests the behaviour of the invoke method of WebAuthenticationValve when "
+ "secured endpoints are invoked.")
- public void testInvokeSecuredEndpoints() throws NoSuchFieldException, IllegalAccessException {
- String encodedString = new String(Base64.getEncoder().encode((ADMIN_USER + ":" + ADMIN_USER).getBytes()));
+ public void testInvokeSecuredEndpointsUnauthorized() throws NoSuchFieldException, IllegalAccessException {
+ String encodedString = new String(Base64.getEncoder().encode((ADMIN_USER + ":" + ADMIN_USER + "test").getBytes()));
Request request = createRequest("basic " + encodedString);
- webappAuthenticationValve.invoke(request, null, compositeValve);
- encodedString = new String(Base64.getEncoder().encode((ADMIN_USER + ":" + ADMIN_USER + "test").getBytes()));
- request = createRequest("basic " + encodedString);
Response response = new Response();
org.apache.coyote.Response coyoteResponse = new org.apache.coyote.Response();
Connector connector = new Connector();
@@ -122,6 +119,21 @@ public class WebappAuthenticationValveTest {
"Response of un-authorized request is not updated");
}
+ @Test(description = "This method tests the behaviour of the invoke method of WebAuthenticationValve when "
+ + "secured endpoints are invoked.")
+ public void testInvokeSecuredEndpointsAuthorized() throws NoSuchFieldException, IllegalAccessException {
+ String encodedString = new String(Base64.getEncoder().encode((ADMIN_USER + ":" + ADMIN_USER).getBytes()));
+ Request request = createRequest("basic " + encodedString);
+ Response response = new Response();
+ org.apache.coyote.Response coyoteResponse = new org.apache.coyote.Response();
+ Connector connector = new Connector();
+ response.setConnector(connector);
+ response.setCoyoteResponse(coyoteResponse);
+ webappAuthenticationValve.invoke(request, response, compositeValve);
+ Assert.assertEquals(response.getStatus(), HttpServletResponse.SC_ACCEPTED,
+ "Response of un-authorized request is not updated");
+ }
+
@Test(description = "This method tests the behaviour of invoke method when the request does not satisfy any "
+ "authenticator requirements")
public void testInvokeWithoutProperAuthenticator() throws NoSuchFieldException, IllegalAccessException {
diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/test/resources/carbon-home/repository/conf/registry.xml b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/test/resources/carbon-home/repository/conf/registry.xml
index 0bb97a7dc97..a226ae80a81 100644
--- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/test/resources/carbon-home/repository/conf/registry.xml
+++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/test/resources/carbon-home/repository/conf/registry.xml
@@ -1,50 +1,50 @@
-
-
-
-
-
-
-
- wso2registry
- false
- true
- /
-
-
- jdbc:h2:./target/databasetest/CARBON_TEST
-
- org.h2.Driver
- 80
- 60000
- 5
-
-
- false
-
-
-
- true
- true
- true
- true
-
-
+
+
+
+
+
+
+
+ wso2registry
+ false
+ true
+ /
+
+
+ jdbc:h2:./target/databasetest/CARBON_TEST
+
+ org.h2.Driver
+ 80
+ 60000
+ 5
+
+
+ false
+
+
+
+ true
+ true
+ true
+ true
+
+
diff --git a/components/webapp-authenticator-framework/pom.xml b/components/webapp-authenticator-framework/pom.xml
index 4a3c39e1742..922e3fdcf59 100644
--- a/components/webapp-authenticator-framework/pom.xml
+++ b/components/webapp-authenticator-framework/pom.xml
@@ -22,14 +22,13 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
webapp-authenticator-framework
- 4.1.16-SNAPSHOT
pom
WSO2 Carbon - Webapp Authenticator Framework
http://wso2.org
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml
index e97519888a8..b1033f9963c 100644
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml
@@ -21,14 +21,13 @@
org.wso2.carbon.devicemgt
apimgt-extensions-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.application.extension.feature
pom
- 4.1.16-SNAPSHOT
WSO2 Carbon - API Management Application Extension Feature
http://wso2.org
This feature contains an implementation of a api application registration, which takes care of subscription
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/src/main/resources/p2.inf b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/src/main/resources/p2.inf
index 1d8124571f9..61654c2892b 100644
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/src/main/resources/p2.inf
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/src/main/resources/p2.inf
@@ -1,3 +1,5 @@
instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/webapps/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.apimgt.application.extension_${feature.version}/webapps/,target:${installFolder}/../../deployment/server/webapps/,overwrite:true);\
\ No newline at end of file
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.apimgt.application.extension_${feature.version}/webapps/,target:${installFolder}/../../deployment/server/webapps/,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.apimgt.application.extension_${feature.version}/synapse-configs/default/api/_API_Application_Registration_.xml,target:${installFolder}/../../deployment/server/synapse-configs/default/api/_API_Application_Registration_.xml,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.apimgt.application.extension_${feature.version}/synapse-configs/default/sequences/_api_registration_fault_.xml,target:${installFolder}/../../deployment/server/synapse-configs/default/sequences/_api_registration_fault_.xml,overwrite:true);\
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/src/main/resources/synapse-configs/default/api/_API_Application_Registration_.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/src/main/resources/synapse-configs/default/api/_API_Application_Registration_.xml
new file mode 100644
index 00000000000..7e25c013420
--- /dev/null
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/src/main/resources/synapse-configs/default/api/_API_Application_Registration_.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+ 60000
+ fault
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 60000
+ fault
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 60000
+ fault
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/src/main/resources/synapse-configs/default/sequences/_api_registration_fault_.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/src/main/resources/synapse-configs/default/sequences/_api_registration_fault_.xml
new file mode 100644
index 00000000000..335a9abaf39
--- /dev/null
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/src/main/resources/synapse-configs/default/sequences/_api_registration_fault_.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml
index 6e332ef23b1..2bd2ef84680 100644
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml
@@ -22,14 +22,13 @@
org.wso2.carbon.devicemgt
apimgt-extensions-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.handler.server.feature
pom
- 4.1.16-SNAPSHOT
WSO2 Carbon - Device Management - APIM handler Server Feature
http://wso2.org
This feature contains the handler for the api authentications
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml
index a934c7dc4c5..8051e07759d 100644
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml
@@ -21,13 +21,12 @@
org.wso2.carbon.devicemgt
apimgt-extensions-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.integration.client.feature
- 4.1.16-SNAPSHOT
pom
WSO2 Carbon - APIM Integration Client Feature
http://wso2.org
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml
index e9f713c97fd..d8c6d647297 100644
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml
@@ -21,14 +21,13 @@
org.wso2.carbon.devicemgt
apimgt-extensions-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.webapp.publisher.feature
pom
- 4.1.16-SNAPSHOT
WSO2 Carbon - API Management Webapp Publisher Feature
http://wso2.org
This feature contains an implementation of a Tomcat lifecycle listener, which takes care of publishing
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/src/main/resources/conf_templates/templates/repository/conf/etc/webapp-publisher-config.xml.j2 b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/src/main/resources/conf_templates/templates/repository/conf/etc/webapp-publisher-config.xml.j2
new file mode 100644
index 00000000000..d8a0413ec8a
--- /dev/null
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/src/main/resources/conf_templates/templates/repository/conf/etc/webapp-publisher-config.xml.j2
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+ {% if webapp_publisher_configs.host is defined %}
+ {{webapp_publisher_configs.host}}
+ {% else %}
+ https://${iot.core.host}:${iot.core.https.port}
+ {% endif %}
+
+
+ {% if webapp_publisher_configs.publish_api is defined %}
+ {{webapp_publisher_configs.publish_api}}
+ {% else %}
+ true
+ {% endif %}
+
+
+ {% if webapp_publisher_configs.enable_update_api is defined %}
+ {{webapp_publisher_configs.enable_update_api}}
+ {% else %}
+ true
+ {% endif %}
+
+
+
+ default
+ {% if webapp_publisher_configs.profiles is defined %}
+ {%- for profile in webapp_publisher_configs.profiles -%}
+ {{profile}}
+ {% endfor %}
+ {% endif %}
+
+
\ No newline at end of file
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/src/main/resources/p2.inf b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/src/main/resources/p2.inf
index 3d6782a96ff..8b5d94e4102 100644
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/src/main/resources/p2.inf
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/src/main/resources/p2.inf
@@ -1,2 +1,3 @@
instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.apimgt.webapp.publisher_${feature.version}/conf/webapp-publisher-config.xml,target:${installFolder}/../../conf/etc/webapp-publisher-config.xml,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.apimgt.webapp.publisher_${feature.version}/conf_templates/,target:${installFolder}/../../resources/conf/,overwrite:true);\
diff --git a/features/apimgt-extensions/pom.xml b/features/apimgt-extensions/pom.xml
index 201296d7d7c..42650878ae4 100644
--- a/features/apimgt-extensions/pom.xml
+++ b/features/apimgt-extensions/pom.xml
@@ -22,23 +22,20 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
apimgt-extensions-feature
- 4.1.16-SNAPSHOT
pom
WSO2 Carbon - API Management Extensions Feature
http://wso2.org
- org.wso2.carbon.apimgt.integration.client.feature
org.wso2.carbon.apimgt.webapp.publisher.feature
org.wso2.carbon.apimgt.application.extension.feature
- org.wso2.carbon.apimgt.handler.server.feature
diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.api.feature/pom.xml b/features/application-mgt/io.entgra.application.mgt.api.feature/pom.xml
similarity index 92%
rename from features/application-mgt/org.wso2.carbon.device.application.mgt.api.feature/pom.xml
rename to features/application-mgt/io.entgra.application.mgt.api.feature/pom.xml
index 44f13b75405..7897e9139bb 100644
--- a/features/application-mgt/org.wso2.carbon.device.application.mgt.api.feature/pom.xml
+++ b/features/application-mgt/io.entgra.application.mgt.api.feature/pom.xml
@@ -22,15 +22,14 @@
org.wso2.carbon.devicemgt
application-mgt-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
- org.wso2.carbon.device.application.mgt.api.feature
- 4.1.16-SNAPSHOT
+ io.entgra.application.mgt.api.feature
pom
- WSO2 Carbon - Application Management API Feature
+ Entgra - Application Management API Feature
https://entgra.io
This feature contains the APIs required for Application Management console UI
@@ -50,7 +49,7 @@
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.publisher.api
+ io.entgra.application.mgt.publisher.api
${project.version}
war
@@ -73,7 +72,7 @@
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.store.api
+ io.entgra.application.mgt.store.api
${project.version}
war
@@ -96,7 +95,7 @@
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.api
+ io.entgra.application.mgt.api
${project.version}
war
@@ -147,7 +146,7 @@
p2-feature-gen
- org.wso2.carbon.device.application.mgt.api
+ io.entgra.application.mgt.api
../../../features/etc/feature.properties
diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.api.feature/src/main/resources/build.properties b/features/application-mgt/io.entgra.application.mgt.api.feature/src/main/resources/build.properties
similarity index 100%
rename from features/application-mgt/org.wso2.carbon.device.application.mgt.api.feature/src/main/resources/build.properties
rename to features/application-mgt/io.entgra.application.mgt.api.feature/src/main/resources/build.properties
diff --git a/features/application-mgt/io.entgra.application.mgt.api.feature/src/main/resources/p2.inf b/features/application-mgt/io.entgra.application.mgt.api.feature/src/main/resources/p2.inf
new file mode 100644
index 00000000000..cc35cf26a1b
--- /dev/null
+++ b/features/application-mgt/io.entgra.application.mgt.api.feature/src/main/resources/p2.inf
@@ -0,0 +1,5 @@
+instructions.configure = \
+org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/webapps/);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.application.mgt.api_${feature.version}/webapps/api#application-mgt-publisher#v1.0.war,target:${installFolder}/../../deployment/server/webapps/api#application-mgt-publisher#v1.0.war,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.application.mgt.api_${feature.version}/webapps/api#application-mgt-store#v1.0.war,target:${installFolder}/../../deployment/server/webapps/api#application-mgt-store#v1.0.war,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.application.mgt.api_${feature.version}/webapps/api#application-mgt#v1.0.war,target:${installFolder}/../../deployment/server/webapps/api#application-mgt#v1.0.war,overwrite:true);\
diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/pom.xml b/features/application-mgt/io.entgra.application.mgt.server.feature/pom.xml
similarity index 65%
rename from features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/pom.xml
rename to features/application-mgt/io.entgra.application.mgt.server.feature/pom.xml
index d8a8448faca..76ce4d2f15a 100644
--- a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/pom.xml
+++ b/features/application-mgt/io.entgra.application.mgt.server.feature/pom.xml
@@ -22,16 +22,15 @@
org.wso2.carbon.devicemgt
application-mgt-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
- org.wso2.carbon.device.application.mgt.server.feature
+ io.entgra.application.mgt.server.feature
pom
- 4.1.16-SNAPSHOT
- WSO2 Carbon - Application Management Server Feature
+ Entgra - Application Management Server Feature
https://entgra.io
This feature contains the core bundles required for Back-end Application Management functionality
@@ -39,11 +38,11 @@
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.common
+ io.entgra.application.mgt.common
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.core
+ io.entgra.application.mgt.core
com.googlecode.plist
@@ -60,25 +59,10 @@
cxf-rt-frontend-jaxrs
${cxf.version}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ com.h2database.wso2
+ h2-database-engine
+
@@ -108,6 +92,39 @@
+
+ org.apache.maven.plugins
+ maven-antrun-plugin
+
+
+ create-app-mgt-schema
+ package
+
+ run
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
org.wso2.maven
carbon-p2-plugin
@@ -120,7 +137,7 @@
p2-feature-gen
- org.wso2.carbon.device.application.mgt.server
+ io.entgra.application.mgt.server
../../../features/etc/feature.properties
@@ -128,16 +145,12 @@
org.eclipse.equinox.p2.type.group:false
-
-
-
-
- org.wso2.carbon.devicemgt:org.wso2.carbon.device.application.mgt.common:${carbon.device.mgt.version}
+ org.wso2.carbon.devicemgt:io.entgra.application.mgt.common:${carbon.device.mgt.version}
- org.wso2.carbon.devicemgt:org.wso2.carbon.device.application.mgt.core:${carbon.device.mgt.version}
+ org.wso2.carbon.devicemgt:io.entgra.application.mgt.core:${carbon.device.mgt.version}
com.googlecode.plist:dd-plist:${googlecode.plist.version}
@@ -145,17 +158,9 @@
commons-validator:commons-validator:${commons-validator.version}
-
-
-
-
-
-
-
-
diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/build.properties b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/build.properties
similarity index 100%
rename from features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/build.properties
rename to features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/build.properties
diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/conf/application-mgt.xml b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/conf/application-mgt.xml
similarity index 93%
rename from features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/conf/application-mgt.xml
rename to features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/conf/application-mgt.xml
index d0d02a058a3..fa4ce1eb53c 100644
--- a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/conf/application-mgt.xml
+++ b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/conf/application-mgt.xml
@@ -23,19 +23,19 @@
- org.wso2.carbon.device.application.mgt.core.impl.ApplicationManagerImpl
+ io.entgra.application.mgt.core.impl.ApplicationManagerImpl
- org.wso2.carbon.device.application.mgt.core.impl.ReviewManagerImpl
+ io.entgra.application.mgt.core.impl.ReviewManagerImpl
- org.wso2.carbon.device.application.mgt.core.lifecycle.LifecycleStateManager
+ io.entgra.application.mgt.core.lifecycle.LifecycleStateManager
- org.wso2.carbon.device.application.mgt.core.impl.SubscriptionManagerImpl
+ io.entgra.application.mgt.core.impl.SubscriptionManagerImpl
- org.wso2.carbon.device.application.mgt.core.impl.ApplicationStorageManagerImpl
+ io.entgra.application.mgt.core.impl.ApplicationStorageManagerImpl
repository/resources/apps/
6
diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/conf/datasources/application-mgt-datasources.xml b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/conf/datasources/application-mgt-datasources.xml
similarity index 94%
rename from features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/conf/datasources/application-mgt-datasources.xml
rename to features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/conf/datasources/application-mgt-datasources.xml
index ddeeaa5005a..9e91286a798 100644
--- a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/conf/datasources/application-mgt-datasources.xml
+++ b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/conf/datasources/application-mgt-datasources.xml
@@ -30,7 +30,7 @@
- jdbc:h2:repository/database/WSO2DM_APPM_DB;DB_CLOSE_ON_EXIT=FALSE
+ jdbc:h2:./repository/database/WSO2DM_APPM_DB;DB_CLOSE_ON_EXIT=FALSE
wso2carbon
wso2carbon
org.h2.Driver
diff --git a/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/conf_templates/templates/repository/conf/application-mgt.xml.j2 b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/conf_templates/templates/repository/conf/application-mgt.xml.j2
new file mode 100644
index 00000000000..21ce676f3f5
--- /dev/null
+++ b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/conf_templates/templates/repository/conf/application-mgt.xml.j2
@@ -0,0 +1,231 @@
+
+
+
+
+
+ jdbc/APPM_DS
+
+
+
+ {% if application_mgt_conf.extension.application_manager is defined %}
+ {{application_mgt_conf.extension.application_manager}}
+ {% else %}
+ io.entgra.application.mgt.core.impl.ApplicationManagerImpl
+ {% endif %}
+
+
+ {% if application_mgt_conf.extension.review_manager is defined %}
+ {{application_mgt_conf.extension.review_manager}}
+ {% else %}
+ io.entgra.application.mgt.core.impl.ReviewManagerImpl
+ {% endif %}
+
+
+ {% if application_mgt_conf.extension.life_cycle_state_manager is defined %}
+ {{application_mgt_conf.extension.life_cycle_state_manager}}
+ {% else %}
+ io.entgra.application.mgt.core.lifecycle.LifecycleStateManager
+ {% endif %}
+
+
+ {% if application_mgt_conf.extension.subscription_manager is defined %}
+ {{application_mgt_conf.extension.subscription_manager}}
+ {% else %}
+ io.entgra.application.mgt.core.impl.SubscriptionManagerImpl
+ {% endif %}
+
+
+ {% if application_mgt_conf.extension.application_storage_manager is defined %}
+ {{application_mgt_conf.extension.application_storage_manager}}
+ {% if application_mgt_conf.extension.application_storage_manager.parameter_options is defined %}
+
+ {% for property_name,property_value in application_mgt_conf.extension.application_storage_manager.parameter_options.items() %}
+ {{property_value}}
+ {% endfor %}
+
+ {% endif %}
+ {% else %}
+ io.entgra.application.mgt.core.impl.ApplicationStorageManagerImpl
+
+ repository/resources/apps/
+ 6
+
+ {% endif %}
+
+
+
+
+
+
+
+
+
+ true
+ true
+ true
+ /app-mgt/life-cycle/application/create
+
+ In-Review
+
+
+
+ /app-mgt/life-cycle/application/review
+
+ Rejected
+ Approved
+ Created
+
+
+
+ /app-mgt/life-cycle/application/approve
+
+ In-Review
+ Published
+
+
+
+ true
+ /app-mgt/life-cycle/application/reject
+
+ In-Review
+
+
+
+ true
+ /app-mgt/life-cycle/application/publish
+
+ Blocked
+ Deprecated
+
+
+
+ /app-mgt/life-cycle/application/block
+
+ Published
+ Deprecated
+
+
+
+ /app-mgt/life-cycle/application/deprecate
+
+ Published
+ Retired
+
+
+
+ true
+ /app-mgt/life-cycle/application/retire
+
+
+
+
+ EMM
+ IoT
+ Art & Design
+ Auto & Vehicles
+ Beauty
+ Books & Reference
+ Business
+ Comics
+ Communications
+ Dating
+ Education
+ Entertainment
+ Events
+ Finance
+ Food & Drink
+ Health & Fitness
+ House & Home
+ Libraries & Demo
+ Lifestyle
+ Maps & Navigation
+ Medical
+ Music & Audio
+ News & Magazines
+ Parenting
+ Personalization
+ Photography
+ Productivity
+ Shopping
+ Social
+ Sports
+ Tools
+ Travel & Local
+ Video Players & Editors
+ Weather
+ GooglePlaySyncedApp
+ {% if application_mgt_conf.app_categories is defined %}
+ {%- for app_category in application_mgt_conf.app_categories -%}
+ {{app_category}}
+ {% endfor %}
+ {% endif %}
+
+
+
+ {% if application_mgt_conf.rating_conf.min_rating_value is defined %}
+ {{application_mgt_conf.rating_conf.min_rating_value}}
+ {% else %}
+ 1
+ {% endif %}
+ {% if application_mgt_conf.rating_conf.max_rating_value is defined %}
+ {{application_mgt_conf.rating_conf.max_rating_value}}
+ {% else %}
+ 10
+ {% endif %}
+
+
+
+ {% if application_mgt_conf.mdm_conf.artifact_download_protocol is defined %}
+ {{application_mgt_conf.mdm_conf.artifact_download_protocol}}
+ {% else %}
+ http
+ {% endif %}
+
+ {% if application_mgt_conf.mdm_conf.artifact_download_endpoint is defined %}
+ {{application_mgt_conf.mdm_conf.artifact_download_endpoint}}
+ {% else %}
+ /api/application-mgt/v1.0/artifact
+ {% endif %}
+
+
diff --git a/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/conf_templates/templates/repository/conf/datasources/application-mgt-datasources.xml.j2 b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/conf_templates/templates/repository/conf/datasources/application-mgt-datasources.xml.j2
new file mode 100644
index 00000000000..a25faf65119
--- /dev/null
+++ b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/conf_templates/templates/repository/conf/datasources/application-mgt-datasources.xml.j2
@@ -0,0 +1,59 @@
+
+
+
+
+ org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader
+
+
+
+
+
+ APPM_DS
+ The datasource used for CDM Application Management
+
+ jdbc/APPM_DS
+
+
+
+ {% if database.app_mgt is defined %}
+ {{database.app_mgt.url}}
+ {{database.app_mgt.username}}
+ {{database.app_mgt.password}}
+ {{database.app_mgt.driver}}
+ {{database.app_mgt.validationQuery}}
+ {% for property_name,property_value in database.app_mgt.pool_options.items() %}
+ <{{property_name}}>{{property_value}}{{property_name}}>
+ {% endfor %}
+ {% else %}
+ jdbc:h2:./repository/database/WSO2DM_APPM_DB;DB_CLOSE_ON_EXIT=FALSE
+ wso2carbon
+ wso2carbon
+ org.h2.Driver
+ 50
+ 60000
+ true
+ SELECT 1
+ 30000
+ {% endif %}
+
+
+
+
+
+
diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/h2.sql b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/h2.sql
similarity index 100%
rename from features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/h2.sql
rename to features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/h2.sql
diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/mssql.sql b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/mssql.sql
similarity index 100%
rename from features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/mssql.sql
rename to features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/mssql.sql
diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/mysql.sql b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/mysql.sql
similarity index 100%
rename from features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/mysql.sql
rename to features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/mysql.sql
diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/oracle.sql b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/oracle.sql
similarity index 100%
rename from features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/oracle.sql
rename to features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/oracle.sql
diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/postgresql.sql b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/postgresql.sql
similarity index 100%
rename from features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/postgresql.sql
rename to features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/postgresql.sql
diff --git a/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/p2.inf b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/p2.inf
new file mode 100644
index 00000000000..480343ebef4
--- /dev/null
+++ b/features/application-mgt/io.entgra.application.mgt.server.feature/src/main/resources/p2.inf
@@ -0,0 +1,10 @@
+instructions.configure = \
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.application.mgt.server_${feature.version}/database/,target:${installFolder}/../../../repository/database/,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.application.mgt.server_${feature.version}/conf/application-mgt.xml,target:${installFolder}/../../conf/application-mgt.xml,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.application.mgt.server_${feature.version}/conf/datasources/application-mgt-datasources.xml,target:${installFolder}/../../conf/datasources/application-mgt-datasources.xml,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.application.mgt.server_${feature.version}/dbscripts/cdm/application-mgt,target:${installFolder}/../../../dbscripts/cdm/application-mgt,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.application.mgt.server_${feature.version}/conf_templates/,target:${installFolder}/../../resources/conf/,overwrite:true);\
+
+instructions.unconfigure = \
+org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../conf/datasources/application-mgt-datasources.xml);\
+org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/application-mgt);\
diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.api.feature/src/main/resources/p2.inf b/features/application-mgt/org.wso2.carbon.device.application.mgt.api.feature/src/main/resources/p2.inf
deleted file mode 100644
index 5f658e814db..00000000000
--- a/features/application-mgt/org.wso2.carbon.device.application.mgt.api.feature/src/main/resources/p2.inf
+++ /dev/null
@@ -1,5 +0,0 @@
-instructions.configure = \
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/webapps/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application.mgt.api_${feature.version}/webapps/api#application-mgt-publisher#v1.0.war,target:${installFolder}/../../deployment/server/webapps/api#application-mgt-publisher#v1.0.war,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application.mgt.api_${feature.version}/webapps/api#application-mgt-store#v1.0.war,target:${installFolder}/../../deployment/server/webapps/api#application-mgt-store#v1.0.war,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application.mgt.api_${feature.version}/webapps/api#application-mgt#v1.0.war,target:${installFolder}/../../deployment/server/webapps/api#application-mgt#v1.0.war,overwrite:true);\
diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/p2.inf b/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/p2.inf
deleted file mode 100644
index a12c244131a..00000000000
--- a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/p2.inf
+++ /dev/null
@@ -1,8 +0,0 @@
-instructions.configure = \
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application.mgt.server_${feature.version}/conf/application-mgt.xml,target:${installFolder}/../../conf/application-mgt.xml,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application.mgt.server_${feature.version}/conf/datasources/application-mgt-datasources.xml,target:${installFolder}/../../conf/datasources/application-mgt-datasources.xml,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application.mgt.server_${feature.version}/dbscripts/cdm/application-mgt,target:${installFolder}/../../../dbscripts/cdm/application-mgt,overwrite:true);\
-
-instructions.unconfigure = \
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../conf/datasources/application-mgt-datasources.xml);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/application-mgt);\
diff --git a/features/application-mgt/pom.xml b/features/application-mgt/pom.xml
index 86fe383b787..0efe38c78fd 100644
--- a/features/application-mgt/pom.xml
+++ b/features/application-mgt/pom.xml
@@ -22,19 +22,18 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../../pom.xml
4.0.0
application-mgt-feature
- 4.1.16-SNAPSHOT
pom
WSO2 Carbon - Application Management Feature
https://entgra.io
- org.wso2.carbon.device.application.mgt.api.feature
- org.wso2.carbon.device.application.mgt.server.feature
+ io.entgra.application.mgt.api.feature
+ io.entgra.application.mgt.server.feature
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml
index 1988d44d719..c4894c3c43f 100644
--- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml
+++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
certificate-mgt-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml
index 1dfc80f4942..5cbef9678b8 100644
--- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml
+++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
certificate-mgt-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml
index a7a9d89595c..6792ce5d056 100644
--- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml
+++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml
@@ -22,14 +22,13 @@
org.wso2.carbon.devicemgt
certificate-mgt-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.certificate.mgt.server.feature
pom
- 4.1.16-SNAPSHOT
WSO2 Carbon - Certificate Management Server Feature
http://wso2.org
This feature contains the core bundles required for back-end Certificate Management functionality
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/conf_templates/templates/repository/conf/certificate-config.xml.j2 b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/conf_templates/templates/repository/conf/certificate-config.xml.j2
new file mode 100755
index 00000000000..2ffad144e29
--- /dev/null
+++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/conf_templates/templates/repository/conf/certificate-config.xml.j2
@@ -0,0 +1,47 @@
+
+
+
+ {% if certificate_conf.certificate_keystore is defined %}
+
+ {{certificate_conf.certificate_keystore.location}}
+
+ {{certificate_conf.certificate_keystore.type}}
+
+ {{certificate_conf.certificate_keystore.password}}
+
+ {{certificate_conf.certificate_keystore.cacert_alias}}
+
+ {{certificate_conf.certificate_keystore.cacert_password}}
+
+ {{certificate_conf.certificate_keystore.racert_alias}}
+
+ {{certificate_conf.certificate_keystore.racert_password}}
+ {% else %}
+
+ ${carbon.home}/repository/resources/security/wso2certs.jks
+
+ JKS
+
+ wso2carbon
+
+ cacert
+
+ cacert
+
+ racert
+
+ racert
+ {% endif %}
+
+
+
+
+
+
+ jdbc/DM_DS
+
+
+
+
+ 10
+
\ No newline at end of file
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/p2.inf b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/p2.inf
index ef6d64fc87e..345f751daae 100644
--- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/p2.inf
+++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/p2.inf
@@ -1,4 +1,5 @@
instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.certificate.mgt.server_${feature.version}/conf/wso2certs.jks,target:${installFolder}/../../resources/security/wso2certs.jks,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.certificate.mgt.server_${feature.version}/conf/certificate-config.xml,target:${installFolder}/../../conf/certificate-config.xml,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.certificate.mgt.server_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts,overwrite:true);\
\ No newline at end of file
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.certificate.mgt.server_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.certificate.mgt.server_${feature.version}/conf_templates/,target:${installFolder}/../../resources/conf/,overwrite:true);\
diff --git a/features/certificate-mgt/pom.xml b/features/certificate-mgt/pom.xml
index bce727f0f21..7dceadff12b 100644
--- a/features/certificate-mgt/pom.xml
+++ b/features/certificate-mgt/pom.xml
@@ -22,14 +22,12 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../../pom.xml
4.0.0
- org.wso2.carbon.devicemgt
certificate-mgt-feature
- 4.1.16-SNAPSHOT
pom
WSO2 Carbon - Certificate Management Feature
http://wso2.org
diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml
index 367a9e97dd6..aca2bf216d1 100644
--- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml
+++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml
@@ -22,14 +22,13 @@
org.wso2.carbon.devicemgt
device-mgt-extensions-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature
pom
- 4.1.16-SNAPSHOT
WSO2 Carbon - Device Type Deployer Feature
http://wso2.org
WSO2 Carbon - Device Type Deployer Feature
diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml
index 3a9724ec93a..e1caa4a07d5 100644
--- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml
+++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml
@@ -22,14 +22,13 @@
org.wso2.carbon.devicemgt
device-mgt-extensions-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature
pom
- 4.1.16-SNAPSHOT
WSO2 Carbon - FCM Based Push Notification Provider Feature
http://wso2.org
WSO2 Carbon - MQTT Based Push Notification Provider Feature
diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml
index 03ab72d6f5c..489e36b2cd3 100644
--- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml
+++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml
@@ -22,14 +22,13 @@
org.wso2.carbon.devicemgt
device-mgt-extensions-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature
pom
- 4.1.16-SNAPSHOT
WSO2 Carbon - MQTT Based Push Notification Provider Feature
http://wso2.org
WSO2 Carbon - MQTT Based Push Notification Provider Feature
diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml
index 87c6f51c3e8..4c025f85720 100644
--- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml
+++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml
@@ -22,14 +22,13 @@
org.wso2.carbon.devicemgt
device-mgt-extensions-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature
pom
- 4.1.16-SNAPSHOT
WSO2 Carbon - MQTT Based Push Notification Provider Feature
http://wso2.org
WSO2 Carbon - MQTT Based Push Notification Provider Feature
diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml
index 7f49e2dd7a8..f482a4874f5 100644
--- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml
+++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml
@@ -22,14 +22,13 @@
org.wso2.carbon.devicemgt
device-mgt-extensions-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature
pom
- 4.1.16-SNAPSHOT
WSO2 Carbon - XMPP Based Push Notification Provider Feature
http://wso2.org
WSO2 Carbon - XMPP Based Push Notification Provider Feature
diff --git a/features/device-mgt-extensions/pom.xml b/features/device-mgt-extensions/pom.xml
index 8f4033f2f0f..063ed9e1c2f 100644
--- a/features/device-mgt-extensions/pom.xml
+++ b/features/device-mgt-extensions/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../../pom.xml
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.feature/pom.xml
index 4f2154e29d3..411d4d0a2c8 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.feature/pom.xml
@@ -22,14 +22,13 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.analytics.feature
pom
- 4.1.16-SNAPSHOT
WSO2 Carbon - Device Management Server Feature
http://wso2.org
This feature contains bundles related to device analytics data publisher and ws proxy
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml
index 68ac18bdf90..c36f6b292c0 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/pom.xml
index 055fcd0a575..f96f388520d 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
@@ -43,34 +43,6 @@
org.wso2.carbon.devicemgt
org.wso2.carbon.device.mgt.common
-
- org.wso2.carbon.devicemgt
- org.wso2.carbon.device.mgt.analytics.data.publisher
-
-
- org.wso2.carbon.registry
- org.wso2.carbon.registry.indexing
-
-
- org.wso2.carbon.analytics-common
- org.wso2.carbon.event.receiver.stub
-
-
- org.wso2.carbon.analytics-common
- org.wso2.carbon.event.stream.stub
-
-
- org.wso2.carbon.analytics-common
- org.wso2.carbon.event.publisher.stub
-
-
- org.wso2.carbon.analytics-common
- org.wso2.carbon.event.stream.persistence.stub
-
-
- org.wso2.orbit.org.scannotation
- scannotation
-
@@ -127,27 +99,6 @@
org.wso2.carbon.devicemgt:org.wso2.carbon.device.mgt.common:${carbon.device.mgt.version}
-
- org.wso2.carbon.devicemgt:org.wso2.carbon.device.mgt.analytics.data.publisher:${carbon.device.mgt.version}
-
-
- org.wso2.carbon.analytics-common:org.wso2.carbon.event.receiver.stub:${carbon.analytics.common.version}
-
-
- org.wso2.carbon.analytics-common:org.wso2.carbon.event.stream.stub:${carbon.analytics.common.version}
-
-
- org.wso2.carbon.analytics-common:org.wso2.carbon.event.publisher.stub:${carbon.analytics.common.version}
-
-
- org.wso2.carbon.analytics-common:org.wso2.carbon.event.stream.persistence.stub:${carbon.analytics.common.version}
-
-
- org.wso2.orbit.com.fasterxml.jackson.core:jackson-annotations:${jackson-annotations.version}
-
-
- org.wso2.orbit.org.scannotation:scannotation:${scannotation.version}
-
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/apis/admin--OAuth2TokenManagement.xml b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/apis/admin--OAuth2TokenManagement.xml
index 9e7e2fd601f..637f40f7764 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/apis/admin--OAuth2TokenManagement.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/apis/admin--OAuth2TokenManagement.xml
@@ -20,7 +20,6 @@
-
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/apis/admin--UserManagementValidateUser.xml b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/apis/admin--UserManagementValidateUser.xml
index 5b8ee2f562a..ec61d66eecf 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/apis/admin--UserManagementValidateUser.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/apis/admin--UserManagementValidateUser.xml
@@ -20,7 +20,6 @@
-
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/cdm-config.xml b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/cdm-config.xml
index bbbd8511d40..d15901005e5 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/cdm-config.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/cdm-config.xml
@@ -42,13 +42,13 @@
https://localhost:9443
- admin
- admin
+ ${admin.username}
+ ${admin.username}
https://localhost:9443
- admin
- admin
+ ${admin.username}
+ ${admin.username}
org.wso2.carbon.policy.mgt
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/datasources/cdm-datasources.xml b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/datasources/cdm-datasources.xml
new file mode 100755
index 00000000000..78db49688e9
--- /dev/null
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/datasources/cdm-datasources.xml
@@ -0,0 +1,65 @@
+
+
+
+
+ org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader
+
+
+
+ DM_DS
+ The datasource used for CDM
+
+ jdbc/DM_DS
+
+
+
+ jdbc:h2:./repository/database/WSO2DM_DB;DB_CLOSE_ON_EXIT=FALSE;AUTO_SERVER=TRUE;LOCK_TIMEOUT=60000
+ wso2carbon
+ wso2carbon
+ org.h2.Driver
+ 50
+ 60000
+ true
+ SELECT 1
+ 30000
+
+
+
+
+ DM_ARCHIVAL_DS
+ The archival datasource used for CDM
+
+ jdbc/DM_ARCHIVAL_DS
+
+
+
+ jdbc:h2:./repository/database/WSO2DM_ARCHIVAL_DS;DB_CLOSE_ON_EXIT=FALSE
+ wso2carbon
+ wso2carbon
+ org.h2.Driver
+ 50
+ 60000
+ true
+ SELECT 1
+ 30000
+
+
+
+
+
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/mdm-ui-config.xml b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/mdm-ui-config.xml
index aa3f169a33d..88d9b47d294 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/mdm-ui-config.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/mdm-ui-config.xml
@@ -183,6 +183,7 @@
perm:metadata:update
perm:android:google-account
perm:android:update-default-sim
+ perm:android:info
device-mgt
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/cdm-config.xml.j2 b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/cdm-config.xml.j2
new file mode 100644
index 00000000000..78b0fafd8a4
--- /dev/null
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/cdm-config.xml.j2
@@ -0,0 +1,315 @@
+
+
+
+
+
+
+
+ jdbc/DM_DS
+
+
+
+
+ {% if device_mgt_conf.push_notification_conf is defined %}
+ {{device_mgt_conf.push_notification_conf.scheduler_batch_size}}
+ {{device_mgt_conf.push_notification_conf.scheduler_batch_delay_mills}}
+ {{device_mgt_conf.push_notification_conf.scheduler_task_initial_delay}}
+ {{device_mgt_conf.push_notification_conf.scheduler_task_enabled}}
+ {% else %}
+ 1000
+ 60000
+ 60000
+ true
+ {% endif %}
+
+ org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.FCMBasedPushNotificationProvider
+ org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.MQTTBasedPushNotificationProvider
+ org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.HTTPBasedPushNotificationProvider
+ org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.XMPPBasedPushNotificationProvider
+ {% if device_mgt_conf.push_notification_conf.push_notification_providers is defined %}
+ {%- for push_notification_provider in device_mgt_conf.push_notification_conf.push_notification_providers -%}
+ {{push_notification_provider}}
+ {% endfor %}
+ {% endif %}
+
+
+
+ {% if device_mgt_conf.pull_notification_conf is defined %}
+ {{device_mgt_conf.pull_notification_conf.enabled}}
+ {% else %}
+ false
+ {% endif %}
+
+
+ {% if device_mgt_conf.identity_conf is defined %}
+ {{device_mgt_conf.identity_conf.server_url}}
+ {{device_mgt_conf.identity_conf.admin_username}}
+ {{device_mgt_conf.identity_conf.admin_password}}
+ {% else %}
+ https://localhost:9443
+ ${admin.username}
+ ${admin.username}
+ {% endif %}
+
+
+ {% if device_mgt_conf.key_manager_conf is defined %}
+ {{device_mgt_conf.key_manager_conf.server_url}}
+ {{device_mgt_conf.key_manager_conf.admin_username}}
+ {{device_mgt_conf.key_manager_conf.admin_password}}
+ {% else %}
+ https://localhost:9443
+ ${admin.username}
+ ${admin.username}
+ {% endif %}
+
+
+ {% if device_mgt_conf.policy_conf is defined %}
+ {{device_mgt_conf.policy_conf.monitoring_class}}
+ {{device_mgt_conf.policy_conf.monitoring_enable}}
+ {{device_mgt_conf.policy_conf.monitoring_frequency}}
+ {{device_mgt_conf.policy_conf.max_retries}}
+ {{device_mgt_conf.policy_conf.min_retries_to_mark_unreachable}}
+ {{device_mgt_conf.policy_conf.min_retries-to_mark_inactive}}
+
+
+
+ {{device_mgt_conf.policy_conf.policy.evaluation_point}}
+ {{device_mgt_conf.policy_conf.cache_enable}}
+ {% else %}
+ org.wso2.carbon.policy.mgt
+ true
+ 60000
+ 5
+ 8
+ 20
+
+
+
+ Simple
+ true
+ {% endif %}
+
+
+
+ {% if device_mgt_conf.pagination_conf is defined %}
+ {{device_mgt_conf.pagination_conf.device_list_page_size}}
+ {{device_mgt_conf.pagination_conf.group_list_page_size}}
+ {{device_mgt_conf.pagination_conf.notification_list_page_size}}
+ {{device_mgt_conf.pagination_conf.activity_list_page_size}}
+ {{device_mgt_conf.pagination_conf.operation_list_page_size}}
+ {{device_mgt_conf.pagination_conf.topic_list_page_size}}
+ {{device_mgt_conf.pagination_conf.metadata_list_page_size}}
+ {% else %}
+ 20
+ 20
+ 20
+ 20
+ 20
+ 20
+ 20
+ {% endif %}
+
+
+
+ {% if device_mgt_conf.device_status_task_config is defined %}
+ {{device_mgt_conf.device_status_task_config.enable}}
+ {% else %}
+ true
+ {% endif %}
+
+
+
+ {% if device_mgt_conf.device_cache_conf is defined %}
+ {{device_mgt_conf.device_cache_conf.enable}}
+ {{device_mgt_conf.device_cache_conf.expiry_time}}
+
+ {{device_mgt_conf.device_cache_conf.capacity}}
+ {% else %}
+ true
+ 600
+
+ 10000
+ {% endif %}
+
+
+ {% if device_mgt_conf.geo_fence_cache_conf is defined %}
+ {{device_mgt_conf.geo_fence_cache_conf.enable}}
+ {{device_mgt_conf.geo_fence_cache_conf.expiry_time}}
+ {{device_mgt_conf.geo_fence_cache_conf.capacity}}
+ {% else %}
+ true
+ 600
+ 10000
+ {% endif %}
+
+
+ {% if device_mgt_conf.event_operation_task_conf is defined %}
+ {{device_mgt_conf.event_operation_task_conf.enable}}
+ {% else %}
+ true
+ {% endif %}
+
+
+ {% if device_mgt_conf.certificate_cache_conf is defined %}
+ {{device_mgt_conf.certificate_cache_conf.enable}}
+ {{device_mgt_conf.certificate_cache_conf.expiry_time}}
+ {% else %}
+ true
+ 86400
+ {% endif %}
+
+
+
+
+ jdbc/DM_ARCHIVAL_DS
+
+
+
+ {% if device_mgt_conf.archival_conf.archival_task is defined %}
+ {{device_mgt_conf.archival_conf.archival_task.enabled}}
+ {{device_mgt_conf.archival_conf.archival_task.archival_pending_operations}}
+
+ DM_DB
+ ARCHIVAL_DB
+
+ {{device_mgt_conf.archival_conf.archival_task.task_class}}
+
+ {{device_mgt_conf.archival_conf.archival_task.cron_expression}}
+
+ {{device_mgt_conf.archival_conf.archival_task.retention_period}}
+ {{device_mgt_conf.archival_conf.archival_task.execution_batch_size}}
+
+ {{device_mgt_conf.archival_conf.archival_task.purging_task.enabled}}
+ {{device_mgt_conf.archival_conf.archival_task.purging_task.task_class}}
+
+ {{device_mgt_conf.archival_conf.archival_task.purging_task.cron_expression}}
+
+ {{device_mgt_conf.archival_conf.archival_task.purging_task.retention_period}}
+
+ {% else %}
+ false
+ false
+
+ DM_DB
+ ARCHIVAL_DB
+
+ org.wso2.carbon.device.mgt.core.task.impl.ArchivalTask
+
+ 0 0 0 1/1 * ? *
+
+ 30
+ 1000
+
+ false
+ org.wso2.carbon.device.mgt.core.task.impl.ArchivedDataDeletionTask
+
+ 0 0 3 1/1 * ? *
+
+ 365
+
+ {% endif %}
+
+
+
+ {% if device_mgt_conf.geo_location_conf is defined %}
+ {{device_mgt_conf.geo_location_conf.enabled}}
+ {% else %}
+ false
+ {% endif %}
+
+
+ false
+ false
+
+ false
+
+
+
+
+ *
+
+
+
+
+
+ {% if device_mgt_conf.remote_session_conf is defined %}
+ {{device_mgt_conf.remote_session_conf.enabled}}
+ {{device_mgt_conf.remote_session_conf.remote_session_server_url}}
+ {{device_mgt_conf.remote_session_conf.max_http_connection_per_host}}
+ {{device_mgt_conf.remote_session_conf.max_total_http_connections}}
+ {{device_mgt_conf.remote_session_conf.max_messages_per_second}}
+ {{device_mgt_conf.remote_session_conf.session_idle_timeout}}
+ {{device_mgt_conf.remote_session_conf.max_message_buffer.size}}
+ {% else %}
+ true
+ ws://localhost:9763
+ 2
+ 100
+ 20
+ 15
+ 640
+ {% endif %}
+
+ {% if device_mgt_conf.default_groups_conf is defined %}
+ {{device_mgt_conf.default_groups_conf}}
+ {% else %}
+ BYOD,COPE
+ {% endif %}
+
+ {% if device_mgt_conf.enrolement_notification_conf is defined %}
+ {{device_mgt_conf.enrolement_notification_conf.enabled}}
+ {{device_mgt_conf.enrolement_notification_conf.notify_through_extension}}
+ {{device_mgt_conf.enrolement_notification_conf.extension_class}}
+ {{device_mgt_conf.enrolement_notification_conf.notify_internal_host}}
+ {% else %}
+ false
+ false
+ org.wso2.carbon.device.mgt.common.enrollment.notification.EnrollmentNotifier
+ http://localhost:8280
+ {% endif %}
+
+
+ {% if device_mgt_conf.default_roles is defined %}
+ {{device_mgt_conf.default_roles.enabled}}
+ {% else %}
+ false
+ {% endif %}
+
+
+ test_role
+
+ /permission/admin/Login
+
+
+
+
+
+
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/datasources/cdm-datasources.xml.j2 b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/datasources/cdm-datasources.xml.j2
new file mode 100755
index 00000000000..e9105a8d3e4
--- /dev/null
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/datasources/cdm-datasources.xml.j2
@@ -0,0 +1,87 @@
+
+
+
+
+ org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader
+
+
+
+ DM_DS
+ The datasource used for CDM
+
+ jdbc/DM_DS
+
+
+
+ {% if database.device_mgt is defined %}
+ {{database.device_mgt.url}}
+ {{database.device_mgt.username}}
+ {{database.device_mgt.password}}
+ {{database.device_mgt.driver}}
+ {{database.device_mgt.validationQuery}}
+ {% for property_name,property_value in database.device_mgt.pool_options.items() %}
+ <{{property_name}}>{{property_value}}{{property_name}}>
+ {% endfor %}
+ {% else %}
+ jdbc:h2:./repository/database/WSO2DM_DB;DB_CLOSE_ON_EXIT=FALSE;AUTO_SERVER=TRUE;LOCK_TIMEOUT=60000
+ wso2carbon
+ wso2carbon
+ org.h2.Driver
+ 50
+ 60000
+ true
+ SELECT 1
+ 30000
+ {% endif %}
+
+
+
+
+ DM_ARCHIVAL_DS
+ The archival datasource used for CDM
+
+ jdbc/DM_ARCHIVAL_DS
+
+
+
+ {% if database.device_mgt_archival is defined %}
+ {{database.device_mgt_archival.url}}
+ {{database.device_mgt_archival.username}}
+ {{database.device_mgt_archival.password}}
+ {{database.device_mgt_archival.driver}}
+ {{database.device_mgt_archival.validationQuery}}
+ {% for property_name,property_value in database.device_mgt_archival.pool_options.items() %}
+ <{{property_name}}>{{property_value}}{{property_name}}>
+ {% endfor %}
+ {% else %}
+ jdbc:h2:./repository/database/WSO2DM_ARCHIVAL_DS;DB_CLOSE_ON_EXIT=FALSE
+ wso2carbon
+ wso2carbon
+ org.h2.Driver
+ 50
+ 60000
+ true
+ SELECT 1
+ 30000
+ {% endif %}
+
+
+
+
+
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/etc/license-config.xml.j2 b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/etc/license-config.xml.j2
new file mode 100644
index 00000000000..ab2e462b425
--- /dev/null
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/etc/license-config.xml.j2
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+ wso2
+ android
+ 1.0.0
+ 1.0.0
+ 01-01-2014
+ 31-12-2035
+
+
+
+ wso2
+ ios
+ 1.0.0
+ 1.0.0
+ 01-01-2014
+ 31-12-2035
+
+
+
+ wso2
+ windows
+ 1.0.0
+ 1.0.0
+ 01-01-2014
+ 31-12-2035
+
+
+ {% if license_conf.licenses is defined %}
+ {%- for license in license_conf.licenses -%}
+
+ {{license.provider}}
+ {{license.name}}
+ {{license.version}}
+ {{license.language}}
+ {{license.valid_from}}
+ {{license.valid-to}}
+ {{license.text}}
+
+ {% endfor %}
+ {% endif %}
+
+
\ No newline at end of file
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/etc/remote-appmanager-config.xml.j2 b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/etc/remote-appmanager-config.xml.j2
new file mode 100644
index 00000000000..5f752a49839
--- /dev/null
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/etc/remote-appmanager-config.xml.j2
@@ -0,0 +1,32 @@
+
+
+
+
+ {% if app_management_conf is defined %}
+ {{app_management_conf.enable}}
+ {{app_management_conf.app_manager_url}}
+ {{app_management_conf.consumer_key}}
+ {{app_management_conf.consumer_secret}}
+ {% else %}
+ true
+ http:/www.google.com
+ http:/www.google.com
+ http:/www.google.com
+ {% endif %}
+
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/mdm-ui-config.xml.j2 b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/mdm-ui-config.xml.j2
new file mode 100644
index 00000000000..ae1c8f4e6ea
--- /dev/null
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/mdm-ui-config.xml.j2
@@ -0,0 +1,219 @@
+
+
+
+
+ {% if mdm_ui_conf.enable_oauth is defined %}
+ {{mdm_ui_conf.enable_oauth}}
+ {% else %}
+ true
+ {% endif %}
+ {% if mdm_ui_conf.enable_sso is defined %}
+ {{mdm_ui_conf.enable_sso}}
+ {% else %}
+ true
+ {% endif %}
+
+ {% if mdm_ui_conf.login_cache_capacity is defined %}
+ {{mdm_ui_conf.login_cache_capacity}}
+ {% else %}
+ 10000
+ {% endif %}
+
+
+
+ {% if mdm_ui_conf.app_registration.tags is defined %}
+ {%- for tag in mdm_ui_conf.app_registration.tags -%}
+ {{tag}}
+ {% endfor %}
+ {% else %}
+ application_management
+ device_management
+ subscription_management
+ review_management
+ {% endif %}
+
+ {% if mdm_ui_conf.app_registration.allow_to_all_domains is defined %}
+ {{mdm_ui_conf.app_registration.allow_to_all_domains}}
+ {% else %}
+ true
+ {% endif %}
+
+
+ perm:app:review:view
+ perm:app:review:update
+ perm:app:publisher:view
+ perm:app:publisher:update
+ perm:app:store:view
+ perm:app:subscription:install
+ perm:app:subscription:uninstall
+ perm:admin:app:review:update
+ perm:admin:app:review:view
+ perm:admin:app:publisher:update
+ perm:admin:app:review:update
+ perm:admin:app:subscription:view
+ perm:device-types:types
+ perm:enterprise:modify
+ perm:enterprise:view
+ perm:android-work:customer
+ perm:android-work:admin
+ perm:application-command:modify
+ perm:sign-csr
+ perm:admin:devices:view
+ perm:admin:topics:view
+ perm:roles:add
+ perm:roles:add-users
+ perm:roles:update
+ perm:roles:permissions
+ perm:roles:details
+ perm:roles:view
+ perm:roles:create-combined-role
+ perm:roles:delete
+ perm:dashboard:vulnerabilities
+ perm:dashboard:non-compliant-count
+ perm:dashboard:non-compliant
+ perm:dashboard:by-groups
+ perm:dashboard:device-counts
+ perm:dashboard:feature-non-compliant
+ perm:dashboard:count-overview
+ perm:dashboard:filtered-count
+ perm:dashboard:details
+ perm:get-activity
+ perm:devices:delete
+ perm:devices:applications
+ perm:devices:effective-policy
+ perm:devices:compliance-data
+ perm:devices:features
+ perm:devices:operations
+ perm:devices:search
+ perm:devices:details
+ perm:devices:update
+ perm:devices:view
+ perm:view-configuration
+ perm:manage-configuration
+ perm:policies:remove
+ perm:policies:priorities
+ perm:policies:deactivate
+ perm:policies:get-policy-details
+ perm:policies:manage
+ perm:policies:activate
+ perm:policies:update
+ perm:policies:changes
+ perm:policies:get-details
+ perm:users:add
+ perm:users:details
+ perm:users:count
+ perm:users:delete
+ perm:users:roles
+ perm:users:user-details
+ perm:users:credentials
+ perm:users:search
+ perm:users:is-exist
+ perm:users:update
+ perm:users:send-invitation
+ perm:admin-users:view
+ perm:admin:devices:update-enrollment
+ perm:groups:devices
+ perm:groups:update
+ perm:groups:add
+ perm:groups:device
+ perm:groups:devices-count
+ perm:groups:remove
+ perm:groups:groups
+ perm:groups:groups-view
+ perm:groups:share
+ perm:groups:count
+ perm:groups:roles
+ perm:groups:devices-remove
+ perm:groups:devices-add
+ perm:groups:assign
+ perm:device-types:configs
+ perm:device-types:features
+ perm:device-types:types
+ perm:applications:install
+ perm:applications:uninstall
+ perm:admin-groups:count
+ perm:admin-groups:view
+ perm:admin-groups:add
+ perm:notifications:mark-checked
+ perm:notifications:view
+ perm:admin:certificates:delete
+ perm:admin:certificates:details
+ perm:admin:certificates:view
+ perm:admin:certificates:add
+ perm:admin:certificates:verify
+ perm:admin
+ perm:devicetype:deployment
+ perm:device-types:events
+ perm:device-types:events:view
+ perm:admin:device-type
+ perm:admin:device-type:view
+ perm:admin:device-type:configs
+ perm:device:enroll
+ perm:geo-service:analytics-view
+ perm:geo-service:alerts-manage
+ appm:read
+ perm:devices:permanent-delete
+ perm:android:manage-configuration
+ perm:android:view-configuration
+ perm:user:permission-view
+ perm:ios:view-configuration
+ perm:ios:manage-configuration
+ perm:ios:dep-view
+ perm:ios:dep-add
+ perm:windows:view-configuration
+ perm:windows:manage-configuration
+ perm:android:lock-devices
+ perm:android:unlock-devices
+ perm:android:location
+ perm:android:clear-password
+ perm:android:control-camera
+ perm:android:enterprise-wipe
+ perm:android:wipe
+ perm:android:ring
+ perm:android:applications
+ perm:android:reboot
+ perm:android:change-LockTask
+ perm:android:mute
+ perm:android:configure-display-message
+ perm:android:send-app-restrictions
+ perm:android:file-transfer
+ perm:android:set-webclip
+ perm:android:set-password-policy
+ perm:android:change-lock-code
+ perm:android:upgrade-firmware
+ perm:android:send-notification
+ perm:geo-service:geo-fence
+ perm:metadata:view
+ perm:metadata:create
+ perm:metadata:update
+ {% if mdm_ui_conf.scopes is defined %}
+ {%- for scope in mdm_ui_conf.scopes -%}
+ {{scope}}
+ {% endfor %}
+ {% endif %}
+
+
+ {% if mdm_ui_conf.sso_conf is defined %}
+ {{mdm_ui_conf.sso_conf.issuer}}
+ {% else %}
+ device-mgt
+ {% endif %}
+
+
+
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/p2.inf b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/p2.inf
index 09ec420214c..5ebad172029 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/p2.inf
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/p2.inf
@@ -1,4 +1,5 @@
instructions.configure = \
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.basics_${feature.version}/conf/datasources/cdm-datasources.xml,target:${installFolder}/../../conf/datasources/cdm-datasources.xml,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.basics_${feature.version}/conf/cdm-config.xml,target:${installFolder}/../../conf/cdm-config.xml,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.basics_${feature.version}/conf/mdm-ui-config.xml,target:${installFolder}/../../conf/mdm-ui-config.xml,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.basics_${feature.version}/conf/license-config.xml,target:${installFolder}/../../conf/etc/license-config.xml,overwrite:true);\
@@ -7,5 +8,4 @@ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../featur
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.basics_${feature.version}/rxts/license.rxt,target:${installFolder}/../../../repository/resources/rxts/license.rxt,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/email-templates);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.basics_${feature.version}/email/templates,target:${installFolder}/../../../repository/resources/email-templates,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.basics_${feature.version}/apis/admin--OAuth2TokenManagement.xml,target:${installFolder}/../../deployment/server/synapse-configs/default/api/admin--OAuth2TokenManagement.xml,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.basics_${feature.version}/apis/admin--UserManagementValidateUser.xml,target:${installFolder}/../../deployment/server/synapse-configs/default/api/admin--UserManagementValidateUser.xml,overwrite:true);\
\ No newline at end of file
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.basics_${feature.version}/conf_templates/,target:${installFolder}/../../resources/conf/,overwrite:true);\
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml
index 3c4216dfb9f..d9969b90710 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml
@@ -4,14 +4,13 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.feature
pom
- 4.1.16-SNAPSHOT
WSO2 Carbon - Device Management Extensions Feature
http://wso2.org
This feature contains common extensions used by key device management functionalities
@@ -87,8 +86,6 @@
org.wso2.carbon.core.server:${carbon.kernel.version}
- org.wso2.carbon.governance.metadata.server:${carbon.governance.version}
-
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml
index 5dcaac8a0f5..2b919cccdf8 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
@@ -39,11 +39,6 @@
org.wso2.carbon.device.mgt.server.feature
zip
-
- org.wso2.carbon.devicemgt
- org.wso2.carbon.device.mgt.ui.feature
- zip
-
javax.servlet.jsp
javax.servlet.jsp-api
@@ -80,7 +75,6 @@
org.wso2.carbon.devicemgt:org.wso2.carbon.device.mgt.server.feature:${carbon.device.mgt.version}
- org.wso2.carbon.devicemgt:org.wso2.carbon.device.mgt.ui.feature:${carbon.device.mgt.version}
javax.servlet.jsp:javax.servlet.jsp-api
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml
index d5d7bf98f03..3e5bc9400ee 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml
@@ -22,14 +22,13 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.server.feature
pom
- 4.1.16-SNAPSHOT
WSO2 Carbon - Device Management Server Feature
http://wso2.org
This feature contains the core bundles required for Back-end Device Management functionality
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml
index e00fa634c83..c4f70cf3be0 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
diff --git a/features/device-mgt/pom.xml b/features/device-mgt/pom.xml
index 28f576bf2e9..d53543139b8 100644
--- a/features/device-mgt/pom.xml
+++ b/features/device-mgt/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../../pom.xml
@@ -35,11 +35,9 @@
org.wso2.carbon.device.mgt.basics.feature
org.wso2.carbon.device.mgt.server.feature
- org.wso2.carbon.device.mgt.ui.feature
org.wso2.carbon.device.mgt.api.feature
org.wso2.carbon.device.mgt.feature
org.wso2.carbon.device.mgt.extensions.feature
- org.wso2.carbon.device.mgt.analytics.feature
diff --git a/features/heartbeat-management/io.entgra.server.heart.beat.feature/pom.xml b/features/heartbeat-management/io.entgra.server.heart.beat.feature/pom.xml
index db6da06d044..ceae78d4309 100644
--- a/features/heartbeat-management/io.entgra.server.heart.beat.feature/pom.xml
+++ b/features/heartbeat-management/io.entgra.server.heart.beat.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
heart-beat-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
@@ -73,14 +73,6 @@
org.codehaus.woodstox
wstx-asl
-
- org.wso2.carbon.devicemgt
- org.wso2.carbon.device.mgt.analytics.data.publisher
-
-
- org.wso2.carbon.analytics
- org.wso2.carbon.analytics.api
-
diff --git a/features/heartbeat-management/io.entgra.server.heart.beat.feature/src/main/resources/conf_templates/templates/repository/conf/datasources/heart-beat-datasources.xml.j2 b/features/heartbeat-management/io.entgra.server.heart.beat.feature/src/main/resources/conf_templates/templates/repository/conf/datasources/heart-beat-datasources.xml.j2
new file mode 100644
index 00000000000..524f28c42a9
--- /dev/null
+++ b/features/heartbeat-management/io.entgra.server.heart.beat.feature/src/main/resources/conf_templates/templates/repository/conf/datasources/heart-beat-datasources.xml.j2
@@ -0,0 +1,57 @@
+
+
+
+ org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader
+
+
+
+ HeartBeat_DS
+ The datasource Server Heart Beat
+
+ jdbc/HeartBeat_DS
+
+
+
+ {% if database.heart_beat is defined %}
+ {{database.heart_beat.url}}
+ {{database.heart_beat.username}}
+ {{database.heart_beat.password}}
+ {{database.heart_beat.driver}}
+ {{database.heart_beat.validationQuery}}
+ {% for property_name,property_value in database.heart_beat.pool_options.items() %}
+ <{{property_name}}>{{property_value}}{{property_name}}>
+ {% endfor %}
+ {% else %}
+ jdbc:mysql://localhost:3306/heart_beat
+ root
+ root
+ com.mysql.jdbc.Driver
+ 50
+ 60000
+ true
+ SELECT 1
+ 30000
+ {% endif %}
+
+
+
+
+
+
diff --git a/features/heartbeat-management/io.entgra.server.heart.beat.feature/src/main/resources/conf_templates/templates/repository/conf/heart-beat-config.xml.j2 b/features/heartbeat-management/io.entgra.server.heart.beat.feature/src/main/resources/conf_templates/templates/repository/conf/heart-beat-config.xml.j2
new file mode 100644
index 00000000000..8d2776fc380
--- /dev/null
+++ b/features/heartbeat-management/io.entgra.server.heart.beat.feature/src/main/resources/conf_templates/templates/repository/conf/heart-beat-config.xml.j2
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+ jdbc/HeartBeat_DS
+
+
+ {% if heart_beat_beacon_conf is defined %}
+ {{heart_beat_beacon_conf.enable}}
+ {{heart_beat_beacon_conf.notifier_initial_delay_in_seconds}}
+ {{heart_beat_beacon_conf.notifier_frequency_in_seconds}}
+ {{heart_beat_beacon_conf.time_skew_in_seconds}}
+ {{heart_beat_beacon_conf.sever_timeout_interval_in_seconds}}
+ {% else %}
+ false
+ 30
+ 300
+ 5
+ 600
+ {% endif %}
+
diff --git a/features/heartbeat-management/io.entgra.server.heart.beat.feature/src/main/resources/p2.inf b/features/heartbeat-management/io.entgra.server.heart.beat.feature/src/main/resources/p2.inf
index 6add3736779..55584ad49a3 100644
--- a/features/heartbeat-management/io.entgra.server.heart.beat.feature/src/main/resources/p2.inf
+++ b/features/heartbeat-management/io.entgra.server.heart.beat.feature/src/main/resources/p2.inf
@@ -2,6 +2,7 @@ instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.server.heart.beat_${feature.version}/datasources/,target:${installFolder}/../../conf/datasources/,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.server.heart.beat_${feature.version}/conf/heart-beat-config.xml,target:${installFolder}/../../conf/heart-beat-config.xml,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.server.heart.beat_${feature.version}/dbscripts/heart-beat/,target:${installFolder}/../../../dbscripts/heart-beat,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.server.heart.beat_${feature.version}/conf_templates/,target:${installFolder}/../../resources/conf/,overwrite:true);\
instructions.unconfigure = \
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../conf/datasources/heart-beat-datasources.xml);\
diff --git a/features/heartbeat-management/pom.xml b/features/heartbeat-management/pom.xml
index 26025480442..b034331e1b9 100644
--- a/features/heartbeat-management/pom.xml
+++ b/features/heartbeat-management/pom.xml
@@ -22,14 +22,13 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
heart-beat-feature
- 4.1.16-SNAPSHOT
pom
Entgra - Heart Beat Feature
http://entgra.io
diff --git a/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml b/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml
index 410cca6e217..4047e2295c3 100644
--- a/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml
+++ b/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml
@@ -23,14 +23,13 @@
org.wso2.carbon.devicemgt
jwt-client-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.identity.jwt.client.extension.feature
pom
- 4.1.16-SNAPSHOT
WSO2 Carbon - JWT Client Feature
http://wso2.org
This feature contains jwt client implementation from which we can get a access token using the jwt
diff --git a/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/src/main/resources/jwt.properties b/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/src/main/resources/jwt.properties
index 0c9641fa2da..be3fa54494e 100644
--- a/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/src/main/resources/jwt.properties
+++ b/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/src/main/resources/jwt.properties
@@ -17,13 +17,13 @@
#
#issuer of the JWT
-iss=wso2.org/products/iot
+iss=https://localhost:9443/oauth2/token
TokenEndpoint=https://${iot.gateway.host}:${iot.gateway.https.port}/token?tenantDomain=carbon.super
#audience of JWT claim
#comma seperated values
-aud=devicemgt
+aud=https://localhost:9443/oauth2/token
#expiration time of JWT (number of minutes from the current time)
exp=1000
diff --git a/features/jwt-client/pom.xml b/features/jwt-client/pom.xml
index 75942261f72..994c462f6a4 100644
--- a/features/jwt-client/pom.xml
+++ b/features/jwt-client/pom.xml
@@ -23,13 +23,12 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../../pom.xml
4.0.0
jwt-client-feature
- 4.1.16-SNAPSHOT
pom
WSO2 Carbon - JWT Client Extension Feature
http://wso2.org
diff --git a/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml b/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml
index 1ca77e930c6..bd943afb338 100644
--- a/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml
+++ b/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml
@@ -23,14 +23,13 @@
org.wso2.carbon.devicemgt
oauth-extensions-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.oauth.extensions.feature
pom
- 4.1.16-SNAPSHOT
WSO2 Carbon - Device Mgt OAuth Extensions Feature
http://wso2.org
This feature contains devicemgt related OAuth extensions
diff --git a/features/oauth-extensions/pom.xml b/features/oauth-extensions/pom.xml
index 8e62605ea50..5e1d9ad26db 100644
--- a/features/oauth-extensions/pom.xml
+++ b/features/oauth-extensions/pom.xml
@@ -22,14 +22,13 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
oauth-extensions-feature
- 4.1.16-SNAPSHOT
pom
WSO2 Carbon - Device Management OAuth Extensions Feature
http://wso2.org
diff --git a/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml b/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml
index daffbc913c6..57146156f92 100644
--- a/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml
+++ b/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml
@@ -23,14 +23,13 @@
org.wso2.carbon.devicemgt
policy-mgt-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.policy.mgt.server.feature
pom
- 4.1.16-SNAPSHOT
WSO2 Carbon - Policy Management Server Feature
http://wso2.org
This feature contains the core bundles required for Back-end Device Management functionality
diff --git a/features/policy-mgt/pom.xml b/features/policy-mgt/pom.xml
index 3223326c5cb..44dd54475ae 100644
--- a/features/policy-mgt/pom.xml
+++ b/features/policy-mgt/pom.xml
@@ -23,14 +23,13 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
policy-mgt-feature
- 4.1.16-SNAPSHOT
pom
WSO2 Carbon - Policy Management Feature
http://wso2.org
diff --git a/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/pom.xml b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/pom.xml
index eaf13f69ff8..52a2cc47306 100644
--- a/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/pom.xml
+++ b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/pom.xml
@@ -22,14 +22,13 @@
org.wso2.carbon.devicemgt
email-sender-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.email.sender.feature
pom
- 4.1.16-SNAPSHOT
WSO2 Carbon - Email Sender Feature
http://wso2.org
This feature contains the core bundles required for email sender related functionality
diff --git a/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/conf_templates/templates/repository/conf/etc/email-sender-config.xml.j2 b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/conf_templates/templates/repository/conf/etc/email-sender-config.xml.j2
new file mode 100644
index 00000000000..f59e8fbf538
--- /dev/null
+++ b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/conf_templates/templates/repository/conf/etc/email-sender-config.xml.j2
@@ -0,0 +1,38 @@
+
+
+
+ {% if email_sender_conf is defined %}
+ {{email_sender_conf.min_threads}}
+
+ {{email_sender_conf.max_threads}}
+
+ {{email_sender_conf.keep_alive_duration}}
+
+ {{email_sender_conf.thread_queue_capacity}}
+ {% else %}
+ 8
+
+ 100
+
+ 20
+
+ 1000
+ {% endif %}
+
+
diff --git a/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/p2.inf b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/p2.inf
index d4dadf6a1e6..03d6cc09f9d 100644
--- a/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/p2.inf
+++ b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/p2.inf
@@ -1,3 +1,4 @@
instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.email.sender_${feature.version}/conf/email-sender-config.xml,target:${installFolder}/../../conf/etc/email-sender-config.xml,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.email.sender_${feature.version}/email/templates,target:${installFolder}/../../../repository/resources/email-templates,overwrite:true);\
\ No newline at end of file
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.email.sender_${feature.version}/email/templates,target:${installFolder}/../../../repository/resources/email-templates,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.email.sender_${feature.version}/conf_templates/,target:${installFolder}/../../resources/conf/,overwrite:true);\
diff --git a/features/transport-mgt/email-sender/pom.xml b/features/transport-mgt/email-sender/pom.xml
index 3292c9ddd43..f44b2990b2e 100644
--- a/features/transport-mgt/email-sender/pom.xml
+++ b/features/transport-mgt/email-sender/pom.xml
@@ -22,14 +22,13 @@
org.wso2.carbon.devicemgt
transport-mgt-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.devicemgt
email-sender-feature
- 4.1.16-SNAPSHOT
pom
WSO2 Carbon - Email Sender Feature
http://wso2.org
diff --git a/features/transport-mgt/pom.xml b/features/transport-mgt/pom.xml
index 1ad10495763..7f934bdd603 100644
--- a/features/transport-mgt/pom.xml
+++ b/features/transport-mgt/pom.xml
@@ -3,7 +3,7 @@
carbon-devicemgt
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../../pom.xml
diff --git a/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api.feature/pom.xml b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api.feature/pom.xml
index 9c33be06bb5..a702d270952 100644
--- a/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api.feature/pom.xml
+++ b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api.feature/pom.xml
@@ -22,14 +22,13 @@
org.wso2.carbon.devicemgt
sms-handler-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
io.entgra.transport.mgt.sms.handler.api.feature
pom
- 4.1.16-SNAPSHOT
Entgra - SMS Handler API Feature
https://entgra.io
This feature contains the APIs required for SMS Handler
diff --git a/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/pom.xml b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/pom.xml
index e6555c20376..9fad844781f 100644
--- a/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/pom.xml
+++ b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/pom.xml
@@ -22,14 +22,13 @@
org.wso2.carbon.devicemgt
sms-handler-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
io.entgra.transport.mgt.sms.handler.server.feature
pom
- 4.1.16-SNAPSHOT
Entgra - SMS Handler Server Feature
https://entgra.io
This feature contains the core bundles required for Back-end SMS Handler functionality
diff --git a/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/src/main/resources/conf_templates/templates/repository/conf/sms-config.xml.j2 b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/src/main/resources/conf_templates/templates/repository/conf/sms-config.xml.j2
new file mode 100644
index 00000000000..0ffc6354274
--- /dev/null
+++ b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/src/main/resources/conf_templates/templates/repository/conf/sms-config.xml.j2
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+ sample
+ +94
+ 160
+
+
+ {% if sms_conf.gateways is defined %}
+ {%- for gateway in sms_conf.gateways -%}
+
+
+ {% for property_name,property_value in gateway.properties_options.items() %}
+ {{property_value}}
+ {% endfor %}
+
+
+ {% endfor %}
+ {% endif %}
+
+
diff --git a/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/src/main/resources/p2.inf b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/src/main/resources/p2.inf
index af486db59b2..958e75d3ab5 100644
--- a/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/src/main/resources/p2.inf
+++ b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/src/main/resources/p2.inf
@@ -1,4 +1,5 @@
instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.transport.mgt.sms.handler.server_${feature.version}/conf/sms-config.xml,target:${installFolder}/../../conf/sms-config.xml,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.transport.mgt.sms.handler.server_${feature.version}/conf_templates/,target:${installFolder}/../../resources/conf/,overwrite:true);\
instructions.unconfigure = \
diff --git a/features/transport-mgt/sms-handler/pom.xml b/features/transport-mgt/sms-handler/pom.xml
index d5bf4be703b..107357cbaf7 100644
--- a/features/transport-mgt/sms-handler/pom.xml
+++ b/features/transport-mgt/sms-handler/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
transport-mgt-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
diff --git a/features/ui-request-interceptor/io.entgra.ui.request.interceptor.feature/pom.xml b/features/ui-request-interceptor/io.entgra.ui.request.interceptor.feature/pom.xml
index b1df7b1684d..364ce6a9f44 100644
--- a/features/ui-request-interceptor/io.entgra.ui.request.interceptor.feature/pom.xml
+++ b/features/ui-request-interceptor/io.entgra.ui.request.interceptor.feature/pom.xml
@@ -21,7 +21,7 @@
ui-request-interceptor-feature
io.entgra.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
4.0.0
diff --git a/features/ui-request-interceptor/io.entgra.ui.request.interceptor.feature/src/main/resources/p2.inf b/features/ui-request-interceptor/io.entgra.ui.request.interceptor.feature/src/main/resources/p2.inf
index 7887868228d..d44e4112eff 100644
--- a/features/ui-request-interceptor/io.entgra.ui.request.interceptor.feature/src/main/resources/p2.inf
+++ b/features/ui-request-interceptor/io.entgra.ui.request.interceptor.feature/src/main/resources/p2.inf
@@ -4,3 +4,4 @@ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../featur
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.ui.request.interceptor_${feature.version}/webapps/ui-request-handler.war,target:${installFolder}/../../deployment/server/webapps/store-ui-request-handler.war,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.ui.request.interceptor_${feature.version}/webapps/ui-request-handler.war,target:${installFolder}/../../deployment/server/webapps/entgra-ui-request-handler.war,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.ui.request.interceptor_${feature.version}/webapps/ui-request-handler.war,target:${installFolder}/../../deployment/server/webapps/mdm-reports-ui-request-handler.war,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.ui.request.interceptor_${feature.version}/payloads/,target:${installFolder}/../../resources/payloads/,overwrite:true);\
diff --git a/features/ui-request-interceptor/io.entgra.ui.request.interceptor.feature/src/main/resources/payloads/get-app-request.xml b/features/ui-request-interceptor/io.entgra.ui.request.interceptor.feature/src/main/resources/payloads/get-app-request.xml
new file mode 100644
index 00000000000..45c2042031d
--- /dev/null
+++ b/features/ui-request-interceptor/io.entgra.ui.request.interceptor.feature/src/main/resources/payloads/get-app-request.xml
@@ -0,0 +1,8 @@
+
+
+
+
+ ${applicationName}
+
+
+
diff --git a/features/ui-request-interceptor/io.entgra.ui.request.interceptor.feature/src/main/resources/payloads/update-app-request.xml b/features/ui-request-interceptor/io.entgra.ui.request.interceptor.feature/src/main/resources/payloads/update-app-request.xml
new file mode 100644
index 00000000000..50e82b986c8
--- /dev/null
+++ b/features/ui-request-interceptor/io.entgra.ui.request.interceptor.feature/src/main/resources/payloads/update-app-request.xml
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+ ${applicationId}
+ ${applicationName}
+
+ ${description}
+
+
+
+
+
+
+
+
+
+
+
+
+ http://wso2.org/claims/username
+
+
+ true
+
+
+
+
+
+ http://testclaims/claims/username
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${inboundAuthKey}
+ ${inboundAuthType}
+ ${inboundConfigType}
+
+
+
+
+
+ ${tenantDomain}
+ ${userName}
+ ${userStoreDomain}
+
+ ${saasApp}
+
+
+ displayName
+ ${displayName}
+
+
+
+
+
+
+
diff --git a/features/ui-request-interceptor/pom.xml b/features/ui-request-interceptor/pom.xml
index 0ab46ec416b..1e4441c8104 100644
--- a/features/ui-request-interceptor/pom.xml
+++ b/features/ui-request-interceptor/pom.xml
@@ -21,7 +21,7 @@
carbon-devicemgt
org.wso2.carbon.devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../../pom.xml
diff --git a/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml
index a2448e6fff7..7f825735f17 100644
--- a/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml
+++ b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml
@@ -22,14 +22,13 @@
org.wso2.carbon.devicemgt
webapp-authenticator-framework-feature
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.webapp.authenticator.framework.server.feature
pom
- 4.1.16-SNAPSHOT
WSO2 Carbon - Webapp Authenticator Framework Server Feature
http://wso2.org
This feature contains the core bundles required for Back-end Device Management functionality
diff --git a/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/src/main/resources/conf/webapp-authenticator-config.xml b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/src/main/resources/conf/webapp-authenticator-config.xml
index dfea5c07ac3..8a8cbcdde74 100644
--- a/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/src/main/resources/conf/webapp-authenticator-config.xml
+++ b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/src/main/resources/conf/webapp-authenticator-config.xml
@@ -6,8 +6,8 @@
false
https://${iot.keymanager.host}:${iot.keymanager.https.port}
- admin
- admin
+ ${admin.username}
+ ${admin.password}
100
100
@@ -41,8 +41,8 @@
false
https://${iot.keymanager.host}:${iot.keymanager.https.port}
- admin
- admin
+ ${admin.username}
+ ${admin.username}
100
100
diff --git a/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/src/main/resources/conf_templates/templates/repository/conf/etc/webapp-authenticator-config.xml.j2 b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/src/main/resources/conf_templates/templates/repository/conf/etc/webapp-authenticator-config.xml.j2
new file mode 100644
index 00000000000..631307ad2cd
--- /dev/null
+++ b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/src/main/resources/conf_templates/templates/repository/conf/etc/webapp-authenticator-config.xml.j2
@@ -0,0 +1,118 @@
+
+
+
+ OAuth
+ {% if webapp_auth_conf.authenticator.oauth is defined %}
+ {{webapp_auth_conf.authenticator.oauth.class_name}}
+
+ {% for property_name,property_value in webapp_auth_conf.authenticator.oauth.parameter_options.items() %}
+ {{property_value}}
+ {% endfor %}
+
+ {% else %}
+ org.wso2.carbon.webapp.authenticator.framework.authenticator.OAuthAuthenticator
+
+ false
+ https://${iot.keymanager.host}:${iot.keymanager.https.port}
+ ${admin.username}
+ ${admin.password}
+ 100
+ 100
+
+ {% endif %}
+
+
+ BasicAuth
+ {% if webapp_auth_conf.authenticator.basic_auth is defined %}
+ {{webapp_auth_conf.authenticator.basic_auth.class_name}}
+
+ {% for property_name,property_value in webapp_auth_conf.authenticator.basic_auth.parameter_options.items() %}
+ {{property_value}}
+ {% endfor %}
+
+ {% else %}
+ org.wso2.carbon.webapp.authenticator.framework.authenticator.BasicAuthAuthenticator
+ {% endif %}
+
+
+ JWT
+ {% if webapp_auth_conf.authenticator.jwt is defined %}
+ {{webapp_auth_conf.authenticator.jwt.class_name}}
+
+ {% for property_name,property_value in webapp_auth_conf.authenticator.jwt.parameter_options.items() %}
+ {{property_value}}
+ {% endfor %}
+
+ {% else %}
+ org.wso2.carbon.webapp.authenticator.framework.authenticator.JWTAuthenticator
+
+
+ wso2carbon
+ wso2carbon
+ wso2carbon
+ wso2carbon
+
+ {% endif %}
+
+
+ CertificateAuth
+ {% if webapp_auth_conf.authenticator.certificate_auth is defined %}
+ {{webapp_auth_conf.authenticator.certificate_auth.class_name}}
+
+ {% for property_name,property_value in webapp_auth_conf.authenticator.certificate_auth.parameter_options.items() %}
+ {{property_value}}
+ {% endfor %}
+
+ {% else %}
+ org.wso2.carbon.webapp.authenticator.framework.authenticator.CertificateAuthenticator
+ {% endif %}
+
+
+ OTPAuth
+ {% if webapp_auth_conf.authenticator.otpauth is defined %}
+ {{webapp_auth_conf.authenticator.otpauth.class_name}}
+
+ {% for property_name,property_value in webapp_auth_conf.authenticator.otpauth.parameter_options.items() %}
+ {{property_value}}
+ {% endfor %}
+
+ {% else %}
+ org.wso2.carbon.webapp.authenticator.framework.authenticator.OneTimeTokenAuthenticator
+ {% endif %}
+
+
+ BST
+ {% if webapp_auth_conf.authenticator.bst is defined %}
+ {{webapp_auth_conf.authenticator.bst.class_name}}
+
+ {% for property_name,property_value in webapp_auth_conf.authenticator.bst.parameter_options.items() %}
+ {{property_value}}
+ {% endfor %}
+
+ {% else %}
+ org.wso2.carbon.webapp.authenticator.framework.authenticator.BSTAuthenticator
+
+ false
+ https://${iot.keymanager.host}:${iot.keymanager.https.port}
+ ${admin.username}
+ ${admin.username}
+ 100
+ 100
+
+ {% endif %}
+
+ {% if webapp_auth_conf.authenticators is defined %}
+ {%- for authenticator in webapp_auth_conf.authenticators -%}
+
+ {{authenticator.name}}
+ {{authenticator.class_name}}
+
+ {% for property_name,property_value in authenticator.parameter_options.items() %}
+ {{property_value}}
+ {% endfor %}
+
+
+ {% endfor %}
+ {% endif %}
+
+
diff --git a/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/src/main/resources/p2.inf b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/src/main/resources/p2.inf
index 7b1ad15df1d..a526d712694 100644
--- a/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/src/main/resources/p2.inf
+++ b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/src/main/resources/p2.inf
@@ -1,2 +1,3 @@
instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.webapp.authenticator.framework.server_${feature.version}/conf/webapp-authenticator-config.xml,target:${installFolder}/../../conf/etc/webapp-authenticator-config.xml,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.webapp.authenticator.framework.server_${feature.version}/conf_templates/,target:${installFolder}/../../resources/conf/,overwrite:true);\
diff --git a/features/webapp-authenticator-framework/pom.xml b/features/webapp-authenticator-framework/pom.xml
index 264f071c9d4..d399ea46806 100644
--- a/features/webapp-authenticator-framework/pom.xml
+++ b/features/webapp-authenticator-framework/pom.xml
@@ -22,14 +22,13 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
webapp-authenticator-framework-feature
- 4.1.16-SNAPSHOT
pom
WSO2 Carbon - Webapp Authenticator Framework Feature
http://wso2.org
diff --git a/pom.xml b/pom.xml
index 39f8ff4e85d..83ceb160d49 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,11 +23,10 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
pom
- 4.1.16-SNAPSHOT
+ 5.0.0-SNAPSHOT
WSO2 Carbon - Device Management - Parent
http://wso2.org
WSO2 Connected Device Manager Components
-
org.wso2
wso2
@@ -43,21 +42,20 @@
components/application-mgt
components/policy-mgt
components/certificate-mgt
- components/webapp-authenticator-framework
components/ui-request-interceptor
components/transport-mgt
+ components/webapp-authenticator-framework
features/device-mgt
features/apimgt-extensions
features/application-mgt
features/policy-mgt
- features/webapp-authenticator-framework
features/certificate-mgt
- features/oauth-extensions
features/heartbeat-management
features/ui-request-interceptor
features/jwt-client
features/device-mgt-extensions
features/transport-mgt
+ features/webapp-authenticator-framework
@@ -177,42 +175,27 @@
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.addons
- ${carbon.device.mgt.version}
-
-
- org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.authhandler
- ${carbon.device.mgt.version}
-
-
- org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.core
- ${carbon.device.mgt.version}
-
-
- org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.common
+ io.entgra.application.mgt.addons
${carbon.device.mgt.version}
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.publisher.api
+ io.entgra.application.mgt.core
${carbon.device.mgt.version}
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.store.api
+ io.entgra.application.mgt.common
${carbon.device.mgt.version}
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.publisher.ui
+ io.entgra.application.mgt.publisher.api
${carbon.device.mgt.version}
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.store.ui
+ io.entgra.application.mgt.store.api
${carbon.device.mgt.version}
@@ -225,11 +208,6 @@
org.wso2.carbon.policy.mgt.core
${carbon.device.mgt.version}
-
- org.wso2.carbon.devicemgt
- org.wso2.carbon.complex.policy.decision.point
- ${carbon.device.mgt.version}
-
org.wso2.carbon.devicemgt
org.wso2.carbon.policy.decision.point
@@ -245,16 +223,6 @@
org.wso2.carbon.apimgt.webapp.publisher
${carbon.device.mgt.version}
-
- org.wso2.carbon.devicemgt
- org.wso2.carbon.apimgt.integration.client
- ${carbon.device.mgt.version}
-
-
- org.wso2.carbon.devicemgt
- org.wso2.carbon.apimgt.integration.generated.client
- ${carbon.device.mgt.version}
-
org.wso2.carbon.devicemgt
org.wso2.carbon.apimgt.annotations
@@ -286,11 +254,6 @@
org.wso2.carbon.device.mgt.analytics.data.publisher
${carbon.device.mgt.version}
-
- org.wso2.carbon.devicemgt
- org.wso2.carbon.device.mgt.analytics.wsproxy
- ${carbon.device.mgt.version}
-
org.wso2.carbon.devicemgt
org.wso2.carbon.device.mgt.server.feature
@@ -309,12 +272,6 @@
zip
${carbon.device.mgt.version}
-
- org.wso2.carbon.devicemgt
- org.wso2.carbon.device.mgt.ui.feature
- zip
- ${carbon.device.mgt.version}
-
org.wso2.carbon.devicemgt
org.wso2.carbon.apimgt.application.extension
@@ -330,51 +287,15 @@
org.wso2.carbon.apimgt.application.extension.api
${carbon.device.mgt.version}
-
-
- org.wso2.carbon.devicemgt
- org.wso2.carbon.apimgt.handlers
- ${carbon.device.mgt.version}
-
-
- org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.server.feature
- zip
- ${carbon.device.mgt.version}
-
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.extensions.feature
+ io.entgra.application.mgt.server.feature
zip
${carbon.device.mgt.version}
org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.api.feature
- zip
- ${carbon.device.mgt.version}
-
-
- org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.auth.handler.feature
- zip
- ${carbon.device.mgt.version}
-
-
- org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.publisher.ui.feature
- zip
- ${carbon.device.mgt.version}
-
-
- org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.store.ui.feature
- zip
- ${carbon.device.mgt.version}
-
-
- org.wso2.carbon.devicemgt
- org.wso2.carbon.device.application.mgt.feature
+ io.entgra.application.mgt.api.feature
zip
${carbon.device.mgt.version}
@@ -483,7 +404,8 @@
javax.servlet
- javax.servlet-api
+ javax.servlet-api
+
@@ -696,10 +618,6 @@
commons-httpclient.wso2
commons-httpclient
-
- commons-httpclient.wso2
- commons-httpclient
-
org.wso2.carbon
org.wso2.carbon.registry.api
@@ -832,7 +750,7 @@
org.wso2.carbon
org.wso2.carbon.logging
- ${carbon.kernel.version}
+ ${org.wso2.carbon.logging.version}
org.wso2.carbon
@@ -908,7 +826,12 @@
org.wso2.carbon.apimgt
- org.wso2.carbon.apimgt.keymgt
+ org.wso2.carbon.apimgt.api
+ ${carbon.api.mgt.version}
+
+
+ org.wso2.carbon.apimgt
+ org.wso2.carbon.apimgt.impl
${carbon.api.mgt.version}
@@ -1153,17 +1076,6 @@
-
- org.apache.cxf
- cxf-rt-bindings-http
- ${cxf.bindings.version}
-
-
- org.codehaus.jra
- jra
-
-
-
org.apache.cxf
cxf-rt-rs-extension-providers
@@ -1794,6 +1706,16 @@
commons-validator
${apache.validator.version}
+
+ org.springframework
+ spring-web
+ ${spring-web.version}
+
+
+ org.apache.cxf
+ cxf-bundle-jaxrs
+ ${cxf-bundle-package.version}
+
@@ -2053,12 +1975,13 @@
2.2.1
- 6.1.1
- 4.4.26
- [4.4.0, 5.0.0)
- 1.5.4
+ 7.4.0
+ 4.6.2
+ [4.5.0, 5.0.0)
+ 5.1.2
1.3
3.1.3
+ 4.4.9
[1.6.1.wso2v11, 1.7.0)
@@ -2077,14 +2000,13 @@
4.3.1
4.4.2
- 6.8
1.1.0
4.8.2
- 3.6.100.v20120522-1841
+ 3.6.200.v20130402-1505
3.3.100.v20120522-1822
- 3.9.1.v20130814-1242
+ 3.9.1.v20140110-1610
1.2.140.wso2v3
@@ -2097,22 +2019,22 @@
4.7.15
- 5.11.148
- [5.2.0, 6.0.0)
- 5.6.63
- 5.4.6
- 1.0.10
- [1.0.10, 2.0.0)
+ 5.18.187
+ [5.2.0, 7.0.0)
+ 6.4.111
+ 5.5.2
+ 1.0.31
+ [1.0.31, 2.0.0)
- [5.7.0, 6.0.0)
- [5.2.0, 6.0.0)
- [5.1.0, 6.0.0)
+ [5.14.0, 6.0.0)
+ [6.0.0, 7.0.0)
+ [5.3.0, 6.0.0)
- 4.6.11
+ 4.9.10
- 4.7.23
+ 4.8.21
1.2.11-wso2v10
@@ -2120,10 +2042,10 @@
1.2.11.wso2v10
- 4.1.16-SNAPSHOT
+ ${project.version}
- 4.6.21
+ 4.7.35
1.4.0.wso2v1
[1.4.0,2.0.0)
2.4.0.wso2v1
@@ -2131,8 +2053,8 @@
[2.6.0,3.0.0)
- 6.2.201
- (6.0.0,7.0.0]
+ 9.0.174
+ [9.0.0, 10.0.0)
5.1.37
@@ -2142,31 +2064,28 @@
2.1.23
- 4.6.28
- 4.6.8
- [4.4.8, 5.0.0)
+ 4.7.39
+ ${carbon.registry.version}
+ [4.7.0, 5.0.0)
- 3.2.0
- 2.5.11
+ 3.3.6
+
1.1.wso2v1
1.9.0
- 1.52.0.wso2v1
- 1.52.0.wso2v2
- [1.52.0,1.60.0)
+ 1.60.0.wso2v1
+ 1.60.0.wso2v1
+ [1.52.0,1.70.0)
2.3.0.wso2v2
-
- 2.26.1.wso2v3
-
3.0.0.wso2v1
1.3
- 2.3.1
- 3.8.1
+ 2.8.5
+ 4.6.0
1.13.0
9.3.1
1.1.1
@@ -2210,18 +2129,18 @@
1.0.2
- 2.26.1.wso2v3
- [2.26.1, 3.0.0)
+ 7.3.0.wso2v1
+ [7.3, 8)
2.0.1
1.5.10
- 1.5.10
+ 1.6.1
4.0.1
1.0.10
- 2.6.1.wso2v1
+ 2.9.8.wso2v1
2.6.1.wso2v3
2.8.2.wso2v1
1.2.0.wso2v1
@@ -2245,7 +2164,7 @@
1.7
- 2.1.7-wso2v7
+ 2.1.7-wso2v227
1.5.11.wso2v15
@@ -2266,7 +2185,7 @@
0.7.8
0.7.5.201505241946
1.0b3
- 1.7.0
+ 1.7.4
1.4.0.wso2v1
1.7.25
@@ -2282,6 +2201,12 @@
7.0.85
1.0
1.13.1
+
+ 5.1.13.RELEASE
+ 2.7.18
+
+ [1.6.0, 2.0.0)
+ [1.2.0,1.3.0)