diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 75785e8b75..2e6839b906 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,18 +1,17 @@ -image: maven:latest +image: shinyay/docker-mvn-jdk8:3.5.0 variables: - MAVEN_CLI_OPTS: "-s .m2/settings.xml --batch-mode" + MAVEN_CLI_OPTS: "-s .m2/settings.xml --batch-mode --errors --show-version" MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository" cache: paths: - .m2/repository/ - - target/ build: stage: build script: - - mvn $MAVEN_CLI_OPTS compile + - mvn $MAVEN_CLI_OPTS clean install -Dmaven.test.skip=true test: stage: test 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 14bb357c4f..8f5387b87b 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.annotations - 3.2.1-SNAPSHOT + 3.2.2-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 f0d6a333e3..3d0f46b92b 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 - 3.2.1-SNAPSHOT + 3.2.2-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 bf4e8c2814..496deb894a 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 - 3.2.1-SNAPSHOT + 3.2.2-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 7d2cad0a90..58ee9e50cd 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.handlers - 3.2.1-SNAPSHOT + 3.2.2-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 4f10905bc2..1241c92d33 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.integration.client - 3.2.1-SNAPSHOT + 3.2.2-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 17019a7fdc..02bd1656b9 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.integration.generated.client - 3.2.1-SNAPSHOT + 3.2.2-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 d8fd7321d4..0c30bf4f4a 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.webapp.publisher - 3.2.1-SNAPSHOT + 3.2.2-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 f43c13a9b8..374ddfdad7 100644 --- a/components/apimgt-extensions/pom.xml +++ b/components/apimgt-extensions/pom.xml @@ -22,13 +22,13 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../../pom.xml 4.0.0 apimgt-extensions - 3.2.1-SNAPSHOT + 3.2.2-SNAPSHOT pom WSO2 Carbon - API Management Extensions Component http://wso2.org diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Application.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Application.java index 87daa4eb5b..0f4d59bb7c 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Application.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Application.java @@ -45,7 +45,7 @@ public class Application { @ApiModelProperty(name = "type", value = "Type of the application", required = true, - example = "Mobile, Web, Web Clip etc") + example = "ENTERPRISE, PUBLIC, WEB, WEB_CLIP etc") private String type; @ApiModelProperty(name = "subType", diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ApplicationManagerImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ApplicationManagerImpl.java index cfe68cb7f7..ddb29961c0 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ApplicationManagerImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ApplicationManagerImpl.java @@ -111,9 +111,8 @@ public class ApplicationManagerImpl implements ApplicationManager { List applicationReleases = new ArrayList<>(); try { ConnectionManagerUtil.beginDBTransaction(); - MAMDeviceConnectorImpl mamDeviceConnector = new MAMDeviceConnectorImpl(); // Getting the device type details to get device type ID for internal mappings - deviceType = mamDeviceConnector.getDeviceManagementService().getDeviceType(application.getDeviceType()); + deviceType = Util.getDeviceManagementService().getDeviceType(application.getDeviceType()); if (deviceType == null) { log.error("Device type is not matched with application type"); @@ -836,7 +835,6 @@ public class ApplicationManagerImpl implements ApplicationManager { try { ConnectionManagerUtil.openDBConnection(); applicationRelease = getAppReleaseIfExists(appId, uuid); - Application application = getApplicationById(appId, null); List deviceTypes = Util.getDeviceManagementService().getDeviceTypes(); @@ -923,8 +921,7 @@ public class ApplicationManagerImpl implements ApplicationManager { + releaseUuid); } - lifecycleState.setNextStates(new ArrayList<>(getLifecycleManagementService(). - getNextLifecycleStates(lifecycleState.getCurrentState()))); + lifecycleState.setNextStates(new ArrayList<>(lifecycleStateManger.getNextLifecycleStates(lifecycleState.getCurrentState()))); } catch (ApplicationManagementException e) { throw new ApplicationManagementException("Failed to get application and application management", e); @@ -964,8 +961,7 @@ public class ApplicationManagerImpl implements ApplicationManager { state.setUpdatedBy(userName); if (state.getCurrentState() != null && state.getPreviousState() != null) { - if (getLifecycleManagementService() - .isValidStateChange(state.getPreviousState(), state.getCurrentState())) { + if (lifecycleStateManger.isValidStateChange(state.getPreviousState(), state.getCurrentState())) { //todo if current state of the adding lifecycle state is PUBLISHED, need to check whether is there //todo any other application release in PUBLISHED state for the application( i.e for the appid) this.lifecycleStateDAO.addLifecycleState(state, applicationId, releaseUuid, tenantId); @@ -1088,15 +1084,4 @@ public class ApplicationManagerImpl implements ApplicationManager { return list; } - public LifecycleStateManger getLifecycleManagementService() { - PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); - LifecycleStateManger deviceManagementProviderService = - (LifecycleStateManger) ctx.getOSGiService(LifecycleStateManger.class, null); - if (deviceManagementProviderService == null) { - String msg = "DeviceImpl Management provider service has not initialized."; - log.error(msg); - throw new IllegalStateException(msg); - } - return deviceManagementProviderService; - } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.jsx index 4a3d606eff..2df6805a53 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.jsx @@ -68,6 +68,7 @@ class Base extends Component { render() { if (this.state.user !== null) { + console.log(sessionStorage); return (
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 c69f1c4d68..4bc37cd31f 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.2.1-SNAPSHOT + 3.2.2-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 b35a3f2122..03126821ea 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.2.1-SNAPSHOT + 3.2.2-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 01baa16e1a..c8ee274238 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.2.1-SNAPSHOT + 3.2.2-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 f79b64055c..50e263c21d 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.certificate.mgt.core - 3.2.1-SNAPSHOT + 3.2.2-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 05b21e441f..11b3d067de 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml diff --git a/components/certificate-mgt/pom.xml b/components/certificate-mgt/pom.xml index 7414ce94c9..b179cec3d8 100644 --- a/components/certificate-mgt/pom.xml +++ b/components/certificate-mgt/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt certificate-mgt - 3.2.1-SNAPSHOT + 3.2.2-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 f354fdfe76..0cc3131ba6 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.2.1-SNAPSHOT + 3.2.2-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 ea82cf7176..00d8b1742a 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.2.1-SNAPSHOT + 3.2.2-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 070d0272e2..e602b9624e 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml index b872de83bf..77a1068fb4 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.2.1-SNAPSHOT + 3.2.2-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 0474146584..29a78f4ac0 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.2.1-SNAPSHOT + 3.2.2-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 055a45d153..f79d79b492 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/pom.xml b/components/device-mgt-extensions/pom.xml index 9baa22ad80..13714047a0 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.2.1-SNAPSHOT + 3.2.2-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 4516c1fe8f..18f0b7b855 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/pom.xml index c7de451372..4b31a9287a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/pom.xml @@ -20,7 +20,7 @@ device-mgt org.wso2.carbon.devicemgt - 3.2.1-SNAPSHOT + 3.2.2-SNAPSHOT 4.0.0 diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/src/main/java/org/wso2/carbon/device/mgt/analytics/wsproxy/inbound/SubscriptionEndpoint.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/src/main/java/org/wso2/carbon/device/mgt/analytics/wsproxy/inbound/SubscriptionEndpoint.java index 14db789fa9..b556949ae1 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/src/main/java/org/wso2/carbon/device/mgt/analytics/wsproxy/inbound/SubscriptionEndpoint.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/src/main/java/org/wso2/carbon/device/mgt/analytics/wsproxy/inbound/SubscriptionEndpoint.java @@ -49,7 +49,7 @@ public class SubscriptionEndpoint { * * @param session - Users registered session. */ - public void onOpen(Session session) { + void onOpen(Session session) { if (log.isDebugEnabled()) { log.debug("WebSocket opened, for Session id: " + session.getId()); } @@ -68,8 +68,7 @@ public class SubscriptionEndpoint { endpoint += "/"; } endpoint += session.getRequestURI().getSchemeSpecificPart().replace("secured-websocket-proxy",""); - AnalyticsClient analyticsClient = new AnalyticsClient(session); - analyticsClient.connectClient(new URI(endpoint)); + AnalyticsClient analyticsClient = new AnalyticsClient(session, new URI(endpoint)); analyticsClients.add(analyticsClient); } catch (URISyntaxException e) { log.error("Unable to create URL from: " + endpoint, e); @@ -121,7 +120,7 @@ public class SubscriptionEndpoint { * @param session - Users registered session. * @param message - Status code for web-socket close. */ - public void onMessage(Session session, String message) { + void onMessage(Session session, String message) { for (AnalyticsClient analyticsClient : analyticsClientsMap.get(session.getId())) { if (analyticsClient != null) { analyticsClient.sendMessage(message); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/src/main/java/org/wso2/carbon/device/mgt/analytics/wsproxy/outbound/AnalyticsClient.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/src/main/java/org/wso2/carbon/device/mgt/analytics/wsproxy/outbound/AnalyticsClient.java index 7bfd480288..96e6d6974a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/src/main/java/org/wso2/carbon/device/mgt/analytics/wsproxy/outbound/AnalyticsClient.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/src/main/java/org/wso2/carbon/device/mgt/analytics/wsproxy/outbound/AnalyticsClient.java @@ -42,24 +42,18 @@ public class AnalyticsClient { private static final Log log = LogFactory.getLog(AnalyticsClient.class); - private WebSocketContainer container; - private Session analyticsSession = null; - private Session clientSession; + private final Session analyticsSession; + private final Session clientSession; /** * Create {@link AnalyticsClient} instance. */ - public AnalyticsClient(Session clientSession) { - container = ContainerProvider.getWebSocketContainer(); + public AnalyticsClient(Session clientSession, URI endpointURI) throws WSProxyException { + WebSocketContainer container = ContainerProvider.getWebSocketContainer(); this.clientSession = clientSession; - } - /** - * Create web socket client connection using {@link WebSocketContainer}. - */ - public void connectClient(URI endpointURI) throws WSProxyException { try { - analyticsSession = container.connectToServer(this, endpointURI); + this.analyticsSession = container.connectToServer(this, endpointURI); } catch (DeploymentException | IOException e) { String msg = "Error occurred while connecting to remote endpoint " + endpointURI.toString(); log.error(msg, e); @@ -79,7 +73,6 @@ public class AnalyticsClient { log.debug("Closing web socket session: '" + userSession.getId() + "'. Code: " + reason.getCloseCode().toString() + " Reason: " + reason.getReasonPhrase()); } - this.analyticsSession = null; } /** @@ -91,7 +84,16 @@ public class AnalyticsClient { */ @OnMessage public void onMessage(String message) { - this.clientSession.getAsyncRemote().sendText(message); + synchronized (this.clientSession) { + try { + this.clientSession.getBasicRemote().sendText(message); + } catch (IOException e) { + log.warn("Sending message to client failed due to " + e.getMessage()); + if (log.isDebugEnabled()) { + log.debug("Full stack trace:", e); + } + } + } } /** @@ -100,14 +102,23 @@ public class AnalyticsClient { * @param message the message which is going to send. */ public void sendMessage(String message) { - this.analyticsSession.getAsyncRemote().sendText(message); + synchronized (this.analyticsSession) { + try { + this.analyticsSession.getBasicRemote().sendText(message); + } catch (IOException e) { + log.warn("Sending message to analytics failed due to " + e.getMessage()); + if (log.isDebugEnabled()) { + log.debug("Full stack trace:", e); + } + } + } } /** * Close current connection. */ public void closeConnection(CloseReason closeReason) throws WSProxyException { - if (this.analyticsSession != null) { + if (this.analyticsSession.isOpen()) { try { this.analyticsSession.close(closeReason); } catch (IOException e) { @@ -115,6 +126,8 @@ public class AnalyticsClient { log.error(msg, e); throw new WSProxyException(msg, e); } + } else { + log.warn("Analytics session '" + this.analyticsSession.getId() + "' is already closed"); } } } 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 1cf54fe11f..8d1321e2e6 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/UserManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/UserManagementService.java index d0924d96c2..12630fcd68 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/UserManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/UserManagementService.java @@ -529,6 +529,92 @@ public interface UserManagementService { defaultValue = "5") @QueryParam("limit") int limit); + @GET + @Path(("/search")) + @ApiOperation( + produces = MediaType.APPLICATION_JSON, + httpMethod = "GET", + value = "Filter details of users based on the given claims", + notes = "You are able to manage users in WSO2 IoTS by adding, updating and removing users. If you wish to" + + " filter and get a list of users registered with WSO2 IoTS, you can do so using this REST API", + tags = "User Management", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = Constants.SCOPE, value = "perm:users:user-details") + }) + } + ) + @ApiResponses(value = { + @ApiResponse( + code = 200, + message = "OK. \n Successfully fetched the list of users registered with WSO2 IoTS.", + response = BasicUserInfoList.class, + responseHeaders = { + @ResponseHeader( + name = "Content-Type", + description = "The content type of the body"), + @ResponseHeader( + name = "ETag", + description = "Entity Tag of the response resource.\n" + + "Used by caches, or in conditional requests."), + @ResponseHeader( + name = "Last-Modified", + description = "Date and time the resource was last modified.\n" + + "Used by caches, or in conditional requests."), + }), + @ApiResponse( + code = 304, + message = "Not Modified. \n Empty body because the client already has the latest version of " + + "the requested resource.\n"), + @ApiResponse( + code = 406, + message = "Not Acceptable.\n The requested media type is not supported", + response = ErrorResponse.class), + @ApiResponse( + code = 500, + message = "Internal Server Error. \n Server error occurred while fetching users.", + response = ErrorResponse.class) + }) + Response getUsers( + @ApiParam( + name = "username", + value = "Username of the user", + required = false + ) + @QueryParam("username") String username, + @ApiParam( + name = "firstName", + value = "First Name of the user", + required = false + ) + @QueryParam("firstName") String firstName, + @ApiParam( + name = "lastName", + value = "Last Name of the user", + required = false + ) + @QueryParam("lastName")String lastName, + @ApiParam( + name = "emailAddress", + value = "Email Address of the user", + required = false + ) + @QueryParam("emailAddress")String emailAddress, + @HeaderParam("If-Modified-Since") String timestamp, + @ApiParam( + name = "offset", + value = "The starting pagination index for the complete list of qualified items.", + required = false, + defaultValue = "0") + @QueryParam("offset") int offset, + @ApiParam( + name = "limit", + value = "Provide how many user details you require from the starting pagination index/offset.", + required = false, + defaultValue = "5") + @QueryParam("limit") int limit + ); + @GET @Path("/count") @ApiOperation( diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GeoLocationBasedServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GeoLocationBasedServiceImpl.java index a8811e5418..add4acef72 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GeoLocationBasedServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GeoLocationBasedServiceImpl.java @@ -100,7 +100,7 @@ public class GeoLocationBasedServiceImpl implements GeoLocationBasedService { CarbonContext.getThreadLocalCarbonContext().getUsername()); try { - String tenantDomain = MultitenantUtils.getTenantDomain(authorizedUser); + String tenantDomain = CarbonContext.getThreadLocalCarbonContext().getTenantDomain(); int tenantId = DeviceMgtAPIUtils.getRealmService().getTenantManager().getTenantId(tenantDomain); AnalyticsDataAPI analyticsDataAPI = DeviceMgtAPIUtils.getAnalyticsDataAPI(); List searchResults = analyticsDataAPI.search(tenantId, tableName, query, diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/UserManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/UserManagementServiceImpl.java index 053d09f77c..c31bc3b523 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/UserManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/UserManagementServiceImpl.java @@ -426,6 +426,104 @@ public class UserManagementServiceImpl implements UserManagementService { } } + @GET + @Path("/search") + @Override + public Response getUsers(@QueryParam("username") String username, @QueryParam("firstName") String firstName, + @QueryParam("lastName") String lastName, @QueryParam("emailAddress") String emailAddress, + @HeaderParam("If-Modified-Since") String timestamp, @QueryParam("offset") int offset, + @QueryParam("limit") int limit) { + + if (RequestValidationUtil.isNonFilterRequest(username,firstName, lastName, emailAddress)) { + return getUsers(null, timestamp, offset, limit); + } + + RequestValidationUtil.validatePaginationParameters(offset, limit); + + if(log.isDebugEnabled()) { + log.debug("Filtering users - filter: {username: " + username +", firstName: " + firstName + ", lastName: " + + lastName + ", emailAddress: " + emailAddress + "}"); + } + + if (limit == 0) { + limit = Constants.DEFAULT_PAGE_LIMIT; + } + + List filteredUserList = new ArrayList<>(); + List commonUsers = null, tempList; + + try { + if (StringUtils.isNotEmpty(username)) { + commonUsers = getUserList(null, username); + } + + if (!skipSearch(commonUsers) && StringUtils.isNotEmpty(firstName)) { + tempList = getUserList(Constants.USER_CLAIM_FIRST_NAME, firstName); + if (commonUsers == null) { + commonUsers = tempList; + } else { + commonUsers.retainAll(tempList); + } + } + + if (!skipSearch(commonUsers) && StringUtils.isNotEmpty(lastName)) { + tempList = getUserList(Constants.USER_CLAIM_LAST_NAME, lastName); + if (commonUsers == null || commonUsers.size() == 0) { + commonUsers = tempList; + } else { + commonUsers.retainAll(tempList); + } + } + + if (!skipSearch(commonUsers) && StringUtils.isNotEmpty(emailAddress)) { + tempList = getUserList(Constants.USER_CLAIM_EMAIL_ADDRESS, emailAddress); + if (commonUsers == null || commonUsers.size() == 0) { + commonUsers = tempList; + } else { + commonUsers.retainAll(tempList); + } + } + + BasicUserInfo basicUserInfo; + if (commonUsers != null) { + for (String user : commonUsers) { + basicUserInfo = new BasicUserInfo(); + basicUserInfo.setUsername(user); + basicUserInfo.setEmailAddress(getClaimValue(user, Constants.USER_CLAIM_EMAIL_ADDRESS)); + basicUserInfo.setFirstname(getClaimValue(user, Constants.USER_CLAIM_FIRST_NAME)); + basicUserInfo.setLastname(getClaimValue(user, Constants.USER_CLAIM_LAST_NAME)); + filteredUserList.add(basicUserInfo); + } + } + + int toIndex = offset + limit; + int listSize = filteredUserList.size(); + int lastIndex = listSize - 1; + + List offsetList; + if (offset <= lastIndex) { + if (toIndex <= listSize) { + offsetList = filteredUserList.subList(offset, toIndex); + } else { + offsetList = filteredUserList.subList(offset, listSize); + } + } else { + offsetList = new ArrayList<>(); + } + + BasicUserInfoList result = new BasicUserInfoList(); + result.setList(offsetList); + result.setCount(commonUsers != null ? commonUsers.size() : 0); + + return Response.status(Response.Status.OK).entity(result).build(); + } catch (UserStoreException e) { + String msg = "Error occurred while retrieving the list of users."; + log.error(msg, e); + return Response.serverError().entity( + new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build(); + } + } + @GET @Path("/count") @Override @@ -700,4 +798,47 @@ public class UserManagementServiceImpl implements UserManagementService { return DeviceManagementConstants.EmailAttributes.DEFAULT_ENROLLMENT_TEMPLATE; } + /** + * Searches users which matches a given filter based on a claim + * + * @param claim the claim value to apply the filter. If null users will be filtered by username. + * @param filter the search query. + * @return List of users which matches. + * @throws UserStoreException If unable to search users. + */ + private ArrayList getUserList(String claim, String filter) throws UserStoreException { + String defaultFilter = "*"; + + org.wso2.carbon.user.core.UserStoreManager userStoreManager = + (org.wso2.carbon.user.core.UserStoreManager) DeviceMgtAPIUtils.getUserStoreManager(); + + String appliedFilter = filter + defaultFilter; + + String[] users; + if (log.isDebugEnabled()) { + log.debug("Searching Users - claim: " + claim + " filter: " + appliedFilter); + } + if (StringUtils.isEmpty(claim)) { + users = userStoreManager.listUsers(appliedFilter, -1); + } else { + users = userStoreManager.getUserList(claim, appliedFilter, null); + } + + if (log.isDebugEnabled()) { + log.debug("Returned user count: " + users.length); + } + + return new ArrayList<>(Arrays.asList(users)); + } + + /** + * User search provides an AND search result and if either of the filter returns an empty set of users, there is no + * need to carry on the search further. This method decides whether to carry on the search or not. + * + * @param commonUsers current filtered user list. + * @return true if further search is needed. + */ + private boolean skipSearch(List commonUsers) { + return commonUsers != null && commonUsers.size() == 0; + } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/RequestValidationUtil.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/RequestValidationUtil.java index 7c1b5dc86a..3936341384 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/RequestValidationUtil.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/RequestValidationUtil.java @@ -18,6 +18,7 @@ */ package org.wso2.carbon.device.mgt.jaxrs.service.impl.util; +import org.apache.commons.lang.StringUtils; import org.wso2.carbon.device.mgt.jaxrs.beans.Scope; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; @@ -353,4 +354,9 @@ public class RequestValidationUtil { } } + public static boolean isNonFilterRequest(String username, String firstName, String lastName, String emailAddress) { + return StringUtils.isEmpty(username) && StringUtils.isEmpty(firstName) && StringUtils.isEmpty(lastName) + && StringUtils.isEmpty(emailAddress); + } + } 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 410c859a91..03cf504ccd 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/Operation.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/Operation.java index 7e3b2fe7c6..b3b863a5f3 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/Operation.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/Operation.java @@ -37,7 +37,7 @@ public class Operation implements Serializable { } public enum Status { - IN_PROGRESS, PENDING, COMPLETED, ERROR, REPEATED + IN_PROGRESS, PENDING, COMPLETED, ERROR, REPEATED, NOTNOW } public enum Control { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/OperationManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/OperationManager.java index d85108e960..78bfdec53f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/OperationManager.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/OperationManager.java @@ -76,6 +76,9 @@ public interface OperationManager { */ List getPendingOperations(DeviceIdentifier deviceId) throws OperationManagementException; + Operation getNextPendingOperation(DeviceIdentifier deviceId, long notNowOperationFrequency) + throws OperationManagementException; + Operation getNextPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException; void updateOperation(DeviceIdentifier deviceId, Operation operation) throws OperationManagementException; 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 5fa19ebc41..e76ca61985 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.2.1-SNAPSHOT + 3.2.2-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 627ea432a9..44b740a097 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 @@ -321,7 +321,7 @@ public class DeviceManagementPluginRepository implements DeviceManagerStartupLis getDeviceTaskManagerService(); OperationMonitoringTaskConfig operationMonitoringTaskConfig = deviceManagementService. getOperationMonitoringConfig(); - if (operationMonitoringTaskConfig != null) { + if (operationMonitoringTaskConfig != null && operationMonitoringTaskConfig.isEnabled()) { deviceTaskManagerService.stopTask(deviceManagementService.getType(), deviceManagementService.getOperationMonitoringConfig()); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dto/operation/mgt/Operation.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dto/operation/mgt/Operation.java index 1b34b5d02b..03acfa9a11 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dto/operation/mgt/Operation.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dto/operation/mgt/Operation.java @@ -23,12 +23,14 @@ import java.util.Properties; public class Operation implements Serializable { + private static final long serialVersionUID = -353614864628915060L; + public enum Type { CONFIG, MESSAGE, INFO, COMMAND, PROFILE , POLICY } public enum Status { - IN_PROGRESS, PENDING, COMPLETED, ERROR, REPEATED + IN_PROGRESS, PENDING, COMPLETED, ERROR, REPEATED, NOTNOW } public enum Control { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/geo/service/GeoLocationProviderServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/geo/service/GeoLocationProviderServiceImpl.java index c5bcec41c2..ccb0317a38 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/geo/service/GeoLocationProviderServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/geo/service/GeoLocationProviderServiceImpl.java @@ -51,6 +51,7 @@ import org.wso2.carbon.identity.jwt.client.extension.service.JWTClientManagerSer import org.wso2.carbon.registry.api.Registry; import org.wso2.carbon.registry.api.RegistryException; import org.wso2.carbon.registry.api.Resource; +import org.wso2.carbon.stratos.common.util.ClaimsMgtUtil; import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLContext; @@ -428,6 +429,9 @@ public class GeoLocationProviderServiceImpl implements GeoLocationProviderServic } catch (JWTClientException e) { throw new GeoLocationBasedServiceException( "JWT token creation failed while " + action + " geo alert '" + alertType, e); + } catch (Exception e) { + throw new GeoLocationBasedServiceException( + "Error occurred while " + action + " geo alert '" + alertType, e); } finally { cleanup(eventprocessorStub); } @@ -541,6 +545,9 @@ public class GeoLocationProviderServiceImpl implements GeoLocationProviderServic throw new GeoLocationBasedServiceException( "JWT token creation failed while " + action + " geo alert '" + alertType + "' for " + identifier.getType() + " device with id:" + identifier.getId(), e); + } catch (Exception e) { + throw new GeoLocationBasedServiceException( + "Error occurred while " + action + " geo alert '" + alertType, e); } finally { cleanup(eventprocessorStub); } @@ -646,6 +653,9 @@ public class GeoLocationProviderServiceImpl implements GeoLocationProviderServic executionPlanName + " for " + identifier.getType() + " device with id:" + identifier.getId(), e ); + } catch (Exception e) { + throw new GeoLocationBasedServiceException( + "Error occurred while removing geo alert '" + alertType, e); } finally { cleanup(eventprocessorStub); } @@ -672,6 +682,9 @@ public class GeoLocationProviderServiceImpl implements GeoLocationProviderServic "JWT token creation failed while removing geo alert '" + alertType + "': " + executionPlanName, e ); + } catch (Exception e) { + throw new GeoLocationBasedServiceException( + "Error occurred while removing geo alert '" + alertType, e); } finally { cleanup(eventprocessorStub); } @@ -702,14 +715,16 @@ public class GeoLocationProviderServiceImpl implements GeoLocationProviderServic } } - protected EventProcessorAdminServiceStub getEventProcessorAdminServiceStub() throws JWTClientException { + protected EventProcessorAdminServiceStub getEventProcessorAdminServiceStub() throws Exception { //send alert to event-processing String eventProcessorAdminServiceWSUrl = Utils.replaceSystemProperty(GeoServices.DAS_URL) + "/services/EventProcessorAdminService"; //Getting the tenant Domain + int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true); String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(); - String username = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername(); + String username = ClaimsMgtUtil.getAdminUserNameFromTenantId(DeviceManagementDataHolder.getInstance().getRealmService(), + tenantId); String tenantAdminUser = username + "@" + tenantDomain; try { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/DeviceTaskManagerServiceComponent.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/DeviceTaskManagerServiceComponent.java index ae39c83109..ee3072170c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/DeviceTaskManagerServiceComponent.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/DeviceTaskManagerServiceComponent.java @@ -89,7 +89,9 @@ public class DeviceTaskManagerServiceComponent { Map deviceConfigMap = DeviceMonitoringOperationDataHolder .getInstance().getOperationMonitoringConfigFromMap(); for (String platformType : new ArrayList<>(deviceConfigMap.keySet())) { - deviceTaskManagerService.startTask(platformType, deviceConfigMap.get(platformType)); + if (deviceConfigMap.get(platformType).isEnabled()){ + deviceTaskManagerService.startTask(platformType, deviceConfigMap.get(platformType)); + } deviceConfigMap.remove(platformType); } } 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 0e5306f6c2..89e541615c 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 @@ -64,6 +64,7 @@ import org.wso2.carbon.device.mgt.core.task.impl.DeviceTaskManagerImpl; import org.wso2.carbon.device.mgt.core.util.DeviceManagerUtil; import java.sql.SQLException; +import java.sql.Timestamp; import java.util.ArrayList; import java.util.Calendar; import java.util.Collections; @@ -251,7 +252,7 @@ public class OperationManagerImpl implements OperationManager { } OperationManagementDAOFactory.commitTransaction(); - if (isScheduled) { + if (!isScheduled) { for (Device device : authorizedDevices) { this.sendNotification(operation, device); } @@ -537,6 +538,13 @@ public class OperationManagerImpl implements OperationManager { @Override public Operation getNextPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException { + // setting notNowOperationFrequency to -1 to avoid picking notnow operations + return this.getNextPendingOperation(deviceId, -1); + } + + @Override + public Operation getNextPendingOperation(DeviceIdentifier deviceId, long notNowOperationFrequency) + throws OperationManagementException { if (log.isDebugEnabled()) { log.debug("device identifier id:[" + deviceId.getId() + "] type:[" + deviceId.getType() + "]"); } @@ -565,8 +573,32 @@ public class OperationManagerImpl implements OperationManager { try { OperationManagementDAOFactory.openConnection(); - org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation dtoOperation = operationDAO.getNextOperation( - enrolmentInfo.getId()); + org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation dtoOperation = null; + + // check whether notnow is set + if (notNowOperationFrequency > 0) { + // retrieve Notnow operations + dtoOperation = operationDAO.getNextOperation(enrolmentInfo.getId(), + org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Status.NOTNOW); + } + + if (dtoOperation != null) { + long currentTime = Calendar.getInstance().getTime().getTime(); + log.info("Current timestamp:" + currentTime); + long updatedTime = Timestamp.valueOf(dtoOperation.getReceivedTimeStamp()).getTime(); + log.info("Updated timestamp: " + updatedTime); + + // check if notnow frequency is met and set next pending operation if not, otherwise let notnow + // operation to proceed + if ((currentTime - updatedTime) < notNowOperationFrequency) { + dtoOperation = operationDAO.getNextOperation(enrolmentInfo.getId(), + org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Status.PENDING); + } + } else { + dtoOperation = operationDAO.getNextOperation(enrolmentInfo.getId(), + org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Status.PENDING); + } + if (dtoOperation != null) { if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.COMMAND.equals(dtoOperation.getType() )) { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/OperationDAO.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/OperationDAO.java index 67dcd517c2..81d47cfc85 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/OperationDAO.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/OperationDAO.java @@ -46,7 +46,7 @@ public interface OperationDAO { List getOperationsForDevice(int enrolmentId, PaginationRequest request) throws OperationManagementDAOException; - Operation getNextOperation(int enrolmentId) throws OperationManagementDAOException; + Operation getNextOperation(int enrolmentId, Operation.Status status) throws OperationManagementDAOException; boolean updateOperationStatus(int enrolmentId, int operationId,Operation.Status status) throws OperationManagementDAOException; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java index 900c41cf96..646f6a9051 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java @@ -1372,7 +1372,7 @@ public class GenericOperationDAOImpl implements OperationDAO { } @Override - public Operation getNextOperation(int enrolmentId) throws OperationManagementDAOException { + public Operation getNextOperation(int enrolmentId, Operation.Status status) throws OperationManagementDAOException { PreparedStatement stmt = null; ResultSet rs = null; try { @@ -1383,7 +1383,7 @@ public class GenericOperationDAOImpl implements OperationDAO { "WHERE dm.ENROLMENT_ID = ? AND dm.STATUS = ?) om ON o.ID = om.OPERATION_ID " + "ORDER BY om.UPDATED_TIMESTAMP ASC, om.ID ASC LIMIT 1"); stmt.setInt(1, enrolmentId); - stmt.setString(2, Operation.Status.PENDING.toString()); + stmt.setString(2, status.toString()); rs = stmt.executeQuery(); Operation operation = null; @@ -1392,11 +1392,7 @@ public class GenericOperationDAOImpl implements OperationDAO { operation.setType(OperationDAOUtil.getType(rs.getString("TYPE"))); operation.setId(rs.getInt("ID")); operation.setCreatedTimeStamp(rs.getTimestamp("CREATED_TIMESTAMP").toString()); -// if (rs.getTimestamp("RECEIVED_TIMESTAMP") == null) { -// operation.setReceivedTimeStamp(""); -// } else { -// operation.setReceivedTimeStamp(rs.getTimestamp("RECEIVED_TIMESTAMP").toString()); -// } + if (rs.getLong("UPDATED_TIMESTAMP") == 0) { operation.setReceivedTimeStamp(""); } else { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ProfileOperationDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ProfileOperationDAOImpl.java index 9223b3c030..769537b47b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ProfileOperationDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ProfileOperationDAOImpl.java @@ -53,7 +53,7 @@ public class ProfileOperationDAOImpl extends GenericOperationDAOImpl { bao = new ByteArrayOutputStream(); oos = new ObjectOutputStream(bao); - oos.writeObject(operation); + oos.writeObject(operation.getPayLoad()); stmt.setInt(1, operationId); stmt.setBytes(2, bao.toByteArray()); @@ -91,7 +91,8 @@ public class ProfileOperationDAOImpl extends GenericOperationDAOImpl { ObjectInputStream ois; try { Connection conn = OperationManagementDAOFactory.getConnection(); - String sql = "SELECT OPERATION_ID, ENABLED, OPERATION_DETAILS FROM DM_PROFILE_OPERATION WHERE OPERATION_ID=?"; + String sql = "SELECT o.ID, po.ENABLED, po.OPERATION_DETAILS, o.CREATED_TIMESTAMP, o.OPERATION_CODE " + + "FROM DM_PROFILE_OPERATION po INNER JOIN DM_OPERATION o ON po.OPERATION_ID = O.ID WHERE po.OPERATION_ID=?"; stmt = conn.prepareStatement(sql); stmt.setInt(1, id); @@ -99,9 +100,20 @@ public class ProfileOperationDAOImpl extends GenericOperationDAOImpl { if (rs.next()) { byte[] operationDetails = rs.getBytes("OPERATION_DETAILS"); + int oppId = rs.getInt("ID"); bais = new ByteArrayInputStream(operationDetails); ois = new ObjectInputStream(bais); - profileOperation = (ProfileOperation) ois.readObject(); + Object obj = ois.readObject(); + if(obj instanceof String){ + profileOperation = new ProfileOperation(); + profileOperation.setCode(rs.getString("OPERATION_CODE")); + profileOperation.setId(oppId); + profileOperation.setCreatedTimeStamp(rs.getString("CREATED_TIMESTAMP")); + profileOperation.setId(oppId); + profileOperation.setPayLoad(obj); + } else { + profileOperation = (ProfileOperation) obj; + } } } catch (IOException e) { throw new OperationManagementDAOException("IO Error occurred while de serialize the profile " + @@ -110,7 +122,7 @@ public class ProfileOperationDAOImpl extends GenericOperationDAOImpl { throw new OperationManagementDAOException("Class not found error occurred while de serialize the " + "profile operation object", e); } catch (SQLException e) { - throw new OperationManagementDAOException("SQL Error occurred while retrieving the command " + + throw new OperationManagementDAOException("SQL Error occurred while retrieving the profile " + "operation object " + "available for the id '" + id, e); } finally { OperationManagementDAOUtil.cleanupResources(stmt, rs); @@ -120,7 +132,7 @@ public class ProfileOperationDAOImpl extends GenericOperationDAOImpl { @Override public List getOperationsByDeviceAndStatus(int enrolmentId, - Operation.Status status) throws OperationManagementDAOException { + Operation.Status status) throws OperationManagementDAOException { PreparedStatement stmt = null; ResultSet rs = null; ProfileOperation profileOperation; @@ -132,10 +144,12 @@ public class ProfileOperationDAOImpl extends GenericOperationDAOImpl { try { Connection conn = OperationManagementDAOFactory.getConnection(); - String sql = "Select po.OPERATION_ID, ENABLED, OPERATION_DETAILS from DM_PROFILE_OPERATION po " + - "INNER JOIN " + - "(Select * From DM_ENROLMENT_OP_MAPPING WHERE ENROLMENT_ID=? " + - "AND STATUS=?) dm ON dm.OPERATION_ID = po.OPERATION_ID"; + String sql = "SELECT o.ID, po1.ENABLED, po1.STATUS, o.TYPE, o.CREATED_TIMESTAMP, o.RECEIVED_TIMESTAMP, " + + "o.OPERATION_CODE, po1.OPERATION_DETAILS " + + "FROM (SELECT po.OPERATION_ID, po.ENABLED, po.OPERATION_DETAILS, dm.STATUS " + + "FROM DM_PROFILE_OPERATION po INNER JOIN (SELECT ENROLMENT_ID, OPERATION_ID, STATUS FROM DM_ENROLMENT_OP_MAPPING " + + "WHERE ENROLMENT_ID = ? AND STATUS = ?) dm ON dm.OPERATION_ID = po.OPERATION_ID) po1 " + + "INNER JOIN DM_OPERATION o ON po1.OPERATION_ID = o.ID "; stmt = conn.prepareStatement(sql); stmt.setInt(1, enrolmentId); @@ -147,9 +161,20 @@ public class ProfileOperationDAOImpl extends GenericOperationDAOImpl { byte[] operationDetails = rs.getBytes("OPERATION_DETAILS"); bais = new ByteArrayInputStream(operationDetails); ois = new ObjectInputStream(bais); - profileOperation = (ProfileOperation) ois.readObject(); - profileOperation.setStatus(status); - operationList.add(profileOperation); + Object obj = ois.readObject(); + if(obj instanceof String){ + profileOperation = new ProfileOperation(); + profileOperation.setCode(rs.getString("OPERATION_CODE")); + profileOperation.setId(rs.getInt("ID")); + profileOperation.setCreatedTimeStamp(rs.getString("CREATED_TIMESTAMP")); + profileOperation.setPayLoad(obj); + profileOperation.setStatus(status); + operationList.add(profileOperation); + } else { + profileOperation = (ProfileOperation) obj; + profileOperation.setStatus(status); + operationList.add(profileOperation); + } } } catch (IOException e) { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/push/notification/mgt/task/PushNotificationSchedulerTask.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/push/notification/mgt/task/PushNotificationSchedulerTask.java index 133ba08cb0..4f79999c8e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/push/notification/mgt/task/PushNotificationSchedulerTask.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/push/notification/mgt/task/PushNotificationSchedulerTask.java @@ -86,11 +86,18 @@ public class PushNotificationSchedulerTask implements Runnable { NotificationStrategy notificationStrategy = provider.getNotificationStrategyByDeviceType (operationMapping.getDeviceIdentifier().getType()); // Send the push notification on given strategy - notificationStrategy.execute(new NotificationContext(operationMapping.getDeviceIdentifier(), - provider.getOperation(operationMapping.getDeviceIdentifier().getType(), operationMapping - .getOperationId()))); - operationMapping.setPushNotificationStatus(Operation.PushNotificationStatus.COMPLETED); - operationsCompletedList.add(operationMapping); + if (notificationStrategy != null) { + notificationStrategy.execute(new NotificationContext(operationMapping.getDeviceIdentifier(), + provider.getOperation(operationMapping.getDeviceIdentifier().getType(), operationMapping + .getOperationId()))); + operationMapping.setPushNotificationStatus(Operation.PushNotificationStatus.COMPLETED); + operationsCompletedList.add(operationMapping); + } else { + if (log.isDebugEnabled()) { + log.debug("Tenant '" + PrivilegedCarbonContext.getThreadLocalCarbonContext() + .getTenantDomain() + "' does not have push notification strategy."); + } + } } catch (DeviceManagementException e) { log.error("Error occurred while getting notification strategy for operation mapping " + operationMapping.getDeviceIdentifier().getType(), e); @@ -121,7 +128,7 @@ public class PushNotificationSchedulerTask implements Runnable { log.debug("Push notification job running completed."); } } catch (Throwable cause) { - log.error("PushNotificationSchedulerTask failed due to " + cause); + log.error("PushNotificationSchedulerTask failed due to " + cause.getMessage(), cause); } } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java index c30967c87d..504ee52dbe 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderService.java @@ -24,6 +24,7 @@ import org.wso2.carbon.device.mgt.common.EnrolmentInfo; import org.wso2.carbon.device.mgt.common.FeatureManager; import org.wso2.carbon.device.mgt.common.InvalidDeviceException; import org.wso2.carbon.device.mgt.common.MonitoringOperation; +import org.wso2.carbon.device.mgt.common.OperationMonitoringTaskConfig; import org.wso2.carbon.device.mgt.common.PaginationRequest; import org.wso2.carbon.device.mgt.common.PaginationResult; import org.wso2.carbon.device.mgt.common.app.mgt.DeviceApplicationMapping; @@ -552,6 +553,9 @@ public interface DeviceManagementProviderService { Operation getNextPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException; + Operation getNextPendingOperation(DeviceIdentifier deviceId, long notNowOperationFrequency) + throws OperationManagementException; + void updateOperation(DeviceIdentifier deviceId, Operation operation) throws OperationManagementException; boolean updateProperties(DeviceIdentifier deviceId, List properties) throws DeviceManagementException; @@ -587,6 +591,8 @@ public interface DeviceManagementProviderService { int getDeviceMonitoringFrequency(String deviceType); + OperationMonitoringTaskConfig getDeviceMonitoringConfig(String deviceType); + boolean isDeviceMonitoringEnabled(String deviceType); PolicyMonitoringManager getPolicyMonitoringManager(String deviceType); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java index f1a59cf9b0..278d2d0d47 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java @@ -1452,8 +1452,15 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv @Override public Operation getNextPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException { + // // setting notNowOperationFrequency to -1 to avoid picking notnow operations return pluginRepository.getOperationManager(deviceId.getType(), this.getTenantId()) - .getNextPendingOperation(deviceId); + .getNextPendingOperation(deviceId, -1); + } + + public Operation getNextPendingOperation(DeviceIdentifier deviceId, long notNowOperationFrequency) + throws OperationManagementException { + return pluginRepository.getOperationManager(deviceId.getType(), this.getTenantId()) + .getNextPendingOperation(deviceId, notNowOperationFrequency); } @Override @@ -1597,6 +1604,13 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv return operationMonitoringTaskConfig.getFrequency(); } + @Override + public OperationMonitoringTaskConfig getDeviceMonitoringConfig(String deviceType) { + int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); + DeviceManagementService dms = pluginRepository.getDeviceManagementService(deviceType, tenantId); + return dms.getOperationMonitoringConfig(); + } + @Override public boolean isDeviceMonitoringEnabled(String deviceType) { int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/Utils.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/Utils.java index f0997ce4b2..36b43b12c6 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/Utils.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/Utils.java @@ -26,14 +26,23 @@ import java.util.Map; public class Utils { - public static Map getTenantedTaskOperationMap(Map> map) { + public static Map getTenantedTaskOperationMap(Map>> map, + String deviceType) { + Map taskMap = new HashMap<>(); int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); if (map.containsKey(tenantId)) { - return map.get(tenantId); + if (map.get(tenantId).containsKey(deviceType)) { + return map.get(tenantId).get(deviceType); + } else { + Map> existingTenantMap = map.get(tenantId); + existingTenantMap.put(deviceType, taskMap); + return taskMap; + } } else { - Map mp = new HashMap<>(); - map.put(tenantId, mp); - return mp; + HashMap> typeMap = new HashMap<>(); + typeMap.put(deviceType, taskMap); + map.put(tenantId, typeMap); + return taskMap; } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/impl/DeviceDetailsRetrieverTask.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/impl/DeviceDetailsRetrieverTask.java index 7b65a3b6ee..567964d808 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/impl/DeviceDetailsRetrieverTask.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/impl/DeviceDetailsRetrieverTask.java @@ -16,16 +16,15 @@ * under the License. */ - package org.wso2.carbon.device.mgt.core.task.impl; -import com.google.gson.Gson; 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.OperationMonitoringTaskConfig; import org.wso2.carbon.device.mgt.core.internal.DeviceManagementDataHolder; +import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; import org.wso2.carbon.device.mgt.core.task.DeviceMgtTaskException; import org.wso2.carbon.device.mgt.core.task.DeviceTaskManager; import org.wso2.carbon.ntask.core.Task; @@ -38,20 +37,13 @@ public class DeviceDetailsRetrieverTask implements Task { private static Log log = LogFactory.getLog(DeviceDetailsRetrieverTask.class); private String deviceType; - private String oppConfig; - private OperationMonitoringTaskConfig operationMonitoringTaskConfig; private boolean executeForTenants = false; private final String IS_CLOUD = "is.cloud"; + private DeviceManagementProviderService deviceManagementProviderService; @Override public void setProperties(Map map) { deviceType = map.get("DEVICE_TYPE"); - oppConfig = map.get("OPPCONFIG"); - - Gson gson = new Gson(); - - operationMonitoringTaskConfig = gson.fromJson(oppConfig, - OperationMonitoringTaskConfig.class); } @Override @@ -60,29 +52,33 @@ public class DeviceDetailsRetrieverTask implements Task { @Override public void execute() { + deviceManagementProviderService = DeviceManagementDataHolder.getInstance() + .getDeviceManagementProvider(); + OperationMonitoringTaskConfig operationMonitoringTaskConfig = deviceManagementProviderService + .getDeviceMonitoringConfig(deviceType); - if(System.getProperty(IS_CLOUD) != null && Boolean.parseBoolean(System.getProperty(IS_CLOUD))){ + if (System.getProperty(IS_CLOUD) != null && Boolean.parseBoolean(System.getProperty(IS_CLOUD))) { executeForTenants = true; } - if(executeForTenants){ - this.executeForAllTenants(); + if (executeForTenants) { + this.executeForAllTenants(operationMonitoringTaskConfig); } else { if (log.isDebugEnabled()) { log.debug("Device details retrieving task started to run."); } - DeviceTaskManager deviceTaskManager = new DeviceTaskManagerImpl(deviceType, - operationMonitoringTaskConfig); + DeviceTaskManager deviceTaskManager = new DeviceTaskManagerImpl(deviceType, operationMonitoringTaskConfig); //pass the configurations also from here, monitoring tasks try { - deviceTaskManager.addOperations(); + if (deviceManagementProviderService.isDeviceMonitoringEnabled(deviceType)) { + deviceTaskManager.addOperations(); + } } catch (DeviceMgtTaskException e) { - log.error( - "Error occurred while trying to add the operations to device to retrieve device details.", e); + log.error("Error occurred while trying to add the operations to device to retrieve device details.", e); } } } - private void executeForAllTenants() { + private void executeForAllTenants(OperationMonitoringTaskConfig operationMonitoringTaskConfig) { if (log.isDebugEnabled()) { log.debug("Device details retrieving task started to run for all tenants."); @@ -101,7 +97,9 @@ public class DeviceDetailsRetrieverTask implements Task { operationMonitoringTaskConfig); //pass the configurations also from here, monitoring tasks try { - deviceTaskManager.addOperations(); + if (deviceManagementProviderService.isDeviceMonitoringEnabled(deviceType)) { + deviceTaskManager.addOperations(); + } } catch (DeviceMgtTaskException e) { log.error("Error occurred while trying to add the operations to " + "device to retrieve device details.", e); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/impl/DeviceTaskManagerImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/impl/DeviceTaskManagerImpl.java index 41d291e74e..2132889189 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/impl/DeviceTaskManagerImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/impl/DeviceTaskManagerImpl.java @@ -36,17 +36,13 @@ import org.wso2.carbon.device.mgt.core.task.DeviceTaskManager; import org.wso2.carbon.device.mgt.core.task.Utils; import org.wso2.carbon.device.mgt.core.util.DeviceManagerUtil; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; public class DeviceTaskManagerImpl implements DeviceTaskManager { private static Log log = LogFactory.getLog(DeviceTaskManagerImpl.class); private String deviceType; - private static Map> map = new HashMap<>(); + static volatile Map>> map = new HashMap<>(); private OperationMonitoringTaskConfig operationMonitoringTaskConfig; public DeviceTaskManagerImpl(String deviceType, @@ -126,7 +122,7 @@ public class DeviceTaskManagerImpl implements DeviceTaskManager { List opNames = new ArrayList<>(); Long milliseconds = System.currentTimeMillis(); int frequency = this.getTaskFrequency(); - Map mp = Utils.getTenantedTaskOperationMap(map); + Map mp = Utils.getTenantedTaskOperationMap(map, deviceType); for (MonitoringOperation top : monitoringOperations) { if (!mp.containsKey(top.getTaskName())) { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/impl/DeviceTaskManagerServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/impl/DeviceTaskManagerServiceImpl.java index b8119222db..d564fd7542 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/impl/DeviceTaskManagerServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/impl/DeviceTaskManagerServiceImpl.java @@ -107,10 +107,12 @@ public class DeviceTaskManagerServiceImpl implements DeviceTaskManagerService { throws DeviceMgtTaskException { try { + int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); TaskService taskService = DeviceManagementDataHolder.getInstance().getTaskService(); if (taskService.isServerInit()) { TaskManager taskManager = taskService.getTaskManager(TASK_TYPE); - taskManager.deleteTask(deviceType); + String taskName = deviceType + String.valueOf(tenantId); + taskManager.deleteTask(taskName); } } catch (TaskException e) { int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); @@ -131,8 +133,8 @@ public class DeviceTaskManagerServiceImpl implements DeviceTaskManagerService { TaskManager taskManager = taskService.getTaskManager(TASK_TYPE); if (taskManager.isTaskScheduled(deviceType)) { - - taskManager.deleteTask(deviceType); + String taskName = deviceType + String.valueOf(tenantId); + taskManager.deleteTask(taskName); TaskInfo.TriggerInfo triggerInfo = new TaskInfo.TriggerInfo(); triggerInfo.setIntervalMillis(operationMonitoringTaskConfig.getFrequency()); triggerInfo.setRepeatCount(-1); @@ -140,7 +142,7 @@ public class DeviceTaskManagerServiceImpl implements DeviceTaskManagerService { Map properties = new HashMap<>(); properties.put(TENANT_ID, String.valueOf(tenantId)); - TaskInfo taskInfo = new TaskInfo(deviceType, TASK_CLASS, properties, triggerInfo); + TaskInfo taskInfo = new TaskInfo(taskName, TASK_CLASS, properties, triggerInfo); taskManager.registerTask(taskInfo); taskManager.rescheduleTask(taskInfo.getName()); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/TestDeviceManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/TestDeviceManagementService.java index 29ebe9c493..d9449f6a49 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/TestDeviceManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/TestDeviceManagementService.java @@ -43,7 +43,7 @@ public class TestDeviceManagementService implements DeviceManagementService { public TestDeviceManagementService(String deviceType, String tenantDomain) { providerType = deviceType; this.tenantDomain = tenantDomain; - this.operationCode = "default"; + this.operationCode = "DEVICE_INFO"; } @Override diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/geo/service/GeoLocationProviderServiceTest.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/geo/service/GeoLocationProviderServiceTest.java index 1e0916d079..649ecf4244 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/geo/service/GeoLocationProviderServiceTest.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/geo/service/GeoLocationProviderServiceTest.java @@ -143,7 +143,7 @@ public class GeoLocationProviderServiceTest { Assert.assertEquals(geoFenceNode.getStationaryTime(), SAMPLE_STATIONARY_TIME); } - private void initMocks() throws JWTClientException, RemoteException { + private void initMocks() throws Exception { EventProcessorAdminServiceStub mockEventProcessorAdminServiceStub = Mockito.mock(EventProcessorAdminServiceStub.class); geoLocationProviderServiceImpl = Mockito.mock(GeoLocationProviderServiceImpl.class, Mockito.CALLS_REAL_METHODS); mockExecutionPlanConfigurationDto[0] = Mockito.mock(ExecutionPlanConfigurationDto.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 dcfd63b995..b1734948d4 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,8 @@ package org.wso2.carbon.device.mgt.core.operation; +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.BeforeClass; @@ -67,6 +69,7 @@ public class OperationManagementTests extends BaseDeviceManagementTest { 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"; + private static final String PROFILE_NOTIFICATION_CODE = "NOTIFICATION"; private static final String DATE_FORMAT_NOW = "yyyy-MM-dd HH:mm:ss"; private static final int NO_OF_DEVICES = 5; private static final String ADMIN_USER = "admin"; @@ -80,6 +83,8 @@ public class OperationManagementTests extends BaseDeviceManagementTest { private Activity commandActivity; private long commandActivityBeforeUpdatedTimestamp; + private static Log log = LogFactory.getLog(OperationManagementTests.class); + @BeforeClass public void init() throws Exception { for (int i = 0; i < NO_OF_DEVICES; i++) { @@ -101,14 +106,14 @@ public class OperationManagementTests extends BaseDeviceManagementTest { } this.deviceMgmtProvider = DeviceManagementDataHolder.getInstance().getDeviceManagementProvider(); deviceManagementService = new TestDeviceManagementService(DEVICE_TYPE, - MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); + 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 { + InvalidDeviceException { OperationManager operationManager = PowerMockito.spy( new OperationManagerImpl(DEVICE_TYPE, deviceManagementService)); try { @@ -154,7 +159,7 @@ public class OperationManagementTests extends BaseDeviceManagementTest { public void addEmptyDevicesCommandOperation() throws DeviceManagementException, OperationManagementException, InvalidDeviceException { this.operationMgtService.addOperation(getOperation(new CommandOperation(), Operation.Type.COMMAND, - COMMAND_OPERATION_CODE), new ArrayList<>()); + COMMAND_OPERATION_CODE), new ArrayList<>()); } @Test(expectedExceptions = InvalidDeviceException.class) @@ -205,8 +210,10 @@ public class OperationManagementTests extends BaseDeviceManagementTest { @Test(dependsOnMethods = "addConfigOperation") public void addProfileOperation() throws DeviceManagementException, OperationManagementException, InvalidDeviceException { - Activity activity = this.operationMgtService.addOperation(getOperation(new ProfileOperation(), - Operation.Type.PROFILE, PROFILE_OPERATION_CODE), + Operation opp = getOperation(new ProfileOperation(), + Operation.Type.PROFILE, PROFILE_NOTIFICATION_CODE); + opp.setPayLoad("{\"messageText\":\"xyz\",\"messageTitle\":\"abc\"}"); + Activity activity = this.operationMgtService.addOperation(opp , this.deviceIds); validateOperationResponse(activity, ActivityStatus.Status.PENDING); } @@ -360,6 +367,35 @@ public class OperationManagementTests extends BaseDeviceManagementTest { Assert.assertTrue(operation.getType().equals(Operation.Type.POLICY)); } + @Test(dependsOnMethods = "getNextPendingOperation") + public void getNextNotNowOperation() throws OperationManagementException { + //This is required to introduce a delay for the update operation of the device. + try { + Thread.sleep(2000); + } catch (InterruptedException ignored) { + } + DeviceIdentifier deviceIdentifier = this.deviceIds.get(0); + Operation operation = this.operationMgtService.getNextPendingOperation(deviceIdentifier); + int operationId = operation.getId(); + operation.setStatus(Operation.Status.NOTNOW); + operation.setOperationResponse("The operation is successfully completed"); + this.operationMgtService.updateOperation(deviceIdentifier, operation); + //This is required to introduce a delay for the update operation of the device. + try { + Thread.sleep(2000); + } catch (InterruptedException ignored) { + } + operation = this.operationMgtService.getNextPendingOperation(deviceIdentifier); + Assert.assertTrue(operation.getId() != operationId, "Fetched the incorrect operation"); + log.info("Waiting 10000ms for NotNow operation to be fetched"); + try { + Thread.sleep(10000); + } catch (InterruptedException ignored) { + } + operation = this.operationMgtService.getNextPendingOperation(deviceIdentifier, 7000); + Assert.assertTrue(operation.getId() == operationId, "Fetched the incorrect NotNow operation"); + } + @Test(dependsOnMethods = "updateOperation", expectedExceptions = OperationManagementException.class) public void getNextPendingOperationAsNonAdmin() throws OperationManagementException { startTenantFlowAsNonAdmin(); @@ -403,7 +439,7 @@ public class OperationManagementTests extends BaseDeviceManagementTest { DeviceIdentifier deviceIdentifier = this.deviceIds.get(0); List operation = this.operationMgtService.getOperationsByDeviceAndStatus(deviceIdentifier, Operation.Status.PENDING); - Assert.assertEquals(operation.size(), 3); + Assert.assertEquals(operation.size(), 2); } @Test(dependsOnMethods = "getOperationByDeviceAndOperationId", expectedExceptions = OperationManagementException.class) @@ -476,8 +512,8 @@ public class OperationManagementTests extends BaseDeviceManagementTest { public void getActivityCountUpdatedAfter() throws OperationManagementException, ParseException { int activityCount = this.operationMgtService.getActivityCountUpdatedAfter (this.commandActivityBeforeUpdatedTimestamp / 1000); - Assert.assertTrue(activityCount == 1, - "The activities updated after the created should be 1"); + Assert.assertTrue(activityCount == 2, + "The activities updated after the created should be 2"); } @Test @@ -531,7 +567,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_OPERATION_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/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 d76783991c..4b558f0708 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.mockito.Mockito; import org.powermock.api.mockito.PowerMockito; import org.testng.Assert; import org.testng.annotations.AfterClass; @@ -27,6 +28,8 @@ import org.testng.annotations.Test; import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.DeviceManagementException; +import org.wso2.carbon.device.mgt.common.MonitoringOperation; +import org.wso2.carbon.device.mgt.common.OperationMonitoringTaskConfig; 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; @@ -60,8 +63,6 @@ public class DeviceTaskManagerTest extends BaseDeviceManagementTest { private static final Log log = LogFactory.getLog(DeviceTaskManagerTest.class); private static final String NEW_DEVICE_TYPE = "NEW-DEVICE-TYPE"; - private static final String DEVICE_DETAIL_RETRIEVER_OPPCONFIG = "{\"isEnabled\":true,\"frequency\":60000," + - "\"monitoringOperation\":[{\"taskName\":\"DEVICE_INFO\",\"recurrentTimes\":2}]}"; private List deviceIds; private DeviceTaskManager deviceTaskManager; private DeviceManagementProviderService deviceMgtProviderService; @@ -76,7 +77,6 @@ public class DeviceTaskManagerTest extends BaseDeviceManagementTest { } List devices = TestDataHolder.generateDummyDeviceData(this.deviceIds); this.deviceMgtProviderService = new DeviceManagementProviderServiceImpl(); - DeviceManagementServiceComponent.notifyStartupListeners(); DeviceManagementDataHolder.getInstance().setDeviceManagementProvider(this.deviceMgtProviderService); DeviceManagementDataHolder.getInstance() @@ -152,7 +152,6 @@ public class DeviceTaskManagerTest extends BaseDeviceManagementTest { DeviceDetailsRetrieverTask deviceDetailsRetrieverTask = new DeviceDetailsRetrieverTask(); Map map = new HashMap<>(); map.put("DEVICE_TYPE", TestDataHolder.TEST_DEVICE_TYPE); - map.put("OPPCONFIG", DEVICE_DETAIL_RETRIEVER_OPPCONFIG); deviceDetailsRetrieverTask.setProperties(map); deviceDetailsRetrieverTask.execute(); for (DeviceIdentifier deviceId : deviceIds) { @@ -172,7 +171,6 @@ public class DeviceTaskManagerTest extends BaseDeviceManagementTest { System.setProperty("is.cloud", "true"); Map map = new HashMap<>(); map.put("DEVICE_TYPE", TestDataHolder.TEST_DEVICE_TYPE); - map.put("OPPCONFIG", DEVICE_DETAIL_RETRIEVER_OPPCONFIG); deviceDetailsRetrieverTask.setProperties(map); deviceDetailsRetrieverTask.execute(); for (DeviceIdentifier deviceId : deviceIds) { 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 befaefecd6..9586b2dcc8 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 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 713807945a..29a19dfc35 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json index 3b4f031c6d..d717cdae31 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json @@ -15,6 +15,9 @@ "iOSConfigRoot": "%https.ip%/ios-enrollment/", "iOSAPIRoot": "%https.ip%/ios/", "adminService": "%https.ip%", + "deviceInfoServiceAPI" : "/api/device-mgt/%device-type%/v1.0/admin/devices/info", + "deviceLocationServiceAPI" : "/api/device-mgt/%device-type%/v1.0/admin/devices/location", + "iOSDeviceInfoServiceAPI" : "/api/device-mgt/%device-type%/v1.0/admin/devices/info", "gatewayEnabled": true, "oauthProvider": { "appRegistration": { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/public/js/bottomJs.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/public/js/bottomJs.js index 66c1719052..0d18ba9dba 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/public/js/bottomJs.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/public/js/bottomJs.js @@ -39,25 +39,25 @@ $("#view-search-param").click(function () { $("#view-search-param").addClass('hidden'); }); -var dynamicForm = '
' + - '
' + - '
' + - '
' + - '
'; +var dynamicForm = '
' + + '
' + + '
' + + '
' + + '
'; var nonNumericKeyValuePair = ["deviceModel", "vendor", "osVersion", "connectionType", "ssid", "pluggedIn"]; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/search.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/search.hbs index c1c6ba2f7f..5fe3223246 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/search.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/search.hbs @@ -82,7 +82,7 @@ required.
- +
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/public/js/listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/public/js/listing.js index ae15c3aea9..05f582844a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/public/js/listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/public/js/listing.js @@ -275,10 +275,11 @@ function loadUsers() { $(data.users).each(function (index) { objects.push({ - filter: htmlspecialchars(data.users[index].username), - firstname: htmlspecialchars(data.users[index].firstname) ? htmlspecialchars(data.users[index].firstname) : "", - lastname: htmlspecialchars(data.users[index].lastname) ? htmlspecialchars(data.users[index].lastname) : "", + username: htmlspecialchars(data.users[index].username), + firstName: htmlspecialchars(data.users[index].firstname) ? htmlspecialchars(data.users[index].firstname) : "", + lastName: htmlspecialchars(data.users[index].lastname) ? htmlspecialchars(data.users[index].lastname) : "", emailAddress: htmlspecialchars(data.users[index].emailAddress) ? htmlspecialchars(data.users[index].emailAddress) : "", + namePattern: htmlspecialchars(data.users[index].firstname) + ' ' + htmlspecialchars(data.users[index].lastname), DT_RowId: "user-" + htmlspecialchars(data.users[index].username) }) }); @@ -304,49 +305,78 @@ function loadUsers() { //noinspection JSUnusedLocalSymbols var columns = [ { + targets: 0, class: "remove-padding icon-only content-fill", - data: null, - render: function (data, type, row, meta) { - return '
' + + data: 'username', + render: function (username, type, row, meta) { + return '
' + '' + '
'; } }, { + targets: 1, class: "", - data: null, - render: function (data, type, row, meta) { - if (!data.firstname && !data.lastname) { + data: 'namePattern', + render: function (namePattern, type, row, meta) { + if (!namePattern) { return ""; - } else if (data.firstname && data.lastname) { - return "

" + data.firstname + " " + data.lastname + "

"; + } else { + return "

" + namePattern + "

"; } } }, { + targets: 2, class: "remove-padding-top", - data: 'filter', - render: function (filter, type, row, meta) { - return '' + filter; + data: 'username', + render: function (username, type, row, meta) { + return '' + username; + } + }, + { + targets: 3, + class: "hidden", + data: 'firstName', + render: function (firstName, type, row, meta) { + if (!firstName) { + return ""; + } else if (firstName) { + return "

" + firstName + "

"; + } + } + }, + { + targets: 4, + class: "hidden", + data: 'lastName', + render: function (lastName, type, row, meta) { + if (!lastName) { + return ""; + } else if (lastName) { + return "

" + lastName + "

"; + } } }, { + targets: 5, class: "remove-padding-top", - data: null, - render: function (data, type, row, meta) { - if (!data.emailAddress) { + data: 'emailAddress', + render: function (emailAddress, type, row, meta) { + if (!emailAddress) { return ""; } else { - return "" + data.emailAddress + ""; + return "" + emailAddress + ""; } } }, { + targets: 6, class: "text-right content-fill text-left-on-grid-view no-wrap tooltip-overflow-fix", data: null, render: function (data, type, row, meta) { var editbtn = ' ' + ' ' + @@ -354,18 +384,18 @@ function loadUsers() { '' + ''; - var resetPasswordbtn = '' + '' + '' + '' + ''; - var removebtn = '' + '' + '' + @@ -375,20 +405,19 @@ function loadUsers() { var returnbtnSet = ''; var adminUser = $("#user-table").data("user"); var currentUser = $("#user-table").data("logged-user"); - if ($("#can-edit").length > 0 && adminUser !== data.filter) { + if ($("#can-edit").length > 0 && adminUser !== data.username) { returnbtnSet = returnbtnSet + editbtn; } - if ($("#can-reset-password").length > 0 && adminUser !== data.filter) { + if ($("#can-reset-password").length > 0 && adminUser !== data.username) { returnbtnSet = returnbtnSet + resetPasswordbtn; } - if ($("#can-remove").length > 0 && adminUser !== data.filter && currentUser !== data.filter) { + if ($("#can-remove").length > 0 && adminUser !== data.username && currentUser !== data.username) { returnbtnSet = returnbtnSet + removebtn; } return returnbtnSet; } } - ]; var options = { @@ -400,18 +429,31 @@ function loadUsers() { "sorting": false }; - $('#user-grid').datatables_extended_serverside_paging(settings, '/api/device-mgt/v1.0/users', dataFilter, columns, fnCreatedRow, null, options); + $('#user-grid').datatables_extended_serverside_paging( + settings, + '/api/device-mgt/v1.0/users/search', + dataFilter, + columns, + fnCreatedRow, + null, + options + ); + $(loadingContentView).hide(); } $(document).ready(function () { loadUsers(); + $(function () { $('[data-toggle="tooltip"]').tooltip() }); + if (!$("#can-invite").val()) { $("#invite-user-button").remove(); } + $("#user-grid_filter").hide(); + }); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/users.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/users.hbs index 26f3f97444..34071d41b9 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/users.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/users.hbs @@ -75,10 +75,25 @@ id="user-grid"> + + By Username + By First Name + By Last Name + By Email + + + + + + + + + + - +
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/app.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/app.js index 805ec7a3ab..fec0b5b280 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/app.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/app.js @@ -279,10 +279,12 @@ var getProviderData = function (timeFrom, timeTo) { var serviceUrl = '/api/device-mgt/v1.0/geo-services/stats/' + deviceType + '/' + deviceId + '?from=' + timeFrom + '&to=' + timeTo; invokerUtil.get(serviceUrl, function (data) { - if(data === ""){showCurrentLocation(tableData);} + if (data === "") { + showCurrentLocation(tableData); + } tableData = JSON.parse(data); if (tableData.length === 0) { - showCurrentLocation(tableData); + showCurrentLocation(tableData); } }, function (message) { showCurrentLocation(tableData); @@ -552,5 +554,5 @@ function formatDate(date) { hours = hours ? hours : 12; // the hour '0' should be '12' minutes = minutes < 10 ? '0'+minutes : minutes; var strTime = hours + ':' + minutes + ' ' + ampm; - return date.getDate() + "/" + date.getMonth()+1 + "/" + date.getFullYear() + " " + strTime; + return date.getDate() + "/" + (date.getMonth() + 1) + "/" + date.getFullYear() + " " + strTime; } \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/websocket.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/websocket.js index 5bc0c3d8a1..def7287471 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/websocket.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/websocket.js @@ -91,7 +91,7 @@ function initializeGeoLocation(geoFencingEnabled) { InitSpatialObject(geoFencingEnabled); } else { - noty({text: 'Invalid Access! No device information provided to track!', type: 'error'}); + noty({text: 'Invalid Access! No device information provided to track!', type: 'error', timeout: 10000}); } } @@ -493,7 +493,7 @@ GeoAreaObject.prototype.update = function (geoJSON) { }; function notifyAlert(message) { - noty({text: "Alert: " + message, type: 'warning'}); + noty({text: "Alert: " + message, type: 'warning', timeout: 10000}); } function Alert(type, message, level) { @@ -505,7 +505,7 @@ function Alert(type, message, level) { this.level = 'information'; this.notify = function () { - noty({text: this.type + ' ' + this.message, type: level}); + noty({text: this.type + ' ' + this.message, type: level, timeout: 10000}); } } @@ -575,7 +575,7 @@ var webSocketOnAlertError = function (e) { wsURL = wsURL.replace("wss://","https://"); var uriParts = wsURL.split("/"); wsURL = uriParts[0] + "//" + uriParts[2]; - noty({text: 'Something went wrong when trying to connect to ' + wsURL + '', type: 'error'}); + noty({text: 'Something went wrong when trying to connect to ' + wsURL + '', type: 'error', timeout: 10000}); }; var webSocketSpatialOnOpen = function () { @@ -606,7 +606,7 @@ var webSocketSpatialOnError = function (err) { wsURL = wsURL.replace("wss://","https://"); var uriParts = wsURL.split("/"); wsURL = uriParts[0] + "//" + uriParts[2]; - noty({text: 'Something went wrong when trying to connect to ' + wsURL + '', type: 'error'}); + noty({text: 'Something went wrong when trying to connect to ' + wsURL + '', type: 'error', timeout: 10000}); }; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/app.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/app.js index de2b1ec9a4..84e0686f35 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/app.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/app.js @@ -419,7 +419,7 @@ function formatDate(date) { hours = hours ? hours : 12; // the hour '0' should be '12' minutes = minutes < 10 ? '0' + minutes : minutes; var strTime = hours + ':' + minutes + ' ' + ampm; - return date.getDate() + "/" + date.getMonth() + 1 + "/" + date.getFullYear() + " " + strTime; + return date.getDate() + "/" + (date.getMonth() + 1) + "/" + date.getFullYear() + " " + strTime; } function timeSince(date) { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/uuf-template-app/lib/error-pages-router.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/uuf-template-app/lib/error-pages-router.js index 5da3b44751..a0e30cc547 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/uuf-template-app/lib/error-pages-router.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/uuf-template-app/lib/error-pages-router.js @@ -113,8 +113,7 @@ conf: appConfigurations }, uri: errorPage.definition[constants.PAGE_DEFINITION_URI], - uriParams: {}, - user: utils.getCurrentUser() + uriParams: {} }; var templateContext = {status: status, message: message}; var renderer = require("/lib/dynamic-files-renderer.js").renderer; 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 3d744c65a6..557416f4ed 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.2.1-SNAPSHOT + 3.2.2-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 a553cf49cd..fb80fc8ab3 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/pom.xml b/components/device-mgt/pom.xml index 4ea48b1bc6..8667c75f6c 100644 --- a/components/device-mgt/pom.xml +++ b/components/device-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.2.1-SNAPSHOT + 3.2.2-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 e8467397ef..768fa0245b 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml diff --git a/components/email-sender/pom.xml b/components/email-sender/pom.xml index 72080b6e27..daba4f6682 100644 --- a/components/email-sender/pom.xml +++ b/components/email-sender/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.2.1-SNAPSHOT + 3.2.2-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 102be803cb..573ff4b397 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.oauth.extensions - 3.2.1-SNAPSHOT + 3.2.2-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 94d61eae0c..7f76feb968 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.2.1-SNAPSHOT + 3.2.2-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 76b1b77a4c..dedd284944 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml diff --git a/components/identity-extensions/pom.xml b/components/identity-extensions/pom.xml index a686ec6c9f..2b129ca2e6 100644 --- a/components/identity-extensions/pom.xml +++ b/components/identity-extensions/pom.xml @@ -22,12 +22,11 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../../pom.xml 4.0.0 - org.wso2.carbon.devicemgt identity-extensions pom WSO2 Carbon - Identity Extensions Component 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 6be810cba9..55be291d4c 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.complex.policy.decision.point - 3.2.1-SNAPSHOT + 3.2.2-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 ce62ebd92f..bcaa557e7a 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.decision.point - 3.2.1-SNAPSHOT + 3.2.2-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 d6ffb9bbc1..ea0178ec35 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml @@ -11,7 +11,7 @@ 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.information.point - 3.2.1-SNAPSHOT + 3.2.2-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 12949f0aba..9b4b319005 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.mgt.common - 3.2.1-SNAPSHOT + 3.2.2-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 e0ac204dc3..61ea3759cf 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.mgt.core - 3.2.1-SNAPSHOT + 3.2.2-SNAPSHOT bundle WSO2 Carbon - Policy Management Core WSO2 Carbon - Policy Management Core diff --git a/components/policy-mgt/pom.xml b/components/policy-mgt/pom.xml index ac999a0628..66ba3e2609 100644 --- a/components/policy-mgt/pom.xml +++ b/components/policy-mgt/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../../pom.xml 4.0.0 policy-mgt - 3.2.1-SNAPSHOT + 3.2.2-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 52e1f903f6..85d66bd30d 100644 --- a/components/test-coverage/pom.xml +++ b/components/test-coverage/pom.xml @@ -21,7 +21,7 @@ carbon-devicemgt org.wso2.carbon.devicemgt - 3.2.1-SNAPSHOT + 3.2.2-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 7ba7e69371..f09d91a886 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.webapp.authenticator.framework - 3.2.1-SNAPSHOT + 3.2.2-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 82e02a0c30..9e11ab1f37 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt webapp-authenticator-framework - 3.2.1-SNAPSHOT + 3.2.2-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 de29013f9d..5025e5fc9e 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.application.extension.feature pom - 3.2.1-SNAPSHOT + 3.2.2-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 2e2d806cc9..a5c528d0ed 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.handler.server.feature pom - 3.2.1-SNAPSHOT + 3.2.2-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 40248cb18b..e4adf005ad 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.integration.client.feature - 3.2.1-SNAPSHOT + 3.2.2-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 faf1057ee8..d415133a5a 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.webapp.publisher.feature pom - 3.2.1-SNAPSHOT + 3.2.2-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 9c6a264d95..77fbe93672 100644 --- a/features/apimgt-extensions/pom.xml +++ b/features/apimgt-extensions/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt apimgt-extensions-feature - 3.2.1-SNAPSHOT + 3.2.2-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 8eccb4c000..a2d8dc7cf6 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.2.1-SNAPSHOT + 3.2.2-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 f188fa4a04..5acdb552df 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.2.1-SNAPSHOT + 3.2.2-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 23349e920f..0f8b67276e 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.certificate.mgt.server.feature pom - 3.2.1-SNAPSHOT + 3.2.2-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 68556235c5..03f5f10de9 100644 --- a/features/certificate-mgt/pom.xml +++ b/features/certificate-mgt/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt certificate-mgt-feature - 3.2.1-SNAPSHOT + 3.2.2-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 6078a8fefa..9934153114 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature pom - 3.2.1-SNAPSHOT + 3.2.2-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 90105cabea..893d59993e 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature pom - 3.2.1-SNAPSHOT + 3.2.2-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 4ae690e9e0..402f91d6ea 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature pom - 3.2.1-SNAPSHOT + 3.2.2-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 7575e2890d..fc27c03330 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature pom - 3.2.1-SNAPSHOT + 3.2.2-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 00e897dfe9..b375aab687 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature pom - 3.2.1-SNAPSHOT + 3.2.2-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 da2c10d621..ea5b0a253b 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../../pom.xml diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.feature/pom.xml index b478134197..3b1cd917ed 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-feature - 3.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.analytics.feature pom - 3.2.1-SNAPSHOT + 3.2.2-SNAPSHOT WSO2 Carbon - Device Management Server Feature http://wso2.org This feature contains bundles related to device analytics data publisher and ws proxy diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml index 70686c9498..eab18373e1 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.2.1-SNAPSHOT + 3.2.2-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 12c040ec3f..4e557642e9 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.2.1-SNAPSHOT + 3.2.2-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 b9dd9dbc65..159fdda997 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.feature pom - 3.2.1-SNAPSHOT + 3.2.2-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 e9ac672779..0371465415 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.2.1-SNAPSHOT + 3.2.2-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 a7d761be17..0b9a4ebfe5 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.server.feature pom - 3.2.1-SNAPSHOT + 3.2.2-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 00e36a1956..342f777896 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml diff --git a/features/device-mgt/pom.xml b/features/device-mgt/pom.xml index ad4064eb40..b347b66fa7 100644 --- a/features/device-mgt/pom.xml +++ b/features/device-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.2.1-SNAPSHOT + 3.2.2-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 21b75267df..fd6563b142 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.email.sender.feature pom - 3.2.1-SNAPSHOT + 3.2.2-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/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/default-enrollment-invitation.vm b/features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/default-enrollment-invitation.vm index 6bac59590d..6084f37ec1 100644 --- a/features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/default-enrollment-invitation.vm +++ b/features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/default-enrollment-invitation.vm @@ -16,29 +16,196 @@ under the License. *# - You have been invited to enroll your $device-type device in WSO2 IoT + You have been invited to enroll your $device-type device in Entgra IoT - WSO2 IoT Server + Entgra IoT Server
-
+
- WSO2 + entgra.io

Hi,

- -

- You have been invited by $first-name to enrol your $device-type device in WSO2 IoT Server. +

+ You have been invited by $first-name to enrol your $device-type device in Entgra IoT Server. Click here to begin device enrolment.

@@ -49,20 +216,10 @@

Regards,

- -

- WSO2 IoT Administrator +

+ Entgra IoT Administrator

-
- - - - -
WSO2
-
diff --git a/features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-enrollment.vm b/features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-enrollment.vm index 5c8a01f5c7..0c29e86b4b 100644 --- a/features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-enrollment.vm +++ b/features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-enrollment.vm @@ -16,29 +16,196 @@ under the License. *# - You have been invited to enroll your device in WSO2 IoT + You have been invited to enroll your device in Entgra IoT - WSO2 IoT Server + Entgra IoT Server
-
+
- WSO2 + entgra.io

Hi $first-name,

- -

- You have been invited to enrol your device in WSO2 IoT Server. +

+ You have been invited to enrol your device in Entgra IoT Server. Click here to begin device enrolment.

@@ -49,19 +216,10 @@ Regards,

-

- WSO2 IoT Administrator +

+ Entgra IoT Administrator

-
- - - - -
WSO2
-
diff --git a/features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-registration.vm b/features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-registration.vm index c47ed13571..5d4592007e 100644 --- a/features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-registration.vm +++ b/features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-registration.vm @@ -16,20 +16,188 @@ under the License. *# - You have successfully been registered in WSO2 IoT + You have successfully been registered in Entgra IoT - WSO2 IoT Server + Entgra IoT Server
-
+
- WSO2 + entgra.io
@@ -37,12 +205,12 @@ Hi $first-name,

-

- You have been registered in WSO2 IoT and invited to enrol your device. +

+ You have been registered in Entgra IoT and invited to enrol your device. Click here to begin device enrolment.

-

- Use following credentials to log in to WSO2 IoT Device Management application. +

+ Use following credentials to log in to Entgra IoT Device Management application.

@@ -59,19 +227,10 @@ Regards,

-

- WSO2 IoT Administrator +

+ Entgra IoT Administrator

-
- - - - -
WSO2
-
diff --git a/features/email-sender/pom.xml b/features/email-sender/pom.xml index 1720a50787..dbfde57989 100644 --- a/features/email-sender/pom.xml +++ b/features/email-sender/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt email-sender-feature - 3.2.1-SNAPSHOT + 3.2.2-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 ce8d574b47..0138144e84 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.identity.jwt.client.extension.feature pom - 3.2.1-SNAPSHOT + 3.2.2-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 0e6fe60de2..3880663260 100644 --- a/features/jwt-client/pom.xml +++ b/features/jwt-client/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../../pom.xml 4.0.0 jwt-client-feature - 3.2.1-SNAPSHOT + 3.2.2-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 0f52113112..b390cc8785 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.oauth.extensions.feature pom - 3.2.1-SNAPSHOT + 3.2.2-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 b3163e4310..ca5a7276d4 100644 --- a/features/oauth-extensions/pom.xml +++ b/features/oauth-extensions/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt oauth-extensions-feature - 3.2.1-SNAPSHOT + 3.2.2-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 0bf0d010c2..3d869d6c78 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.policy.mgt.server.feature pom - 3.2.1-SNAPSHOT + 3.2.2-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 a2effad935..5d61abb322 100644 --- a/features/policy-mgt/pom.xml +++ b/features/policy-mgt/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 3.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt policy-mgt-feature - 3.2.1-SNAPSHOT + 3.2.2-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 393a26f397..c4ae8cf969 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.webapp.authenticator.framework.server.feature pom - 3.2.1-SNAPSHOT + 3.2.2-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 3255d169b8..5641dcd07e 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.2.1-SNAPSHOT + 3.2.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt webapp-authenticator-framework-feature - 3.2.1-SNAPSHOT + 3.2.2-SNAPSHOT pom WSO2 Carbon - Webapp Authenticator Framework Feature http://wso2.org diff --git a/pom.xml b/pom.xml index 50cf2142a3..cdf352e397 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt pom - 3.2.1-SNAPSHOT + 3.2.2-SNAPSHOT WSO2 Carbon - Device Management - Parent http://wso2.org WSO2 Connected Device Manager Components @@ -37,7 +37,7 @@ components/device-mgt components/device-mgt-extensions - components/identity-extensions + components/identity-extensions components/apimgt-extensions components/application-mgt components/policy-mgt @@ -2082,7 +2082,7 @@ 1.2.11.wso2v10 - 3.2.1-SNAPSHOT + 3.2.2-SNAPSHOT 4.6.21