diff --git a/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.cdmf.analytics/pom.xml b/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.cdmf.analytics/pom.xml
index 661d567f2..e4aee9ad2 100644
--- a/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.cdmf.analytics/pom.xml
+++ b/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.cdmf.analytics/pom.xml
@@ -21,7 +21,7 @@
org.wso2.carbon.devicemgt-plugins
iot-analytics
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/pom.xml b/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/pom.xml
index e0989639d..4ff9b90d5 100644
--- a/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/pom.xml
+++ b/components/analytics/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/pom.xml
@@ -21,7 +21,7 @@
org.wso2.carbon.devicemgt-plugins
iot-analytics
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/components/analytics/iot-analytics/org.wso2.carbon.iot.device.statistics.dashboard/pom.xml b/components/analytics/iot-analytics/org.wso2.carbon.iot.device.statistics.dashboard/pom.xml
index d10e276b0..eef2d5daa 100644
--- a/components/analytics/iot-analytics/org.wso2.carbon.iot.device.statistics.dashboard/pom.xml
+++ b/components/analytics/iot-analytics/org.wso2.carbon.iot.device.statistics.dashboard/pom.xml
@@ -21,7 +21,7 @@
org.wso2.carbon.devicemgt-plugins
iot-analytics
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/pom.xml b/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/pom.xml
index 6159476b8..c445aa691 100644
--- a/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/pom.xml
+++ b/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/pom.xml
@@ -21,7 +21,7 @@
org.wso2.carbon.devicemgt-plugins
iot-analytics
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/components/analytics/iot-analytics/pom.xml b/components/analytics/iot-analytics/pom.xml
index aadc84355..846ac5636 100644
--- a/components/analytics/iot-analytics/pom.xml
+++ b/components/analytics/iot-analytics/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt-plugins
analytics
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/components/analytics/pom.xml b/components/analytics/pom.xml
index 9c7156d1c..c9bb22611 100644
--- a/components/analytics/pom.xml
+++ b/components/analytics/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt-plugins
carbon-device-mgt-plugins-parent
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../../pom.xml
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/pom.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/pom.xml
index 40220bd12..1088db3e9 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/pom.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/pom.xml
@@ -21,7 +21,7 @@
androidsense-plugin
org.wso2.carbon.devicemgt-plugins
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/pom.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/pom.xml
index 6e15c7ed3..d6b8df2ce 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/pom.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/pom.xml
@@ -3,7 +3,7 @@
androidsense-plugin
org.wso2.carbon.devicemgt-plugins
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
@@ -172,6 +172,32 @@
android_sense
+
+ org.jacoco
+ jacoco-maven-plugin
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+
+
+
+ jacoco-initialize
+
+ prepare-agent
+
+
+
+ jacoco-site
+ test
+
+ report
+
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+ ${basedir}/target/coverage-reports/site
+
+
+
+
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/pom.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/pom.xml
index 029436784..2a6656a3f 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/pom.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/pom.xml
@@ -22,7 +22,7 @@
androidsense-plugin
org.wso2.carbon.devicemgt-plugins
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.js
index 438936c90..49b35cf50 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.js
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.js
@@ -20,6 +20,7 @@ function onRequest(context) {
var log = new Log("device-view.js");
var deviceType = context.uriParams.deviceType;
var deviceId = request.getParameter("id");
+ var owner = request.getParameter("owner");
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var autoCompleteParams = [
{"name" : "deviceId", "value" : deviceId}
@@ -27,7 +28,7 @@ function onRequest(context) {
if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) {
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
- var device = deviceModule.viewDevice(deviceType, deviceId);
+ var device = deviceModule.viewDevice(deviceType, deviceId, owner);
if (device && device.status != "error") {
var anchor = { "device" : { "id" : device.content.deviceIdentifier, "type" : device.content.type}};
var viewObject = {};
diff --git a/components/device-types/androidsense-plugin/pom.xml b/components/device-types/androidsense-plugin/pom.xml
index 74908c498..ef7bacbce 100644
--- a/components/device-types/androidsense-plugin/pom.xml
+++ b/components/device-types/androidsense-plugin/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt-plugins
device-types
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/pom.xml b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/pom.xml
index 9aa16a559..aeff9f43d 100644
--- a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/pom.xml
+++ b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/pom.xml
@@ -21,7 +21,7 @@
arduino-plugin
org.wso2.carbon.devicemgt-plugins
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/pom.xml b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/pom.xml
index ce175790d..08c2766f1 100644
--- a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/pom.xml
+++ b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/pom.xml
@@ -21,7 +21,7 @@
arduino-plugin
org.wso2.carbon.devicemgt-plugins
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
@@ -158,6 +158,32 @@
arduino
+
+ org.jacoco
+ jacoco-maven-plugin
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+
+
+
+ jacoco-initialize
+
+ prepare-agent
+
+
+
+ jacoco-site
+ test
+
+ report
+
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+ ${basedir}/target/coverage-reports/site
+
+
+
+
diff --git a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.ui/pom.xml b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.ui/pom.xml
index 4ed266718..070042199 100644
--- a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.ui/pom.xml
+++ b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.ui/pom.xml
@@ -23,7 +23,7 @@
arduino-plugin
org.wso2.carbon.devicemgt-plugins
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/components/device-types/arduino-plugin/pom.xml b/components/device-types/arduino-plugin/pom.xml
index 4be186bfd..ba3327032 100644
--- a/components/device-types/arduino-plugin/pom.xml
+++ b/components/device-types/arduino-plugin/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt-plugins
device-types
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/components/device-types/pom.xml b/components/device-types/pom.xml
index 955994639..c935aba89 100644
--- a/components/device-types/pom.xml
+++ b/components/device-types/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt-plugins
carbon-device-mgt-plugins-parent
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../../pom.xml
diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/pom.xml b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/pom.xml
index 03ff5f76d..5336b00e3 100644
--- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/pom.xml
+++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/pom.xml
@@ -21,7 +21,7 @@
raspberrypi-plugin
org.wso2.carbon.devicemgt-plugins
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/pom.xml b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/pom.xml
index 9b1ce1844..ca8d74c6c 100644
--- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/pom.xml
+++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/pom.xml
@@ -21,7 +21,7 @@
raspberrypi-plugin
org.wso2.carbon.devicemgt-plugins
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
@@ -139,6 +139,32 @@
raspberrypi
+
+ org.jacoco
+ jacoco-maven-plugin
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+
+
+
+ jacoco-initialize
+
+ prepare-agent
+
+
+
+ jacoco-site
+ test
+
+ report
+
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+ ${basedir}/target/coverage-reports/site
+
+
+
+
diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/pom.xml b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/pom.xml
index 5b0702e24..fb721c750 100644
--- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/pom.xml
+++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/pom.xml
@@ -23,7 +23,7 @@
raspberrypi-plugin
org.wso2.carbon.devicemgt-plugins
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/components/device-types/raspberrypi-plugin/pom.xml b/components/device-types/raspberrypi-plugin/pom.xml
index b031f75e5..838ef998f 100644
--- a/components/device-types/raspberrypi-plugin/pom.xml
+++ b/components/device-types/raspberrypi-plugin/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt-plugins
device-types
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/pom.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/pom.xml
index c26cf7bd8..d8fa43317 100644
--- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/pom.xml
+++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/pom.xml
@@ -23,7 +23,7 @@
virtual-fire-alarm-plugin
org.wso2.carbon.devicemgt-plugins
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/pom.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/pom.xml
index 3cc0f920c..7738dfa14 100644
--- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/pom.xml
+++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/pom.xml
@@ -21,7 +21,7 @@
virtual-fire-alarm-plugin
org.wso2.carbon.devicemgt-plugins
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/pom.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/pom.xml
index dffaa4891..8ae713f84 100644
--- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/pom.xml
+++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/pom.xml
@@ -21,7 +21,7 @@
virtual-fire-alarm-plugin
org.wso2.carbon.devicemgt-plugins
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
@@ -240,6 +240,32 @@
virtual_firealarm
+
+ org.jacoco
+ jacoco-maven-plugin
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+
+
+
+ jacoco-initialize
+
+ prepare-agent
+
+
+
+ jacoco-site
+ test
+
+ report
+
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+ ${basedir}/target/coverage-reports/site
+
+
+
+
diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/pom.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/pom.xml
index 6dc7a5fbe..5d8bde9af 100644
--- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/pom.xml
+++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/pom.xml
@@ -23,7 +23,7 @@
virtual-fire-alarm-plugin
org.wso2.carbon.devicemgt-plugins
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/components/device-types/virtual-fire-alarm-plugin/pom.xml b/components/device-types/virtual-fire-alarm-plugin/pom.xml
index 6e0d79479..db226fd08 100644
--- a/components/device-types/virtual-fire-alarm-plugin/pom.xml
+++ b/components/device-types/virtual-fire-alarm-plugin/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt-plugins
device-types
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.osgiconnector/pom.xml b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.osgiconnector/pom.xml
index 0d092aca8..b9fdc36a3 100644
--- a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.osgiconnector/pom.xml
+++ b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.osgiconnector/pom.xml
@@ -18,7 +18,7 @@
org.wso2.carbon.devicemgt-plugins
appm-connector
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
@@ -65,6 +65,32 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+
+
+
+ jacoco-initialize
+
+ prepare-agent
+
+
+
+ jacoco-site
+ test
+
+ report
+
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+ ${basedir}/target/coverage-reports/site
+
+
+
+
diff --git a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/pom.xml b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/pom.xml
index f0966f240..0521de608 100644
--- a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/pom.xml
+++ b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector/pom.xml
@@ -18,7 +18,7 @@
org.wso2.carbon.devicemgt-plugins
appm-connector
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
@@ -83,6 +83,32 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+
+
+
+ jacoco-initialize
+
+ prepare-agent
+
+
+
+ jacoco-site
+ test
+
+ report
+
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+ ${basedir}/target/coverage-reports/site
+
+
+
+
diff --git a/components/extensions/appm-connector/pom.xml b/components/extensions/appm-connector/pom.xml
index aa4ebb29c..f8d37fdce 100644
--- a/components/extensions/appm-connector/pom.xml
+++ b/components/extensions/appm-connector/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt-plugins
extensions
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/pom.xml b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/pom.xml
index 694cbde96..46b9857a4 100644
--- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/pom.xml
+++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.extension/pom.xml
@@ -20,7 +20,7 @@
org.wso2.carbon.devicemgt-plugins
cdmf-transport-adapters
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../../pom.xml
4.0.0
@@ -76,6 +76,32 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+
+
+
+ jacoco-initialize
+
+ prepare-agent
+
+
+
+ jacoco-site
+ test
+
+ report
+
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+ ${basedir}/target/coverage-reports/site
+
+
+
+
diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.http/pom.xml b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.http/pom.xml
index fdacf4cdc..0b9a5fb1f 100644
--- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.http/pom.xml
+++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.http/pom.xml
@@ -20,7 +20,7 @@
org.wso2.carbon.devicemgt-plugins
cdmf-transport-adapters
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../../pom.xml
@@ -176,6 +176,32 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+
+
+
+ jacoco-initialize
+
+ prepare-agent
+
+
+
+ jacoco-site
+ test
+
+ report
+
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+ ${basedir}/target/coverage-reports/site
+
+
+
+
diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/pom.xml b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/pom.xml
index e86625147..f6d07cc3a 100644
--- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/pom.xml
+++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/pom.xml
@@ -20,7 +20,7 @@
org.wso2.carbon.devicemgt-plugins
cdmf-transport-adapters
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../../pom.xml
4.0.0
@@ -153,6 +153,32 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+
+
+
+ jacoco-initialize
+
+ prepare-agent
+
+
+
+ jacoco-site
+ test
+
+ report
+
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+ ${basedir}/target/coverage-reports/site
+
+
+
+
diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml
index 71717949e..f13071e07 100644
--- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml
+++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.thrift/pom.xml
@@ -21,7 +21,7 @@
org.wso2.carbon.devicemgt-plugins
cdmf-transport-adapters
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../../pom.xml
@@ -125,6 +125,32 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+
+
+
+ jacoco-initialize
+
+ prepare-agent
+
+
+
+ jacoco-site
+ test
+
+ report
+
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+ ${basedir}/target/coverage-reports/site
+
+
+
+
diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.xmpp/pom.xml b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.xmpp/pom.xml
index 256d79358..b5ec0292d 100644
--- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.xmpp/pom.xml
+++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.xmpp/pom.xml
@@ -20,7 +20,7 @@
org.wso2.carbon.devicemgt-plugins
cdmf-transport-adapters
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../../pom.xml
4.0.0
@@ -129,6 +129,32 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+
+
+
+ jacoco-initialize
+
+ prepare-agent
+
+
+
+ jacoco-site
+ test
+
+ report
+
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+ ${basedir}/target/coverage-reports/site
+
+
+
+
diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/pom.xml b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/pom.xml
index e13c9ed2f..6ddabed1c 100644
--- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/pom.xml
+++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/pom.xml
@@ -20,7 +20,7 @@
org.wso2.carbon.devicemgt-plugins
cdmf-transport-adapters
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../../pom.xml
4.0.0
@@ -136,6 +136,32 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+
+
+
+ jacoco-initialize
+
+ prepare-agent
+
+
+
+ jacoco-site
+ test
+
+ report
+
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+ ${basedir}/target/coverage-reports/site
+
+
+
+
\ No newline at end of file
diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket.endpoint/pom.xml b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket.endpoint/pom.xml
index 581754566..b8cedff02 100644
--- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket.endpoint/pom.xml
+++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket.endpoint/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt-plugins
cdmf-transport-adapters
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../../pom.xml
@@ -59,5 +59,33 @@
secured-websocket
+
+
+ org.jacoco
+ jacoco-maven-plugin
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+
+
+
+ jacoco-initialize
+
+ prepare-agent
+
+
+
+ jacoco-site
+ test
+
+ report
+
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+ ${basedir}/target/coverage-reports/site
+
+
+
+
+
diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/pom.xml b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/pom.xml
index 6a8b988dd..0fba9121d 100644
--- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/pom.xml
+++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/pom.xml
@@ -21,7 +21,7 @@
org.wso2.carbon.devicemgt-plugins
cdmf-transport-adapters
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../../pom.xml
@@ -185,6 +185,32 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+
+
+
+ jacoco-initialize
+
+ prepare-agent
+
+
+
+ jacoco-site
+ test
+
+ report
+
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+ ${basedir}/target/coverage-reports/site
+
+
+
+
diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/src/main/java/org/wso2/carbon/device/mgt/output/adapter/websocket/authorization/DeviceAuthorizer.java b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/src/main/java/org/wso2/carbon/device/mgt/output/adapter/websocket/authorization/DeviceAuthorizer.java
index 36744852e..12e42a518 100644
--- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/src/main/java/org/wso2/carbon/device/mgt/output/adapter/websocket/authorization/DeviceAuthorizer.java
+++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/src/main/java/org/wso2/carbon/device/mgt/output/adapter/websocket/authorization/DeviceAuthorizer.java
@@ -104,7 +104,7 @@ public class DeviceAuthorizer implements Authorizer {
List devices = deviceAuthorizationResult.getAuthorizedDevices();
if (devices != null && devices.size() > 0) {
DeviceIdentifier authorizedDevice = devices.get(0);
- if (authorizedDevice.getId().equals(deviceId) && authorizedDevice.getType().equals(deviceType)) {
+ if (authorizedDevice.getId().equals(deviceId) && authorizedDevice.getType().equalsIgnoreCase(deviceType)) {
return true;
}
}
diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.xmpp/pom.xml b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.xmpp/pom.xml
index 1d42a9672..5d09562e1 100644
--- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.xmpp/pom.xml
+++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.xmpp/pom.xml
@@ -20,7 +20,7 @@
org.wso2.carbon.devicemgt-plugins
cdmf-transport-adapters
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../../pom.xml
@@ -103,6 +103,32 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+
+
+
+ jacoco-initialize
+
+ prepare-agent
+
+
+
+ jacoco-site
+ test
+
+ report
+
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+ ${basedir}/target/coverage-reports/site
+
+
+
+
\ No newline at end of file
diff --git a/components/extensions/cdmf-transport-adapters/pom.xml b/components/extensions/cdmf-transport-adapters/pom.xml
index 5addb98d1..e7b63115a 100644
--- a/components/extensions/cdmf-transport-adapters/pom.xml
+++ b/components/extensions/cdmf-transport-adapters/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt-plugins
extensions
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/pom.xml b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/pom.xml
new file mode 100644
index 000000000..ccc04cc4a
--- /dev/null
+++ b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/pom.xml
@@ -0,0 +1,332 @@
+
+
+
+
+
+
+ org.wso2.carbon.devicemgt-plugins
+ mb-extensions
+ 4.0.87-SNAPSHOT
+ ../pom.xml
+
+
+ 4.0.0
+ org.wso2.carbon.andes.extensions.device.mgt.api
+ war
+ WSO2 Carbon - MQTT Topics Management API
+ WSO2 Carbon - MQTT Topics Management API
+ http://wso2.org
+
+
+
+
+ maven-compiler-plugin
+
+
+ 1.7
+
+
+
+ maven-war-plugin
+
+ WEB-INF/lib/*cxf*.jar
+ api#mqtt-topics#v1.0
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+
+
+
+ jacoco-initialize
+
+ prepare-agent
+
+
+
+ jacoco-site
+ test
+
+ report
+
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+ ${basedir}/target/coverage-reports/site
+
+
+
+
+
+
+
+
+
+ deploy
+
+ compile
+
+
+ org.apache.maven.plugins
+ maven-antrun-plugin
+ 1.7
+
+
+ compile
+
+ run
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ client
+
+ test
+
+
+ org.codehaus.mojo
+ exec-maven-plugin
+ 1.2.1
+
+
+ test
+
+ java
+
+
+
+
+
+
+
+
+
+
+
+ org.apache.cxf
+ cxf-rt-frontend-jaxws
+ provided
+
+
+ org.apache.cxf
+ cxf-rt-frontend-jaxrs
+ provided
+
+
+ org.apache.cxf
+ cxf-rt-transports-http
+ provided
+
+
+ junit
+ junit
+ test
+
+
+ commons-httpclient.wso2
+ commons-httpclient
+ provided
+
+
+ javax.ws.rs
+ jsr311-api
+
+
+
+ org.wso2.carbon
+ org.wso2.carbon.utils
+ provided
+
+
+ org.wso2.carbon
+ org.wso2.carbon.logging
+ provided
+
+
+ org.wso2.carbon.devicemgt
+ org.wso2.carbon.device.mgt.common
+ provided
+
+
+ org.wso2.carbon.devicemgt
+ org.wso2.carbon.device.mgt.core
+ provided
+
+
+ org.apache.axis2.wso2
+ axis2
+
+
+ org.apache.axis2.transport
+ axis2-transport-mail
+
+
+ org.apache.ws.commons.axiom.wso2
+ axiom
+
+
+
+
+ org.wso2.carbon.devicemgt
+ org.wso2.carbon.policy.mgt.core
+ provided
+
+
+ org.apache.axis2.wso2
+ axis2-client
+
+
+
+
+ org.wso2.carbon.identity.inbound.auth.oauth2
+ org.wso2.carbon.identity.oauth.stub
+ provided
+
+
+ org.apache.axis2.wso2
+ axis2
+
+
+ org.apache.axis2.wso2
+ axis2-client
+
+
+ org.apache.axis2.transport
+ axis2-transport-mail
+
+
+
+
+ org.json.wso2
+ json
+ provided
+
+
+ org.wso2.carbon.devicemgt
+ org.wso2.carbon.certificate.mgt.core
+ provided
+
+
+ org.apache.axis2.wso2
+ axis2
+
+
+
+
+ io.swagger
+ swagger-annotations
+
+
+ io.swagger
+ swagger-core
+
+
+ com.fasterxml.jackson.module
+ jackson-module-jaxb-annotations
+
+
+ org.slf4j
+ slf4j-api
+
+
+ org.wso2.orbit.com.fasterxml.jackson.core
+ jackson-core
+
+
+
+
+ io.swagger
+ swagger-jaxrs
+
+
+ com.fasterxml.jackson.module
+ jackson-module-jaxb-annotations
+
+
+ org.slf4j
+ slf4j-api
+
+
+ org.wso2.orbit.com.fasterxml.jackson.core
+ jackson-core
+
+
+
+
+ javax.servlet
+ servlet-api
+
+
+
+ org.wso2.carbon.devicemgt
+ org.wso2.carbon.apimgt.annotations
+ provided
+
+
+ org.wso2.orbit.com.fasterxml.jackson.core
+ jackson-annotations
+
+
+ org.hibernate
+ hibernate-validator
+
+
+ javax.ws.rs
+ javax.ws.rs-api
+
+
+ org.wso2.carbon.messaging
+ org.wso2.carbon.andes.mqtt.stub
+
+
+ org.apache.axis2.wso2
+ axis2
+
+
+ org.apache.axis2.wso2
+ axis2-client
+
+
+ org.apache.axis2.transport
+ axis2-transport-mail
+
+
+ org.apache.ws.commons.axiom.wso2
+ axiom
+
+
+
+
+
+
diff --git a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/jaxrs/ApiOriginFilter.java b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/jaxrs/ApiOriginFilter.java
new file mode 100644
index 000000000..d5f093ef9
--- /dev/null
+++ b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/jaxrs/ApiOriginFilter.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * WSO2 Inc. licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.wso2.carbon.andes.extensions.device.mgt.jaxrs;
+
+import javax.servlet.*;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+public class ApiOriginFilter implements Filter {
+
+ public void doFilter(ServletRequest request, ServletResponse response,
+ FilterChain chain) throws IOException, ServletException {
+ HttpServletResponse res = (HttpServletResponse) response;
+ res.addHeader("Access-Control-Allow-Origin", "*");
+ res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT");
+ res.addHeader("Access-Control-Allow-Headers", "Content-Type");
+ chain.doFilter(request, response);
+ }
+
+ public void destroy() {
+ //do nothing
+ }
+
+ public void init(FilterConfig filterConfig) throws ServletException {
+ //do nothing
+ }
+
+}
diff --git a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/jaxrs/beans/BasePaginatedResult.java b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/jaxrs/beans/BasePaginatedResult.java
new file mode 100644
index 000000000..7341f6686
--- /dev/null
+++ b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/jaxrs/beans/BasePaginatedResult.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * WSO2 Inc. licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.wso2.carbon.andes.extensions.device.mgt.jaxrs.beans;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModelProperty;
+
+public class BasePaginatedResult {
+
+ /**
+ * Number of Resources returned.
+ */
+ @ApiModelProperty(
+ value = "Number of total resources.",
+ example = "1")
+ @JsonProperty("count")
+ private long count;
+
+ public long getCount() {
+ return count;
+ }
+
+ public void setCount(long count) {
+ this.count = count;
+ }
+}
\ No newline at end of file
diff --git a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/jaxrs/beans/ErrorListItem.java b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/jaxrs/beans/ErrorListItem.java
new file mode 100644
index 000000000..ebd09a021
--- /dev/null
+++ b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/jaxrs/beans/ErrorListItem.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * WSO2 Inc. licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.wso2.carbon.andes.extensions.device.mgt.jaxrs.beans;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.NotNull;
+
+@ApiModel(description = "")
+public class ErrorListItem {
+
+ @NotNull
+ private String code = null;
+ @NotNull
+ private String message = null;
+
+ @ApiModelProperty(required = true, value = "")
+ @JsonProperty("code")
+ public String getCode() {
+ return code;
+ }
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+ public ErrorListItem() {}
+
+ public ErrorListItem(String code, String msg) {
+ this.code = code;
+ this.message = msg;
+ }
+
+
+ /**
+ * Description about individual errors occurred
+ **/
+ @ApiModelProperty(required = true, value = "Description about individual errors occurred")
+ @JsonProperty("message")
+ public String getMessage() {
+ return message;
+ }
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("errorItem {\n");
+
+ sb.append(" code: ").append(code).append("\n");
+ sb.append(" message: ").append(message).append("\n");
+ sb.append("}\n");
+ return sb.toString();
+ }
+
+}
diff --git a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/jaxrs/beans/ErrorResponse.java b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/jaxrs/beans/ErrorResponse.java
new file mode 100644
index 000000000..b8e090d38
--- /dev/null
+++ b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/jaxrs/beans/ErrorResponse.java
@@ -0,0 +1,193 @@
+/*
+ * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * WSO2 Inc. licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.wso2.carbon.andes.extensions.device.mgt.jaxrs.beans;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@ApiModel(description = "")
+public class ErrorResponse {
+
+ private Long code = null;
+ private String message = null;
+ private String description = null;
+ private String moreInfo = null;
+ private List errorItems = new ArrayList<>();
+
+ public ErrorResponse() {
+ }
+
+ @JsonProperty(value = "code")
+ @ApiModelProperty(required = true, value = "")
+ public Long getCode() {
+ return code;
+ }
+
+ public void setCode(Long code) {
+ this.code = code;
+ }
+
+ @JsonProperty(value = "message")
+ @ApiModelProperty(required = true, value = "ErrorResponse message.")
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ @JsonProperty(value = "description")
+ @ApiModelProperty(value = "A detail description about the error message.")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ @JsonProperty(value = "moreInfo")
+ @ApiModelProperty(value = "Preferably an url with more details about the error.")
+ public String getMoreInfo() {
+ return moreInfo;
+ }
+
+ public void setMoreInfo(String moreInfo) {
+ this.moreInfo = moreInfo;
+ }
+
+ public void addErrorListItem(ErrorListItem item) {
+ this.errorItems.add(item);
+ }
+
+ /**
+ * If there are more than one error list them out. \nFor example, list out validation errors by each field.
+ */
+ @JsonProperty(value = "errorItems")
+ @ApiModelProperty(value = "If there are more than one error list them out. \n" +
+ "For example, list out validation errors by each field.")
+ public List getErrorItems() {
+ return errorItems;
+ }
+
+ public void setErrorItems(List error) {
+ this.errorItems = error;
+ }
+
+ @Override
+ public String toString() {
+// StringBuilder sb = new StringBuilder();
+// sb.append("{");
+// boolean cont = false;
+// if (code != null) {
+// cont = true;
+// sb.append(" \"code\": ").append(code);
+// }
+// if (message != null) {
+// if (cont) {
+// sb.append(",");
+// }
+// cont = true;
+// sb.append(" \"message\": \"").append(message).append("\"");
+// }
+// if (description != null) {
+// if (cont) {
+// sb.append(",");
+// }
+// cont = true;
+// sb.append(" \"description\": ").append(description).append("\"");
+// }
+// if (moreInfo != null) {
+// if (cont) {
+// sb.append(",");
+// }
+// cont = true;
+// sb.append(" \"moreInfo\": \"").append(moreInfo).append("\"");
+// }
+// if (error != null && error.size() > 0) {
+// if (cont) {
+// sb.append(",");
+// }
+// sb.append(" \"errorItems\": ").append(error);
+// }
+// sb.append("}");
+// return sb.toString();
+ return null;
+ }
+
+ public static class ErrorResponseBuilder {
+
+ private Long code = null;
+ private String message = null;
+ private String description = null;
+ private String moreInfo = null;
+ private List error;
+
+
+ public ErrorResponseBuilder() {
+ this.error = new ArrayList<>();
+ }
+
+ public ErrorResponseBuilder setCode(long code) {
+ this.code = code;
+ return this;
+ }
+
+ public ErrorResponseBuilder setMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ public ErrorResponseBuilder setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public ErrorResponseBuilder setMoreInfo(String moreInfo) {
+ this.moreInfo = moreInfo;
+ return this;
+ }
+
+ public ErrorResponseBuilder addErrorItem(String code, String msg) {
+ ErrorListItem item = new ErrorListItem();
+ item.setCode(code);
+ item.setMessage(msg);
+ this.error.add(item);
+ return this;
+ }
+
+ public ErrorResponse build() {
+ ErrorResponse errorResponse = new ErrorResponse();
+ errorResponse.setCode(code);
+ errorResponse.setMessage(message);
+ errorResponse.setErrorItems(error);
+ errorResponse.setDescription(description);
+ errorResponse.setMoreInfo(moreInfo);
+ return errorResponse;
+ }
+ }
+
+}
+
+
diff --git a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/jaxrs/beans/SubscriptionList.java b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/jaxrs/beans/SubscriptionList.java
new file mode 100644
index 000000000..80a7d8cad
--- /dev/null
+++ b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/jaxrs/beans/SubscriptionList.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * WSO2 Inc. licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.wso2.carbon.andes.extensions.device.mgt.jaxrs.beans;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModelProperty;
+import org.wso2.carbon.andes.core.types.xsd.MQTTSubscription;
+import org.wso2.carbon.andes.core.types.xsd.Subscription;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SubscriptionList extends BasePaginatedResult {
+
+ private List subscriptions = new ArrayList<>();
+
+ @ApiModelProperty(value = "List of subscriptions returned")
+ @JsonProperty("subscriptions")
+ public List getList() {
+ return subscriptions;
+ }
+
+ public void setList(List subscriptions) {
+ this.subscriptions = subscriptions;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("{\n");
+
+ sb.append(" count: ").append(getCount()).append(",\n");
+ sb.append(" subscriptions: [").append(subscriptions).append("\n");
+ sb.append("]}\n");
+ return sb.toString();
+ }
+
+}
+
diff --git a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/jaxrs/beans/TopicPaginationRequest.java b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/jaxrs/beans/TopicPaginationRequest.java
new file mode 100644
index 000000000..233b84bb3
--- /dev/null
+++ b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/jaxrs/beans/TopicPaginationRequest.java
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * WSO2 Inc. licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License.
+ * you may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.wso2.carbon.andes.extensions.device.mgt.jaxrs.beans;
+
+import java.util.Date;
+
+/**
+ * This class holds required parameters for a querying a paginated device response.
+ */
+public class TopicPaginationRequest {
+
+ private int startIndex;
+ private int rowCount;
+ private Date since;
+ private String topic_name;
+ private int remaining_messages;
+ private String active;
+ private String durable;
+ private String subscriber_name;
+ private String identifier;
+
+ public TopicPaginationRequest(int start, int rowCount) {
+ this.startIndex = start;
+ this.rowCount = rowCount;
+ }
+
+ public int getStartIndex() {
+ return startIndex;
+ }
+
+ public void setStartIndex(int startIndex) {
+ this.startIndex = startIndex;
+ }
+
+ public int getRowCount() {
+ return rowCount;
+ }
+
+ public void setRowCount(int rowCount) {
+ this.rowCount = rowCount;
+ }
+
+ public Date getSince() {
+ return since;
+ }
+
+ public void setSince(Date since) {
+ this.since = since;
+ }
+
+ public String getTopic_name() {
+ return topic_name;
+ }
+
+ public void setTopic_name(String topic_name) {
+ this.topic_name = topic_name;
+ }
+
+ public int getRemaining_messages() {
+ return remaining_messages;
+ }
+
+ public void setRemaining_messages(int remaining_messages) {
+ this.remaining_messages = remaining_messages;
+ }
+
+ public String getActive() {
+ return active;
+ }
+
+ public void setActive(String active) {
+ this.active = active;
+ }
+
+ public String getDurable() {
+ return durable;
+ }
+
+ public void setDurable(String durable) {
+ this.durable = durable;
+ }
+
+ public String getSubscriber_name() {
+ return subscriber_name;
+ }
+
+ public void setSubscriber_name(String subscriber_name) {
+ this.subscriber_name = subscriber_name;
+ }
+
+ public String getIdentifier() {
+ return identifier;
+ }
+
+ public void setIdentifier(String identifier) {
+ this.identifier = identifier;
+ }
+}
diff --git a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/jaxrs/common/GsonMessageBodyHandler.java b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/jaxrs/common/GsonMessageBodyHandler.java
new file mode 100644
index 000000000..804244945
--- /dev/null
+++ b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.api/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/jaxrs/common/GsonMessageBodyHandler.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * WSO2 Inc. licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.wso2.carbon.andes.extensions.device.mgt.jaxrs.common;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.Produces;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.ext.MessageBodyReader;
+import javax.ws.rs.ext.MessageBodyWriter;
+import javax.ws.rs.ext.Provider;
+import java.io.*;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+
+import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
+
+@Provider
+@Produces(APPLICATION_JSON)
+@Consumes(APPLICATION_JSON)
+public class GsonMessageBodyHandler implements MessageBodyWriter
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-bar/operation-bar.hbs b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-bar/operation-bar.hbs
index 8cf7a0d74..2581776dd 100644
--- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-bar/operation-bar.hbs
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-bar/operation-bar.hbs
@@ -36,7 +36,7 @@
}
{{#each controlOperations}}
-
+
{{#if iconFont}}
{{else}}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-mod/public/js/operation-mod.js b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-mod/public/js/operation-mod.js
index 3ead46e63..c8a9ce6ee 100644
--- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-mod/public/js/operation-mod.js
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-mod/public/js/operation-mod.js
@@ -742,9 +742,12 @@ var androidOperationModule = function () {
// only for app whitelisting and black listing
if (operationCode == "APP-RESTRICTION" && key == "restrictedApplications") {
+ //remove elements before adding
+ $('[data-add-form-container="#restricted-applications-grid"]').empty();
+
var i;
for (i = 0; i < uiPayload.restrictedApplications.length; ++i) {
- $("#restrictedapplication-list").append('' +
+ $('[data-add-form-container="#restricted-applications-grid"]').append('
' +
''+ (i+1) +' | ' + uiPayload.restrictedApplications[i].appName +
' | ' + uiPayload.restrictedApplications[i].packageName + ' |
');
}
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-edit/public/templates/android-policy-edit.hbs b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-edit/public/templates/android-policy-edit.hbs
index 4b2a55318..2256807f3 100644
--- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-edit/public/templates/android-policy-edit.hbs
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-edit/public/templates/android-policy-edit.hbs
@@ -321,7 +321,7 @@
+ title="Enables the usage of device camera.">
Allow use of camera
@@ -340,7 +340,7 @@
-
+
Disallow configuring credentials
@@ -351,7 +351,7 @@
@@ -750,7 +749,7 @@
-
+
Disable status bar
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/pom.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/pom.xml
index 5a6523e66..98c0a9013 100644
--- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/pom.xml
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android/pom.xml
@@ -22,7 +22,7 @@
android-plugin
org.wso2.carbon.devicemgt-plugins
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
@@ -84,20 +84,32 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ org.jacoco
+ jacoco-maven-plugin
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+
+
+
+ jacoco-initialize
+
+ prepare-agent
+
+
+
+ jacoco-site
+ test
+
+ report
+
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+ ${basedir}/target/coverage-reports/site
+
+
+
+
diff --git a/components/mobile-plugins/android-plugin/pom.xml b/components/mobile-plugins/android-plugin/pom.xml
index c987467ec..8aa40780c 100644
--- a/components/mobile-plugins/android-plugin/pom.xml
+++ b/components/mobile-plugins/android-plugin/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt-plugins
mobile-plugins
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/components/mobile-plugins/pom.xml b/components/mobile-plugins/pom.xml
index 6fec21c29..178500548 100644
--- a/components/mobile-plugins/pom.xml
+++ b/components/mobile-plugins/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt-plugins
carbon-device-mgt-plugins-parent
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../../pom.xml
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/pom.xml b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/pom.xml
index a2d2784c9..7b06da4bd 100644
--- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/pom.xml
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/pom.xml
@@ -21,7 +21,7 @@
windows-plugin
org.wso2.carbon.devicemgt-plugins
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
@@ -49,6 +49,32 @@
api#device-mgt#windows#v1.0
+
+ org.jacoco
+ jacoco-maven-plugin
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+
+
+
+ jacoco-initialize
+
+ prepare-agent
+
+
+
+ jacoco-site
+ test
+
+ report
+
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+ ${basedir}/target/coverage-reports/site
+
+
+
+
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/common/PluginConstants.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/common/PluginConstants.java
index 7ef3f6498..897a7d2bb 100644
--- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/common/PluginConstants.java
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/common/PluginConstants.java
@@ -352,11 +352,10 @@ public final class PluginConstants {
private WindowsEnrollmentProperties() {
throw new AssertionError();
}
-
public static final String DEVICE_NAME = "DeviceName";
public static final String DEVICE_VERSION = "OSVersion";
public static final String DEVICE_ID = "DeviceID";
public static final String IMEI = "MobileEquipmentId";
-
+ public static final String TYPE = "DeviceType";
}
}
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/ChallengeTag.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/ChallengeTag.java
index e2c1fe6b4..c47649ce2 100644
--- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/ChallengeTag.java
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/ChallengeTag.java
@@ -38,9 +38,9 @@ public class ChallengeTag {
public void buildChallengeElement(Document doc, Element rootElement) {
Element challenge = doc.createElement(Constants.CHALLENGE);
- rootElement.appendChild(challenge);
if (getMeta() != null) {
getMeta().buildMetaElement(doc, challenge);
}
+ rootElement.appendChild(challenge);
}
}
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/StatusTag.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/StatusTag.java
index b83fe5c04..4c82b8a56 100644
--- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/StatusTag.java
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/StatusTag.java
@@ -44,6 +44,17 @@ public class StatusTag {
this.data = data;
}
+ public StatusTag(int commandId, int messageReference, int commandReference, String command,
+ ChallengeTag challengeTag, String targetReference, String data) {
+ this.commandId = commandId;
+ this.messageReference = messageReference;
+ this.commandReference = commandReference;
+ this.command = command;
+ this.challenge = challengeTag;
+ this.targetReference = targetReference;
+ this.data = data;
+ }
+
public StatusTag() {
}
@@ -140,5 +151,4 @@ public class StatusTag {
status.appendChild(data);
}
}
-
}
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/util/Constants.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/util/Constants.java
index b20f31baa..b0d3fb85d 100644
--- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/util/Constants.java
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/util/Constants.java
@@ -87,6 +87,7 @@ public class Constants {
public final class SyncMLResponseCodes {
public static final String AUTHENTICATION_ACCEPTED = "212";
public static final String ACCEPTED = "200";
+ public static final String UNAUTHORIZED = "401";
public static final String ACCEPTED_FOR_PROCESSING = "202";
public static final String PIN_NOTFOUND = "405";
public static final String LOCK_RESET_NOTIFICATION = "Error occurred in Device Lock Operation. " +
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/util/OperationHandler.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/util/OperationHandler.java
index 25f963ab3..fd5cf76eb 100644
--- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/util/OperationHandler.java
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/util/OperationHandler.java
@@ -22,7 +22,6 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.json.JSONException;
import org.json.JSONObject;
-import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.device.details.DeviceInfo;
@@ -32,15 +31,21 @@ import org.wso2.carbon.device.mgt.common.notification.mgt.NotificationManagement
import org.wso2.carbon.device.mgt.common.notification.mgt.NotificationManagementService;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
+import org.wso2.carbon.device.mgt.common.policy.mgt.ProfileFeature;
+import org.wso2.carbon.device.mgt.common.policy.mgt.monitor.ComplianceFeature;
+import org.wso2.carbon.device.mgt.common.policy.mgt.monitor.PolicyComplianceException;
import org.wso2.carbon.device.mgt.core.device.details.mgt.DeviceDetailsMgtException;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.WindowsAPIUtils;
+import org.wso2.carbon.device.mgt.mobile.windows.api.operations.StatusTag;
+import org.wso2.carbon.device.mgt.mobile.windows.api.operations.SyncmlDocument;
+import org.wso2.carbon.device.mgt.mobile.windows.api.operations.SyncmlHeader;
+import org.wso2.carbon.device.mgt.mobile.windows.api.operations.ItemTag;
+import org.wso2.carbon.device.mgt.mobile.windows.api.operations.WindowsOperationException;
+import org.wso2.carbon.device.mgt.mobile.windows.api.operations.ResultsTag;
+import org.wso2.carbon.device.mgt.mobile.windows.api.operations.SyncmlBody;
import org.wso2.carbon.device.mgt.mobile.windows.api.services.syncml.beans.Profile;
-import org.wso2.carbon.device.mgt.mobile.windows.api.operations.*;
import org.wso2.carbon.policy.mgt.common.PolicyManagementException;
-import org.wso2.carbon.device.mgt.common.policy.mgt.ProfileFeature;
-import org.wso2.carbon.device.mgt.common.policy.mgt.monitor.ComplianceFeature;
-import org.wso2.carbon.device.mgt.common.policy.mgt.monitor.PolicyComplianceException;
import java.util.ArrayList;
import java.util.List;
@@ -226,6 +231,20 @@ public class OperationHandler {
}
}
+ public void updateDisenrollOperationStatus(DeviceIdentifier deviceIdentifier) throws OperationManagementException {
+ List extends Operation> pendingDeviceInfoOperations;
+ try {
+ pendingDeviceInfoOperations = WindowsAPIUtils.getPendingOperations(deviceIdentifier);
+ } catch (DeviceManagementException e) {
+ throw new OperationManagementException("Error occurred while getting pending operations.");
+ }
+ for (Operation operation : pendingDeviceInfoOperations) {
+ if (PluginConstants.OperationCodes.DISENROLL.equals(operation.getCode())) {
+ operation.setStatus(Operation.Status.COMPLETED);
+ updateStatus(deviceIdentifier.getId(), pendingDeviceInfoOperations);
+ }
+ }
+ }
public void updateDeviceInfoStatus(DeviceIdentifier deviceIdentifier) throws OperationManagementException {
List extends Operation> pendingDeviceInfoOperations;
@@ -294,6 +313,9 @@ public class OperationHandler {
if (OperationCode.Command.TOTAL_RAM.getCode().equals(itemTag.getSource().getLocURI())) {
updateDeviceInfo(syncmlDocument);
}
+ if (OperationCode.Command.BATTERY_CHARGE_REMAINING.equals(itemTag.getSource().getLocURI())) {
+ updateDeviceInfo(syncmlDocument);
+ }
}
}
UpdateUriOperations(syncmlDocument);
@@ -562,6 +584,7 @@ public class OperationHandler {
String totalRAM;
String deviceID = null;
String totalStorage;
+ Double battery;
List deviceInformations = syncmlDocument.getBody().getResults().getItem();
DeviceInfo deviceInfo = new DeviceInfo();
@@ -598,6 +621,10 @@ public class OperationHandler {
if (OperationCode.Info.DEV_ID.getCode().equals(source)) {
deviceID = item.getData();
}
+ if (OperationCode.Info.BATTERY_CHARGE_REMAINING.getCode().equals(source)) {
+ battery = Double.valueOf(item.getData());
+ deviceInfo.setBatteryLevel(battery);
+ }
}
DeviceIdentifier deviceIdentifier = convertToDeviceIdentifierObject(deviceID);
try {
@@ -636,6 +663,16 @@ public class OperationHandler {
} catch (OperationManagementException e) {
throw new WindowsOperationException("Error occurred while updating Device Location operation status.");
}
+ }
+ public void checkForDeviceWipe(List extends Operation> pendingDeviceInfoOperations
+ , DeviceIdentifier deviceIdentifier) throws OperationManagementException {
+ for (Operation operation : pendingDeviceInfoOperations) {
+ if (PluginConstants.OperationCodes.WIPE_DATA.equals(operation.getCode())) {
+ operation.setStatus(Operation.Status.COMPLETED);
+ updateStatus(deviceIdentifier.getId(), pendingDeviceInfoOperations);
+ }
+ }
}
}
+
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/util/OperationReply.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/util/OperationReply.java
index 9fbb4f27d..389dd0cdc 100644
--- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/util/OperationReply.java
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/util/OperationReply.java
@@ -21,6 +21,8 @@ package org.wso2.carbon.device.mgt.mobile.windows.api.operations.util;
import com.google.gson.Gson;
import org.json.JSONException;
import org.json.JSONObject;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
@@ -162,22 +164,27 @@ public class OperationReply {
SyncmlBody sourceSyncmlBody = syncmlDocument.getBody();
SyncmlHeader sourceHeader = syncmlDocument.getHeader();
StatusTag headerStatus;
+ ChallengeTag challengeTag = new ChallengeTag();
+ MetaTag metaTag = new MetaTag();
+ metaTag.setFormat(Constants.CRED_FORMAT);
+ metaTag.setType(Constants.CRED_TYPE);
+ metaTag.setNextNonce(Constants.INITIAL_NONCE);
+ challengeTag.setMeta(metaTag);
SyncmlBody syncmlBodyReply = new SyncmlBody();
List statuses = new ArrayList<>();
List sourceStatuses = sourceSyncmlBody.getStatus();
if (sourceStatuses.isEmpty()) {
headerStatus =
new StatusTag(headerCommandId, sourceHeader.getMsgID(), HEADER_STATUS_ID,
- HEADER_COMMAND_TEXT, sourceHeader.getSource().getLocURI(),
- String.valueOf(Constants.SyncMLResponseCodes.AUTHENTICATION_ACCEPTED));
+ HEADER_COMMAND_TEXT, challengeTag,sourceHeader.getSource().getLocURI(),
+ String.valueOf(Constants.SyncMLResponseCodes.UNAUTHORIZED));
statuses.add(headerStatus);
} else {
for (StatusTag sourceStatus : sourceStatuses) {
if (sourceStatus.getChallenge() != null && HEADER_COMMAND_TEXT.equals(sourceStatus.getCommand())) {
-
headerStatus =
new StatusTag(headerCommandId, sourceHeader.getMsgID(), HEADER_STATUS_ID,
- HEADER_COMMAND_TEXT, sourceHeader.getSource().getLocURI(),
+ HEADER_COMMAND_TEXT, challengeTag, sourceHeader.getSource().getLocURI(),
String.valueOf(Constants.SyncMLResponseCodes.AUTHENTICATION_ACCEPTED));
statuses.add(headerStatus);
}
@@ -230,7 +237,6 @@ public class OperationReply {
private void appendOperations(SyncmlBody syncmlBody) throws PolicyManagementException,
FeatureManagementException, JSONException, SyncmlOperationException {
-
GetTag getElement = new GetTag();
List getElements = new ArrayList<>();
List executeElements = new ArrayList<>();
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/enrollment/impl/EnrollmentServiceImpl.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/enrollment/impl/EnrollmentServiceImpl.java
index ee3d62c9c..558cd601b 100644
--- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/enrollment/impl/EnrollmentServiceImpl.java
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/enrollment/impl/EnrollmentServiceImpl.java
@@ -18,6 +18,7 @@
package org.wso2.carbon.device.mgt.mobile.windows.api.services.enrollment.impl;
+import com.google.gson.Gson;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.logging.Log;
@@ -40,6 +41,7 @@ import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WAPProvis
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsDeviceEnrolmentException;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.DeviceUtil;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.WindowsAPIUtils;
+import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.DeviceInfo;
import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.SyncmlCredentialUtil;
import org.wso2.carbon.device.mgt.mobile.windows.api.services.enrollment.EnrollmentService;
import org.wso2.carbon.device.mgt.mobile.windows.api.services.enrollment.beans.*;
@@ -98,7 +100,6 @@ public class EnrollmentServiceImpl implements EnrollmentService {
AdditionalContext additionalContext,
Holder response)
throws WindowsDeviceEnrolmentException, UnsupportedEncodingException, WAPProvisioningException {
-
String headerBinarySecurityToken = null;
String headerTo = null;
String encodedWap;
@@ -199,7 +200,6 @@ public class EnrollmentServiceImpl implements EnrollmentService {
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();
transformer.transform(DOMSource, streamResult);
-
return stringWriter.toString();
}
@@ -220,14 +220,12 @@ public class EnrollmentServiceImpl implements EnrollmentService {
String signedCertEncodedString;
X509Certificate signedCertificate;
String provisioningXmlString;
-
CertificateManagementServiceImpl certMgtServiceImpl = CertificateManagementServiceImpl.getInstance();
Base64 base64Encoder = new Base64();
try {
X509Certificate rootCACertificate = (X509Certificate) certMgtServiceImpl.getCACertificate();
rootCertEncodedString = base64Encoder.encodeAsString(rootCACertificate.getEncoded());
-
signedCertificate = certMgtServiceImpl.getSignedCertificateFromCSR(binarySecurityToken);
signedCertEncodedString = base64Encoder.encodeAsString(signedCertificate.getEncoded());
@@ -312,7 +310,6 @@ public class EnrollmentServiceImpl implements EnrollmentService {
Node pollValue = pollingAttributes.getNamedItem(PluginConstants.CertificateEnrolment.VALUE);
pollValue.setTextContent(pollingFrequency);
provisioningXmlString = convertDocumentToString(document);
-
} catch (ParserConfigurationException e) {
throw new WAPProvisioningException("Problem occurred while creating configuration request", e);
} catch (CertificateEncodingException e) {
@@ -368,7 +365,7 @@ public class EnrollmentServiceImpl implements EnrollmentService {
* @return Value added Device.
*/
private Device generateDevice(WindowsDevice windowsDevice) {
-
+ Gson gson = new Gson();
Device generatedDevice = new Device();
Device.Property OSVersionProperty = new Device.Property();
@@ -383,16 +380,26 @@ public class EnrollmentServiceImpl implements EnrollmentService {
IMEIProperty.setName(PluginConstants.SyncML.IMEI);
IMEIProperty.setValue(windowsDevice.getImei());
+ Device.Property deviceInfoProperties = new Device.Property();
+ deviceInfoProperties.setName(PluginConstants.WindowsEnrollmentProperties.TYPE);
+ deviceInfoProperties.setValue(windowsDevice.getWindowsType());
+ String deviceInfo = gson.toJson(deviceInfoProperties);
+
+ Device.Property winDeviceType = new Device.Property();
+ winDeviceType.setName(PluginConstants.SyncML.DEVICE_INFO);
+ winDeviceType.setValue(deviceInfo);
+
List propertyList = new ArrayList<>();
propertyList.add(OSVersionProperty);
propertyList.add(IMSEIProperty);
propertyList.add(IMEIProperty);
+ propertyList.add(winDeviceType);
EnrolmentInfo enrolmentInfo = new EnrolmentInfo();
enrolmentInfo.setOwner(windowsDevice.getUser());
enrolmentInfo.setOwnership(EnrolmentInfo.OwnerShip.BYOD);
enrolmentInfo.setStatus(EnrolmentInfo.Status.ACTIVE);
-
+
generatedDevice.setEnrolmentInfo(enrolmentInfo);
generatedDevice.setDeviceIdentifier(windowsDevice.getDeviceId());
generatedDevice.setProperties(propertyList);
@@ -430,6 +437,9 @@ public class EnrollmentServiceImpl implements EnrollmentService {
if (PluginConstants.WindowsEnrollmentProperties.DEVICE_VERSION.equals(contextItem.getName())) {
windowsDevice.setOsVersion(contextItem.getValue());
}
+ if (PluginConstants.WindowsEnrollmentProperties.TYPE.equals(contextItem.getName())) {
+ windowsDevice.setWindowsType(contextItem.getValue());
+ }
}
Device device = generateDevice(windowsDevice);
WindowsAPIUtils.getDeviceManagementService().enrollDevice(device);
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/impl/DeviceManagementServiceImpl.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/impl/DeviceManagementServiceImpl.java
index 8dd5f93cb..5b8d52a44 100644
--- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/impl/DeviceManagementServiceImpl.java
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/impl/DeviceManagementServiceImpl.java
@@ -87,39 +87,54 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
if ((PluginConstants.SyncML.SYNCML_FIRST_MESSAGE_ID == msgId) &&
(PluginConstants.SyncML.SYNCML_FIRST_SESSION_ID == sessionId)) {
- token = syncmlHeader.getCredential().getData();
- MobileCacheEntry cacheToken = DeviceUtil.getTokenEntry(token);
- DeviceUtil.persistChallengeToken(token, deviceIdentifier.getId(), user);
- PrivilegedCarbonContext carbonCtx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
- carbonCtx.setTenantId(cacheToken.getTenanatID(), true);
-
- if ((cacheToken.getUsername() != null) && (cacheToken.getUsername().equals(user))) {
-
- if (modifyEnrollWithMoreDetail(request, cacheToken.getTenantDomain(), cacheToken.getTenanatID())) {
- pendingOperations = operationHandler.getPendingOperations(syncmlDocument);
- response = operationReply.generateReply(syncmlDocument, pendingOperations);
- return Response.status(Response.Status.OK).entity(response).build();
+ if (syncmlHeader.getCredential() != null) {
+ token = syncmlHeader.getCredential().getData();
+ MobileCacheEntry cacheToken = DeviceUtil.getTokenEntry(token);
+ DeviceUtil.persistChallengeToken(token, deviceIdentifier.getId(), user);
+ PrivilegedCarbonContext carbonCtx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
+ carbonCtx.setTenantId(cacheToken.getTenanatID(), true);
+ if ((cacheToken.getUsername() != null) && (cacheToken.getUsername().equals(user))) {
+ if (modifyEnrollWithMoreDetail(request, cacheToken.getTenantDomain(), cacheToken.getTenanatID())) {
+ pendingOperations = operationHandler.getPendingOperations(syncmlDocument);
+ operationHandler.checkForDeviceWipe(pendingOperations, deviceIdentifier);
+ response = operationReply.generateReply(syncmlDocument, pendingOperations);
+ return Response.status(Response.Status.OK).entity(response).build();
+ } else {
+ String msg = "Error occurred in while modify the enrollment.";
+ log.error(msg);
+ return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build();
+ }
} else {
- String msg = "Error occurred in while modify the enrollment.";
+ String msg = "Authentication failure due to incorrect credentials.";
log.error(msg);
- return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build();
+ return Response.status(Response.Status.UNAUTHORIZED).entity(msg).build();
}
} else {
- String msg = "Authentication failure due to incorrect credentials.";
- log.error(msg);
- return Response.status(Response.Status.UNAUTHORIZED).entity(msg).build();
+ return Response.ok().entity(operationReply.generateReply(syncmlDocument, null)).build();
}
} else {
- MobileCacheEntry cacheToken = DeviceUtil.getTokenEntryFromDeviceId(deviceIdentifier.getId());
- PrivilegedCarbonContext carbonCtx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
- carbonCtx.setTenantId(cacheToken.getTenanatID());
+ if (DeviceUtil.getTokenEntryFromDeviceId(deviceIdentifier.getId()) == null) {
+ if (syncmlHeader.getCredential() != null) {
+ token = syncmlHeader.getCredential().getData();
+ MobileCacheEntry cacheToken = DeviceUtil.getTokenEntry(token);
+ DeviceUtil.persistChallengeToken(token, deviceIdentifier.getId(), user);
+ PrivilegedCarbonContext carbonCtx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
+ carbonCtx.setTenantId(cacheToken.getTenanatID(), true);
+ }
+ } else {
+ MobileCacheEntry cacheToken = DeviceUtil.getTokenEntryFromDeviceId(deviceIdentifier.getId());
+ PrivilegedCarbonContext carbonCtx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
+ carbonCtx.setTenantId(cacheToken.getTenanatID());
+ }
if ((syncmlDocument.getBody().getAlert() != null)) {
if (!syncmlDocument.getBody().getAlert().getData().equals(Constants.DISENROLL_ALERT_DATA)) {
pendingOperations = operationHandler.getPendingOperations(syncmlDocument);
+ operationHandler.checkForDeviceWipe(pendingOperations, deviceIdentifier);
return Response.ok().entity(operationReply.generateReply(
syncmlDocument, pendingOperations)).build();
} else {
if (WindowsAPIUtils.getDeviceManagementService().getDevice(deviceIdentifier, false) != null) {
+ operationHandler.updateDisenrollOperationStatus(deviceIdentifier);
WindowsAPIUtils.getDeviceManagementService().disenrollDevice(deviceIdentifier);
return Response.ok().entity(operationReply.generateReply(syncmlDocument, null)).build();
} else {
@@ -130,6 +145,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
}
} else {
pendingOperations = operationHandler.getPendingOperations(syncmlDocument);
+ operationHandler.checkForDeviceWipe(pendingOperations, deviceIdentifier);
return Response.ok().entity(operationReply.generateReply(
syncmlDocument, pendingOperations)).build();
}
@@ -171,7 +187,6 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
boolean status = false;
String user;
SyncmlDocument syncmlDocument;
-
try {
syncmlDocument = SyncmlParser.parseSyncmlPayload(request);
ReplaceTag replace = syncmlDocument.getBody().getReplace();
@@ -196,7 +211,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
Device existingDevice = WindowsAPIUtils.getDeviceManagementService().getDevice(deviceIdentifier);
if (!existingDevice.getProperties().isEmpty()) {
List existingProperties = new ArrayList<>();
-
+
Device.Property vendorProperty = new Device.Property();
vendorProperty.setName(PluginConstants.SyncML.VENDOR);
vendorProperty.setValue(devMan);
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/syncml/beans/WindowsDevice.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/syncml/beans/WindowsDevice.java
index 272b7875a..4bafbf22c 100644
--- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/syncml/beans/WindowsDevice.java
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/syncml/beans/WindowsDevice.java
@@ -32,6 +32,15 @@ public class WindowsDevice {
private String model;
private String user;
private String deviceName;
+ private String windowsType;
+
+ public String getWindowsType() {
+ return windowsType;
+ }
+
+ public void setWindowsType(String windowsType) {
+ this.windowsType = windowsType;
+ }
public String getImei() {
return imei;
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/resources/win10-wap-provisioning.xml b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/resources/win10-wap-provisioning.xml
index 5d305a243..fdbd89938 100644
--- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/resources/win10-wap-provisioning.xml
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/resources/win10-wap-provisioning.xml
@@ -29,7 +29,7 @@
-
+
@@ -42,8 +42,8 @@
-
-
+
+
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/pom.xml b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/pom.xml
index a0e7e03c0..9c361a70d 100644
--- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/pom.xml
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/pom.xml
@@ -23,13 +23,13 @@
windows-plugin
org.wso2.carbon.devicemgt-plugins
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.mobile.windows.ui
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
WSO2 Carbon - Mobile Windows UI
pom
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.js b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.js
index 42c90e23c..4986c18e2 100644
--- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.js
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.js
@@ -20,11 +20,12 @@ function onRequest(context) {
// var log = new Log("device-view.js");
var deviceType = context["uriParams"]["deviceType"];
var deviceId = request.getParameter("id");
+ var owner = request.getParameter("owner");
var deviceViewData = {};
if (deviceType && deviceId) {
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
- var response = deviceModule.viewDevice(deviceType, deviceId);
+ var response = deviceModule.viewDevice(deviceType, deviceId, owner);
if (response["status"] == "success") {
deviceViewData["deviceFound"] = true;
deviceViewData["isAuthorized"] = true;
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/templates/applications-list.hbs b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/templates/applications-list.hbs
index 8fdead83f..984df89cf 100644
--- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/templates/applications-list.hbs
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/public/templates/applications-list.hbs
@@ -3,7 +3,7 @@
{{name}}
-
v{{version}}
+
v{{version}}
{{/each}}
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/pom.xml b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/pom.xml
index 4ab55652b..75336dcef 100644
--- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/pom.xml
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/pom.xml
@@ -22,7 +22,7 @@
windows-plugin
org.wso2.carbon.devicemgt-plugins
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
@@ -80,20 +80,32 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ org.jacoco
+ jacoco-maven-plugin
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+
+
+
+ jacoco-initialize
+
+ prepare-agent
+
+
+
+ jacoco-site
+ test
+
+ report
+
+
+ ${basedir}/target/coverage-reports/jacoco-unit.exec
+ ${basedir}/target/coverage-reports/site
+
+
+
+
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/impl/WindowsTokenServiceImpl.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/impl/WindowsTokenServiceImpl.java
index 68c40595f..ab81df77c 100644
--- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/impl/WindowsTokenServiceImpl.java
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/impl/WindowsTokenServiceImpl.java
@@ -2,8 +2,6 @@ package org.wso2.carbon.device.mgt.mobile.windows.impl;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.mgt.common.TransactionManagementException;
-import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory;
import org.wso2.carbon.device.mgt.mobile.windows.impl.dao.MobileDeviceManagementDAOException;
import org.wso2.carbon.device.mgt.mobile.windows.impl.dao.WindowsDAOFactory;
import org.wso2.carbon.device.mgt.mobile.windows.impl.dao.WindowsEnrollmentTokenDAO;
@@ -16,7 +14,6 @@ public class WindowsTokenServiceImpl implements WindowsTokenService {
private static WindowsEnrollmentTokenDAO windowsEnrollmentTokenDAO;
public WindowsTokenServiceImpl() {
- WindowsDAOFactory windowsDAOFactory = new WindowsDAOFactory();
windowsEnrollmentTokenDAO = new WindowsEnrollmentTokenDAOImpl();
}
@@ -46,9 +43,8 @@ public class WindowsTokenServiceImpl implements WindowsTokenService {
public MobileCacheEntry getCacheToken(String token) throws MobileDeviceManagementDAOException {
MobileCacheEntry cacheEntry = null;
try {
- WindowsDAOFactory.beginTransaction();
+ WindowsDAOFactory.openConnection();
cacheEntry = windowsEnrollmentTokenDAO.getCacheToken(token);
- WindowsDAOFactory.commitTransaction();
} finally {
WindowsDAOFactory.closeConnection();
}
@@ -59,9 +55,8 @@ public class WindowsTokenServiceImpl implements WindowsTokenService {
throws MobileDeviceManagementDAOException {
MobileCacheEntry cacheEntry = null;
try {
- WindowsDAOFactory.beginTransaction();
+ WindowsDAOFactory.openConnection();
cacheEntry = windowsEnrollmentTokenDAO.getCacheTokenFromDeviceId(deviceId);
- WindowsDAOFactory.commitTransaction();
} finally {
WindowsDAOFactory.closeConnection();
}
diff --git a/components/mobile-plugins/windows-plugin/pom.xml b/components/mobile-plugins/windows-plugin/pom.xml
index 0447aefe7..9b9d35318 100644
--- a/components/mobile-plugins/windows-plugin/pom.xml
+++ b/components/mobile-plugins/windows-plugin/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt-plugins
mobile-plugins
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/components/test-coverage/pom.xml b/components/test-coverage/pom.xml
new file mode 100644
index 000000000..20a9823e2
--- /dev/null
+++ b/components/test-coverage/pom.xml
@@ -0,0 +1,385 @@
+
+
+
+
+
+
+ carbon-device-mgt-plugins-parent
+ org.wso2.carbon.devicemgt-plugins
+ 4.0.87-SNAPSHOT
+ ../../pom.xml
+
+ 4.0.0
+
+ test-coverage
+ WSO2 Carbon - Carbon Device Management Plugins Test Coverage Component
+
+
+ target
+ coverage-reports
+ jacoco-unit.exec
+ classes
+
+
+
+ device-types
+
+ ${basedir}/../${device.types}/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api
+
+
+ ${basedir}/../${device.types}/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api
+
+
+ ${basedir}/../${device.types}/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api
+
+
+ ${basedir}/../${device.types}/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api
+
+
+
+ extensions
+
+
+
+ ${basedir}/../${extensions}/appm-connector/org.wso2.carbon.appmgt.mdm.osgiconnector
+
+
+ ${basedir}/../${extensions}/appm-connector/org.wso2.carbon.appmgt.mdm.restconnector
+
+
+
+ ${extensions}/cdmf-transport-adapters
+
+ ${basedir}/../${cdmf.adapters}/input/org.wso2.carbon.device.mgt.input.adapter.extension
+
+
+ ${basedir}/../${cdmf.adapters}/input/org.wso2.carbon.device.mgt.input.adapter.http
+
+
+ ${basedir}/../${cdmf.adapters}/input/org.wso2.carbon.device.mgt.input.adapter.mqtt
+
+
+ ${basedir}/../${cdmf.adapters}/input/org.wso2.carbon.device.mgt.input.adapter.thrift
+
+
+ ${basedir}/../${cdmf.adapters}/input/org.wso2.carbon.device.mgt.input.adapter.xmpp
+
+
+ ${basedir}/../${cdmf.adapters}/output/org.wso2.carbon.device.mgt.output.adapter.mqtt
+
+
+ ${basedir}/../${cdmf.adapters}/output/org.wso2.carbon.device.mgt.output.adapter.websocket
+
+
+ ${basedir}/../${cdmf.adapters}/output/org.wso2.carbon.device.mgt.output.adapter.websocket.endpoint
+
+
+ ${basedir}/../${cdmf.adapters}/output/org.wso2.carbon.device.mgt.output.adapter.xmpp
+
+
+ ${extensions}/mb-extensions
+ ${basedir}/../${mb.extensions}/org.wso2.carbon.andes.extensions.device.mgt.api
+
+ ${basedir}/../${mb.extensions}/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization
+
+
+
+ ${basedir}/../${extensions}/pull-notification-listeners/org.wso2.carbon.device.mgt.mqtt.notification.listener
+
+
+
+ ${basedir}/../${extensions}/siddhi-extensions/org.wso2.extension.siddhi.execution.json
+
+
+
+ mobile-plugins
+ ${mobile.plugins}/android-plugin
+ ${basedir}/../${android.plugin}/org.wso2.carbon.device.mgt.mobile.android
+ ${basedir}/../${android.plugin}/org.wso2.carbon.device.mgt.mobile.android.api
+ ${mobile.plugins}/windows-plugin
+ ${basedir}/../${windows.plugin}/org.wso2.carbon.device.mgt.mobile.windows
+ ${basedir}/../${windows.plugin}/org.wso2.carbon.device.mgt.mobile.windows.api
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-antrun-plugin
+
+
+ post-integration-test
+
+ run
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ org.jacoco
+ org.jacoco.ant
+ ${jacoco.ant.verision}
+
+
+ ant-contrib
+ ant-contrib
+ ${ant.contrib.version}
+
+
+ ant
+ ant
+
+
+
+
+
+
+
+
diff --git a/features/analytics-feature/org.wso2.carbon.device.mgt.cdmf.analytics.feature/pom.xml b/features/analytics-feature/org.wso2.carbon.device.mgt.cdmf.analytics.feature/pom.xml
index d5f0522a9..88fa12027 100644
--- a/features/analytics-feature/org.wso2.carbon.device.mgt.cdmf.analytics.feature/pom.xml
+++ b/features/analytics-feature/org.wso2.carbon.device.mgt.cdmf.analytics.feature/pom.xml
@@ -23,7 +23,7 @@
org.wso2.carbon.devicemgt-plugins
analytics-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/features/analytics-feature/org.wso2.carbon.device.mgt.iot.analytics.feature/pom.xml b/features/analytics-feature/org.wso2.carbon.device.mgt.iot.analytics.feature/pom.xml
index 2d2fc2e1d..23705eef2 100644
--- a/features/analytics-feature/org.wso2.carbon.device.mgt.iot.analytics.feature/pom.xml
+++ b/features/analytics-feature/org.wso2.carbon.device.mgt.iot.analytics.feature/pom.xml
@@ -23,13 +23,13 @@
org.wso2.carbon.devicemgt-plugins
analytics-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.iot.analytics.feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
pom
WSO2 Carbon - IoT Server Analytics Feature
http://wso2.org
diff --git a/features/analytics-feature/org.wso2.carbon.iot.device.statistics.dashboard.feature/pom.xml b/features/analytics-feature/org.wso2.carbon.iot.device.statistics.dashboard.feature/pom.xml
index f764d7be5..72a334a71 100644
--- a/features/analytics-feature/org.wso2.carbon.iot.device.statistics.dashboard.feature/pom.xml
+++ b/features/analytics-feature/org.wso2.carbon.iot.device.statistics.dashboard.feature/pom.xml
@@ -23,13 +23,13 @@
org.wso2.carbon.devicemgt-plugins
analytics-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.iot.device.statistics.dashboard.feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
pom
WSO2 Carbon - IoT Server Analytics Feature
http://wso2.org
diff --git a/features/analytics-feature/org.wso2.carbon.iot.geo.dashboard.feature/pom.xml b/features/analytics-feature/org.wso2.carbon.iot.geo.dashboard.feature/pom.xml
index 7e5c86ea1..8f49522d8 100644
--- a/features/analytics-feature/org.wso2.carbon.iot.geo.dashboard.feature/pom.xml
+++ b/features/analytics-feature/org.wso2.carbon.iot.geo.dashboard.feature/pom.xml
@@ -23,7 +23,7 @@
org.wso2.carbon.devicemgt-plugins
analytics-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/features/analytics-feature/pom.xml b/features/analytics-feature/pom.xml
index 7c603bb86..482a017b1 100644
--- a/features/analytics-feature/pom.xml
+++ b/features/analytics-feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt-plugins
carbon-device-mgt-plugins-parent
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../../pom.xml
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/pom.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/pom.xml
index 285636a3b..f40d89209 100644
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/pom.xml
+++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/pom.xml
@@ -23,13 +23,13 @@
org.wso2.carbon.devicemgt-plugins
androidsense-plugin-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
pom
WSO2 Carbon - IoT Server Android Sense Analytics Feature
http://wso2.org
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/pom.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/pom.xml
index 4658d0005..021d63926 100644
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/pom.xml
+++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/pom.xml
@@ -23,13 +23,13 @@
org.wso2.carbon.devicemgt-plugins
androidsense-plugin-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.iot.androidsense.backend.feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
pom
WSO2 Carbon - IoT Server Android Sense Backend Feature
http://wso2.org
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/pom.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/pom.xml
index b230a8768..428504f7c 100644
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/pom.xml
+++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/pom.xml
@@ -23,13 +23,13 @@
org.wso2.carbon.devicemgt-plugins
androidsense-plugin-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.iot.androidsense.ui.feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
pom
WSO2 Carbon - IoT Server Android Sense UI Feature
http://wso2.org
diff --git a/features/device-types-feature/androidsense-plugin-feature/pom.xml b/features/device-types-feature/androidsense-plugin-feature/pom.xml
index f0d2ada38..82d7ed7d7 100644
--- a/features/device-types-feature/androidsense-plugin-feature/pom.xml
+++ b/features/device-types-feature/androidsense-plugin-feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt-plugins
device-types-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/pom.xml b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/pom.xml
index b48c8a30e..2b8c2d837 100644
--- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/pom.xml
+++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/pom.xml
@@ -23,7 +23,7 @@
org.wso2.carbon.devicemgt-plugins
arduino-plugin-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/pom.xml b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/pom.xml
index f6af78c92..ae285800d 100644
--- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/pom.xml
+++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/pom.xml
@@ -23,7 +23,7 @@
org.wso2.carbon.devicemgt-plugins
arduino-plugin-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/pom.xml b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/pom.xml
index 66cf7fc05..5f797847d 100644
--- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/pom.xml
+++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/pom.xml
@@ -23,7 +23,7 @@
org.wso2.carbon.devicemgt-plugins
arduino-plugin-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/features/device-types-feature/arduino-plugin-feature/pom.xml b/features/device-types-feature/arduino-plugin-feature/pom.xml
index d597d0af5..0d1f11a30 100644
--- a/features/device-types-feature/arduino-plugin-feature/pom.xml
+++ b/features/device-types-feature/arduino-plugin-feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt-plugins
device-types-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/features/device-types-feature/pom.xml b/features/device-types-feature/pom.xml
index 4a73d5087..956df24f6 100644
--- a/features/device-types-feature/pom.xml
+++ b/features/device-types-feature/pom.xml
@@ -22,13 +22,13 @@
org.wso2.carbon.devicemgt-plugins
carbon-device-mgt-plugins-parent
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../../pom.xml
4.0.0
device-types-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
pom
WSO2 Carbon - Device Management IoT Plugins Feature
http://wso2.org
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/pom.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/pom.xml
index 48221b1a5..e5246126c 100644
--- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/pom.xml
+++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/pom.xml
@@ -23,7 +23,7 @@
org.wso2.carbon.devicemgt-plugins
raspberrypi-plugin-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/pom.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/pom.xml
index d06bf1423..bfd16fa04 100644
--- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/pom.xml
+++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/pom.xml
@@ -23,7 +23,7 @@
org.wso2.carbon.devicemgt-plugins
raspberrypi-plugin-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/src/token_updater.py b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/src/token_updater.py
index bd08ce266..d58b4186b 100644
--- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/src/token_updater.py
+++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/src/token_updater.py
@@ -48,6 +48,6 @@ class RefreshToken():
params = urllib.urlencode({"grant_type": "refresh_token", "refresh_token": refreshToken,
"scope": "Enroll device"})
data = self.post("/token", params, applicationKey)
- response = json.loads(data)
+ response = json.loads(data.content)
self.updateFile(response)
return response
\ No newline at end of file
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/pom.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/pom.xml
index 59e009635..f809dad44 100644
--- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/pom.xml
+++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/pom.xml
@@ -23,7 +23,7 @@
org.wso2.carbon.devicemgt-plugins
raspberrypi-plugin-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/pom.xml b/features/device-types-feature/raspberrypi-plugin-feature/pom.xml
index 71a609000..6c90c613f 100644
--- a/features/device-types-feature/raspberrypi-plugin-feature/pom.xml
+++ b/features/device-types-feature/raspberrypi-plugin-feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt-plugins
device-types-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/pom.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/pom.xml
index 0e7c8e82b..18693502a 100644
--- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/pom.xml
+++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/pom.xml
@@ -23,7 +23,7 @@
org.wso2.carbon.devicemgt-plugins
virtual-fire-alarm-plugin-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/pom.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/pom.xml
index 3c8f57582..c209fb853 100644
--- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/pom.xml
+++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/pom.xml
@@ -23,7 +23,7 @@
org.wso2.carbon.devicemgt-plugins
virtual-fire-alarm-plugin-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/pom.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/pom.xml
index 21674c6fd..265483757 100644
--- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/pom.xml
+++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/pom.xml
@@ -23,7 +23,7 @@
org.wso2.carbon.devicemgt-plugins
virtual-fire-alarm-plugin-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/pom.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/pom.xml
index eef2819bb..cdba99239 100644
--- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/pom.xml
+++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt-plugins
device-types-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.api.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.api.feature/pom.xml
new file mode 100644
index 000000000..499ff6388
--- /dev/null
+++ b/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.api.feature/pom.xml
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
+ org.wso2.carbon.devicemgt-plugins
+ extensions-feature
+ 4.0.87-SNAPSHOT
+ ../pom.xml
+
+
+ 4.0.0
+ org.wso2.carbon.andes.extensions.device.mgt.api.feature
+ pom
+ WSO2 Carbon - MQTT Topics Management API Feature
+ http://wso2.org
+ This feature contains the API feature for the MQTT dashboard
+
+
+
+
+ maven-resources-plugin
+
+
+ copy-resources
+ generate-resources
+
+ copy-resources
+
+
+ src/main/resources
+
+
+ resources
+
+ build.properties
+ p2.inf
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+
+
+ copy-jaxrs-war
+ package
+
+ copy
+
+
+
+
+ org.wso2.carbon.devicemgt-plugins
+ org.wso2.carbon.andes.extensions.device.mgt.api
+ war
+ true
+
+ ${project.build.directory}/maven-shared-archive-resources/webapps/
+
+ api#mqtt-topics#v1.0.war
+
+
+
+
+
+
+
+ org.wso2.maven
+ carbon-p2-plugin
+ ${carbon.p2.plugin.version}
+
+
+ p2-feature-generation
+ package
+
+ p2-feature-gen
+
+
+ org.wso2.carbon.andes.extensions.device.mgt.api
+ ../../../features/etc/feature.properties
+
+
+ org.wso2.carbon.p2.category.type:server
+ org.eclipse.equinox.p2.type.group:true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.api.feature/src/main/resources/build.properties b/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.api.feature/src/main/resources/build.properties
new file mode 100644
index 000000000..ddedd58dc
--- /dev/null
+++ b/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.api.feature/src/main/resources/build.properties
@@ -0,0 +1,19 @@
+#
+# Copyright (c) 2005-2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+#
+# WSO2 Inc. licenses this file to you under the Apache License,
+# Version 2.0 (the "License"); you may not use this file except
+# in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+custom = true
diff --git a/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.api.feature/src/main/resources/p2.inf b/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.api.feature/src/main/resources/p2.inf
new file mode 100644
index 000000000..b1f1b35b3
--- /dev/null
+++ b/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.api.feature/src/main/resources/p2.inf
@@ -0,0 +1,3 @@
+instructions.configure = \
+org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/webapps/);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.andes.extensions.device.mgt.api_${feature.version}/webapps/,target:${installFolder}/../../deployment/server/webapps/,overwrite:true);\
\ No newline at end of file
diff --git a/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.feature/pom.xml
index 1289d965a..2c2a3cec7 100644
--- a/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.feature/pom.xml
+++ b/features/extensions-feature/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.feature/pom.xml
@@ -23,7 +23,7 @@
org.wso2.carbon.devicemgt-plugins
extensions-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/features/extensions-feature/org.wso2.carbon.appmgt.mdm.osgiconnector.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.appmgt.mdm.osgiconnector.feature/pom.xml
index 6507230d2..ee69fde9d 100644
--- a/features/extensions-feature/org.wso2.carbon.appmgt.mdm.osgiconnector.feature/pom.xml
+++ b/features/extensions-feature/org.wso2.carbon.appmgt.mdm.osgiconnector.feature/pom.xml
@@ -20,13 +20,13 @@
org.wso2.carbon.devicemgt-plugins
extensions-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
org.wso2.carbon.appmgt.mdm.osgiconnector.feature
pom
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
WSO2 Carbon - App management MDM OSGI Connector
http://wso2.org
This feature contains the core bundles required for APP management OSGI MDM connection
@@ -36,7 +36,7 @@
org.wso2.carbon.devicemgt-plugins
org.wso2.carbon.appmgt.mdm.osgiconnector
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
org.apache.ws.commons.axiom
diff --git a/features/extensions-feature/org.wso2.carbon.appmgt.mdm.restconnector.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.appmgt.mdm.restconnector.feature/pom.xml
index 1895795ca..3a068cd10 100644
--- a/features/extensions-feature/org.wso2.carbon.appmgt.mdm.restconnector.feature/pom.xml
+++ b/features/extensions-feature/org.wso2.carbon.appmgt.mdm.restconnector.feature/pom.xml
@@ -20,13 +20,13 @@
org.wso2.carbon.devicemgt-plugins
extensions-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
org.wso2.carbon.appmgt.mdm.restconnector.feature
pom
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
WSO2 Carbon - App management MDM REST Connector
http://wso2.org
This feature contains the core bundles required for APP management MDM REST connection
@@ -36,7 +36,7 @@
org.wso2.carbon.devicemgt-plugins
org.wso2.carbon.appmgt.mdm.restconnector
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
org.apache.ws.commons.axiom
diff --git a/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/pom.xml
index 174a2fb41..0187fe4b7 100644
--- a/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/pom.xml
+++ b/features/extensions-feature/org.wso2.carbon.device.mgt.adapter.feature/pom.xml
@@ -23,14 +23,14 @@
org.wso2.carbon.devicemgt-plugins
extensions-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.adapter.feature
pom
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
WSO2 Carbon - Device Management Adapters Feature
http://wso2.org
This feature contains the adapter bundles required for IoT Server
diff --git a/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml b/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml
index cf3a0137d..402a21e1e 100644
--- a/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml
+++ b/features/extensions-feature/org.wso2.carbon.device.mgt.notification.listener.feature/pom.xml
@@ -3,14 +3,14 @@
org.wso2.carbon.devicemgt-plugins
extensions-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.notification.listener.feature
pom
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
WSO2 Carbon - Notification Listener
http://wso2.org
This feature contains the core bundles required iot core listeners
diff --git a/features/extensions-feature/org.wso2.extension.siddhi.execution.json.feature/pom.xml b/features/extensions-feature/org.wso2.extension.siddhi.execution.json.feature/pom.xml
index c4be4ba66..b64229b72 100644
--- a/features/extensions-feature/org.wso2.extension.siddhi.execution.json.feature/pom.xml
+++ b/features/extensions-feature/org.wso2.extension.siddhi.execution.json.feature/pom.xml
@@ -20,13 +20,13 @@
org.wso2.carbon.devicemgt-plugins
extensions-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
org.wso2.extension.siddhi.execution.json.feature
pom
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
WSO2 Siddhi Execution Extension - Json Feature
http://wso2.org
This feature contains Siddhi extension feature for changing a json string to individual properties.
diff --git a/features/extensions-feature/org.wso2.gpl.siddhi.extension.geo.script.feature/pom.xml b/features/extensions-feature/org.wso2.gpl.siddhi.extension.geo.script.feature/pom.xml
index eba281bb2..9c799d747 100644
--- a/features/extensions-feature/org.wso2.gpl.siddhi.extension.geo.script.feature/pom.xml
+++ b/features/extensions-feature/org.wso2.gpl.siddhi.extension.geo.script.feature/pom.xml
@@ -23,7 +23,7 @@
org.wso2.carbon.devicemgt-plugins
extensions-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
diff --git a/features/extensions-feature/pom.xml b/features/extensions-feature/pom.xml
index a8addc697..d9274ff61 100644
--- a/features/extensions-feature/pom.xml
+++ b/features/extensions-feature/pom.xml
@@ -22,13 +22,13 @@
org.wso2.carbon.devicemgt-plugins
carbon-device-mgt-plugins-parent
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../../pom.xml
4.0.0
extensions-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
pom
WSO2 Carbon - Device Management Extensions
http://wso2.org
@@ -38,6 +38,7 @@
org.wso2.carbon.appmgt.mdm.restconnector.feature
org.wso2.carbon.device.mgt.adapter.feature
org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.feature
+ org.wso2.carbon.andes.extensions.device.mgt.api.feature
org.wso2.extension.siddhi.execution.json.feature
org.wso2.carbon.device.mgt.notification.listener.feature
org.wso2.gpl.siddhi.extension.geo.script.feature
diff --git a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/pom.xml b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/pom.xml
index d62312c2c..3924ffc7c 100644
--- a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/pom.xml
+++ b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt-plugins
android-plugin-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.mobile.android.feature
pom
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
WSO2 Carbon - Android Device Management Feature
http://wso2.org
This feature contains the core bundles required for Android Device Management
diff --git a/features/mobile-plugins-feature/android-plugin-feature/pom.xml b/features/mobile-plugins-feature/android-plugin-feature/pom.xml
index dc6772b3f..1040dc34e 100644
--- a/features/mobile-plugins-feature/android-plugin-feature/pom.xml
+++ b/features/mobile-plugins-feature/android-plugin-feature/pom.xml
@@ -22,13 +22,13 @@
org.wso2.carbon.devicemgt-plugins
mobile-plugins-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
4.0.0
android-plugin-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
pom
WSO2 Carbon - Device Management Android Plugin Feature
http://wso2.org
diff --git a/features/mobile-plugins-feature/pom.xml b/features/mobile-plugins-feature/pom.xml
index b7111d08a..cabdb7fe4 100644
--- a/features/mobile-plugins-feature/pom.xml
+++ b/features/mobile-plugins-feature/pom.xml
@@ -22,13 +22,13 @@
org.wso2.carbon.devicemgt-plugins
carbon-device-mgt-plugins-parent
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../../pom.xml
4.0.0
mobile-plugins-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
pom
WSO2 Carbon - Device Management EMM Plugins Feature
http://wso2.org
diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/pom.xml b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/pom.xml
index 11bc910d7..4dbc7b6c0 100644
--- a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/pom.xml
+++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt-plugins
windows-plugin-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.mobile.windows.feature
pom
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
WSO2 Carbon - Windows Device Management Feature
http://wso2.org
This feature contains the core bundles required for Windows Device Management
diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/dbscripts/plugins/mssql.sql b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/dbscripts/plugins/mssql.sql
index 041df9a0c..f6314b992 100644
--- a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/dbscripts/plugins/mssql.sql
+++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/dbscripts/plugins/mssql.sql
@@ -3,7 +3,7 @@
-- -----------------------------------------------------
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[WIN_FEATURE]') AND TYPE IN (N'U'))
CREATE TABLE WIN_FEATURE (
- ID INT NOT NULL IDENTITY,
+ ID INTEGER IDENTITY(1,1) NOT NULL,
CODE VARCHAR(45) NOT NULL,
NAME VARCHAR(100) NULL,
DESCRIPTION VARCHAR(200) NULL,
@@ -36,8 +36,9 @@ CREATE TABLE WIN_DEVICE (
-- -----------------------------------------------------
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[WINDOWS_ENROLLMENT_TOKEN]') AND TYPE IN (N'U'))
CREATE TABLE WINDOWS_ENROLLMENT_TOKEN (
- ID INT NOT NULL IDENTITY,
+ ID INTEGER IDENTITY(1,1) NOT NULL,
TENANT_DOMAIN VARCHAR(45) NOT NULL,
+ TENANT_ID INTEGER DEFAULT 0,
ENROLLMENT_TOKEN VARCHAR (100) NULL DEFAULT NULL,
DEVICE_ID VARCHAR (100) NOT NULL,
USERNAME VARCHAR (45) NOT NULL,
diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/dbscripts/plugins/mysql.sql b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/dbscripts/plugins/mysql.sql
index 378d516da..4d2e4d159 100644
--- a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/dbscripts/plugins/mysql.sql
+++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/dbscripts/plugins/mysql.sql
@@ -36,6 +36,7 @@ ENGINE = InnoDB;
CREATE TABLE IF NOT EXISTS `WINDOWS_ENROLLMENT_TOKEN` (
`ID` INT NOT NULL AUTO_INCREMENT,
`TENANT_DOMAIN` VARCHAR(45) NOT NULL,
+ `TENANT_ID` INT DEFAULT 0,
`ENROLLMENT_TOKEN` VARCHAR(100) NULL,
`DEVICE_ID` VARCHAR(100) NULL,
`USERNAME` VARCHAR(45) NULL,
diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/dbscripts/plugins/oracle.sql b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/dbscripts/plugins/oracle.sql
index 3371fab89..615900ee3 100644
--- a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/dbscripts/plugins/oracle.sql
+++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/dbscripts/plugins/oracle.sql
@@ -23,7 +23,7 @@ CREATE TABLE WIN_DEVICE (
-- Table `WIN_FEATURE`
-- -----------------------------------------------------
CREATE TABLE WIN_FEATURE (
- ID INT NOT NULL,
+ ID NUMBER(10) NOT NULL,
CODE VARCHAR(45) NOT NULL,
NAME VARCHAR(100) NOT NULL,
DESCRIPTION VARCHAR(200) NULL,
@@ -35,8 +35,9 @@ CREATE TABLE WIN_FEATURE (
-- Table `WINDOWS_ENROLLMENT_TOKEN`
-- -----------------------------------------------------
CREATE TABLE WINDOWS_ENROLLMENT_TOKEN (
- ID INT NOT NULL,
+ ID NUMBER(10) NOT NULL,
TENANT_DOMAIN VARCHAR(45) NOT NULL,
+ TENANT_ID NUMBER(10) DEFAULT 0,
ENROLLMENT_TOKEN VARCHAR(100) NULL,
DEVICE_ID VARCHAR(100) NULL,
USERNAME VARCHAR(45) NULL,
@@ -62,4 +63,23 @@ FOR EACH ROW
BEGIN
SELECT WIN_FEATURE_ID_INC_SEQ.NEXTVAL INTO :NEW.ID FROM DUAL;
END;
+/
+
+-- -----------------------------------------------------
+-- Sequence `WIN_ENR_TOKEN_ID_INC_SEQ`
+-- -----------------------------------------------------
+CREATE SEQUENCE WIN_ENR_TOKEN_ID_INC_SEQ START WITH 1 INCREMENT BY 1 NOCACHE
+/
+
+-- -----------------------------------------------------
+-- Trigger `WIN_ENR_TOKEN_ID_INC_TRIG`
+-- -----------------------------------------------------
+CREATE OR REPLACE TRIGGER WIN_ENR_TOKEN_ID_INC_TRIG
+BEFORE INSERT
+ON WINDOWS_ENROLLMENT_TOKEN
+REFERENCING NEW AS NEW
+FOR EACH ROW
+ BEGIN
+ SELECT WIN_ENR_TOKEN_ID_INC_SEQ.NEXTVAL INTO :NEW.ID FROM DUAL;
+ END;
/
\ No newline at end of file
diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/dbscripts/plugins/postgresql.sql b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/dbscripts/plugins/postgresql.sql
index c8af94cd6..9286eb41c 100644
--- a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/dbscripts/plugins/postgresql.sql
+++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/dbscripts/plugins/postgresql.sql
@@ -35,6 +35,7 @@ CREATE TABLE IF NOT EXISTS WIN_FEATURE (
CREATE TABLE IF NOT EXISTS WINDOWS_ENROLLMENT_TOKEN (
ID SERIAL NOT NULL,
TENANT_DOMAIN VARCHAR(45) NOT NULL,
+ TENANT_ID INTEGER DEFAULT 0,
ENROLLMENT_TOKEN VARCHAR(100) NULL,
DEVICE_ID VARCHAR(100) NULL,
USERNAME VARCHAR(45) NULL,
diff --git a/features/mobile-plugins-feature/windows-plugin-feature/pom.xml b/features/mobile-plugins-feature/windows-plugin-feature/pom.xml
index 3e4a77c33..d27e25f10 100644
--- a/features/mobile-plugins-feature/windows-plugin-feature/pom.xml
+++ b/features/mobile-plugins-feature/windows-plugin-feature/pom.xml
@@ -22,13 +22,13 @@
org.wso2.carbon.devicemgt-plugins
mobile-plugins-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
../pom.xml
4.0.0
windows-plugin-feature
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
pom
WSO2 Carbon - Device Management Windows Plugin Feature
http://wso2.org
diff --git a/issue_template.md b/issue_template.md
new file mode 100644
index 000000000..757e13efe
--- /dev/null
+++ b/issue_template.md
@@ -0,0 +1,18 @@
+**Description:**
+
+
+**Suggested Labels:**
+
+
+**Suggested Assignees:**
+
+
+**Affected Product Version:**
+
+**OS, DB, other environment details and versions:**
+
+**Steps to reproduce:**
+
+
+**Related Issues:**
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 5d5eb3407..176f2c78f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
org.wso2.carbon.devicemgt-plugins
carbon-device-mgt-plugins-parent
pom
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
WSO2 Carbon - Device Management Plugins Parent
http://wso2.org
WSO2 Carbon - Device Management Plugins Parent
@@ -39,6 +39,7 @@
components/mobile-plugins
components/device-types
components/analytics
+ components/test-coverage
features/analytics-feature
features/mobile-plugins-feature
features/device-types-feature
@@ -837,6 +838,11 @@
jackson-jaxrs
${jackson.version}
+
+ org.wso2.orbit.com.fasterxml.jackson.core
+ jackson-annotations
+ ${jackson-annotations.version}
+
@@ -1053,13 +1059,18 @@
org.wso2.andes.wso2
andes
- ${carbon.messaging.version}
+ ${andes.version}
org.wso2.carbon.devicemgt-plugins
org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization
${carbon.devicemgt.plugins.version}
+
+ org.wso2.carbon.devicemgt-plugins
+ org.wso2.carbon.andes.extensions.device.mgt.api
+ ${carbon.devicemgt.plugins.version}
+
commons-lang
commons-lang
@@ -1080,10 +1091,15 @@
feign-gson
${io.github.openfeign.version}
+
+ io.github.openfeign
+ feign-slf4j
+ ${io.github.openfeign.version}
+
- io.github.openfeign
- feign-slf4j
- ${io.github.openfeign.version}
+ org.wso2.carbon.messaging
+ org.wso2.carbon.andes.mqtt.stub
+ ${carbon.andes.mqtt.version}
@@ -1121,6 +1137,7 @@
[1.6.1.wso2v11, 1.7.0)
1.6.1.wso2v11
+ 1.1.0-wso2v10
1.3
@@ -1146,14 +1163,14 @@
1.1.1
- 3.0.93-SNAPSHOT
+ 3.0.112
[3.0.0, 4.0.0)
- 1.2.35
+ 1.2.40
- 4.0.66-SNAPSHOT
+ 4.0.87-SNAPSHOT
4.4.8
@@ -1177,7 +1194,7 @@
4.7.8
- 6.1.64
+ 6.1.109
3.0.4.wso2v1
@@ -1264,7 +1281,10 @@
[0.0.0,1.0.0)
- 3.1.3
+ 3.2.16
+ 3.2.25
+ 2.6.1.wso2v1
+ 3.2.16
9.3.1
@@ -1273,6 +1293,11 @@
3.1.2
1.7.2
true
+
+
+ 0.7.8
+ 0.7.5.201505241946
+ 1.0b3
@@ -1394,6 +1419,11 @@
maven-jar-plugin
3.0.2
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.maven.plugin.version}
+