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 3e7496e796..8f036da8cb 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,13 @@ apimgt-extensions org.wso2.carbon.devicemgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.annotations - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT bundle WSO2 Carbon - API Management Annotations WSO2 Carbon - API Management Custom Annotation Module 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 2491289e4e..26bb34e75c 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,12 @@ apimgt-extensions org.wso2.carbon.devicemgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT org.wso2.carbon.apimgt.application.extension.api war WSO2 Carbon - API Application Management API 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 6c08f55444..2322f5e574 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,12 @@ apimgt-extensions org.wso2.carbon.devicemgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT org.wso2.carbon.apimgt.application.extension bundle WSO2 Carbon - API Application Management 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 23a01c76ff..ee82172077 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,13 @@ apimgt-extensions org.wso2.carbon.devicemgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.handlers - 3.0.136-SNAPSHOT + 3.0.138-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 b1e60b0c05..9067c756f1 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,13 @@ apimgt-extensions org.wso2.carbon.devicemgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.integration.client - 3.0.136-SNAPSHOT + 3.0.138-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 5cc97beee5..ace194ae73 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,13 @@ apimgt-extensions org.wso2.carbon.devicemgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.integration.generated.client - 3.0.136-SNAPSHOT + 3.0.138-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 2a3a560981..b41da0591d 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,13 @@ apimgt-extensions org.wso2.carbon.devicemgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.webapp.publisher - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT bundle WSO2 Carbon - API Management Webapp Publisher WSO2 Carbon - API Management Webapp Publisher diff --git a/components/apimgt-extensions/pom.xml b/components/apimgt-extensions/pom.xml index c5e920ef96..987ba14d57 100644 --- a/components/apimgt-extensions/pom.xml +++ b/components/apimgt-extensions/pom.xml @@ -22,13 +22,13 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../../pom.xml 4.0.0 apimgt-extensions - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT pom WSO2 Carbon - API Management Extensions Component http://wso2.org 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 b653352d9e..233cacf989 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 - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 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 ac8b84e484..c3ffdb81fa 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 - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 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 351a0f589f..720f79aea9 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 @@ -21,13 +21,13 @@ org.wso2.carbon.devicemgt certificate-mgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.certificate.mgt.core - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT bundle WSO2 Carbon - Certificate Management Core WSO2 Carbon - Certificate Management Core diff --git a/components/certificate-mgt/pom.xml b/components/certificate-mgt/pom.xml index cb93b5abdd..4573479336 100644 --- a/components/certificate-mgt/pom.xml +++ b/components/certificate-mgt/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt certificate-mgt - 3.0.136-SNAPSHOT + 3.0.138-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 e925abec3d..58a49ea4ad 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 - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 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 aeda965f48..2fcf22e6e8 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 - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 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 b3faf21c9f..06a36ee303 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 - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 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 bbc52fa987..9fc258edcd 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 - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 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 10767ceb62..49f6513d1c 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 - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 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 ad578868fc..6299d2dd2a 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 - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/pom.xml b/components/device-mgt-extensions/pom.xml index 67004d0d2c..4638c56192 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 - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../../pom.xml 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 fb8894aa93..e3881762d5 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 - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 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 87481961f4..1ac2601df0 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 - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 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 d719e90e00..254ad9a95e 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 @@ -35,7 +35,6 @@ 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.mgt.analytics.dashboard.GadgetDataService; import org.wso2.carbon.device.mgt.analytics.data.publisher.service.EventsPublisherService; import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; @@ -438,15 +437,6 @@ public class DeviceMgtAPIUtils { return searchManagerService; } - public static GadgetDataService getGadgetDataService() { - PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); - GadgetDataService gadgetDataService = (GadgetDataService) ctx.getOSGiService(GadgetDataService.class, null); - if (gadgetDataService == null) { - throw new IllegalStateException("Gadget Data Service has not been initialized."); - } - return gadgetDataService; - } - public static GeoLocationProviderService getGeoService() { PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); GeoLocationProviderService diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml index 531e9f28b3..1bc2da51cb 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml @@ -21,7 +21,7 @@ device-mgt org.wso2.carbon.devicemgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 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 ff1280a6ed..000c425af3 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 - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 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 4a60638986..55c42344b0 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 - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/DeviceTypeManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/DeviceTypeManager.java index 1f1ee0d868..6e2aff8b35 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/DeviceTypeManager.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/DeviceTypeManager.java @@ -83,9 +83,7 @@ public class DeviceTypeManager implements DeviceManager { if (deviceTypeConfiguration.getFeatures() != null && deviceTypeConfiguration.getFeatures(). getFeature() != null) { List features = deviceTypeConfiguration.getFeatures().getFeature(); - if (features != null) { - featureManager = new ConfigurationBasedFeatureManager(features); - } + featureManager = new ConfigurationBasedFeatureManager(features); } if (deviceTypeConfiguration.getDeviceAuthorizationConfig() != null) { requiredDeviceTypeAuthorization = deviceTypeConfiguration.getDeviceAuthorizationConfig(). @@ -119,7 +117,8 @@ public class DeviceTypeManager implements DeviceManager { try { defaultPlatformConfiguration = this.getDefaultConfiguration(); } catch (DeviceManagementException e) { - String msg = "Error occurred while default platform configuration"; + String msg = + "Error occurred while getting default platform configuration for the device type " + deviceType; throw new DeviceTypeDeployerPayloadException(msg, e); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/dao/PropertyBasedPluginDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/dao/PropertyBasedPluginDAOImpl.java index ceedeb7454..0e1502f34a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/dao/PropertyBasedPluginDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/dao/PropertyBasedPluginDAOImpl.java @@ -126,14 +126,13 @@ public class PropertyBasedPluginDAOImpl implements PluginDAO { } public boolean updateDevice(Device device) throws DeviceTypeMgtPluginException { - boolean status = false; - Connection conn = null; + Connection conn; PreparedStatement stmt = null; try { conn = deviceTypeDAOHandler.getConnection(); stmt = conn.prepareStatement( - "UPDATE DM_DEVICE_PROPERTIES SET PROPERTY_VALUE = ? WHERE DEVICE_TYPE_NAME = ? AND " + - "DEVICE_IDENTIFICATION = ? AND PROPERTY_NAME = ? AND TENANT_ID= ?"); + "UPDATE DM_DEVICE_PROPERTIES SET PROPERTY_VALUE = ? WHERE DEVICE_TYPE_NAME = ? AND " + + "DEVICE_IDENTIFICATION = ? AND PROPERTY_NAME = ? AND TENANT_ID= ?"); for (Device.Property property : device.getProperties()) { if (!deviceProps.contains(property.getName())) { @@ -149,8 +148,8 @@ public class PropertyBasedPluginDAOImpl implements PluginDAO { stmt.executeBatch(); return true; } catch (SQLException e) { - String msg = "Error occurred while modifying the device '" + - device.getDeviceIdentifier() + "' data on" + deviceType; + String msg = "Error occurred while modifying the device '" + device.getDeviceIdentifier() + "' data on" + + deviceType; log.error(msg, e); throw new DeviceTypeMgtPluginException(msg, e); } finally { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/exception/DeviceTypeMgtPluginException.java b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/exception/DeviceTypeMgtPluginException.java index 1919e88f42..a07808a9ff 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/exception/DeviceTypeMgtPluginException.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/exception/DeviceTypeMgtPluginException.java @@ -22,6 +22,10 @@ package org.wso2.carbon.device.mgt.extensions.device.type.template.exception; */ public class DeviceTypeMgtPluginException extends Exception{ + public DeviceTypeMgtPluginException(String msg) { + super(msg); + } + public DeviceTypeMgtPluginException(String msg, Exception nestedEx) { super(msg, nestedEx); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/util/DeviceTypeUtils.java b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/util/DeviceTypeUtils.java index d409d22b38..56ab67d7bf 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/util/DeviceTypeUtils.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/util/DeviceTypeUtils.java @@ -25,6 +25,7 @@ import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.device.mgt.extensions.device.type.template.exception.DeviceTypeMgtPluginException; import org.wso2.carbon.device.mgt.extensions.internal.DeviceTypeExtensionDataHolder; import org.wso2.carbon.registry.api.RegistryException; +import org.wso2.carbon.registry.api.RegistryService; import org.wso2.carbon.registry.api.Resource; import org.wso2.carbon.registry.core.Registry; @@ -101,25 +102,28 @@ public class DeviceTypeUtils { public static Registry getConfigurationRegistry() throws DeviceTypeMgtPluginException { try { int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); - return DeviceTypeExtensionDataHolder.getInstance().getRegistryService() - .getConfigSystemRegistry(tenantId); + org.wso2.carbon.registry.core.service.RegistryService registryService = DeviceTypeExtensionDataHolder + .getInstance().getRegistryService(); + if (registryService == null) { + throw new DeviceTypeMgtPluginException("Registry Service is not initialized properly"); + } + return registryService.getConfigSystemRegistry(tenantId); } catch (RegistryException e) { throw new DeviceTypeMgtPluginException("Error in retrieving conf registry instance: " + e.getMessage(), e); } } public static boolean putRegistryResource(String path, Resource resource) throws DeviceTypeMgtPluginException { - boolean status; try { - DeviceTypeUtils.getConfigurationRegistry().beginTransaction(); - DeviceTypeUtils.getConfigurationRegistry().put(path, resource); - DeviceTypeUtils.getConfigurationRegistry().commitTransaction(); - status = true; + Registry registry = getConfigurationRegistry(); + registry.beginTransaction(); + registry.put(path, resource); + registry.commitTransaction(); + return true; } catch (RegistryException e) { - throw new DeviceTypeMgtPluginException("Error occurred while persisting registry resource : " + - e.getMessage(), e); + throw new DeviceTypeMgtPluginException( + "Error occurred while persisting registry resource : " + e.getMessage(), e); } - return status; } public static Resource getRegistryResource(String path) throws DeviceTypeMgtPluginException { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/java/org/wso2/carbon/device/mgt/extensions/device/type/template/DeviceTypeManagerNegativeTest.java b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/java/org/wso2/carbon/device/mgt/extensions/device/type/template/DeviceTypeManagerNegativeTest.java index d2d9060d12..06c0a3a0fb 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/java/org/wso2/carbon/device/mgt/extensions/device/type/template/DeviceTypeManagerNegativeTest.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/java/org/wso2/carbon/device/mgt/extensions/device/type/template/DeviceTypeManagerNegativeTest.java @@ -18,13 +18,26 @@ package org.wso2.carbon.device.mgt.extensions.device.type.template; +import org.h2.jdbcx.JdbcDataSource; +import org.mockito.Mockito; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; import org.wso2.carbon.base.MultitenantConstants; +import org.wso2.carbon.device.mgt.common.Device; +import org.wso2.carbon.device.mgt.common.DeviceIdentifier; +import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.extensions.device.type.template.config.DataSource; +import org.wso2.carbon.device.mgt.extensions.device.type.template.config.DeviceDetails; import org.wso2.carbon.device.mgt.extensions.device.type.template.config.DeviceTypeConfiguration; +import org.wso2.carbon.device.mgt.extensions.device.type.template.config.Properties; import org.wso2.carbon.device.mgt.extensions.device.type.template.config.exception.DeviceTypeConfigurationException; +import org.wso2.carbon.device.mgt.extensions.device.type.template.dao.DeviceDAODefinition; +import org.wso2.carbon.device.mgt.extensions.device.type.template.dao.DeviceTypeDAOHandler; +import org.wso2.carbon.device.mgt.extensions.device.type.template.dao.DeviceTypePluginDAOImpl; +import org.wso2.carbon.device.mgt.extensions.device.type.template.dao.DeviceTypePluginDAOManager; +import org.wso2.carbon.device.mgt.extensions.device.type.template.dao.PropertyBasedPluginDAOImpl; import org.wso2.carbon.device.mgt.extensions.device.type.template.exception.DeviceTypeDeployerPayloadException; +import org.wso2.carbon.device.mgt.extensions.device.type.template.exception.DeviceTypeMgtPluginException; import org.wso2.carbon.device.mgt.extensions.utils.Utils; import org.xml.sax.SAXException; @@ -32,7 +45,11 @@ import javax.xml.bind.JAXBException; import javax.xml.parsers.ParserConfigurationException; import java.io.File; import java.io.IOException; +import java.lang.reflect.Field; import java.net.URL; +import java.sql.Connection; +import java.util.ArrayList; +import java.util.List; /** * This class tests the negative scenarios in {@link DeviceTypeManager} initialization; @@ -40,15 +57,22 @@ import java.net.URL; public class DeviceTypeManagerNegativeTest { private DeviceTypeConfiguration defectiveDeviceTypeConfiguration1; private DeviceTypeConfiguration defectiveDeviceTypeConfiguration2; + private DeviceTypeConfiguration defectiveDeviceTypeConfiguration3; private DeviceTypeConfiguration androidDeviceTypeConfiguration; private DeviceTypeConfigIdentifier deviceTypeConfigIdentifier; + private DeviceTypeManager androidDeviceTypeManager; + private DeviceTypeDAOHandler deviceTypeDAOHandler; private final String DEFECTIVE_DEVICE_TYPE = "defectiveDeviceType"; private final String TABLE_NAME = "DEFECTIVE_DEVICE"; + private DeviceIdentifier deviceIdentifier; + private final String ANDROID_DEVICE_TYPE = "android"; + private PropertyBasedPluginDAOImpl propertyBasedPluginDAO; + private Device sampleDevice; @BeforeTest public void setup() throws SAXException, JAXBException, ParserConfigurationException, DeviceTypeConfigurationException, - IOException { + IOException, NoSuchFieldException, IllegalAccessException { ClassLoader classLoader = getClass().getClassLoader(); URL resourceUrl = classLoader.getResource(Utils.DEVICE_TYPE_FOLDER + "defective-devicetype.xml"); File configurationFile = null; @@ -76,6 +100,37 @@ public class DeviceTypeManagerNegativeTest { if (configurationFile != null) { androidDeviceTypeConfiguration = Utils.getDeviceTypeConfiguration(configurationFile.getAbsoluteFile()); } + + resourceUrl = classLoader.getResource(Utils.DEVICE_TYPE_FOLDER + "defective-devicetype3.xml"); + if (resourceUrl != null) { + configurationFile = new File(resourceUrl.getFile()); + } + if (configurationFile != null) { + defectiveDeviceTypeConfiguration3 = Utils + .getDeviceTypeConfiguration(configurationFile.getAbsoluteFile()); + } + createDefectiveDeviceTypeManager(); + deviceIdentifier = new DeviceIdentifier(); + deviceIdentifier.setId(Utils.TEST_STRING); + deviceIdentifier.setType(ANDROID_DEVICE_TYPE); + + DeviceDetails deviceDetails = new DeviceDetails(); + Properties properties = new Properties(); + List propertyList = new ArrayList<>(); + propertyList.add(Utils.TEST_STRING); + properties.addProperties(propertyList); + + deviceDetails.setProperties(properties); + propertyBasedPluginDAO = new PropertyBasedPluginDAOImpl(deviceDetails, + deviceTypeDAOHandler, ANDROID_DEVICE_TYPE); + sampleDevice = new Device(); + sampleDevice.setDeviceIdentifier(Utils.TEST_STRING); + List deviceProperties = new ArrayList<>(); + Device.Property property = new Device.Property(); + property.setName(Utils.TEST_STRING); + property.setValue(Utils.TEST_STRING); + deviceProperties.add(property); + sampleDevice.setProperties(deviceProperties); } @Test(description = "This test case tests the behaviour of the DeviceTypeManager creation without defining the " @@ -121,4 +176,168 @@ public class DeviceTypeManagerNegativeTest { new DeviceTypeManager(deviceTypeConfigIdentifier, androidDeviceTypeConfiguration); } + + @Test(description = "This test case tests the behaviour of the DeviceTypeManager creation when having a " + + "defective platform configuration ", expectedExceptions = {DeviceTypeDeployerPayloadException.class}, + expectedExceptionsMessageRegExp = "Error occurred while getting default platform configuration for the " + + "device type wrong *") + public void testWithDefectivePlatformConfiguration() { + DeviceTypeConfigIdentifier wrongDeviceTypeConfigIdentifier = new DeviceTypeConfigIdentifier("wrong", + MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); + new DeviceTypeManager(wrongDeviceTypeConfigIdentifier, androidDeviceTypeConfiguration); + } + + @Test(description = "This test case tests the behaviour of the DeviceTypeManager creation when having a " + + "defective platform configuration ", expectedExceptions = {DeviceTypeDeployerPayloadException.class}, + expectedExceptionsMessageRegExp = "Error while looking up the data source:.*") + public void testWithoutDeviceSpecificTable() { + new DeviceTypeManager(deviceTypeConfigIdentifier, defectiveDeviceTypeConfiguration3); + } + + @Test(description = "This test case tests the behaviour of the isEnrolled when the relevant tables are not there", + expectedExceptions = {DeviceManagementException.class}, + expectedExceptionsMessageRegExp = "Error while checking the enrollment status of android device.*") + public void testIsEnrolled() throws DeviceManagementException { + androidDeviceTypeManager.isEnrolled(deviceIdentifier); + } + + @Test(description = "This test case tests the behaviour of the modifyEnrollment when the relevant tables " + + "are not there", + expectedExceptions = {DeviceManagementException.class}, + expectedExceptionsMessageRegExp = "Error while updating the enrollment of the.*") + public void testModifyEnrollment() throws DeviceManagementException { + Device device = new Device(); + device.setDeviceIdentifier(deviceIdentifier.getId()); + device.setType(deviceIdentifier.getType()); + androidDeviceTypeManager.modifyEnrollment(device); + } + + @Test(description = "This test case tests the behaviour of the getAllDevices when the relevant tables " + + "are not there", + expectedExceptions = {DeviceManagementException.class}, + expectedExceptionsMessageRegExp = "Error occurred while fetching all.*") + public void testGetAllDevices() throws DeviceManagementException { + androidDeviceTypeManager.getAllDevices(); + } + + @Test(description = "This test case tests the behaviour of the updateDeviceInfo when the relevant tables " + + "are not there", + expectedExceptions = {DeviceManagementException.class}, + expectedExceptionsMessageRegExp = "Error occurred while fetching the.*") + public void testUpdateDeviceInfo() throws DeviceManagementException { + Device device = new Device(); + device.setDeviceIdentifier(deviceIdentifier.getId()); + device.setType(deviceIdentifier.getType()); + androidDeviceTypeManager.updateDeviceInfo(deviceIdentifier, device); + } + + @Test(description = ("This test case tests the behaviour of the enrollDevice when the relevant tables are not " + + "there"), expectedExceptions = {DeviceManagementException.class}, + expectedExceptionsMessageRegExp = "Error while enrolling the.*", dependsOnMethods = {"testIsEnrolled"}) + public void testEnrollDevice() throws DeviceManagementException { + Device device = new Device(); + device.setDeviceIdentifier(deviceIdentifier.getId()); + device.setType(deviceIdentifier.getType()); + Mockito.doReturn(false).when(androidDeviceTypeManager).isEnrolled(Mockito.any()); + androidDeviceTypeManager.enrollDevice(device); + } + + @Test(description = ("This test case tests the behaviour of the updateDeviceInfo when the relevant tables are not " + + "there"), expectedExceptions = {DeviceManagementException.class}, + expectedExceptionsMessageRegExp = "Error occurred while updating the.*", dependsOnMethods = + {"testUpdateDeviceInfo"}) + public void testUpdateDeviceWithMock() throws DeviceManagementException { + Mockito.doReturn(new Device()).when(androidDeviceTypeManager).getDevice(Mockito.any()); + androidDeviceTypeManager.updateDeviceInfo(deviceIdentifier, sampleDevice); + } + + @Test(description = "This test case tests the behaviour of addDevice when the relevant tables are not available", + expectedExceptions = { DeviceTypeMgtPluginException.class }, + expectedExceptionsMessageRegExp = "Error occurred while adding the device .*") + public void testAddDevice() throws DeviceTypeMgtPluginException { + propertyBasedPluginDAO.addDevice(sampleDevice); + } + + @Test(description = "This test case tests the behaviour of getDevice when the relevant tables are not available", + expectedExceptions = { DeviceTypeMgtPluginException.class }, + expectedExceptionsMessageRegExp = "Error occurred while fetching device .*") + public void testGetPropertyBasedDevice() throws DeviceTypeMgtPluginException { + propertyBasedPluginDAO.getDevice("id"); + } + + @Test(description = "This test case tests the behaviour of the getAllDevices method of the PropertyBasedPuginDAO", + expectedExceptions = {DeviceTypeMgtPluginException.class}, expectedExceptionsMessageRegExp = "Error " + + "occurred while fetching all.*") + public void testGetAllPropertyBasedDevices() throws DeviceTypeMgtPluginException { + propertyBasedPluginDAO.getAllDevices(); + } + + @Test(description = "This test case tests the behaviour of the updateDevice method of the PropertyBasedPuginDAO", + expectedExceptions = {DeviceTypeMgtPluginException.class}, expectedExceptionsMessageRegExp = "Error " + + "occurred while modifying the device.*") + public void testUpdateDevice() throws DeviceTypeMgtPluginException { + propertyBasedPluginDAO.updateDevice(sampleDevice); + } + + /** + * To create a defective device type manager for testing. + * @throws NoSuchFieldException No Such Field Exception. + * @throws SAXException SAX Exception. + * @throws JAXBException JAXB Exception + * @throws ParserConfigurationException Parser Configuration Exception. + * @throws DeviceTypeConfigurationException Device Type Configuration Exception. + * @throws IOException IO Exception. + * @throws IllegalAccessException Illegal Access Exception. + */ + private void createDefectiveDeviceTypeManager() + throws NoSuchFieldException, SAXException, JAXBException, ParserConfigurationException, + DeviceTypeConfigurationException, IOException, IllegalAccessException { + Field datasourceField = DeviceTypeDAOHandler.class.getDeclaredField("dataSource"); + datasourceField.setAccessible(true); + Field currentConnection = DeviceTypeDAOHandler.class.getDeclaredField("currentConnection"); + currentConnection.setAccessible(true); + Field deviceTypePluginDAOField = DeviceTypePluginDAOManager.class.getDeclaredField("deviceTypePluginDAO"); + deviceTypePluginDAOField.setAccessible(true); + Field deviceTypeDAOHandlerField = DeviceTypePluginDAOManager.class.getDeclaredField("deviceTypeDAOHandler"); + deviceTypeDAOHandlerField.setAccessible(true); + + ClassLoader classLoader = getClass().getClassLoader(); + URL resourceUrl = classLoader.getResource(Utils.DEVICE_TYPE_FOLDER + "android.xml"); + File androidConfiguration = null; + if (resourceUrl != null) { + androidConfiguration = new File(resourceUrl.getFile()); + } + DeviceTypeConfiguration androidDeviceConfiguration = Utils.getDeviceTypeConfiguration(androidConfiguration); + androidDeviceTypeManager = Mockito.mock(DeviceTypeManager.class, Mockito.CALLS_REAL_METHODS); + + deviceTypeDAOHandler = Mockito + .mock(DeviceTypeDAOHandler.class, Mockito.CALLS_REAL_METHODS); + + JdbcDataSource dataSource = new JdbcDataSource(); + dataSource.setURL("jdbc:h2:mem:notexist;DB_CLOSE_DELAY=-1"); + dataSource.setUser("sa"); + dataSource.setPassword("sa"); + datasourceField.set(deviceTypeDAOHandler, dataSource); + currentConnection.set(deviceTypeDAOHandler, new ThreadLocal()); + + DeviceDAODefinition deviceDAODefinition = Utils.getDeviceDAODefinition(androidDeviceConfiguration); + DeviceTypePluginDAOImpl deviceTypePluginDAO = new DeviceTypePluginDAOImpl(deviceDAODefinition, + deviceTypeDAOHandler); + DeviceTypePluginDAOManager deviceTypePluginDAOManager = Mockito + .mock(DeviceTypePluginDAOManager.class, Mockito.CALLS_REAL_METHODS); + deviceTypePluginDAOField.set(deviceTypePluginDAOManager, deviceTypePluginDAO); + deviceTypeDAOHandlerField.set(deviceTypePluginDAOManager, deviceTypeDAOHandler); + + Field deviceTypePluginDAOManagerField = DeviceTypeManager.class.getDeclaredField("deviceTypePluginDAOManager"); + deviceTypePluginDAOManagerField.setAccessible(true); + deviceTypePluginDAOManagerField.set(androidDeviceTypeManager, deviceTypePluginDAOManager); + + Field propertiesExist = DeviceTypeManager.class.getDeclaredField("propertiesExist"); + propertiesExist.setAccessible(true); + Field deviceType = DeviceTypeManager.class.getDeclaredField("deviceType"); + deviceType.setAccessible(true); + + deviceType.set(androidDeviceTypeManager, ANDROID_DEVICE_TYPE); + propertiesExist.set(androidDeviceTypeManager, true); + } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/java/org/wso2/carbon/device/mgt/extensions/device/type/template/DeviceTypeManagerTest.java b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/java/org/wso2/carbon/device/mgt/extensions/device/type/template/DeviceTypeManagerTest.java index 27ebd3f827..d6f732cf13 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/java/org/wso2/carbon/device/mgt/extensions/device/type/template/DeviceTypeManagerTest.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/java/org/wso2/carbon/device/mgt/extensions/device/type/template/DeviceTypeManagerTest.java @@ -170,8 +170,8 @@ public class DeviceTypeManagerTest { Assert.assertTrue(customDeviceTypeManager.enrollDevice(customDevice), "Custom device type enrollment failed."); List properties = customDevice.getProperties(); Device.Property property = new Device.Property(); - property.setName("test"); - property.setValue("test"); + property.setName(Utils.TEST_STRING); + property.setValue(Utils.TEST_STRING); properties.add(property); customDevice.setProperties(properties); Assert.assertFalse(customDeviceTypeManager.enrollDevice(customDevice), @@ -239,8 +239,8 @@ public class DeviceTypeManagerTest { list.add(property); } - sampleDevice1 = new Device("testdevice", androidDeviceType, "test", "testdevice", null, null, list); - sampleDevice2 = new Device("testdevice1", androidDeviceType, "test", "testdevice", null, null, list); + sampleDevice1 = new Device("testdevice", androidDeviceType, Utils.TEST_STRING, "testdevice", null, null, list); + sampleDevice2 = new Device("testdevice1", androidDeviceType, Utils.TEST_STRING, "testdevice", null, null, list); } /** diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/java/org/wso2/carbon/device/mgt/extensions/device/type/template/HttpDeviceTypeManagerServiceAndDeviceTypeGeneratorServceTest.java b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/java/org/wso2/carbon/device/mgt/extensions/device/type/template/HttpDeviceTypeManagerServiceAndDeviceTypeGeneratorServceTest.java index 7c4ff9ec2c..b6beda3c2c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/java/org/wso2/carbon/device/mgt/extensions/device/type/template/HttpDeviceTypeManagerServiceAndDeviceTypeGeneratorServceTest.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/java/org/wso2/carbon/device/mgt/extensions/device/type/template/HttpDeviceTypeManagerServiceAndDeviceTypeGeneratorServceTest.java @@ -42,9 +42,13 @@ import javax.xml.bind.JAXBException; import javax.xml.parsers.ParserConfigurationException; import java.io.File; import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; import java.net.URL; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; /** * This test case contains the tests for {@link HTTPDeviceTypeManagerService} and {@link DeviceTypeGeneratorServiceImpl} @@ -75,7 +79,8 @@ public class HttpDeviceTypeManagerServiceAndDeviceTypeGeneratorServceTest { @Test(description = "This test case tests the enrollment of newly added device type") public void testEnrollDevice() throws DeviceManagementException { String deviceId = "testdevice1"; - Device sampleDevice1 = new Device(deviceId, androidSenseDeviceType, "test", "testdevice", null, null, null); + Device sampleDevice1 = new Device(deviceId, androidSenseDeviceType, Utils.TEST_STRING, "testdevice", null, null, + null); Assert.assertTrue(httpDeviceTypeManagerService.getDeviceManager().enrollDevice(sampleDevice1), "Enrollment of " + androidSenseDeviceType + " device failed"); Assert.assertTrue(httpDeviceTypeManagerService.getDeviceManager() @@ -108,7 +113,7 @@ public class HttpDeviceTypeManagerServiceAndDeviceTypeGeneratorServceTest { ConfigurationEntry configurationEntry = configurationEntries.get(0); - Assert.assertEquals(configurationEntry.getName(), "test", + Assert.assertEquals(configurationEntry.getName(), Utils.TEST_STRING, "Platform Configuration for device type " + "sample is not saved correctly"); String contentType = configurationEntry.getContentType(); @@ -142,6 +147,28 @@ public class HttpDeviceTypeManagerServiceAndDeviceTypeGeneratorServceTest { httpDeviceTypeManagerService.getDeviceManager().enrollDevice(null); } + @Test(description = "This test case tests the getDeviceTypeConfiguration method", + dependsOnMethods = {"testPopulateDeviceManagementService"}) + public void testGetDeviceTypeConfiguration() + throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { + Method getDeviceTypeConfiguration = HTTPDeviceTypeManagerService.class + .getDeclaredMethod("getDeviceTypeConfiguration", String.class, DeviceTypeMetaDefinition.class); + getDeviceTypeConfiguration.setAccessible(true); + List properties = new ArrayList<>(); + properties.add(Utils.TEST_STRING); + deviceTypeMetaDefinition.setProperties(properties); + Map mapProperties = new HashMap<>(); + mapProperties.put(Utils.TEST_STRING, Utils.TEST_STRING); + PushNotificationConfig pushNotificationConfig = new PushNotificationConfig("push", true, mapProperties); + deviceTypeMetaDefinition.setPushNotificationConfig(pushNotificationConfig); + DeviceTypeConfiguration deviceTypeConfiguration = (DeviceTypeConfiguration) getDeviceTypeConfiguration + .invoke(httpDeviceTypeManagerService, "android", deviceTypeMetaDefinition); + Assert.assertEquals(deviceTypeMetaDefinition.getProperties().size(), + deviceTypeConfiguration.getDeviceDetails().getProperties().getProperty().size(), "Number of " + + "properties added in device-type meta definition is not equal to the properties added in " + + "the DeviceType Configuration"); + } + /** * To create a sample device type meta defintion. * @throws SAXException SAX Exception. @@ -180,6 +207,13 @@ public class HttpDeviceTypeManagerServiceAndDeviceTypeGeneratorServceTest { commonFeature.setCode(feature.getCode()); commonFeature.setDescription(feature.getDescription()); commonFeature.setName(feature.getName()); + org.wso2.carbon.device.mgt.common.Feature.MetadataEntry metadataEntry = new org.wso2.carbon.device.mgt + .common.Feature.MetadataEntry(); + metadataEntry.setId(1); + metadataEntry.setValue(Utils.TEST_STRING); + List metadataEntries = new ArrayList<>(); + metadataEntries.add(metadataEntry); + commonFeature.setMetadataEntries(metadataEntries); features.add(commonFeature); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/java/org/wso2/carbon/device/mgt/extensions/utils/Utils.java b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/java/org/wso2/carbon/device/mgt/extensions/utils/Utils.java index d35b8eba93..8a2634d0f8 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/java/org/wso2/carbon/device/mgt/extensions/utils/Utils.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/java/org/wso2/carbon/device/mgt/extensions/utils/Utils.java @@ -56,6 +56,7 @@ import java.util.List; */ public class Utils { public static final String DEVICE_TYPE_FOLDER = "device-types" + File.separator; + public static final String TEST_STRING = "test"; /** * To get the device type configuration based on the configuration file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/java/org/wso2/carbon/device/mgt/extensions/utils/UtilsTest.java b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/java/org/wso2/carbon/device/mgt/extensions/utils/UtilsTest.java index 01651d3b2c..c5a6f419cd 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/java/org/wso2/carbon/device/mgt/extensions/utils/UtilsTest.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/java/org/wso2/carbon/device/mgt/extensions/utils/UtilsTest.java @@ -23,10 +23,15 @@ import org.testng.Assert; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; import org.wso2.carbon.base.MultitenantConstants; +import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.device.mgt.common.license.mgt.License; import org.wso2.carbon.device.mgt.common.license.mgt.LicenseManagementException; +import org.wso2.carbon.device.mgt.extensions.device.type.template.DeviceTypeConfigIdentifier; +import org.wso2.carbon.device.mgt.extensions.device.type.template.exception.DeviceTypeMgtPluginException; import org.wso2.carbon.device.mgt.extensions.device.type.template.util.DeviceSchemaInitializer; +import org.wso2.carbon.device.mgt.extensions.device.type.template.util.DeviceTypeUtils; import org.wso2.carbon.device.mgt.extensions.license.mgt.file.FileSystemBasedLicenseManager; +import org.wso2.carbon.device.mgt.extensions.license.mgt.registry.RegistryBasedLicenseManager; import java.io.File; import java.lang.reflect.InvocationTargetException; @@ -63,7 +68,7 @@ public class UtilsTest { @Test(description = "This test case tests the getLicense method of the FileBasedLicenseManager") public void testFileBasedLicenseManagerGetLicense() throws LicenseManagementException { - License fileBasedLicense = fileSystemBasedLicenseManager.getLicense("test","en_US"); + License fileBasedLicense = fileSystemBasedLicenseManager.getLicense(Utils.TEST_STRING,"en_US"); Assert.assertEquals(fileBasedLicense.getText(), "This is a file based license", "FileBased License cannot " + "be retrieved by FileBasedLicenseManager"); } @@ -79,6 +84,43 @@ public class UtilsTest { + "file system", expectedExceptions = {UnsupportedOperationException.class}, expectedExceptionsMessageRegExp = "'addLicense' method is not supported in FileSystemBasedLicenseManager") public void testFileBasedLicenseManagerAddLicense() throws LicenseManagementException { - fileSystemBasedLicenseManager.addLicense("test", null); + fileSystemBasedLicenseManager.addLicense(Utils.TEST_STRING, null); + } + + @Test(description = "This test case tests the DeviceTypeConfigIdentifier equals method") + public void testDeviceTypeConfigIdentifier() { + DeviceTypeConfigIdentifier deviceTypeConfigIdentifier = new DeviceTypeConfigIdentifier("sample", + MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); + DeviceTypeConfigIdentifier clonedDeviceTypeConfigIdentifier = new DeviceTypeConfigIdentifier("sample", + MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); + Assert.assertTrue(deviceTypeConfigIdentifier.equals(clonedDeviceTypeConfigIdentifier), + "Clone device type config identifier gives wrong results for equals check."); + Assert.assertFalse(deviceTypeConfigIdentifier.equals(null), + "Device Type config identifier object comparison gives wrong results."); + } + + @Test(description = "This test cases tests the registry based license addition") + public void testAddRegistryBasedLicense() throws LicenseManagementException { + String newLicenseString = "New License"; + License fileBasedLicense = fileSystemBasedLicenseManager.getLicense(Utils.TEST_STRING, "en_US"); + RegistryBasedLicenseManager registryBasedLicenseManager = new RegistryBasedLicenseManager(); + registryBasedLicenseManager.addLicense(Utils.TEST_STRING, fileBasedLicense); + Assert.assertEquals(fileBasedLicense.getText(), + registryBasedLicenseManager.getLicense(Utils.TEST_STRING, "en_US").getText(), + "Registry license addition failed"); + fileBasedLicense.setText(newLicenseString); + registryBasedLicenseManager.addLicense(Utils.TEST_STRING, fileBasedLicense); + Assert.assertEquals(registryBasedLicenseManager.getLicense(Utils.TEST_STRING, "en_US").getText(), + newLicenseString, "Registry license update failed"); + } + + @Test(description = "This test case tests the GetConfigurationRegistry method when the registry service is " + + "unavailable", dependsOnMethods = {"testDeviceSchemaInitializer", "testDeviceTypeConfigIdentifier", + "testAddRegistryBasedLicense"}, + expectedExceptions = {DeviceTypeMgtPluginException.class}, + expectedExceptionsMessageRegExp = "Error in retrieving conf registry instance:.*") + public void testGetConfigurationRegistry() throws DeviceTypeMgtPluginException { + PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantId(4); + DeviceTypeUtils.getConfigurationRegistry(); } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/resources/carbon-home/repository/conf/etc/device-mgt-plugin-configs/mobile/wrong-default-platform-configuration.xml b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/resources/carbon-home/repository/conf/etc/device-mgt-plugin-configs/mobile/wrong-default-platform-configuration.xml new file mode 100644 index 0000000000..645805d7a8 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/resources/carbon-home/repository/conf/etc/device-mgt-plugin-configs/mobile/wrong-default-platform-configuration.xml @@ -0,0 +1,23 @@ + + + + + + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/resources/carbon-home/repository/conf/registry.xml b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/resources/carbon-home/repository/conf/registry.xml index 0bb97a7dc9..036b3dda06 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/resources/carbon-home/repository/conf/registry.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/resources/carbon-home/repository/conf/registry.xml @@ -24,7 +24,7 @@ wso2registry false - true + false / diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/resources/device-types/android.xml b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/resources/device-types/android.xml index 176469c329..0320698ff4 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/resources/device-types/android.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/test/resources/device-types/android.xml @@ -51,6 +51,11 @@ true + + + true + + + + + + + defective + + + + + + + Control Bulb + Control Bulb on Arduino Uno + + + state + + + + + + + true + + + + en_US + 1.0.0 + This is license text + + + + + jdbc/MobileAndroidDM_DS + + + +
+
+
+ +
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 8756a1527b..724b398fc9 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 - 3.0.136-SNAPSHOT + 3.0.138-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 22680bc1b9..303b0e5b54 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 - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/pom.xml b/components/device-mgt/pom.xml index e5a178be9f..de5c9d6278 100644 --- a/components/device-mgt/pom.xml +++ b/components/device-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../../pom.xml diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml b/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml index 187c91fd9c..90206e3789 100644 --- a/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml +++ b/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt email-sender - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml diff --git a/components/email-sender/pom.xml b/components/email-sender/pom.xml index 5dd4d7ec2a..cf5a8ca32f 100644 --- a/components/email-sender/pom.xml +++ b/components/email-sender/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.136-SNAPSHOT + 3.0.138-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 a6f7c45277..e8d51953b6 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,13 @@ org.wso2.carbon.devicemgt identity-extensions - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.oauth.extensions - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT bundle WSO2 Carbon - OAuth Extensions http://wso2.org 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 ab46b70b15..63ffad7400 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 - 3.0.136-SNAPSHOT + 3.0.138-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 d576cbe232..bce05b1e75 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 - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml diff --git a/components/identity-extensions/pom.xml b/components/identity-extensions/pom.xml index d09dfcadc5..d407b90e9c 100644 --- a/components/identity-extensions/pom.xml +++ b/components/identity-extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../../pom.xml 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 7495351151..12b07ab2c4 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,14 @@ org.wso2.carbon.devicemgt policy-mgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.complex.policy.decision.point - 3.0.136-SNAPSHOT + 3.0.138-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 6e1e1e1360..06e76076b4 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,14 @@ org.wso2.carbon.devicemgt policy-mgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.decision.point - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT bundle WSO2 Carbon - Policy Decision Point WSO2 Carbon - Policy Decision Point 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 5ce011d6f9..aa2145b71c 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 - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml @@ -11,7 +11,7 @@ 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.information.point - 3.0.136-SNAPSHOT + 3.0.138-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 f0009431ad..767d7d8599 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,14 @@ org.wso2.carbon.devicemgt policy-mgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.mgt.common - 3.0.136-SNAPSHOT + 3.0.138-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 847c68ca64..d9a2971297 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,14 +22,14 @@ org.wso2.carbon.devicemgt policy-mgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.mgt.core - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT bundle WSO2 Carbon - Policy Management Core WSO2 Carbon - Policy Management Core diff --git a/components/policy-mgt/pom.xml b/components/policy-mgt/pom.xml index cb3ab3541a..188dc778ab 100644 --- a/components/policy-mgt/pom.xml +++ b/components/policy-mgt/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../../pom.xml 4.0.0 policy-mgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT pom WSO2 Carbon - Policy Management Component http://wso2.org diff --git a/components/test-coverage/pom.xml b/components/test-coverage/pom.xml index 74c56411b3..40126ee051 100644 --- a/components/test-coverage/pom.xml +++ b/components/test-coverage/pom.xml @@ -21,7 +21,7 @@ carbon-devicemgt org.wso2.carbon.devicemgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../../pom.xml 4.0.0 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 8c4baf3a1f..5d0bd2d5ca 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,14 @@ org.wso2.carbon.devicemgt webapp-authenticator-framework - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.webapp.authenticator.framework - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT bundle WSO2 Carbon - Web Application Authenticator Framework Bundle WSO2 Carbon - Web Application Authenticator Framework Bundle diff --git a/components/webapp-authenticator-framework/pom.xml b/components/webapp-authenticator-framework/pom.xml index 00012ba9f9..dd720f9ff7 100644 --- a/components/webapp-authenticator-framework/pom.xml +++ b/components/webapp-authenticator-framework/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt webapp-authenticator-framework - 3.0.136-SNAPSHOT + 3.0.138-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 2f76b79aff..bdb5f04751 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,14 @@ org.wso2.carbon.devicemgt apimgt-extensions-feature - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.application.extension.feature pom - 3.0.136-SNAPSHOT + 3.0.138-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.handler.server.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml index e2e9476a21..65c4ea5240 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,14 @@ org.wso2.carbon.devicemgt apimgt-extensions-feature - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.handler.server.feature pom - 3.0.136-SNAPSHOT + 3.0.138-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 fb4d5a67c8..b6f41a9396 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,13 @@ org.wso2.carbon.devicemgt apimgt-extensions-feature - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.integration.client.feature - 3.0.136-SNAPSHOT + 3.0.138-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 85e92dfdc3..4a7db35143 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,14 @@ org.wso2.carbon.devicemgt apimgt-extensions-feature - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.webapp.publisher.feature pom - 3.0.136-SNAPSHOT + 3.0.138-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/pom.xml b/features/apimgt-extensions/pom.xml index a86ebe65dd..8f093ba16c 100644 --- a/features/apimgt-extensions/pom.xml +++ b/features/apimgt-extensions/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt apimgt-extensions-feature - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT pom WSO2 Carbon - API Management Extensions Feature http://wso2.org 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 e057eda81d..37f8cfa89c 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 - 3.0.136-SNAPSHOT + 3.0.138-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 e0524c79b5..e03b0c32f8 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 - 3.0.136-SNAPSHOT + 3.0.138-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 ceff012a8f..3f7a6baabe 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,14 @@ org.wso2.carbon.devicemgt certificate-mgt-feature - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.certificate.mgt.server.feature pom - 3.0.136-SNAPSHOT + 3.0.138-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/pom.xml b/features/certificate-mgt/pom.xml index b0d9f5f717..9f37281237 100644 --- a/features/certificate-mgt/pom.xml +++ b/features/certificate-mgt/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt certificate-mgt-feature - 3.0.136-SNAPSHOT + 3.0.138-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 7d6fe2f02d..8703a72825 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,14 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature pom - 3.0.136-SNAPSHOT + 3.0.138-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 0b944fcbca..1d0265f684 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,14 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature pom - 3.0.136-SNAPSHOT + 3.0.138-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 78ffaa3c6d..5435a39add 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,14 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature pom - 3.0.136-SNAPSHOT + 3.0.138-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 537ba1c69e..c5e5b0b964 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,14 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature pom - 3.0.136-SNAPSHOT + 3.0.138-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 2f6f302c96..1f1d81b52b 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,14 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature pom - 3.0.136-SNAPSHOT + 3.0.138-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 0b3a430cf4..108db78bed 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 - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../../pom.xml diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml index 8e08c780da..bad9a6322c 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-feature - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.analytics.data.publisher.feature pom - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT WSO2 Carbon - Device Management Server Feature http://wso2.org This feature contains bundles related to device analytics data publisher 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 46a908c84f..97528f0921 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 - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 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 ee9be17229..2bb2bf60e0 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,14 @@ org.wso2.carbon.devicemgt device-mgt-feature - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.feature pom - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT WSO2 Carbon - Device Management Extensions Feature http://wso2.org This feature contains common extensions used by key device management functionalities 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 29070be3c6..146b59463f 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 - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 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 8eb3c45e71..f38645a246 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,14 @@ org.wso2.carbon.devicemgt device-mgt-feature - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.server.feature pom - 3.0.136-SNAPSHOT + 3.0.138-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 5d70ba2820..0ab4f144d6 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 - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml diff --git a/features/device-mgt/pom.xml b/features/device-mgt/pom.xml index 46318ece65..4f492a612d 100644 --- a/features/device-mgt/pom.xml +++ b/features/device-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../../pom.xml diff --git a/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml b/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml index efa8c7ff27..c6c574d54e 100644 --- a/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml +++ b/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt email-sender-feature - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.email.sender.feature pom - 3.0.136-SNAPSHOT + 3.0.138-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/email-sender/pom.xml b/features/email-sender/pom.xml index e6184ca0c4..71d2770415 100644 --- a/features/email-sender/pom.xml +++ b/features/email-sender/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt email-sender-feature - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT pom WSO2 Carbon - Email Sender Feature http://wso2.org 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 f6996e1110..106e4dba4b 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,14 @@ org.wso2.carbon.devicemgt jwt-client-feature - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.identity.jwt.client.extension.feature pom - 3.0.136-SNAPSHOT + 3.0.138-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/pom.xml b/features/jwt-client/pom.xml index 2eb02489ae..72c4250e2e 100644 --- a/features/jwt-client/pom.xml +++ b/features/jwt-client/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../../pom.xml 4.0.0 jwt-client-feature - 3.0.136-SNAPSHOT + 3.0.138-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 f01de39280..85137db1ac 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,14 @@ org.wso2.carbon.devicemgt oauth-extensions-feature - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.oauth.extensions.feature pom - 3.0.136-SNAPSHOT + 3.0.138-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 fc4ef74efe..ffc8ba9be0 100644 --- a/features/oauth-extensions/pom.xml +++ b/features/oauth-extensions/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt oauth-extensions-feature - 3.0.136-SNAPSHOT + 3.0.138-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 b3bea18c8f..b93719be60 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,14 @@ org.wso2.carbon.devicemgt policy-mgt-feature - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.policy.mgt.server.feature pom - 3.0.136-SNAPSHOT + 3.0.138-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 d0f3eee479..6a17d90f44 100644 --- a/features/policy-mgt/pom.xml +++ b/features/policy-mgt/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt policy-mgt-feature - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT pom WSO2 Carbon - Policy Management Feature http://wso2.org 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 bc5b65952c..9ef704d01e 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,14 @@ org.wso2.carbon.devicemgt webapp-authenticator-framework-feature - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.webapp.authenticator.framework.server.feature pom - 3.0.136-SNAPSHOT + 3.0.138-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/pom.xml b/features/webapp-authenticator-framework/pom.xml index 2ee8ae0aac..77babcb8c7 100644 --- a/features/webapp-authenticator-framework/pom.xml +++ b/features/webapp-authenticator-framework/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt webapp-authenticator-framework-feature - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT pom WSO2 Carbon - Webapp Authenticator Framework Feature http://wso2.org diff --git a/pom.xml b/pom.xml index 7b12b06260..216262ca95 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt pom - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT WSO2 Carbon - Device Management - Parent http://wso2.org WSO2 Connected Device Manager Components @@ -241,11 +241,6 @@ org.wso2.carbon.device.mgt.analytics.data.publisher ${carbon.device.mgt.version} - - org.wso2.carbon.devicemgt - org.wso2.carbon.device.mgt.analytics.dashboard - ${carbon.device.mgt.version} - org.wso2.carbon.devicemgt org.wso2.carbon.device.mgt.server.feature @@ -1863,7 +1858,7 @@ 1.2.11.wso2v10 - 3.0.136-SNAPSHOT + 3.0.138-SNAPSHOT 4.4.8