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 72708689f46..1b490e35aca 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.annotations - 3.0.223-SNAPSHOT + 3.0.227-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 c76e6652e78..230ab7d2c57 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 - 3.0.223-SNAPSHOT + 3.0.227-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 c363eaf0727..795d40cccff 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 - 3.0.223-SNAPSHOT + 3.0.227-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 ffb155844f5..624db62881e 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.handlers - 3.0.223-SNAPSHOT + 3.0.227-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 80197ddc9ae..1cfe7e1b02a 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.integration.client - 3.0.223-SNAPSHOT + 3.0.227-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 493aee82bca..b9bf375fd2f 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.integration.generated.client - 3.0.223-SNAPSHOT + 3.0.227-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 7d8def7cb91..ab9d7905df4 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.webapp.publisher - 3.0.223-SNAPSHOT + 3.0.227-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 ff2a971327f..75073d38f0f 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../../pom.xml 4.0.0 apimgt-extensions - 3.0.223-SNAPSHOT + 3.0.227-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 531a9007fd5..7eaab3c3144 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.223-SNAPSHOT + 3.0.227-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 9fd5c268dc8..b202cf0066c 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.v09.api/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.v09.api/pom.xml index 294eeec9009..517f7581083 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.v09.api/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.v09.api/pom.xml @@ -24,7 +24,7 @@ certificate-mgt org.wso2.carbon.devicemgt - 3.0.223-SNAPSHOT + 3.0.227-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 edfdd9526a6..b7367e76dd9 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.certificate.mgt.core - 3.0.223-SNAPSHOT + 3.0.227-SNAPSHOT bundle WSO2 Carbon - Certificate Management Core WSO2 Carbon - Certificate Management Core diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.v09.api/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.v09.api/pom.xml index 5744750bae2..c42b5dfb596 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.v09.api/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.v09.api/pom.xml @@ -24,7 +24,7 @@ certificate-mgt org.wso2.carbon.devicemgt - 3.0.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml diff --git a/components/certificate-mgt/pom.xml b/components/certificate-mgt/pom.xml index 4c66bea6161..e324de0b250 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt certificate-mgt - 3.0.223-SNAPSHOT + 3.0.227-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 face4f46ef0..ba766282a75 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.223-SNAPSHOT + 3.0.227-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 af2f5cd0492..cae0f05aa9d 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.223-SNAPSHOT + 3.0.227-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 9c8f852d544..c72896513f2 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/src/main/java/org/wso2/carbon/device/mgt/extensions/push/notification/provider/fcm/FCMNotificationStrategy.java b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/src/main/java/org/wso2/carbon/device/mgt/extensions/push/notification/provider/fcm/FCMNotificationStrategy.java index 7085f1244b0..83a9289442f 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/src/main/java/org/wso2/carbon/device/mgt/extensions/push/notification/provider/fcm/FCMNotificationStrategy.java +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/src/main/java/org/wso2/carbon/device/mgt/extensions/push/notification/provider/fcm/FCMNotificationStrategy.java @@ -21,6 +21,8 @@ package org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm; import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.push.notification.NotificationContext; @@ -37,10 +39,13 @@ import java.util.List; public class FCMNotificationStrategy implements NotificationStrategy { + private static final Log log = LogFactory.getLog(FCMNotificationStrategy.class); + + private static final String NOTIFIER_TYPE_FCM = "FCM"; private static final String FCM_TOKEN = "FCM_TOKEN"; private static final String FCM_ENDPOINT = "https://fcm.googleapis.com/fcm/send"; private static final String FCM_API_KEY = "fcmAPIKey"; - private static final int TIME_TO_LIVE = 60; + private static final int TIME_TO_LIVE = 5 * 60; //Set FCM TTL to 5 minutes private static final int HTTP_STATUS_CODE_OK = 200; private final PushNotificationConfig config; @@ -56,9 +61,16 @@ public class FCMNotificationStrategy implements NotificationStrategy { @Override public void execute(NotificationContext ctx) throws PushNotificationExecutionFailedException { try { - Device device = - FCMDataHolder.getInstance().getDeviceManagementProviderService().getDeviceWithTypeProperties(ctx.getDeviceId()); - this.sendWakeUpCall(ctx.getOperation().getCode(), device); + if (NOTIFIER_TYPE_FCM.equals(config.getType())) { + Device device = FCMDataHolder.getInstance().getDeviceManagementProviderService() + .getDeviceWithTypeProperties(ctx.getDeviceId()); + this.sendWakeUpCall(ctx.getOperation().getCode(), device); + } else { + if (log.isDebugEnabled()) { + log.debug("Not using FCM notifier as notifier type is set to " + config.getType() + + " in Platform Configurations."); + } + } } catch (DeviceManagementException e) { throw new PushNotificationExecutionFailedException("Error occurred while retrieving device information", e); } catch (IOException e) { @@ -76,12 +88,12 @@ public class FCMNotificationStrategy implements NotificationStrategy { } - private void sendWakeUpCall(String message, - Device device) throws IOException, PushNotificationExecutionFailedException { + private void sendWakeUpCall(String message, Device device) throws IOException, + PushNotificationExecutionFailedException { OutputStream os = null; byte[] bytes = getFCMRequest(message, getFCMToken(device.getProperties())).getBytes(); - HttpURLConnection conn = null; + HttpURLConnection conn; try { conn = (HttpURLConnection) new URL(FCM_ENDPOINT).openConnection(); conn.setRequestProperty("Content-Type", "application/json"); @@ -96,6 +108,9 @@ public class FCMNotificationStrategy implements NotificationStrategy { } } int status = conn.getResponseCode(); + if (log.isDebugEnabled()) { + log.debug("Result code: " + status + ", Message: " + conn.getResponseMessage()); + } if (status != HTTP_STATUS_CODE_OK) { throw new PushNotificationExecutionFailedException("Push notification sending failed with the HTTP " + "error code '" + status + "'"); 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 2c6680e9941..ae3fee2fc7a 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.223-SNAPSHOT + 3.0.227-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 cdab70a09df..541b6728590 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.223-SNAPSHOT + 3.0.227-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 06844620d95..f835dc43638 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/pom.xml b/components/device-mgt-extensions/pom.xml index 70e29c658f3..fadd58a3125 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.223-SNAPSHOT + 3.0.227-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 bc20233fde7..a6c3ee7d7b3 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.223-SNAPSHOT + 3.0.227-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 868f034c870..7486767d07e 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 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 144c4f8827c..cb307c8c0dc 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.223-SNAPSHOT + 3.0.227-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 daa655b4113..5ba55c76345 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementPluginRepository.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementPluginRepository.java index 4c06d507ca0..93bee26a824 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementPluginRepository.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementPluginRepository.java @@ -22,22 +22,20 @@ 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.DeviceManagementException; -import org.wso2.carbon.device.mgt.common.pull.notification.PullNotificationSubscriber; -import org.wso2.carbon.device.mgt.core.dto.DeviceManagementServiceHolder; -import org.wso2.carbon.device.mgt.core.dto.DeviceTypeServiceIdentifier; +import org.wso2.carbon.device.mgt.common.DeviceStatusTaskPluginConfig; import org.wso2.carbon.device.mgt.common.OperationMonitoringTaskConfig; import org.wso2.carbon.device.mgt.common.ProvisioningConfig; -import org.wso2.carbon.device.mgt.common.DeviceStatusTaskPluginConfig; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManager; +import org.wso2.carbon.device.mgt.common.pull.notification.PullNotificationSubscriber; import org.wso2.carbon.device.mgt.common.push.notification.NotificationStrategy; -import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationConfig; -import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationProvider; import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; import org.wso2.carbon.device.mgt.common.type.mgt.DeviceTypeDefinitionProvider; import org.wso2.carbon.device.mgt.common.type.mgt.DeviceTypeMetaDefinition; 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.dto.DeviceManagementServiceHolder; import org.wso2.carbon.device.mgt.core.dto.DeviceType; +import org.wso2.carbon.device.mgt.core.dto.DeviceTypeServiceIdentifier; import org.wso2.carbon.device.mgt.core.internal.DeviceManagementDataHolder; import org.wso2.carbon.device.mgt.core.internal.DeviceManagementServiceComponent; import org.wso2.carbon.device.mgt.core.internal.DeviceManagerStartupListener; @@ -248,7 +246,6 @@ public class DeviceManagementPluginRepository implements DeviceManagerStartupLis private void registerPushNotificationStrategy(DeviceManagementService deviceManagementService) throws DeviceManagementException { - PushNotificationConfig pushNoteConfig = deviceManagementService.getPushNotificationConfig(); PrivilegedCarbonContext.startTenantFlow(); PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain( deviceManagementService.getProvisioningConfig().getProviderTenantDomain(), true); @@ -261,22 +258,8 @@ public class DeviceManagementPluginRepository implements DeviceManagerStartupLis int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); deviceTypeIdentifier = new DeviceTypeServiceIdentifier(deviceManagementService.getType(), tenantId); } - - if (pushNoteConfig != null) { - PushNotificationProvider provider = DeviceManagementDataHolder.getInstance() - .getPushNotificationProviderRepository().getProvider(pushNoteConfig.getType()); - if (provider == null) { - throw new DeviceManagementException( - "No registered push notification provider found for the type: '" + - pushNoteConfig.getType() + "'."); - } - NotificationStrategy notificationStrategy = provider.getNotificationStrategy(pushNoteConfig); - operationManagerRepository.addOperationManager(deviceTypeIdentifier, - new OperationManagerImpl(deviceTypeIdentifier.getDeviceType(), notificationStrategy)); - } else { - operationManagerRepository.addOperationManager(deviceTypeIdentifier, - new OperationManagerImpl(deviceTypeIdentifier.getDeviceType())); - } + operationManagerRepository.addOperationManager(deviceTypeIdentifier, new OperationManagerImpl( + deviceTypeIdentifier.getDeviceType(), deviceManagementService)); } finally { PrivilegedCarbonContext.endTenantFlow(); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java index 86c9fa2bbcc..8c6c23352c1 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java @@ -39,7 +39,10 @@ import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementExcept import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManager; import org.wso2.carbon.device.mgt.common.push.notification.NotificationContext; import org.wso2.carbon.device.mgt.common.push.notification.NotificationStrategy; +import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationConfig; import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationExecutionFailedException; +import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationProvider; +import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; import org.wso2.carbon.device.mgt.core.DeviceManagementConstants; import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager; import org.wso2.carbon.device.mgt.core.dao.DeviceDAO; @@ -61,6 +64,7 @@ import org.wso2.carbon.device.mgt.core.util.DeviceManagerUtil; import java.sql.SQLException; import java.util.ArrayList; +import java.util.Calendar; import java.util.Collections; import java.util.Date; import java.util.List; @@ -73,6 +77,8 @@ import java.util.List; public class OperationManagerImpl implements OperationManager { private static final Log log = LogFactory.getLog(OperationManagerImpl.class); + private static final int CACHE_VALIDITY_PERIOD = 5 * 60 * 1000; + private static final String NOTIFIER_TYPE_LOCAL = "LOCAL"; private OperationDAO commandOperationDAO; private OperationDAO configOperationDAO; @@ -84,6 +90,8 @@ public class OperationManagerImpl implements OperationManager { private EnrollmentDAO enrollmentDAO; private NotificationStrategy notificationStrategy; private String deviceType; + private DeviceManagementService deviceManagementService; + private long lastUpdatedTimeStamp = 0; public OperationManagerImpl() { commandOperationDAO = OperationManagementDAOFactory.getCommandOperationDAO(); @@ -96,20 +104,32 @@ public class OperationManagerImpl implements OperationManager { enrollmentDAO = DeviceManagementDAOFactory.getEnrollmentDAO(); } - public OperationManagerImpl(String deviceType) { + public OperationManagerImpl(String deviceType, DeviceManagementService deviceManagementService) { this(); this.deviceType = deviceType; + this.deviceManagementService = deviceManagementService; } public NotificationStrategy getNotificationStrategy() { + if (Calendar.getInstance().getTimeInMillis() - lastUpdatedTimeStamp > CACHE_VALIDITY_PERIOD) { + PushNotificationConfig pushNoteConfig = deviceManagementService.getPushNotificationConfig(); + if (pushNoteConfig != null && !NOTIFIER_TYPE_LOCAL.equals(pushNoteConfig.getType())) { + PushNotificationProvider provider = DeviceManagementDataHolder.getInstance() + .getPushNotificationProviderRepository().getProvider(pushNoteConfig.getType()); + if (provider == null) { + log.error("No registered push notification provider found for the type: '" + + pushNoteConfig.getType() + "'."); + return null; + } + notificationStrategy = provider.getNotificationStrategy(pushNoteConfig); + } else { + notificationStrategy = null; + } + lastUpdatedTimeStamp = Calendar.getInstance().getTimeInMillis(); + } return notificationStrategy; } - public OperationManagerImpl(String deviceType, NotificationStrategy notificationStrategy) { - this(deviceType); - this.notificationStrategy = notificationStrategy; - } - @Override public Activity addOperation(Operation operation, List deviceIds) @@ -144,6 +164,7 @@ public class OperationManagerImpl implements OperationManager { boolean isScheduledOperation = this.isTaskScheduledOperation(operation); boolean isNotRepeated = false; boolean isScheduled = false; + notificationStrategy = getNotificationStrategy(); // check whether device list is greater than batch size notification strategy has enable to send push // notification using scheduler task diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/operation/OperationManagementNegativeDBOperationTest.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/operation/OperationManagementNegativeDBOperationTest.java index 767cde63ed9..b55c77d0853 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/operation/OperationManagementNegativeDBOperationTest.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/operation/OperationManagementNegativeDBOperationTest.java @@ -17,6 +17,7 @@ */ package org.wso2.carbon.device.mgt.core.operation; +import org.powermock.api.mockito.PowerMockito; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -28,7 +29,7 @@ import org.wso2.carbon.device.mgt.common.PaginationRequest; 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.operation.mgt.OperationManager; -import org.wso2.carbon.device.mgt.common.push.notification.NotificationStrategy; +import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; import org.wso2.carbon.device.mgt.core.TestDeviceManagementService; import org.wso2.carbon.device.mgt.core.common.BaseDeviceManagementTest; import org.wso2.carbon.device.mgt.core.common.TestDataHolder; @@ -39,10 +40,10 @@ import org.wso2.carbon.device.mgt.core.operation.mgt.dao.OperationManagementDAOF import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; import org.wso2.carbon.utils.multitenancy.MultitenantConstants; +import javax.sql.DataSource; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.List; -import javax.sql.DataSource; /** * Negative test cases for {@link OperationManagerImpl} @@ -83,8 +84,11 @@ public class OperationManagementNegativeDBOperationTest extends BaseDeviceManage throw new Exception("Incorrect device with ID - " + device.getDeviceIdentifier() + " returned!"); } } - NotificationStrategy notificationStrategy = new TestNotificationStrategy(); - this.operationMgtService = new OperationManagerImpl(DEVICE_TYPE, notificationStrategy); + DeviceManagementService deviceManagementService + = new TestDeviceManagementService(DEVICE_TYPE, MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); + this.operationMgtService = PowerMockito.spy(new OperationManagerImpl(DEVICE_TYPE, deviceManagementService)); + PowerMockito.when(this.operationMgtService, "getNotificationStrategy") + .thenReturn(new TestNotificationStrategy()); this.setMockDataSource(); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/operation/OperationManagementNoDBSchemaTests.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/operation/OperationManagementNoDBSchemaTests.java index 4bc7b452783..92310af40c1 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/operation/OperationManagementNoDBSchemaTests.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/operation/OperationManagementNoDBSchemaTests.java @@ -18,6 +18,7 @@ package org.wso2.carbon.device.mgt.core.operation; +import org.powermock.api.mockito.PowerMockito; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -30,7 +31,7 @@ import org.wso2.carbon.device.mgt.common.PaginationRequest; 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.operation.mgt.OperationManager; -import org.wso2.carbon.device.mgt.common.push.notification.NotificationStrategy; +import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; import org.wso2.carbon.device.mgt.core.DeviceManagementConstants; import org.wso2.carbon.device.mgt.core.TestDeviceManagementService; import org.wso2.carbon.device.mgt.core.common.BaseDeviceManagementTest; @@ -42,9 +43,9 @@ import org.wso2.carbon.device.mgt.core.operation.mgt.dao.OperationManagementDAOF import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; import org.wso2.carbon.utils.multitenancy.MultitenantConstants; +import javax.sql.DataSource; import java.util.ArrayList; import java.util.List; -import javax.sql.DataSource; /** * This is the testcase which covers the methods from {@link OperationManager} @@ -82,8 +83,11 @@ public class OperationManagementNoDBSchemaTests extends BaseDeviceManagementTest throw new Exception("Incorrect device with ID - " + device.getDeviceIdentifier() + " returned!"); } } - NotificationStrategy notificationStrategy = new TestNotificationStrategy(); - this.operationMgtService = new OperationManagerImpl(DEVICE_TYPE, notificationStrategy); + DeviceManagementService deviceManagementService + = new TestDeviceManagementService(DEVICE_TYPE, MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); + this.operationMgtService = PowerMockito.spy(new OperationManagerImpl(DEVICE_TYPE, deviceManagementService)); + PowerMockito.when(this.operationMgtService, "getNotificationStrategy") + .thenReturn(new TestNotificationStrategy()); } @Test(description = "add operation", expectedExceptions = OperationManagementException.class) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/operation/OperationManagementTests.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/operation/OperationManagementTests.java index 0ce5541596f..dcfd63b9959 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/operation/OperationManagementTests.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/operation/OperationManagementTests.java @@ -18,6 +18,7 @@ package org.wso2.carbon.device.mgt.core.operation; +import org.powermock.api.mockito.PowerMockito; import org.testng.Assert; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -34,7 +35,7 @@ import org.wso2.carbon.device.mgt.common.operation.mgt.ActivityStatus; 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.operation.mgt.OperationManager; -import org.wso2.carbon.device.mgt.common.push.notification.NotificationStrategy; +import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; import org.wso2.carbon.device.mgt.core.DeviceManagementConstants; import org.wso2.carbon.device.mgt.core.TestDeviceManagementService; import org.wso2.carbon.device.mgt.core.common.BaseDeviceManagementTest; @@ -62,7 +63,7 @@ public class OperationManagementTests extends BaseDeviceManagementTest { private static final String DEVICE_TYPE = "OP_TEST_TYPE"; private static final String DEVICE_ID_PREFIX = "OP-TEST-DEVICE-ID-"; - private static final String COMMAND_OPERATON_CODE = "COMMAND-TEST"; + private static final String COMMAND_OPERATION_CODE = "COMMAND-TEST"; private static final String POLICY_OPERATION_CODE = "POLICY-TEST"; private static final String CONFIG_OPERATION_CODE = "CONFIG-TEST"; private static final String PROFILE_OPERATION_CODE = "PROFILE-TEST"; @@ -75,6 +76,7 @@ public class OperationManagementTests extends BaseDeviceManagementTest { private List deviceIds = new ArrayList<>(); private OperationManager operationMgtService; private DeviceManagementProviderService deviceMgmtProvider; + private DeviceManagementService deviceManagementService; private Activity commandActivity; private long commandActivityBeforeUpdatedTimestamp; @@ -98,18 +100,25 @@ public class OperationManagementTests extends BaseDeviceManagementTest { } } this.deviceMgmtProvider = DeviceManagementDataHolder.getInstance().getDeviceManagementProvider(); - NotificationStrategy notificationStrategy = new TestNotificationStrategy(); - this.operationMgtService = new OperationManagerImpl(DEVICE_TYPE, notificationStrategy); + deviceManagementService = new TestDeviceManagementService(DEVICE_TYPE, + MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); + this.operationMgtService = PowerMockito.spy(new OperationManagerImpl(DEVICE_TYPE, deviceManagementService)); + PowerMockito.when(this.operationMgtService, "getNotificationStrategy").thenReturn(new TestNotificationStrategy()); } @Test public void addCommandOperation() throws DeviceManagementException, OperationManagementException, InvalidDeviceException { - NotificationStrategy notificationStrategy = new TestNotificationStrategy(true); - OperationManager operationManager = new OperationManagerImpl(DEVICE_TYPE, notificationStrategy); + OperationManager operationManager = PowerMockito.spy( + new OperationManagerImpl(DEVICE_TYPE, deviceManagementService)); + try { + PowerMockito.when(operationManager, "getNotificationStrategy") + .thenReturn(new TestNotificationStrategy(true)); + } catch (Exception e) { + throw new RuntimeException("Unable to mock getNotificationStrategy method", e); + } this.commandActivity = operationManager.addOperation( - getOperation(new CommandOperation(), Operation.Type.COMMAND, COMMAND_OPERATON_CODE), - this.deviceIds); + getOperation(new CommandOperation(), Operation.Type.COMMAND, COMMAND_OPERATION_CODE), this.deviceIds); validateOperationResponse(this.commandActivity, ActivityStatus.Status.PENDING); } @@ -123,8 +132,8 @@ public class OperationManagementTests extends BaseDeviceManagementTest { invalidDevices.add(new DeviceIdentifier(INVALID_DEVICE + i, DEVICE_TYPE)); } invalidDevices.addAll(this.deviceIds); - Activity activity = this.operationMgtService.addOperation(getOperation(new CommandOperation(), - Operation.Type.COMMAND, COMMAND_OPERATON_CODE), invalidDevices); + Activity activity = this.operationMgtService.addOperation( + getOperation(new CommandOperation(), Operation.Type.COMMAND, COMMAND_OPERATION_CODE), invalidDevices); Assert.assertEquals(activity.getActivityStatus().size(), invalidDevices.size(), "The operation response for add operation only have - " + activity.getActivityStatus().size()); for (int i = 0; i < activity.getActivityStatus().size(); i++) { @@ -145,8 +154,7 @@ public class OperationManagementTests extends BaseDeviceManagementTest { public void addEmptyDevicesCommandOperation() throws DeviceManagementException, OperationManagementException, InvalidDeviceException { this.operationMgtService.addOperation(getOperation(new CommandOperation(), Operation.Type.COMMAND, - COMMAND_OPERATON_CODE), - new ArrayList<>()); + COMMAND_OPERATION_CODE), new ArrayList<>()); } @Test(expectedExceptions = InvalidDeviceException.class) @@ -156,18 +164,16 @@ public class OperationManagementTests extends BaseDeviceManagementTest { DeviceIdentifier deviceIdentifier = new DeviceIdentifier(); List deviceIdentifiers = new ArrayList<>(); deviceIdentifiers.add(deviceIdentifier); - this.operationMgtService.addOperation(getOperation(new CommandOperation(), Operation.Type.COMMAND, - COMMAND_OPERATON_CODE), - deviceIdentifiers); + this.operationMgtService.addOperation( + getOperation(new CommandOperation(), Operation.Type.COMMAND, COMMAND_OPERATION_CODE), deviceIdentifiers); } @Test public void addNonAdminUserDevicesCommandOperation() throws DeviceManagementException, OperationManagementException, InvalidDeviceException { startTenantFlowAsNonAdmin(); - Activity activity = this.operationMgtService.addOperation(getOperation(new CommandOperation(), - Operation.Type.COMMAND, COMMAND_OPERATON_CODE), - deviceIds); + Activity activity = this.operationMgtService.addOperation( + getOperation(new CommandOperation(), Operation.Type.COMMAND, COMMAND_OPERATION_CODE), deviceIds); PrivilegedCarbonContext.endTenantFlow(); validateOperationResponse(activity, ActivityStatus.Status.UNAUTHORIZED); } @@ -525,7 +531,7 @@ public class OperationManagementTests extends BaseDeviceManagementTest { expectedExceptions = OperationManagementException.class) public void getUpdateOperationForInvalidDevice() throws DeviceManagementException, OperationManagementException { this.operationMgtService.updateOperation(new DeviceIdentifier(INVALID_DEVICE, DEVICE_TYPE), - getOperation(new CommandOperation(), Operation.Type.COMMAND, COMMAND_OPERATON_CODE)); + getOperation(new CommandOperation(), Operation.Type.COMMAND, COMMAND_OPERATION_CODE)); } @Test(dependsOnMethods = "getUpdateOperationForInvalidDevice", diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/operation/ScheduledTaskOperationTests.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/operation/ScheduledTaskOperationTests.java index 269563b3a80..d064497b0aa 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/operation/ScheduledTaskOperationTests.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/operation/ScheduledTaskOperationTests.java @@ -18,6 +18,7 @@ package org.wso2.carbon.device.mgt.core.operation; import org.mockito.Mockito; +import org.powermock.api.mockito.PowerMockito; import org.testng.Assert; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -29,6 +30,7 @@ import org.wso2.carbon.device.mgt.common.operation.mgt.Activity; 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.operation.mgt.OperationManager; +import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; import org.wso2.carbon.device.mgt.core.TestDeviceManagementService; import org.wso2.carbon.device.mgt.core.TestTaskServiceImpl; import org.wso2.carbon.device.mgt.core.common.BaseDeviceManagementTest; @@ -87,8 +89,11 @@ public class ScheduledTaskOperationTests extends BaseDeviceManagementTest { } } DeviceConfigurationManager.getInstance().initConfig(CDM_CONFIG_LOCATION); - TestNotificationStrategy notificationStrategy = new TestNotificationStrategy(); - this.operationMgtService = new OperationManagerImpl(DEVICE_TYPE, notificationStrategy); + DeviceManagementService deviceManagementService + = new TestDeviceManagementService(DEVICE_TYPE, MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); + this.operationMgtService = PowerMockito.spy(new OperationManagerImpl(DEVICE_TYPE, deviceManagementService)); + PowerMockito.when(this.operationMgtService, "getNotificationStrategy") + .thenReturn(new TestNotificationStrategy()); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/task/DeviceTaskManagerTest.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/task/DeviceTaskManagerTest.java index ff020451cf7..d76783991c6 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/task/DeviceTaskManagerTest.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/task/DeviceTaskManagerTest.java @@ -19,6 +19,7 @@ package org.wso2.carbon.device.mgt.core.task; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.powermock.api.mockito.PowerMockito; import org.testng.Assert; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -29,23 +30,22 @@ import org.wso2.carbon.device.mgt.common.DeviceManagementException; 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.operation.mgt.OperationManager; -import org.wso2.carbon.device.mgt.common.push.notification.NotificationStrategy; +import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; import org.wso2.carbon.device.mgt.core.TestDeviceManagementService; import org.wso2.carbon.device.mgt.core.TestUtils; import org.wso2.carbon.device.mgt.core.authorization.DeviceAccessAuthorizationServiceImpl; import org.wso2.carbon.device.mgt.core.common.BaseDeviceManagementTest; import org.wso2.carbon.device.mgt.core.common.TestDataHolder; -import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager; import org.wso2.carbon.device.mgt.core.internal.DeviceManagementDataHolder; import org.wso2.carbon.device.mgt.core.internal.DeviceManagementServiceComponent; import org.wso2.carbon.device.mgt.core.operation.TestNotificationStrategy; import org.wso2.carbon.device.mgt.core.operation.mgt.OperationManagerImpl; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderServiceImpl; -import org.wso2.carbon.device.mgt.core.service.GroupManagementProviderServiceImpl; import org.wso2.carbon.device.mgt.core.task.impl.DeviceDetailsRetrieverTask; import org.wso2.carbon.device.mgt.core.task.impl.DeviceTaskManagerImpl; import org.wso2.carbon.registry.core.exceptions.RegistryException; +import org.wso2.carbon.utils.multitenancy.MultitenantConstants; import java.util.ArrayList; import java.util.HashMap; @@ -84,8 +84,16 @@ public class DeviceTaskManagerTest extends BaseDeviceManagementTest { DeviceManagementDataHolder.getInstance() .setDeviceAccessAuthorizationService(new DeviceAccessAuthorizationServiceImpl()); DeviceManagementDataHolder.getInstance().setDeviceTaskManagerService(null); - NotificationStrategy notificationStrategy = new TestNotificationStrategy(); - this.operationManager = new OperationManagerImpl(TestDataHolder.TEST_DEVICE_TYPE, notificationStrategy); + DeviceManagementService deviceManagementService = new TestDeviceManagementService( + TestDataHolder.TEST_DEVICE_TYPE, MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); + this.operationManager = PowerMockito.spy( + new OperationManagerImpl(TestDataHolder.TEST_DEVICE_TYPE, deviceManagementService)); + try { + PowerMockito.when(this.operationManager, "getNotificationStrategy") + .thenReturn(new TestNotificationStrategy()); + } catch (Exception e) { + throw new RuntimeException("Unable to mock getNotificationStrategy method", e); + } this.deviceMgtProviderService.registerDeviceType( new TestDeviceManagementService(TestDataHolder.TEST_DEVICE_TYPE, TestDataHolder.SUPER_TENANT_DOMAIN)); for (Device device : devices) { 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 c62211a31a6..f205488b27e 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.223-SNAPSHOT + 3.0.227-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/DeviceTypeManagerService.java b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/DeviceTypeManagerService.java index 48f011f8dbd..4c481fc9f35 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/DeviceTypeManagerService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/src/main/java/org/wso2/carbon/device/mgt/extensions/device/type/template/DeviceTypeManagerService.java @@ -59,6 +59,8 @@ import java.util.Map; public class DeviceTypeManagerService implements DeviceManagementService { private static final Log log = LogFactory.getLog(DeviceTypeManagerService.class); + private static final String NOTIFIER_PROPERTY = "notifierType"; + private static final String NOTIFIER_TYPE_LOCAL = "LOCAL"; private DeviceManager deviceManager; private PushNotificationConfig pushNotificationConfig; @@ -71,6 +73,9 @@ public class DeviceTypeManagerService implements DeviceManagementService { private PullNotificationSubscriber pullNotificationSubscriber; private DeviceStatusTaskPluginConfig deviceStatusTaskPluginConfig; private GeneralConfig generalConfig; + private boolean isRegistryBasedConfigs = false; + private boolean isScheduled = false; + private String notifierType; public DeviceTypeManagerService(DeviceTypeConfigIdentifier deviceTypeConfigIdentifier, DeviceTypeConfiguration deviceTypeConfiguration) { @@ -126,6 +131,7 @@ public class DeviceTypeManagerService implements DeviceManagementService { private void populatePushNotificationConfig(PushNotificationProvider pushNotificationProvider) { if (pushNotificationProvider != null) { if (pushNotificationProvider.isFileBasedProperties()) { + isRegistryBasedConfigs = false; Map staticProps = new HashMap<>(); ConfigProperties configProperties = pushNotificationProvider.getConfigProperties(); if (configProperties != null) { @@ -139,21 +145,30 @@ public class DeviceTypeManagerService implements DeviceManagementService { pushNotificationConfig = new PushNotificationConfig(pushNotificationProvider.getType(), pushNotificationProvider.isScheduled(), staticProps); } else { - try { - PlatformConfiguration deviceTypeConfig = deviceManager.getConfiguration(); - if (deviceTypeConfig != null) { - List configuration = deviceTypeConfig.getConfiguration(); - if (configuration.size() > 0) { - Map properties = this.getConfigProperty(configuration); - pushNotificationConfig = new PushNotificationConfig( - pushNotificationProvider.getType(), pushNotificationProvider.isScheduled(), - properties); - } + isRegistryBasedConfigs = true; + isScheduled = pushNotificationProvider.isScheduled(); + notifierType = pushNotificationProvider.getType(); + refreshPlatformConfigurations(); + } + } + } + + private void refreshPlatformConfigurations() { + try { + PlatformConfiguration deviceTypeConfig = deviceManager.getConfiguration(); + if (deviceTypeConfig != null) { + List configuration = deviceTypeConfig.getConfiguration(); + if (!configuration.isEmpty()) { + Map properties = this.getConfigProperty(configuration); + String notifierValue = properties.get(NOTIFIER_PROPERTY); + if (notifierValue != null && notifierValue.equals("1")) { + notifierType = NOTIFIER_TYPE_LOCAL; } - } catch (DeviceManagementException e) { - log.error("Unable to get the " + type + " platform configuration from registry."); + pushNotificationConfig = new PushNotificationConfig(notifierType, isScheduled, properties); } } + } catch (DeviceManagementException e) { + log.error("Unable to get the " + type + " platform configuration from registry."); } } @@ -174,6 +189,9 @@ public class DeviceTypeManagerService implements DeviceManagementService { @Override public PushNotificationConfig getPushNotificationConfig() { + if (isRegistryBasedConfigs) { + refreshPlatformConfigurations(); + } return pushNotificationConfig; } 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 26a85ab336d..d305cb203d6 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.effective-policy.view/public/js/view.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.effective-policy.view/public/js/view.js index bb11a38d267..c28deb2db5e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.effective-policy.view/public/js/view.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.effective-policy.view/public/js/view.js @@ -27,19 +27,19 @@ var displayPolicy = function (policyPayloadObj) { $("#policy-action").text(policyPayloadObj.compliance.toUpperCase()); $("#policy-description").text(policyPayloadObj["description"]); var policyStatus = "Active"; - if (policyPayloadObj["active"] == true && policyPayloadObj["updated"] == true) { + if (policyPayloadObj["active"] === true && policyPayloadObj["updated"] === true) { policyStatus = ' Active/Updated'; - } else if (policyPayloadObj["active"] == true && policyPayloadObj["updated"] == false) { + } else if (policyPayloadObj["active"] === true && policyPayloadObj["updated"] === false) { policyStatus = ' Active'; - } else if (policyPayloadObj["active"] == false && policyPayloadObj["updated"] == true) { + } else if (policyPayloadObj["active"] === false && policyPayloadObj["updated"] === true) { policyStatus = ' Inactive/Updated'; - } else if (policyPayloadObj["active"] == false && policyPayloadObj["updated"] == false) { + } else if (policyPayloadObj["active"] === false && policyPayloadObj["updated"] === false) { policyStatus = ' Inactive'; } $("#policy-status").html(policyStatus); - if (policyPayloadObj.users == null) { + if (!policyPayloadObj.users) { $("#policy-users").text("NONE"); } else if (policyPayloadObj.users.length > 0) { @@ -48,10 +48,9 @@ var displayPolicy = function (policyPayloadObj) { $("#users-row").addClass("hidden"); } - if (policyPayloadObj.deviceGroups == null) { + if (!policyPayloadObj.deviceGroups) { $("#policy-groups").text("NONE"); } else if (policyPayloadObj.deviceGroups.length > 0) { - debugger; var deviceGroups = policyPayloadObj.deviceGroups; var assignedGroups = []; for (var index in deviceGroups) { @@ -64,7 +63,7 @@ var displayPolicy = function (policyPayloadObj) { $("#policy-groups").text("NONE"); } - if (policyPayloadObj.roles == null) { + if (!policyPayloadObj.roles) { $("#policy-roles").text("NONE"); } else if (policyPayloadObj.roles.length > 0) { @@ -131,7 +130,7 @@ $(document).ready(function () { "/api/device-mgt/v1.0" + "/policies/effective-policy/" + getParameterByName("type") + "/" + getParameterByName("id"), // on success function (data, textStatus, jqXHR) { - if (jqXHR.status == 200 && data) { + if (jqXHR.status === 200 && data) { policyPayloadObj = JSON.parse(data); displayPolicy(policyPayloadObj); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.edit/public/js/policy-edit.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.edit/public/js/policy-edit.js index 6242ec3a555..8f664adf530 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.edit/public/js/policy-edit.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.edit/public/js/policy-edit.js @@ -283,7 +283,7 @@ stepForwardFrom["policy-criteria"] = function () { */ var inputIsValidAgainstLength = function (input, minLength, maxLength) { var length = input.length; - return (length == minLength || (length > minLength && length < maxLength) || length == maxLength); + return (length === minLength || (length > minLength && length < maxLength) || length === maxLength); }; /** @@ -298,10 +298,10 @@ validateStep["policy-criteria"] = function () { $("input[type='radio'].select-users-radio").each(function () { if ($(this).is(":checked")) { - if ($(this).attr("id") == "users-radio-btn") { + if ($(this).attr("id") === "users-radio-btn") { selectedAssignees = $("#users-input").val(); selectedField = "User(s)"; - } else if ($(this).attr("id") == "user-roles-radio-btn") { + } else if ($(this).attr("id") === "user-roles-radio-btn") { selectedAssignees = $("#user-roles-input").val(); } return false; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.view/public/js/view.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.view/public/js/view.js index 2f035e80c37..9a5eef0ee32 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.view/public/js/view.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.view/public/js/view.js @@ -29,13 +29,13 @@ var displayPolicy = function (policyPayloadObj) { $("#policy-action").text(policyPayloadObj.compliance.toUpperCase()); $("#policy-description").text(policyPayloadObj["description"]); var policyStatus = "Active"; - if (policyPayloadObj["active"] == true && policyPayloadObj["updated"] == true) { + if (policyPayloadObj["active"] === true && policyPayloadObj["updated"] === true) { policyStatus = ' Active/Updated'; - } else if (policyPayloadObj["active"] == true && policyPayloadObj["updated"] == false) { + } else if (policyPayloadObj["active"] === true && policyPayloadObj["updated"] === false) { policyStatus = ' Active'; - } else if (policyPayloadObj["active"] == false && policyPayloadObj["updated"] == true) { + } else if (policyPayloadObj["active"] === false && policyPayloadObj["updated"] === true) { policyStatus = ' Inactive/Updated'; - } else if (policyPayloadObj["active"] == false && policyPayloadObj["updated"] == false) { + } else if (policyPayloadObj["active"] === false && policyPayloadObj["updated"] === false) { policyStatus = ' Inactive'; } @@ -47,7 +47,6 @@ var displayPolicy = function (policyPayloadObj) { $("#users-row").addClass("hidden"); } if (policyPayloadObj.deviceGroups.length > 0) { - debugger; var deviceGroups = policyPayloadObj.deviceGroups; var assignedGroups = []; for (var index in deviceGroups) { 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 decb0c2f4e4..7546c8773df 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/pom.xml index 1119a8bfa4a..a621aea1b40 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.v09.api/pom.xml @@ -22,7 +22,7 @@ device-mgt org.wso2.carbon.devicemgt - 3.0.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/pom.xml b/components/device-mgt/pom.xml index 0ff75eabcab..a7d38c7c56b 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.223-SNAPSHOT + 3.0.227-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 9b5f5a4b6cf..f1f34e8df61 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml diff --git a/components/email-sender/pom.xml b/components/email-sender/pom.xml index 50c4afb1611..ad750d9ce4d 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.223-SNAPSHOT + 3.0.227-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 01eadad20aa..71877b5b4ef 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.oauth.extensions - 3.0.223-SNAPSHOT + 3.0.227-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 040dd442d03..bb9d8013abd 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.223-SNAPSHOT + 3.0.227-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 667e1c9bd1e..d7f10115ba3 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml diff --git a/components/identity-extensions/pom.xml b/components/identity-extensions/pom.xml index d978843e58a..126eed783ee 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.223-SNAPSHOT + 3.0.227-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 e5eea693328..744e3bf415b 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.complex.policy.decision.point - 3.0.223-SNAPSHOT + 3.0.227-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 44dde59eff6..c9814c66d58 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.decision.point - 3.0.223-SNAPSHOT + 3.0.227-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 7d381b64bbf..c12941f3e52 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml @@ -11,7 +11,7 @@ 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.information.point - 3.0.223-SNAPSHOT + 3.0.227-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 e800cb26185..a0cab52da63 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.mgt.common - 3.0.223-SNAPSHOT + 3.0.227-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 f2064bbc26b..b5bc4dc5d03 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.mgt.core - 3.0.223-SNAPSHOT + 3.0.227-SNAPSHOT bundle WSO2 Carbon - Policy Management Core WSO2 Carbon - Policy Management Core diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/PolicyManagerServiceImplTest.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/PolicyManagerServiceImplTest.java index 0f173931283..cbc3f5c0bb7 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/PolicyManagerServiceImplTest.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/PolicyManagerServiceImplTest.java @@ -36,6 +36,7 @@ import org.wso2.carbon.device.mgt.common.policy.mgt.ProfileFeature; import org.wso2.carbon.device.mgt.common.policy.mgt.monitor.ComplianceFeature; import org.wso2.carbon.device.mgt.common.policy.mgt.monitor.NonComplianceData; import org.wso2.carbon.device.mgt.common.policy.mgt.monitor.PolicyComplianceException; +import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; import org.wso2.carbon.device.mgt.core.internal.DeviceManagementDataHolder; import org.wso2.carbon.device.mgt.core.operation.mgt.OperationManagerImpl; import org.wso2.carbon.device.mgt.core.operation.mgt.PolicyOperation; @@ -86,9 +87,9 @@ public class PolicyManagerServiceImplTest extends BasePolicyManagementDAOTest { public void addPolicy() throws DeviceManagementException, GroupManagementException, PolicyManagementException { int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); policyManagerService = new PolicyManagerServiceImpl(); - - deviceMgtService.registerDeviceType(new TypeXDeviceManagementService(DEVICE_TYPE_A)); - operationManager = new OperationManagerImpl(DEVICE_TYPE_A); + DeviceManagementService deviceManagementService = new TypeXDeviceManagementService(DEVICE_TYPE_A); + deviceMgtService.registerDeviceType(deviceManagementService); + operationManager = new OperationManagerImpl(DEVICE_TYPE_A, deviceManagementService); enrollDevice(DEVICE1, DEVICE_TYPE_A); createDeviceGroup(GROUP1); DeviceGroup group1 = groupMgtService.getGroup(GROUP1); diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/mgt/impl/FeatureManagerImplTest.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/mgt/impl/FeatureManagerImplTest.java index 7a0a756fafd..9d2e67be3a3 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/mgt/impl/FeatureManagerImplTest.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/mgt/impl/FeatureManagerImplTest.java @@ -31,6 +31,7 @@ import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroup; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManager; import org.wso2.carbon.device.mgt.common.policy.mgt.Profile; import org.wso2.carbon.device.mgt.common.policy.mgt.ProfileFeature; +import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; import org.wso2.carbon.device.mgt.core.operation.mgt.OperationManagerImpl; import org.wso2.carbon.policy.mgt.common.FeatureManagementException; import org.wso2.carbon.policy.mgt.core.BasePolicyManagementDAOTest; @@ -77,9 +78,9 @@ public class FeatureManagerImplTest extends BasePolicyManagementDAOTest { super.initializeServices(); int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); - - deviceMgtService.registerDeviceType(new TypeXDeviceManagementService(DEVICE_TYPE_D)); - operationManager = new OperationManagerImpl(DEVICE_TYPE_D); + DeviceManagementService deviceManagementService = new TypeXDeviceManagementService(DEVICE_TYPE_D); + deviceMgtService.registerDeviceType(deviceManagementService); + operationManager = new OperationManagerImpl(DEVICE_TYPE_D, deviceManagementService); featureManager = new FeatureManagerImpl(); enrollDevice(DEVICE4, DEVICE_TYPE_D); diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImplTest.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImplTest.java index 5d33c919c4b..6da2d3ca0ac 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImplTest.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImplTest.java @@ -22,6 +22,7 @@ import org.wso2.carbon.device.mgt.common.policy.mgt.Profile; import org.wso2.carbon.device.mgt.common.policy.mgt.ProfileFeature; 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.common.spi.DeviceManagementService; import org.wso2.carbon.device.mgt.core.operation.mgt.OperationManagerImpl; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; import org.wso2.carbon.policy.mgt.core.BasePolicyManagementDAOTest; @@ -83,8 +84,9 @@ public class MonitoringManagerImplTest extends BasePolicyManagementDAOTest{ int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); - deviceMgtService.registerDeviceType(new TypeXDeviceManagementService(DEVICE_TYPE_E)); - operationManager = new OperationManagerImpl(DEVICE_TYPE_E); + DeviceManagementService deviceManagementService = new TypeXDeviceManagementService(DEVICE_TYPE_E); + deviceMgtService.registerDeviceType(deviceManagementService); + operationManager = new OperationManagerImpl(DEVICE_TYPE_E, deviceManagementService); featureManager = new FeatureManagerImpl(); monitoringManager = new MonitoringManagerImpl(); policyManager = new PolicyManagerImpl(); diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/mgt/impl/ProfileManagerImplTest.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/mgt/impl/ProfileManagerImplTest.java index 622a3e04141..23898f4a523 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/mgt/impl/ProfileManagerImplTest.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/mgt/impl/ProfileManagerImplTest.java @@ -30,6 +30,7 @@ import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroup; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManager; import org.wso2.carbon.device.mgt.common.policy.mgt.Profile; import org.wso2.carbon.device.mgt.common.policy.mgt.ProfileFeature; +import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; import org.wso2.carbon.device.mgt.core.operation.mgt.OperationManagerImpl; import org.wso2.carbon.policy.mgt.common.ProfileManagementException; import org.wso2.carbon.policy.mgt.core.BasePolicyManagementDAOTest; @@ -71,8 +72,9 @@ public class ProfileManagerImplTest extends BasePolicyManagementDAOTest { public void initialize() throws Exception { log.info("Initializing policy manager tests"); super.initializeServices(); - deviceMgtService.registerDeviceType(new TypeXDeviceManagementService(DEVICE_TYPE_C)); - operationManager = new OperationManagerImpl(DEVICE_TYPE_C); + DeviceManagementService deviceManagementService = new TypeXDeviceManagementService(DEVICE_TYPE_C); + deviceMgtService.registerDeviceType(deviceManagementService); + operationManager = new OperationManagerImpl(DEVICE_TYPE_C, deviceManagementService); enrollDevice(DEVICE3, DEVICE_TYPE_C); createDeviceGroup(GROUP3); DeviceGroup group1 = groupMgtService.getGroup(GROUP3); diff --git a/components/policy-mgt/pom.xml b/components/policy-mgt/pom.xml index 779551d66c8..14b330280e5 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../../pom.xml 4.0.0 policy-mgt - 3.0.223-SNAPSHOT + 3.0.227-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 13fe126bb84..c05f5e3bd77 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.223-SNAPSHOT + 3.0.227-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 43cb5b6cabf..f8d6befa95a 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.webapp.authenticator.framework - 3.0.223-SNAPSHOT + 3.0.227-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 1a1451f9228..c078817ac82 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt webapp-authenticator-framework - 3.0.223-SNAPSHOT + 3.0.227-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 2f622fa39f5..af8d9efc1e5 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.application.extension.feature pom - 3.0.223-SNAPSHOT + 3.0.227-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 8228c79cd3c..e07e7cc265c 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.handler.server.feature pom - 3.0.223-SNAPSHOT + 3.0.227-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 4bc8c08a479..f65876fe333 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.integration.client.feature - 3.0.223-SNAPSHOT + 3.0.227-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 f29527ef2ac..ee95e528f3f 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.webapp.publisher.feature pom - 3.0.223-SNAPSHOT + 3.0.227-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 f092f70ddec..ae0b55150e6 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt apimgt-extensions-feature - 3.0.223-SNAPSHOT + 3.0.227-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 1c9d92315bf..755ad05dfd3 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.223-SNAPSHOT + 3.0.227-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 8fde9cdf9b5..3d5228f8a67 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.223-SNAPSHOT + 3.0.227-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 0fc6c8066e9..e90525c9180 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.certificate.mgt.server.feature pom - 3.0.223-SNAPSHOT + 3.0.227-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 30379bbd7b8..401e4b38ef5 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt certificate-mgt-feature - 3.0.223-SNAPSHOT + 3.0.227-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 2026ff46032..64142de9fc0 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature pom - 3.0.223-SNAPSHOT + 3.0.227-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 43dcca181f6..f9c67add264 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature pom - 3.0.223-SNAPSHOT + 3.0.227-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 b7065e1a268..e9aec51e657 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature pom - 3.0.223-SNAPSHOT + 3.0.227-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 4ca888e1319..b183612a859 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature pom - 3.0.223-SNAPSHOT + 3.0.227-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 7798d1c8567..4309c5f499e 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature pom - 3.0.223-SNAPSHOT + 3.0.227-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 a6fe0c85b6a..e1431233e29 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.223-SNAPSHOT + 3.0.227-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 2e8cd1f349a..7ff5f88d029 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.analytics.data.publisher.feature pom - 3.0.223-SNAPSHOT + 3.0.227-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 46e42e61ae9..2ef0fdf7056 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.223-SNAPSHOT + 3.0.227-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 a10d7b689b2..4bd15940051 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 - 3.0.223-SNAPSHOT + 3.0.227-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 a2cd6fd4642..2fa6009a3be 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.feature pom - 3.0.223-SNAPSHOT + 3.0.227-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 49b707b616d..c03e28c1198 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.223-SNAPSHOT + 3.0.227-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 917bb74a1a6..5b9e1ccca5d 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.server.feature pom - 3.0.223-SNAPSHOT + 3.0.227-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 ae168bf7b64..406353547cb 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml diff --git a/features/device-mgt/pom.xml b/features/device-mgt/pom.xml index 19b7912f797..e282750988a 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.223-SNAPSHOT + 3.0.227-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 6fea9475878..9e90a8f52ac 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.email.sender.feature pom - 3.0.223-SNAPSHOT + 3.0.227-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 9b9fc46aadf..69948d89998 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt email-sender-feature - 3.0.223-SNAPSHOT + 3.0.227-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 2038a712755..4f8c3ba5e86 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.identity.jwt.client.extension.feature pom - 3.0.223-SNAPSHOT + 3.0.227-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 bee27657d00..8651075c7a9 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../../pom.xml 4.0.0 jwt-client-feature - 3.0.223-SNAPSHOT + 3.0.227-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 92878aa2ea2..7ad7a8d7601 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.oauth.extensions.feature pom - 3.0.223-SNAPSHOT + 3.0.227-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 50d63fd5252..57e55317981 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt oauth-extensions-feature - 3.0.223-SNAPSHOT + 3.0.227-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 977d81de75a..121d66cdc6c 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.policy.mgt.server.feature pom - 3.0.223-SNAPSHOT + 3.0.227-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 e379796886b..de4a35adfb3 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt policy-mgt-feature - 3.0.223-SNAPSHOT + 3.0.227-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 59e1944a711..b2592ace5e7 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.webapp.authenticator.framework.server.feature pom - 3.0.223-SNAPSHOT + 3.0.227-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 1b27b8d2717..e4f1e83212e 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.223-SNAPSHOT + 3.0.227-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt webapp-authenticator-framework-feature - 3.0.223-SNAPSHOT + 3.0.227-SNAPSHOT pom WSO2 Carbon - Webapp Authenticator Framework Feature http://wso2.org diff --git a/pom.xml b/pom.xml index 49b98205940..6d288dc4bbd 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt pom - 3.0.223-SNAPSHOT + 3.0.227-SNAPSHOT WSO2 Carbon - Device Management - Parent http://wso2.org WSO2 Connected Device Manager Components @@ -1875,7 +1875,7 @@ 1.2.11.wso2v10 - 3.0.223-SNAPSHOT + 3.0.227-SNAPSHOT 4.4.8