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 86c15fc6e..29b716c34 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
- 3.0.34-SNAPSHOT
+ 3.0.37-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 ea1c81b3e..4993f5fd6 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
- 3.0.34-SNAPSHOT
+ 3.0.37-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 d054841d8..bb154bca0 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
- 3.0.34-SNAPSHOT
+ 3.0.37-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 e228658dc..76dfe1333 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
diff --git a/components/analytics/iot-analytics/pom.xml b/components/analytics/iot-analytics/pom.xml
index bddcf6bbd..97846bf69 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
diff --git a/components/analytics/pom.xml b/components/analytics/pom.xml
index 18bf27bb6..ad80273df 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
- 3.0.34-SNAPSHOT
+ 3.0.37-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 82cd3ee9f..450d8948f 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/artifacts.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/artifacts.xml
index 7b824d34e..c57c44147 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/artifacts.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/artifacts.xml
@@ -161,7 +161,6 @@
serverRole="DataAnalyticsServer"/>
-
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 0a9d9bd67..ccafcd41a 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
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 70c08984e..e7f213af5 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
- 3.0.34-SNAPSHOT
+ 3.0.37-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.platform.configuration/configuration.hbs 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.platform.configuration/configuration.hbs
index 1f9b95d49..dc7ac8fbb 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.platform.configuration/configuration.hbs
+++ 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.platform.configuration/configuration.hbs
@@ -18,7 +18,7 @@
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 20c376552..f8c9c2d65 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/configuration.hbs b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/configuration.hbs
index 583e332f7..6ad97dfb5 100644
--- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/configuration.hbs
+++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/configuration.hbs
@@ -19,7 +19,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/configuration.js b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/configuration.js
new file mode 100644
index 000000000..74111c244
--- /dev/null
+++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/configuration.js
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+
+function onRequest(context){
+ var viewModel = {};
+ var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
+ viewModel["permissions"] = userModule.getUIPermissions();
+ return viewModel;
+}
\ No newline at end of file
diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/public/js/platform-configuration.js b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/public/js/platform-configuration.js
index 19f1c9ff3..9c69e7899 100644
--- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/public/js/platform-configuration.js
+++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration/public/js/platform-configuration.js
@@ -103,3 +103,30 @@ var addConfiguration = function () {
}
);
};
+
+var artifactUpload = function () {
+ var contentType = "application/json";
+ var backendEndBasePath = "/api/device-mgt/v1.0";
+ var urix = backendEndBasePath + "/admin/devicetype/deploy/virtual_firealarm";
+ var defaultStatusClasses = "fw fw-stack-1x";
+ var content = $("#virtual-firealarm-statistic-response-template").find(".content");
+ var title = content.find("#title");
+ var statusIcon = content.find("#status-icon");
+ var data = {}
+ invokerUtil.post(urix, data, function (data) {
+ title.html("Deploying statistic artifacts. Please wait...");
+ statusIcon.attr("class", defaultStatusClasses + " fw-check");
+ $(modalPopupContent).html(content.html());
+ showPopup();
+ setTimeout(function () {
+ hidePopup();
+ location.reload(true);
+ }, 5000);
+
+ }, function (jqXHR) {
+ title.html("Failed to deploy artifacts, Please contact administrator.");
+ statusIcon.attr("class", defaultStatusClasses + " fw-error");
+ $(modalPopupContent).html(content.html());
+ showPopup();
+ }, contentType);
+};
diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.realtime.analytics-view/analytics-view.js b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.realtime.analytics-view/analytics-view.js
index 5c34b9331..40e36dd96 100644
--- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.realtime.analytics-view/analytics-view.js
+++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.realtime.analytics-view/analytics-view.js
@@ -28,15 +28,31 @@ function onRequest(context) {
var jwtClient = jwtService.getJWTClient();
var encodedClientKeys = session.get(constants["ENCODED_TENANT_BASED_WEB_SOCKET_CLIENT_CREDENTIALS"]);
var token = "";
+ var user = session.get(constants.USER_SESSION_KEY);
+ if (!user) {
+ log.error("User object was not found in the session");
+ throw constants.ERRORS.USER_NOT_FOUND;
+ }
+
if (encodedClientKeys) {
- var tokenUtil = require("/app/modules/oauth/token-handler-utils.js")["utils"];
- var resp = tokenUtil.decode(encodedClientKeys).split(":");
- var tokenPair = jwtClient.getAccessToken(resp[0], resp[1], context.user.username,"default", {});
- if (tokenPair) {
- token = tokenPair.accessToken;
- }
- websocketEndpoint = websocketEndpoint + "/secured-websocket/org.wso2.iot.devices.temperature/1.0.0?"
- + "deviceId=" + device.deviceIdentifier + "&deviceType=" + device.type + "&websocketToken=" + token;
+ var tokenUtil = require("/app/modules/oauth/token-handler-utils.js")["utils"];
+ var resp = tokenUtil.decode(encodedClientKeys).split(":");
+ if (user.domain == "carbon.super") {
+ var tokenPair = jwtClient.getAccessToken(resp[0], resp[1], context.user.username , "default", {});
+ if (tokenPair) {
+ token = tokenPair.accessToken;
+ }
+ websocketEndpoint = websocketEndpoint + "/secured-websocket/org.wso2.iot.devices.temperature/1.0.0?"
+ + "deviceId=" + device.deviceIdentifier + "&deviceType=" + device.type + "&websocketToken=" + token;
+ } else {
+ var tokenPair = jwtClient.getAccessToken(resp[0], resp[1], context.user.username + "@" + user.domain
+ , "default", {});
+ if (tokenPair) {
+ token = tokenPair.accessToken;
+ }
+ websocketEndpoint = websocketEndpoint + "/secured-websocket/t/" + user.domain + "/org.wso2.iot.devices.temperature/1.0.0?"
+ + "deviceId=" + device.deviceIdentifier + "&deviceType=" + device.type + "&websocketToken=" + token;
+ }
}
return {"device": device, "websocketEndpoint": websocketEndpoint};
}
diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/public/js/download.js b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/public/js/download.js
index a667ef4cc..d4ceb751f 100644
--- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/public/js/download.js
+++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/public/js/download.js
@@ -134,31 +134,4 @@ function doAction(data) {
hideAgentDownloadPopup();
});
}
-}
-
-function artifactUpload() {
- var contentType = "application/json";
-
- var urix = backendEndBasePath + "/admin/devicetype/deploy/virtual_firealarm";
- var defaultStatusClasses = "fw fw-stack-1x";
- var content = $("#virtualfirealarm-statistic-response-template").find(".content");
- var title = content.find("#title");
- var statusIcon = content.find("#status-icon");
- var data = {}
- invokerUtil.post(urix, data, function (data) {
- title.html("Deploying statistic artifacts. Please wait...");
- statusIcon.attr("class", defaultStatusClasses + " fw-check");
- $(modalPopupContent).html(content.html());
- showPopup();
- setTimeout(function () {
- hidePopup();
- location.reload(true);
- }, 5000);
-
- }, function (jqXHR) {
- title.html("Failed to deploy artifacts, Please contact administrator.");
- statusIcon.attr("class", defaultStatusClasses + " fw-error");
- $(modalPopupContent).html(content.html());
- showPopup();
- }, contentType);
}
\ No newline at end of file
diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/type-view.hbs b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/type-view.hbs
index 6be6d141b..f34aa0d6f 100644
--- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/type-view.hbs
+++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/type-view.hbs
@@ -54,9 +54,6 @@
Download Agent
- {{#if permissions.IS_ADMIN}}
- Deploy Analytics Artifacts
- {{/if}}
Click [ here ] for latest instructions and
diff --git a/components/device-types/virtual-fire-alarm-plugin/pom.xml b/components/device-types/virtual-fire-alarm-plugin/pom.xml
index 79d3e5d17..1d324a4d9 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
- 3.0.34-SNAPSHOT
+ 3.0.37-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 4f97a6eea..c094c83fc 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
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 811a985e5..faa2e5299 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
diff --git a/components/extensions/appm-connector/pom.xml b/components/extensions/appm-connector/pom.xml
index da7439c6d..14555303d 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
- 3.0.34-SNAPSHOT
+ 3.0.37-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 6dede469a..9fdf522ac 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../../pom.xml
4.0.0
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 b8e561d0f..8b02645b2 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../../pom.xml
diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.http/src/main/java/org/wso2/carbon/device/mgt/input/adapter/http/HTTPMessageServlet.java b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.http/src/main/java/org/wso2/carbon/device/mgt/input/adapter/http/HTTPMessageServlet.java
index afda05edf..9ac531e6d 100644
--- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.http/src/main/java/org/wso2/carbon/device/mgt/input/adapter/http/HTTPMessageServlet.java
+++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.http/src/main/java/org/wso2/carbon/device/mgt/input/adapter/http/HTTPMessageServlet.java
@@ -69,9 +69,14 @@ public class HTTPMessageServlet extends HttpServlet {
this.tenantId = tenantId;
this.exposedTransports = eventAdapterConfiguration.getProperties().get(
HTTPEventAdapterConstants.EXPOSED_TRANSPORTS);
+ String globalContentValidator = globalProperties.get(HTTPEventAdapterConstants.
+ ADAPTER_CONF_CONTENT_VALIDATOR_TYPE);
String contentValidatorType = eventAdapterConfiguration.getProperties().get(
HTTPEventAdapterConstants.ADAPTER_CONF_CONTENT_VALIDATOR_TYPE);
+ if (globalContentValidator != null && !globalContentValidator.isEmpty() ) {
+ contentValidatorType = globalContentValidator;
+ }
if (contentValidatorType == null || HTTPEventAdapterConstants.DEFAULT.equals(contentValidatorType)) {
contentValidator = InputAdapterServiceDataHolder.getInputAdapterExtensionService()
.getDefaultContentValidator();
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 4c5488a3f..f46a64d8b 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../../pom.xml
4.0.0
diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/MQTTEventAdapter.java b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/MQTTEventAdapter.java
index eed3f82bc..8f5c996d0 100644
--- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/MQTTEventAdapter.java
+++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/MQTTEventAdapter.java
@@ -93,6 +93,10 @@ public class MQTTEventAdapter implements InputEventAdapter {
public void disconnect() {
//when mqtt and this feature both together then this method becomes a blocking method, Therefore
// have used a thread to skip it.
+ if (!PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain()
+ .equals(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME)) {
+ return;
+ }
try {
Thread thread = new Thread(new Runnable() {
public void run() {
diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/MQTTEventAdapterFactory.java b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/MQTTEventAdapterFactory.java
index f5f93b17a..0419d26eb 100644
--- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/MQTTEventAdapterFactory.java
+++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/MQTTEventAdapterFactory.java
@@ -120,7 +120,7 @@ public class MQTTEventAdapterFactory extends InputEventAdapterFactory {
// set clientId
Property clientId = new Property(MQTTEventAdapterConstants.ADAPTER_CONF_CLIENTID);
clientId.setDisplayName(resourceBundle.getString(MQTTEventAdapterConstants.ADAPTER_CONF_CLIENTID));
- clientId.setRequired(false);
+ clientId.setRequired(true);
clientId.setHint(resourceBundle.getString(MQTTEventAdapterConstants.ADAPTER_CONF_CLIENTID_HINT));
propertyList.add(clientId);
diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTAdapterListener.java b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTAdapterListener.java
index 7635155d3..635012538 100644
--- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTAdapterListener.java
+++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTAdapterListener.java
@@ -24,6 +24,7 @@ import org.apache.commons.logging.LogFactory;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
+import org.apache.http.conn.HttpHostConnectException;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.apache.http.message.BasicHeader;
@@ -131,7 +132,7 @@ public class MQTTAdapterListener implements MqttCallback, Runnable {
}
}
- public void startListener() throws MqttException {
+ public boolean startListener() throws MqttException {
if (this.mqttBrokerConnectionConfiguration.getUsername() != null &&
this.mqttBrokerConnectionConfiguration.getDcrUrl() != null) {
String username = this.mqttBrokerConnectionConfiguration.getUsername();
@@ -151,12 +152,12 @@ public class MQTTAdapterListener implements MqttCallback, Runnable {
registrationProfile.setTokenScope(MQTTEventAdapterConstants.TOKEN_SCOPE);
if (!mqttBrokerConnectionConfiguration.isGlobalCredentailSet()) {
registrationProfile.setClientName(MQTTEventAdapterConstants.APPLICATION_NAME_PREFIX
- + mqttBrokerConnectionConfiguration.getAdapterName() +
- "_" + tenantDomain);
+ + mqttBrokerConnectionConfiguration.getAdapterName() +
+ "_" + tenantDomain);
registrationProfile.setIsSaasApp(false);
} else {
registrationProfile.setClientName(MQTTEventAdapterConstants.APPLICATION_NAME_PREFIX
- + mqttBrokerConnectionConfiguration.getAdapterName());
+ + mqttBrokerConnectionConfiguration.getAdapterName());
registrationProfile.setIsSaasApp(true);
}
String jsonString = registrationProfile.toJSON();
@@ -164,8 +165,8 @@ public class MQTTAdapterListener implements MqttCallback, Runnable {
postMethod.setEntity(requestEntity);
String basicAuth = getBase64Encode(username, password);
postMethod.setHeader(new BasicHeader(MQTTEventAdapterConstants.AUTHORIZATION_HEADER_NAME,
- MQTTEventAdapterConstants.AUTHORIZATION_HEADER_VALUE_PREFIX +
- basicAuth));
+ MQTTEventAdapterConstants.AUTHORIZATION_HEADER_VALUE_PREFIX +
+ basicAuth));
HttpResponse httpResponse = httpClient.execute(postMethod);
if (httpResponse != null) {
String response = MQTTUtil.getResponseString(httpResponse);
@@ -182,17 +183,34 @@ public class MQTTAdapterListener implements MqttCallback, Runnable {
log.error(msg, e);
}
}
+ } catch (HttpHostConnectException e) {
+ log.error("Keymanager is unreachable, Waiting....");
+ return false;
} catch (MalformedURLException e) {
log.error("Invalid dcrUrl : " + dcrUrlString);
+ return false;
} catch (JWTClientException | UserStoreException e) {
log.error("Failed to create an oauth token with jwt grant type.", e);
+ return false;
} catch (NoSuchAlgorithmException | KeyManagementException | KeyStoreException | IOException e) {
log.error("Failed to create a http connection.", e);
+ return false;
}
}
}
- mqttClient.connect(connectionOptions);
- mqttClient.subscribe(topic);
+ try {
+ mqttClient.connect(connectionOptions);
+ } catch (MqttException e) {
+ log.warn("Broker is unreachable, Waiting.....");
+ return false;
+ }
+ try {
+ mqttClient.subscribe(topic);
+ } catch (MqttException e) {
+ log.error("Failed to subscribe to topic: " + topic + ", Retrying.....");
+ return false;
+ }
+ return true;
}
@@ -267,10 +285,14 @@ public class MQTTAdapterListener implements MqttCallback, Runnable {
while (!connectionSucceeded) {
try {
connectionDuration = connectionDuration * MQTTEventAdapterConstants.RECONNECTION_PROGRESS_FACTOR;
+ if (connectionDuration > MQTTEventAdapterConstants.MAXIMUM_RECONNECTION_DURATION) {
+ connectionDuration = MQTTEventAdapterConstants.MAXIMUM_RECONNECTION_DURATION;
+ }
Thread.sleep(connectionDuration);
- startListener();
- connectionSucceeded = true;
- log.info("MQTT Connection successful");
+ if (startListener()) {
+ connectionSucceeded = true;
+ log.info("MQTT Connection successful");
+ }
} catch (InterruptedException e) {
log.error("Interruption occurred while waiting for reconnection", e);
} catch (MqttException e) {
diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTBrokerConnectionConfiguration.java b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTBrokerConnectionConfiguration.java
index 3685c245f..32669bd96 100644
--- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTBrokerConnectionConfiguration.java
+++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTBrokerConnectionConfiguration.java
@@ -105,10 +105,18 @@ public class MQTTBrokerConnectionConfiguration {
this.brokerUrl = PropertyUtils.replaceMqttProperty(url);
this.dcrUrl = PropertyUtils
.replaceMqttProperty(globalProperties.get(MQTTEventAdapterConstants.ADAPTER_CONF_DCR_URL));
- this.contentValidatorType = eventAdapterConfiguration.getProperties()
- .get(MQTTEventAdapterConstants.ADAPTER_CONF_CONTENT_VALIDATOR_TYPE);
- this.cleanSession = Boolean.parseBoolean(eventAdapterConfiguration.getProperties()
- .get(MQTTEventAdapterConstants.ADAPTER_CONF_CLEAN_SESSION));
+ this.contentValidatorType = globalProperties.get(MQTTEventAdapterConstants.ADAPTER_CONF_CONTENT_VALIDATOR_TYPE);
+ if (contentValidatorType == null || contentValidatorType.isEmpty()) {
+ this.contentValidatorType = eventAdapterConfiguration.getProperties()
+ .get(MQTTEventAdapterConstants.ADAPTER_CONF_CONTENT_VALIDATOR_TYPE);
+ }
+ String cleanSession = globalProperties.get(MQTTEventAdapterConstants.ADAPTER_CONF_CLEAN_SESSION);
+ if (cleanSession == null || cleanSession.isEmpty()) {
+ this.cleanSession = Boolean.parseBoolean(eventAdapterConfiguration.getProperties()
+ .get(MQTTEventAdapterConstants.ADAPTER_CONF_CLEAN_SESSION));
+ } else {
+ this.cleanSession = Boolean.parseBoolean(cleanSession);
+ }
//If global properties are available those will be assigned else constant values will be assigned
if (globalProperties.get(MQTTEventAdapterConstants.ADAPTER_CONF_KEEP_ALIVE) != null) {
keepAlive = Integer.parseInt((globalProperties.get(MQTTEventAdapterConstants.ADAPTER_CONF_KEEP_ALIVE)));
diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTEventAdapterConstants.java b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTEventAdapterConstants.java
index dc0e45413..7d52fb53c 100644
--- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTEventAdapterConstants.java
+++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTEventAdapterConstants.java
@@ -50,6 +50,7 @@ public class MQTTEventAdapterConstants {
public static final int INITIAL_RECONNECTION_DURATION = 4000;
public static final int RECONNECTION_PROGRESS_FACTOR = 2;
+ public static final int MAXIMUM_RECONNECTION_DURATION = 60000;
public static final String EMPTY_STRING = "";
public static final String GRANT_TYPE_PARAM_NAME = "grant_type";
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 38dc1641e..b83eeea47 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../../pom.xml
4.0.0
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 20b7d7130..a52f5d32c 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../../pom.xml
4.0.0
diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/output/adapter/mqtt/MQTTEventAdapter.java b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/output/adapter/mqtt/MQTTEventAdapter.java
index fbc9c015d..658a124d2 100644
--- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/output/adapter/mqtt/MQTTEventAdapter.java
+++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/output/adapter/mqtt/MQTTEventAdapter.java
@@ -44,10 +44,10 @@ public class MQTTEventAdapter implements OutputEventAdapter {
private Map globalProperties;
private MQTTAdapterPublisher mqttAdapterPublisher;
private int connectionKeepAliveInterval;
- private String qos;
private static ThreadPoolExecutor threadPoolExecutor;
private static final Log log = LogFactory.getLog(MQTTEventAdapter.class);
private int tenantId;
+ private MQTTBrokerConnectionConfiguration mqttBrokerConnectionConfiguration;
public MQTTEventAdapter(OutputEventAdapterConfiguration eventAdapterConfiguration,
Map globalProperties) {
@@ -117,11 +117,11 @@ public class MQTTEventAdapter implements OutputEventAdapter {
@Override
public void connect() {
- MQTTBrokerConnectionConfiguration mqttBrokerConnectionConfiguration =
+ mqttBrokerConnectionConfiguration =
new MQTTBrokerConnectionConfiguration(eventAdapterConfiguration, globalProperties);
String clientId = eventAdapterConfiguration.getStaticProperties().get(
MQTTEventAdapterConstants.ADAPTER_CONF_CLIENTID);
- qos = eventAdapterConfiguration.getStaticProperties().get(MQTTEventAdapterConstants.ADAPTER_MESSAGE_QOS);
+
mqttAdapterPublisher = new MQTTAdapterPublisher(mqttBrokerConnectionConfiguration, clientId, tenantId);
}
@@ -179,11 +179,7 @@ public class MQTTEventAdapter implements OutputEventAdapter {
}
}
}
- if (qos == null || qos.trim().isEmpty()) {
- mqttAdapterPublisher.publish(message.toString(), topic);
- } else {
- mqttAdapterPublisher.publish(Integer.parseInt(qos), message.toString(), topic);
- }
+ mqttAdapterPublisher.publish(mqttBrokerConnectionConfiguration.getQos(), message.toString(), topic);
} catch (Throwable t) {
EventAdapterUtil.logAndDrop(eventAdapterConfiguration.getName(), message, null, t, log, tenantId);
}
diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/output/adapter/mqtt/MQTTEventAdapterFactory.java b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/output/adapter/mqtt/MQTTEventAdapterFactory.java
index 1c8cd43de..b3351234f 100644
--- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/output/adapter/mqtt/MQTTEventAdapterFactory.java
+++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/output/adapter/mqtt/MQTTEventAdapterFactory.java
@@ -90,9 +90,9 @@ public class MQTTEventAdapterFactory extends OutputEventAdapterFactory {
// set Quality of Service
Property qos = new Property(MQTTEventAdapterConstants.ADAPTER_MESSAGE_QOS);
qos.setDisplayName(resourceBundle.getString(MQTTEventAdapterConstants.ADAPTER_MESSAGE_QOS));
- qos.setRequired(true);
+ qos.setRequired(false);
qos.setOptions(new String[]{"0", "1", "2"});
- qos.setDefaultValue("1");
+ qos.setDefaultValue("2");
staticPropertyList.add(brokerUrl);
staticPropertyList.add(userName);
diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/output/adapter/mqtt/util/MQTTBrokerConnectionConfiguration.java b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/output/adapter/mqtt/util/MQTTBrokerConnectionConfiguration.java
index 2bbd394ab..7bdf982c9 100644
--- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/output/adapter/mqtt/util/MQTTBrokerConnectionConfiguration.java
+++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/output/adapter/mqtt/util/MQTTBrokerConnectionConfiguration.java
@@ -34,6 +34,7 @@ public class MQTTBrokerConnectionConfiguration {
private boolean cleanSession = true;
private int keepAlive;
private boolean globalCredentailSet;
+ private int qos;
public String getTokenUrl() {
return tokenUrl;
@@ -75,6 +76,9 @@ public class MQTTBrokerConnectionConfiguration {
return globalCredentailSet;
}
+ public int getQos() {
+ return qos;
+ }
public MQTTBrokerConnectionConfiguration(OutputEventAdapterConfiguration eventAdapterConfiguration,
Map globalProperties) {
adapterName = eventAdapterConfiguration.getName();
@@ -98,14 +102,28 @@ public class MQTTBrokerConnectionConfiguration {
if (scopes == null) {
this.scopes = MQTTEventAdapterConstants.EMPTY_STRING;
}
- this.cleanSession = Boolean.parseBoolean(eventAdapterConfiguration.getStaticProperties()
- .get(MQTTEventAdapterConstants.ADAPTER_CONF_CLEAN_SESSION));
+ String cleanSession = globalProperties.get(MQTTEventAdapterConstants.ADAPTER_CONF_CLEAN_SESSION);
+ if (cleanSession == null || cleanSession.isEmpty()) {
+ this.cleanSession = Boolean.parseBoolean(eventAdapterConfiguration.getStaticProperties()
+ .get(MQTTEventAdapterConstants.ADAPTER_CONF_CLEAN_SESSION));
+ } else {
+ this.cleanSession = Boolean.parseBoolean(cleanSession);
+ }
//If global properties are available those will be assigned else constant values will be assigned
if (globalProperties.get(MQTTEventAdapterConstants.ADAPTER_CONF_KEEP_ALIVE) != null) {
keepAlive = Integer.parseInt((globalProperties.get(MQTTEventAdapterConstants.ADAPTER_CONF_KEEP_ALIVE)));
} else {
keepAlive = MQTTEventAdapterConstants.ADAPTER_CONF_DEFAULT_KEEP_ALIVE;
}
+ String qosVal = globalProperties.get(MQTTEventAdapterConstants.ADAPTER_MESSAGE_QOS);
+ if (qosVal != null && !qosVal.isEmpty()) {
+ this.qos = Integer.parseInt(qosVal);
+ } else {
+ qosVal = eventAdapterConfiguration.getStaticProperties().get(MQTTEventAdapterConstants.ADAPTER_MESSAGE_QOS);
+ this.qos = Integer.parseInt(qosVal);
+ }
+
+
}
}
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 24e3314e4..7c1109aab 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../../pom.xml
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 c6835e12c..527917363 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../../pom.xml
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 c4c40856e..775ea200f 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
@@ -63,23 +63,14 @@ public class DeviceAuthorizer implements Authorizer {
private static DeviceAccessAuthorizationAdminService deviceAccessAuthorizationAdminService;
private static final String CDMF_SERVER_BASE_CONTEXT = "/api/device-mgt/v1.0";
private static final String DEVICE_MGT_SERVER_URL = "deviceMgtServerUrl";
- private static final String STAT_PERMISSION = "statsPermission";
private static final String DEVICE_ID = "deviceId";
private static final String DEVICE_TYPE = "deviceType";
private static Log log = LogFactory.getLog(DeviceAuthorizer.class);
- private static List statPermissions;
-
public DeviceAuthorizer() {
}
@Override
public void init(Map globalProperties) {
- statPermissions = getPermissions(globalProperties);
- if (statPermissions != null && !statPermissions.isEmpty()) {
- for (String permission : statPermissions) {
- PermissionUtil.putPermission(permission);
- }
- }
try {
deviceAccessAuthorizationAdminService = Feign.builder().client(getSSLClient()).logger(new Slf4jLogger())
.logLevel(Logger.Level.FULL).requestInterceptor(new OAuthRequestInterceptor(globalProperties))
@@ -102,9 +93,6 @@ public class DeviceAuthorizer implements Authorizer {
AuthorizationRequest authorizationRequest = new AuthorizationRequest();
authorizationRequest.setTenantDomain(authenticationInfo.getTenantDomain());
- if (statPermissions != null && !statPermissions.isEmpty()) {
- authorizationRequest.setPermissions(statPermissions);
- }
authorizationRequest.setUsername(authenticationInfo.getUsername());
DeviceIdentifier deviceIdentifier = new DeviceIdentifier();
deviceIdentifier.setId(deviceId);
@@ -137,14 +125,6 @@ public class DeviceAuthorizer implements Authorizer {
return deviceMgtServerUrl;
}
- private List getPermissions(Map properties) {
- String stats = properties.get(STAT_PERMISSION);
- if (stats != null && !stats.isEmpty()) {
- return Arrays.asList(stats.replace("\n", "").split(" "));
- }
- return null;
- }
-
private static Client getSSLClient() {
return new Client.Default(getTrustedSSLSocketFactory(), new HostnameVerifier() {
@Override
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/PermissionUtil.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/PermissionUtil.java
deleted file mode 100644
index cab25a8c4..000000000
--- 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/PermissionUtil.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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.device.mgt.output.adapter.websocket.authorization;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.base.MultitenantConstants;
-import org.wso2.carbon.device.mgt.output.adapter.websocket.internal.WebsocketEventAdaptorServiceDataHolder;
-import org.wso2.carbon.registry.api.Resource;
-import org.wso2.carbon.registry.core.Registry;
-import org.wso2.carbon.registry.core.exceptions.RegistryException;
-
-import java.util.StringTokenizer;
-
-/**
- * Utility class which holds necessary utility methods required for persisting permissions in
- * registry.
- */
-public class PermissionUtil {
-
- public static final String PERMISSION_PROPERTY_NAME = "name";
- private static Log log = LogFactory.getLog(DeviceAuthorizer.class);
-
- public static void putPermission(String permission) {
- try {
- StringTokenizer tokenizer = new StringTokenizer(permission, "/");
- String lastToken = "", currentToken, tempPath;
- while (tokenizer.hasMoreTokens()) {
- currentToken = tokenizer.nextToken();
- tempPath = lastToken + "/" + currentToken;
- if (!checkResourceExists(tempPath)) {
- createRegistryCollection(tempPath, currentToken);
-
- }
- lastToken = tempPath;
- }
- } catch (org.wso2.carbon.registry.api.RegistryException e) {
- log.error("Failed to creation permission in registry" + permission, e);
- }
- }
-
- public static void createRegistryCollection(String path, String resourceName)
- throws org.wso2.carbon.registry.api.RegistryException {
- Resource resource = getGovernanceRegistry().newCollection();
- resource.addProperty(PERMISSION_PROPERTY_NAME, resourceName);
- getGovernanceRegistry().beginTransaction();
- getGovernanceRegistry().put(path, resource);
- getGovernanceRegistry().commitTransaction();
- }
-
- public static boolean checkResourceExists(String path)
- throws RegistryException {
- return getGovernanceRegistry().resourceExists(path);
- }
-
- public static Registry getGovernanceRegistry() throws RegistryException {
- return WebsocketEventAdaptorServiceDataHolder.getRegistryService()
- .getGovernanceSystemRegistry(MultitenantConstants.SUPER_TENANT_ID);
- }
-
-}
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/client/dto/DeviceAccessAuthorizationAdminService.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/client/dto/DeviceAccessAuthorizationAdminService.java
index 7ff42b115..440173bf3 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/client/dto/DeviceAccessAuthorizationAdminService.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/client/dto/DeviceAccessAuthorizationAdminService.java
@@ -28,7 +28,7 @@ import javax.ws.rs.core.MediaType;
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
-@Path("/admin/authorization")
+@Path("/admin/authorization/stat")
/**
* This interface provided the definition of the device - user access verification service.
*/
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 b4bf7b222..40606f5b8 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../../pom.xml
diff --git a/components/extensions/cdmf-transport-adapters/pom.xml b/components/extensions/cdmf-transport-adapters/pom.xml
index c57f118a4..18e368ce2 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
diff --git a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/pom.xml b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/pom.xml
index 3dab3dccd..ce48000b0 100644
--- a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/pom.xml
+++ b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt-plugins
mb-extensions
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
diff --git a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/mqtt/authorization/DeviceAccessBasedMQTTAuthorizer.java b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/mqtt/authorization/DeviceAccessBasedMQTTAuthorizer.java
index 6fd2c3464..e158c726e 100644
--- a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/mqtt/authorization/DeviceAccessBasedMQTTAuthorizer.java
+++ b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/mqtt/authorization/DeviceAccessBasedMQTTAuthorizer.java
@@ -77,12 +77,14 @@ public class DeviceAccessBasedMQTTAuthorizer implements IAuthorizer {
private static final String CACHE_MANAGER_NAME = "mqttAuthorizationCacheManager";
private static final String CACHE_NAME = "mqttAuthorizationCache";
private static DeviceAccessAuthorizationAdminService deviceAccessAuthorizationAdminService;
-
+ private static OAuthRequestInterceptor oAuthRequestInterceptor;
+ private static final String GATEWAY_ERROR_CODE = "404";
public DeviceAccessBasedMQTTAuthorizer() {
+ oAuthRequestInterceptor = new OAuthRequestInterceptor();
this.MQTTAuthorizationConfiguration = AuthorizationConfigurationManager.getInstance();
deviceAccessAuthorizationAdminService = Feign.builder().client(getSSLClient()).logger(new Slf4jLogger())
- .logLevel(Logger.Level.FULL).requestInterceptor(new OAuthRequestInterceptor())
+ .logLevel(Logger.Level.FULL).requestInterceptor(oAuthRequestInterceptor)
.contract(new JAXRSContract()).encoder(new GsonEncoder()).decoder(new GsonDecoder())
.target(DeviceAccessAuthorizationAdminService.class,
MQTTAuthorizationConfiguration.getDeviceMgtServerUrl() + CDMF_SERVER_BASE_CONTEXT);
@@ -121,7 +123,12 @@ public class DeviceAccessBasedMQTTAuthorizer implements IAuthorizer {
}
return false;
} catch (FeignException e) {
- log.error(e.getMessage(), e);
+ oAuthRequestInterceptor.resetApiApplicationKey();
+ if (e.getMessage().contains(GATEWAY_ERROR_CODE)) {
+ log.error("Failed to connect to the device authorization service.");
+ } else {
+ log.error(e.getMessage(), e);
+ }
return false;
}
}
@@ -164,6 +171,12 @@ public class DeviceAccessBasedMQTTAuthorizer implements IAuthorizer {
}
}
} catch (FeignException e) {
+ oAuthRequestInterceptor.resetApiApplicationKey();
+ if (e.getMessage().contains(GATEWAY_ERROR_CODE)) {
+ log.error("Failed to connect to the device authorization service.");
+ } else {
+ log.error(e.getMessage(), e);
+ }
log.error(e.getMessage(), e);
}
} finally {
diff --git a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/mqtt/authorization/client/OAuthRequestInterceptor.java b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/mqtt/authorization/client/OAuthRequestInterceptor.java
index b6124baae..d2917f59e 100755
--- a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/mqtt/authorization/client/OAuthRequestInterceptor.java
+++ b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/mqtt/authorization/client/OAuthRequestInterceptor.java
@@ -123,6 +123,10 @@ public class OAuthRequestInterceptor implements RequestInterceptor {
template.header("Authorization", headerValue);
}
+ public void resetApiApplicationKey() {
+ apiApplicationKey = null;
+ }
+
private static Client getSSLClient() {
return new Client.Default(getTrustedSSLSocketFactory(), new HostnameVerifier() {
@Override
diff --git a/components/extensions/mb-extensions/pom.xml b/components/extensions/mb-extensions/pom.xml
index a8d28a143..6653e9021 100644
--- a/components/extensions/mb-extensions/pom.xml
+++ b/components/extensions/mb-extensions/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt-plugins
extensions
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
diff --git a/components/extensions/pom.xml b/components/extensions/pom.xml
index f6e244826..639275b5a 100644
--- a/components/extensions/pom.xml
+++ b/components/extensions/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt-plugins
carbon-device-mgt-plugins-parent
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../../pom.xml
diff --git a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/pom.xml b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/pom.xml
index afe157e51..f8945c007 100644
--- a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/pom.xml
+++ b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/pom.xml
@@ -20,7 +20,7 @@
org.wso2.carbon.devicemgt-plugins
siddhi-extensions
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
@@ -77,7 +77,7 @@
org.wso2.extension.siddhi.execution.json.*
- org.json,
+ org.json;version="${orbit.version.json.range}",
org.wso2.siddhi.core.*,
org.wso2.siddhi.query.api.*,
diff --git a/components/extensions/siddhi-extensions/pom.xml b/components/extensions/siddhi-extensions/pom.xml
index f1d673f80..5cce874e3 100644
--- a/components/extensions/siddhi-extensions/pom.xml
+++ b/components/extensions/siddhi-extensions/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt-plugins
extensions
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.analytics/pom.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.analytics/pom.xml
index 1c8dfb985..ec384d200 100644
--- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.analytics/pom.xml
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.analytics/pom.xml
@@ -21,7 +21,7 @@
org.wso2.carbon.devicemgt-plugins
android-plugin
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/pom.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/pom.xml
index d66aa7311..082dcaaa2 100644
--- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/pom.xml
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/pom.xml
@@ -21,7 +21,7 @@
android-plugin
org.wso2.carbon.devicemgt-plugins
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/DeviceManagementServiceImpl.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/DeviceManagementServiceImpl.java
index c7deb305c..6ef393cf3 100644
--- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/DeviceManagementServiceImpl.java
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/DeviceManagementServiceImpl.java
@@ -193,8 +193,8 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
notification.setOperationId(operation.getId());
notification.setStatus(org.wso2.carbon.device.mgt.common.notification.mgt.Notification.
Status.NEW.toString());
- notification.setDescription(operation.getCode() + " operation did fail to execute on device " +
- deviceName + " with identifier " + deviceId);
+ notification.setDescription(operation.getCode() + " operation failed to execute on device " +
+ deviceName + " (ID: " + deviceId + ")");
AndroidAPIUtils.getNotificationManagementService().addNotification(id, notification);
}
if (log.isDebugEnabled()) {
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml
index df3343469..d8f1346fb 100644
--- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/pom.xml
@@ -23,13 +23,13 @@
android-plugin
org.wso2.carbon.devicemgt-plugins
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.mobile.android.ui
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
WSO2 Carbon - Mobile Android UI
pom
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.type-view/public/js/type-view.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.type-view/public/js/type-view.js
index 5f92d11aa..6375247c8 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.type-view/public/js/type-view.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.type-view/public/js/type-view.js
@@ -384,31 +384,4 @@ $(document).ready(function () {
}
);
});
-});
-
-function artifactUpload() {
- var contentType = "application/json";
-
- var urix = backendEndBasePath + "/admin/devicetype/deploy/android";
- var defaultStatusClasses = "fw fw-stack-1x";
- var content = $("#android-statistic-response-template").find(".content");
- var title = content.find("#title");
- var statusIcon = content.find("#status-icon");
- var data = {}
- invokerUtil.post(urix, data, function (data) {
- title.html("Deploying statistic artifacts. Please wait...");
- statusIcon.attr("class", defaultStatusClasses + " fw-check");
- $(modalPopupContent).html(content.html());
- showPopup();
- setTimeout(function () {
- hidePopup();
- location.reload(true);
- }, 5000);
-
- }, function (jqXHR) {
- title.html("Failed to deploy artifacts, Please contact administrator.");
- statusIcon.attr("class", defaultStatusClasses + " fw-error");
- $(modalPopupContent).html(content.html());
- showPopup();
- }, contentType);
-}
\ No newline at end of file
+});
\ No newline at end of file
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.type-view/type-view.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.type-view/type-view.hbs
index a56292b43..183b0b96b 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.type-view/type-view.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.type-view/type-view.hbs
@@ -43,10 +43,6 @@
Download APK
- {{#if permissions.IS_ADMIN}}
-
- Deploy Geo Dashboard
- {{/if}}
{{/if}}
{{/if}}
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.type-view/type-view.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.type-view/type-view.js
index 382a66982..881806f4c 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.type-view/type-view.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.type-view/type-view.js
@@ -19,8 +19,6 @@
function onRequest(context) {
var viewModel = {};
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
- var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
- viewModel["permissions"] = userModule.getUIPermissions();
var isCloud = devicemgtProps["isCloud"];
viewModel["isVirtual"] = request.getParameter("type") == 'virtual';
viewModel["isCloud"] = isCloud;
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 31432e760..06927ef1f 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
diff --git a/components/mobile-plugins/android-plugin/pom.xml b/components/mobile-plugins/android-plugin/pom.xml
index be682d0df..f5690ed52 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
diff --git a/components/mobile-plugins/pom.xml b/components/mobile-plugins/pom.xml
index 4649209d1..50714635d 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
- 3.0.34-SNAPSHOT
+ 3.0.37-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 0c9002c5e..afb3a88c1 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
@@ -265,6 +265,11 @@
org.wso2.carbon.device.mgt.common
provided
+
+ org.wso2.carbon.devicemgt-plugins
+ org.wso2.carbon.device.mgt.mobile.windows
+ provided
+
org.wso2.carbon.devicemgt
org.wso2.carbon.webapp.authenticator.framework
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/util/BSTValidator.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/util/BSTValidator.java
index 7a81fdd10..d6b51faba 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/util/BSTValidator.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/util/BSTValidator.java
@@ -19,6 +19,7 @@
package org.wso2.carbon.device.mgt.mobile.windows.api.common.util;
import org.apache.commons.codec.binary.Base64;
+import org.apache.http.auth.AUTH;
import org.apache.ws.security.WSSecurityException;
import org.apache.ws.security.handler.RequestData;
import org.apache.ws.security.message.token.BinarySecurity;
@@ -32,6 +33,9 @@ import org.wso2.carbon.device.mgt.mobile.windows.api.common.beans.CacheEntry;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.AuthenticationException;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.OAuthTokenValidationException;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsDeviceEnrolmentException;
+import org.wso2.carbon.device.mgt.mobile.windows.exception.WindowsDeviceMgtPluginException;
+import org.wso2.carbon.device.mgt.mobile.windows.impl.dao.MobileDeviceManagementDAOException;
+import org.wso2.carbon.device.mgt.mobile.windows.impl.dto.MobileCacheEntry;
import java.util.HashMap;
@@ -94,12 +98,17 @@ public class BSTValidator implements Validator {
private boolean authenticate(String binarySecurityToken, AuthenticationInfo authenticationInfo) throws
AuthenticationException {
WindowsAPIUtils.startTenantFlow(authenticationInfo);
- if (DeviceUtil.getCacheEntry(binarySecurityToken) != null) {
- CacheEntry cacheentry = (CacheEntry) DeviceUtil.getCacheEntry(binarySecurityToken);
- String username = cacheentry.getUsername();
- return username != null;
- } else {
- return false;
+ MobileCacheEntry cacheEntry;
+ try {
+ cacheEntry = DeviceUtil.getTokenEntry(binarySecurityToken);
+ if (cacheEntry != null) {
+ String username = cacheEntry.getUsername();
+ return username != null;
+ } else {
+ return false;
+ }
+ } catch (WindowsDeviceEnrolmentException e) {
+ throw new AuthenticationException("Authentication failure when fetching token entry", e);
}
}
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/util/DeviceUtil.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/util/DeviceUtil.java
index b378ae8c9..51cd42b28 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/util/DeviceUtil.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/util/DeviceUtil.java
@@ -18,14 +18,17 @@
package org.wso2.carbon.device.mgt.mobile.windows.api.common.util;
-import org.wso2.carbon.device.mgt.mobile.windows.api.common.beans.CacheEntry;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.context.PrivilegedCarbonContext;
+import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsDeviceEnrolmentException;
+import org.wso2.carbon.device.mgt.mobile.windows.exception.WindowsDeviceMgtPluginException;
+import org.wso2.carbon.device.mgt.mobile.windows.impl.WindowsTokenService;
+import org.wso2.carbon.device.mgt.mobile.windows.impl.dao.MobileDeviceManagementDAOException;
+import org.wso2.carbon.device.mgt.mobile.windows.impl.dto.MobileCacheEntry;
+import org.wso2.carbon.device.mgt.mobile.windows.impl.util.WindowsUtils;
-import javax.cache.Cache;
-import javax.cache.CacheConfiguration;
-import javax.cache.CacheManager;
-import javax.cache.Caching;
import java.util.UUID;
-import java.util.concurrent.TimeUnit;
/**
* Class for generate random token for XCEP and WSTEP.
@@ -36,45 +39,106 @@ public class DeviceUtil {
private static final String TOKEN_CACHE = "TOKEN_CACHE";
private static final long CACHE_DURATION = 15l;
private static boolean isContextCacheInitialized = false;
+ private static WindowsTokenService tokenService;
+
+ private static final Log log = LogFactory.getLog(DeviceUtil.class);
+
+ static {
+ try {
+ tokenService = WindowsUtils.getEnrollmentTokenService();
+ } catch (WindowsDeviceMgtPluginException e) {
+ log.error("WindowsTokenService cannot be initialized.", e);
+ }
+ }
public static String generateRandomToken() {
return String.valueOf(UUID.randomUUID());
}
- public static void persistChallengeToken(String token, String deviceID, String username) {
-
- Object objCacheEntry = getCacheEntry(token);
- CacheEntry cacheEntry;
- if (objCacheEntry == null) {
- cacheEntry = new CacheEntry();
- cacheEntry.setUsername(username);
- } else {
- cacheEntry = (CacheEntry) objCacheEntry;
- }
- if (deviceID != null) {
- cacheEntry.setDeviceID(deviceID);
+ public static void persistChallengeToken(String token, String deviceID, String username)
+ throws WindowsDeviceEnrolmentException {
+ try {
+ if(tokenService == null) {
+ tokenService = WindowsUtils.getEnrollmentTokenService();
+ }
+ MobileCacheEntry existingCacheEntry = tokenService.getCacheToken(token);
+ PrivilegedCarbonContext carbonCtx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
+ if (existingCacheEntry == null) {
+ MobileCacheEntry newCacheEntry = new MobileCacheEntry();
+ newCacheEntry.setDeviceID(deviceID);
+ newCacheEntry.setUsername(username);
+ newCacheEntry.setCacheToken(token);
+ newCacheEntry.setTenantDomain(carbonCtx.getTenantDomain());
+ newCacheEntry.setTenanatID(carbonCtx.getTenantId());
+ tokenService.saveCacheToken(newCacheEntry);
+ } else {
+ existingCacheEntry.setDeviceID(deviceID);
+ existingCacheEntry.setCacheToken(token);
+ tokenService.updateCacheToken(existingCacheEntry);
+ }
+ } catch (MobileDeviceManagementDAOException e) {
+ String msg = "Error occured when saving cache token for device: " + deviceID;
+ log.error(msg);
+ throw new WindowsDeviceEnrolmentException(msg, e);
+ } catch (WindowsDeviceMgtPluginException e) {
+ String msg = "Error occured when retrieving enrollment token service";
+ log.error(msg);
+ throw new WindowsDeviceEnrolmentException(msg, e);
}
- getTokenCache().put(token.trim(), cacheEntry);
}
- public static void removeToken(String token) {
- getTokenCache().remove(token);
+ public static MobileCacheEntry getTokenEntry(String token)
+ throws WindowsDeviceEnrolmentException {
+ MobileCacheEntry tokenEntry;
+ try {
+ if (tokenService == null) {
+ tokenService = WindowsUtils.getEnrollmentTokenService();
+ }
+ tokenEntry = tokenService.getCacheToken(token);
+ } catch (WindowsDeviceMgtPluginException e) {
+ String msg = "Error occured when retrieving enrollment token service.";
+ log.error(msg);
+ throw new WindowsDeviceEnrolmentException(msg, e);
+ } catch (MobileDeviceManagementDAOException e) {
+ String msg = "Error occured when retrieving enrollment token.";
+ log.error(msg);
+ throw new WindowsDeviceEnrolmentException(msg, e);
+ }
+ return tokenEntry;
}
- public static Object getCacheEntry(String token) {
- return getTokenCache().get(token);
+ public static MobileCacheEntry getTokenEntryFromDeviceId(String deviceId)
+ throws WindowsDeviceEnrolmentException {
+ MobileCacheEntry tokenEntry;
+ try {
+ if (tokenService == null) {
+ tokenService = WindowsUtils.getEnrollmentTokenService();
+ }
+ tokenEntry = tokenService.getCacheTokenFromDeviceId(deviceId);
+ } catch (WindowsDeviceMgtPluginException e) {
+ String msg = "Error occured when retrieving enrollment token service.";
+ log.error(msg);
+ throw new WindowsDeviceEnrolmentException(msg, e);
+ } catch (MobileDeviceManagementDAOException e) {
+ String msg = "Error occured when retrieving enrollment token.";
+ log.error(msg);
+ throw new WindowsDeviceEnrolmentException(msg, e);
+ }
+ return tokenEntry;
}
- private static Cache getTokenCache() {
- CacheManager contextCacheManager = Caching.getCacheManager(TOKEN_CACHE_MANAGER).
- getCache(TOKEN_CACHE).getCacheManager();
- if (!isContextCacheInitialized) {
- return Caching.getCacheManager(TOKEN_CACHE_MANAGER).getCache(TOKEN_CACHE);
- } else {
- isContextCacheInitialized = true;
- return contextCacheManager.createCacheBuilder(TOKEN_CACHE_MANAGER).setExpiry(
- CacheConfiguration.ExpiryType.MODIFIED,
- new CacheConfiguration.Duration(TimeUnit.MINUTES, CACHE_DURATION)).setStoreByValue(false).build();
+ public static void removeTokenEntry(String token) {
+ try {
+ if (tokenService == null) {
+ tokenService = WindowsUtils.getEnrollmentTokenService();
+ }
+ tokenService.removeCacheToken(token);
+ } catch (WindowsDeviceMgtPluginException e) {
+ String msg = "Error occured when retrieving enrollment token service.";
+ log.error(msg);
+ } catch (MobileDeviceManagementDAOException e) {
+ String msg = "Error occured when removing enrollment token.";
+ log.error(msg);
}
}
}
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 b8e9287e4..25f963ab3 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,6 +22,7 @@ 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;
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 d45455f0c..ee3d62c9c 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
@@ -44,6 +44,7 @@ import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.SyncmlCrede
import org.wso2.carbon.device.mgt.mobile.windows.api.services.enrollment.EnrollmentService;
import org.wso2.carbon.device.mgt.mobile.windows.api.services.enrollment.beans.*;
import org.wso2.carbon.device.mgt.mobile.windows.api.services.syncml.beans.WindowsDevice;
+import org.wso2.carbon.device.mgt.mobile.windows.impl.dto.MobileCacheEntry;
import org.wso2.carbon.policy.mgt.common.PolicyManagementException;
import org.wso2.carbon.policy.mgt.core.PolicyManagerService;
import org.xml.sax.SAXException;
@@ -296,7 +297,7 @@ public class EnrollmentServiceImpl implements EnrollmentService {
//CacheEntry cacheEntry = (CacheEntry) DeviceUtil.getCacheEntry(headerBst);
// String userName = cacheEntry.getUsername();
authNameNode.setTextContent(userName);
- DeviceUtil.removeToken(headerBst);
+ DeviceUtil.removeTokenEntry(headerBst);
String password = DeviceUtil.generateRandomToken();
Node passwordAuthPosition = wapParm.item(PluginConstants.CertificateEnrolment.APPAUTH_PASSWORD_POSITION);
NamedNodeMap appSrvPasswordAttribute = passwordAuthPosition.getAttributes();
@@ -351,7 +352,12 @@ public class EnrollmentServiceImpl implements EnrollmentService {
* @return User for given token.
*/
private String getRequestedUser(String bst) {
- CacheEntry cacheEntry = (CacheEntry) DeviceUtil.getCacheEntry(bst);
+ MobileCacheEntry cacheEntry = null;
+ try {
+ cacheEntry = DeviceUtil.getTokenEntry(bst);
+ } catch (WindowsDeviceEnrolmentException e) {
+
+ }
return cacheEntry.getUsername();
}
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 38dfde51d..ae0e59a9c 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
@@ -43,6 +43,7 @@ import org.wso2.carbon.device.mgt.mobile.windows.api.operations.*;
import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.*;
import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.DeviceInfo;
import org.wso2.carbon.device.mgt.mobile.windows.api.services.DeviceManagementService;
+import org.wso2.carbon.device.mgt.mobile.windows.impl.dto.MobileCacheEntry;
import org.wso2.carbon.policy.mgt.common.PolicyManagementException;
import org.wso2.carbon.policy.mgt.core.PolicyManagerService;
@@ -80,14 +81,18 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
DeviceIdentifier deviceIdentifier = convertToDeviceIdentifierObject(syncmlHeader.getSource().
getLocURI());
msgId = syncmlHeader.getMsgID();
+
if ((PluginConstants.SyncML.SYNCML_FIRST_MESSAGE_ID == msgId) &&
(PluginConstants.SyncML.SYNCML_FIRST_SESSION_ID == sessionId)) {
token = syncmlHeader.getCredential().getData();
- CacheEntry cacheToken = (CacheEntry) DeviceUtil.getCacheEntry(token);
+ 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)) {
+ 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();
@@ -102,6 +107,9 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
return Response.status(Response.Status.UNAUTHORIZED).entity(msg).build();
}
} 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);
@@ -152,7 +160,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
* @throws WindowsDeviceEnrolmentException
* @throws WindowsOperationException
*/
- private boolean modifyEnrollWithMoreDetail(Document request) throws WindowsDeviceEnrolmentException,
+ private boolean modifyEnrollWithMoreDetail(Document request, String tenantDomain, int tenantId) throws WindowsDeviceEnrolmentException,
WindowsOperationException {
String devMan = null;
@@ -177,6 +185,8 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
user = syncmlDocument.getHeader().getSource().getLocName();
AuthenticationInfo authenticationInfo = new AuthenticationInfo();
authenticationInfo.setUsername(user);
+ authenticationInfo.setTenantId(tenantId);
+ authenticationInfo.setTenantDomain(tenantDomain);
WindowsAPIUtils.startTenantFlow(authenticationInfo);
DeviceIdentifier deviceIdentifier = convertToDeviceIdentifierObject(syncmlDocument.
getHeader().getSource().getLocURI());
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/impl/SyncmlServiceImpl.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/impl/SyncmlServiceImpl.java
index 4cc2f0ac8..356035f04 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/impl/SyncmlServiceImpl.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/impl/SyncmlServiceImpl.java
@@ -22,12 +22,15 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Document;
import org.wso2.carbon.context.PrivilegedCarbonContext;
-import org.wso2.carbon.device.mgt.common.*;
+import org.wso2.carbon.device.mgt.common.Device;
+import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
+import org.wso2.carbon.device.mgt.common.DeviceManagementConstants;
+import org.wso2.carbon.device.mgt.common.DeviceManagementException;
+import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
import org.wso2.carbon.device.mgt.common.notification.mgt.NotificationManagementException;
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.mobile.windows.api.common.PluginConstants;
-import org.wso2.carbon.device.mgt.mobile.windows.api.common.beans.CacheEntry;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.SyncmlMessageFormatException;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.SyncmlOperationException;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsConfigurationException;
@@ -35,10 +38,20 @@ import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsDe
import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.AuthenticationInfo;
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.ItemTag;
+import org.wso2.carbon.device.mgt.mobile.windows.api.operations.ReplaceTag;
+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.WindowsOperationException;
+import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.Constants;
+import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.DeviceInfo;
+import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.OperationHandler;
+import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.OperationReply;
+import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.SyncmlGenerator;
+import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.SyncmlParser;
import org.wso2.carbon.device.mgt.mobile.windows.api.services.syncml.SyncmlService;
import org.wso2.carbon.device.mgt.mobile.windows.api.services.syncml.beans.WindowsDevice;
-import org.wso2.carbon.device.mgt.mobile.windows.api.operations.*;
-import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.*;
+import org.wso2.carbon.device.mgt.mobile.windows.impl.dto.MobileCacheEntry;
import org.wso2.carbon.policy.mgt.common.PolicyManagementException;
import org.wso2.carbon.policy.mgt.core.PolicyManagerService;
@@ -143,11 +156,11 @@ public class SyncmlServiceImpl implements SyncmlService {
if ((PluginConstants.SyncML.SYNCML_FIRST_MESSAGE_ID == msgId) &&
(PluginConstants.SyncML.SYNCML_FIRST_SESSION_ID == sessionId)) {
token = syncmlHeader.getCredential().getData();
- CacheEntry cacheToken = (CacheEntry) DeviceUtil.getCacheEntry(token);
+ MobileCacheEntry cacheToken = DeviceUtil.getTokenEntry(token);
if ((cacheToken.getUsername() != null) && (cacheToken.getUsername().equals(user))) {
- if (enrollDevice(request)) {
+ if (enrollDevice(request, cacheToken.getTenantDomain(), cacheToken.getTenanatID())) {
deviceInfoOperations = deviceInfo.getDeviceInfo();
response = generateReply(syncmlDocument, deviceInfoOperations);
return Response.status(Response.Status.OK).entity(response).build();
@@ -163,7 +176,8 @@ public class SyncmlServiceImpl implements SyncmlService {
}
} else if (PluginConstants.SyncML.SYNCML_SECOND_MESSAGE_ID == msgId &&
PluginConstants.SyncML.SYNCML_FIRST_SESSION_ID == sessionId) {
- if (enrollDevice(request)) {
+ PrivilegedCarbonContext carbonCtx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
+ if (enrollDevice(request, carbonCtx.getTenantDomain(), carbonCtx.getTenantId())) {
return Response.ok().entity(generateReply(syncmlDocument, null)).build();
} else {
String msg = "Error occurred in modify enrollment.";
@@ -223,7 +237,7 @@ public class SyncmlServiceImpl implements SyncmlService {
* @throws WindowsDeviceEnrolmentException
* @throws WindowsOperationException
*/
- private boolean enrollDevice(Document request) throws WindowsDeviceEnrolmentException,
+ private boolean enrollDevice(Document request, String tenantDomain, int tenantId) throws WindowsDeviceEnrolmentException,
WindowsOperationException {
String osVersion;
@@ -256,6 +270,8 @@ public class SyncmlServiceImpl implements SyncmlService {
user = syncmlDocument.getHeader().getSource().getLocName();
AuthenticationInfo authenticationInfo = new AuthenticationInfo();
authenticationInfo.setUsername(user);
+ authenticationInfo.setTenantDomain(tenantDomain);
+ authenticationInfo.setTenantId(tenantId);
WindowsAPIUtils.startTenantFlow(authenticationInfo);
if (log.isDebugEnabled()) {
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/wstep/impl/CertificateEnrollmentServiceImpl.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/wstep/impl/CertificateEnrollmentServiceImpl.java
index a749214ba..f71aa52e2 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/wstep/impl/CertificateEnrollmentServiceImpl.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/wstep/impl/CertificateEnrollmentServiceImpl.java
@@ -26,14 +26,17 @@ import org.apache.cxf.headers.Header;
import org.apache.cxf.helpers.CastUtils;
import org.apache.cxf.jaxws.context.WrappedMessageContext;
import org.apache.cxf.message.Message;
-import org.w3c.dom.*;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
import org.wso2.carbon.certificate.mgt.core.exception.KeystoreException;
import org.wso2.carbon.certificate.mgt.core.service.CertificateManagementServiceImpl;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
-import org.wso2.carbon.device.mgt.mobile.windows.api.common.beans.CacheEntry;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.CertificateGenerationException;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.SyncmlMessageFormatException;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WAPProvisioningException;
@@ -46,6 +49,7 @@ import org.wso2.carbon.device.mgt.mobile.windows.api.services.wstep.beans.Additi
import org.wso2.carbon.device.mgt.mobile.windows.api.services.wstep.beans.BinarySecurityToken;
import org.wso2.carbon.device.mgt.mobile.windows.api.services.wstep.beans.RequestSecurityTokenResponse;
import org.wso2.carbon.device.mgt.mobile.windows.api.services.wstep.beans.RequestedSecurityToken;
+import org.wso2.carbon.device.mgt.mobile.windows.impl.dto.MobileCacheEntry;
import org.xml.sax.SAXException;
import javax.annotation.Resource;
@@ -293,10 +297,10 @@ public class CertificateEnrollmentServiceImpl implements CertificateEnrollmentSe
Node userNameAuthPosition = wapParm.item(PluginConstants.CertificateEnrolment.APPAUTH_USERNAME_POSITION);
NamedNodeMap appServerAttribute = userNameAuthPosition.getAttributes();
Node authNameNode = appServerAttribute.getNamedItem(PluginConstants.CertificateEnrolment.VALUE);
- CacheEntry cacheEntry = (CacheEntry) DeviceUtil.getCacheEntry(headerBst);
+ MobileCacheEntry cacheEntry = DeviceUtil.getTokenEntry(headerBst);
String userName = cacheEntry.getUsername();
authNameNode.setTextContent(cacheEntry.getUsername());
- DeviceUtil.removeToken(headerBst);
+ DeviceUtil.removeTokenEntry(headerBst);
String password = DeviceUtil.generateRandomToken();
Node passwordAuthPosition = wapParm.item(PluginConstants.CertificateEnrolment.APPAUTH_PASSWORD_POSITION);
NamedNodeMap appSrvPasswordAttribute = passwordAuthPosition.getAttributes();
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 97ce7830d..2d67a3c8e 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.mobile.windows.ui
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
WSO2 Carbon - Mobile Windows UI
pom
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 2721c8be1..0480bc714 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
@@ -64,6 +64,7 @@
org.wso2.carbon.context,
org.wso2.carbon.utils.*,
org.wso2.carbon.device.mgt.common.*,
+ org.wso2.carbon.device.mgt.core.dao.*,
org.wso2.carbon.ndatasource.core,
org.wso2.carbon.policy.mgt.common.*,
org.wso2.carbon.registry.core,
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/WindowsTokenService.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/WindowsTokenService.java
new file mode 100644
index 000000000..851a108c0
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/impl/WindowsTokenService.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * WSO2 Inc. licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License.
+ * you may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.wso2.carbon.device.mgt.mobile.windows.impl;
+
+import org.wso2.carbon.device.mgt.mobile.windows.impl.dao.MobileDeviceManagementDAOException;
+import org.wso2.carbon.device.mgt.mobile.windows.impl.dto.MobileCacheEntry;
+
+public interface WindowsTokenService {
+ void saveCacheToken(MobileCacheEntry entry) throws MobileDeviceManagementDAOException;
+ void updateCacheToken(MobileCacheEntry entry) throws MobileDeviceManagementDAOException;
+ MobileCacheEntry getCacheToken(String token) throws MobileDeviceManagementDAOException;
+ MobileCacheEntry getCacheTokenFromDeviceId(String deviceId) throws MobileDeviceManagementDAOException;
+ void removeCacheToken(String token) throws MobileDeviceManagementDAOException;
+}
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
new file mode 100644
index 000000000..68c40595f
--- /dev/null
+++ 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
@@ -0,0 +1,81 @@
+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;
+import org.wso2.carbon.device.mgt.mobile.windows.impl.dao.impl.WindowsEnrollmentTokenDAOImpl;
+import org.wso2.carbon.device.mgt.mobile.windows.impl.dto.MobileCacheEntry;
+
+public class WindowsTokenServiceImpl implements WindowsTokenService {
+
+ private static final Log log = LogFactory.getLog(WindowsTokenServiceImpl.class);
+ private static WindowsEnrollmentTokenDAO windowsEnrollmentTokenDAO;
+
+ public WindowsTokenServiceImpl() {
+ WindowsDAOFactory windowsDAOFactory = new WindowsDAOFactory();
+ windowsEnrollmentTokenDAO = new WindowsEnrollmentTokenDAOImpl();
+ }
+
+ @Override
+ public void saveCacheToken(MobileCacheEntry entry) throws MobileDeviceManagementDAOException {
+ try {
+ WindowsDAOFactory.beginTransaction();
+ windowsEnrollmentTokenDAO.addCacheToken(entry);
+ WindowsDAOFactory.commitTransaction();
+ } finally {
+ WindowsDAOFactory.closeConnection();
+ }
+ }
+
+ @Override
+ public void updateCacheToken(MobileCacheEntry entry) throws MobileDeviceManagementDAOException {
+ try {
+ WindowsDAOFactory.beginTransaction();
+ windowsEnrollmentTokenDAO.updateCacheToken(entry);
+ WindowsDAOFactory.commitTransaction();
+ } finally {
+ WindowsDAOFactory.closeConnection();
+ }
+ }
+
+ @Override
+ public MobileCacheEntry getCacheToken(String token) throws MobileDeviceManagementDAOException {
+ MobileCacheEntry cacheEntry = null;
+ try {
+ WindowsDAOFactory.beginTransaction();
+ cacheEntry = windowsEnrollmentTokenDAO.getCacheToken(token);
+ WindowsDAOFactory.commitTransaction();
+ } finally {
+ WindowsDAOFactory.closeConnection();
+ }
+ return cacheEntry;
+ }
+
+ @Override public MobileCacheEntry getCacheTokenFromDeviceId(String deviceId)
+ throws MobileDeviceManagementDAOException {
+ MobileCacheEntry cacheEntry = null;
+ try {
+ WindowsDAOFactory.beginTransaction();
+ cacheEntry = windowsEnrollmentTokenDAO.getCacheTokenFromDeviceId(deviceId);
+ WindowsDAOFactory.commitTransaction();
+ } finally {
+ WindowsDAOFactory.closeConnection();
+ }
+ return cacheEntry;
+ }
+
+ @Override
+ public void removeCacheToken(String token) throws MobileDeviceManagementDAOException {
+ try {
+ WindowsDAOFactory.beginTransaction();
+ windowsEnrollmentTokenDAO.deleteCacheToken(token);
+ WindowsDAOFactory.commitTransaction();
+ } finally {
+ WindowsDAOFactory.closeConnection();
+ }
+ }
+}
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/dao/WindowsDAOFactory.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/dao/WindowsDAOFactory.java
index 6bbdf572f..760a8a5fd 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/dao/WindowsDAOFactory.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/dao/WindowsDAOFactory.java
@@ -21,9 +21,13 @@ package org.wso2.carbon.device.mgt.mobile.windows.impl.dao;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.device.mgt.common.DeviceManagementConstants;
+import org.wso2.carbon.device.mgt.mobile.windows.exception.WindowsDeviceMgtPluginException;
import org.wso2.carbon.device.mgt.mobile.windows.impl.dao.impl.WindowsDeviceDAOImpl;
import org.wso2.carbon.device.mgt.mobile.windows.impl.dao.impl.WindowsFeatureDAOImpl;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.SQLException;
@@ -35,7 +39,18 @@ public class WindowsDAOFactory extends AbstractMobileDeviceManagementDAOFactory
private static ThreadLocal currentConnection = new ThreadLocal<>();
public WindowsDAOFactory() {
- this.dataSource = getDataSourceMap().get(DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_WINDOWS);
+// this.dataSource = getDataSourceMap().get(DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_WINDOWS);
+ String dataSourceName = "jdbc/MobileWindowsDM_DS";
+ initDAO(dataSourceName);
+ }
+
+ public void initDAO(String datasourceName) {
+ try {
+ Context ctx = new InitialContext();
+ dataSource = (DataSource) ctx.lookup(datasourceName);
+ } catch (NamingException e) {
+
+ }
}
@Override
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/dao/WindowsEnrollmentTokenDAO.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/dao/WindowsEnrollmentTokenDAO.java
new file mode 100644
index 000000000..9ab0a2b73
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/impl/dao/WindowsEnrollmentTokenDAO.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * WSO2 Inc. licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License.
+ * you may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.wso2.carbon.device.mgt.mobile.windows.impl.dao;
+
+import org.wso2.carbon.device.mgt.mobile.windows.impl.dto.MobileCacheEntry;
+
+public interface WindowsEnrollmentTokenDAO {
+
+ MobileCacheEntry getCacheToken(String token) throws MobileDeviceManagementDAOException;
+
+ MobileCacheEntry getCacheTokenFromDeviceId(String deviceId) throws MobileDeviceManagementDAOException;
+
+ boolean addCacheToken(MobileCacheEntry cacheEntry) throws MobileDeviceManagementDAOException;
+
+ boolean updateCacheToken(MobileCacheEntry cacheEntry) throws MobileDeviceManagementDAOException;
+
+ boolean deleteCacheToken(String mobileDeviceId) throws MobileDeviceManagementDAOException;
+}
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/dao/impl/WindowsEnrollmentTokenDAOImpl.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/dao/impl/WindowsEnrollmentTokenDAOImpl.java
new file mode 100644
index 000000000..338818e79
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/impl/dao/impl/WindowsEnrollmentTokenDAOImpl.java
@@ -0,0 +1,177 @@
+/*
+ * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * WSO2 Inc. licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License.
+ * you may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.wso2.carbon.device.mgt.mobile.windows.impl.dao.impl;
+
+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;
+import org.wso2.carbon.device.mgt.mobile.windows.impl.dao.util.MobileDeviceManagementDAOUtil;
+import org.wso2.carbon.device.mgt.mobile.windows.impl.dto.MobileCacheEntry;
+import org.wso2.carbon.device.mgt.mobile.windows.impl.util.WindowsPluginConstants;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+public class WindowsEnrollmentTokenDAOImpl implements WindowsEnrollmentTokenDAO {
+
+ public WindowsEnrollmentTokenDAOImpl() {
+ }
+
+ @Override
+ public MobileCacheEntry getCacheToken(String token) throws MobileDeviceManagementDAOException {
+ Connection conn;
+ PreparedStatement stmt = null;
+ ResultSet rs = null;
+ MobileCacheEntry cacheEntry = null;
+ try {
+ conn = WindowsDAOFactory.getConnection();
+ String selectDBQuery = "SELECT TENANT_DOMAIN, TENANT_ID, ENROLLMENT_TOKEN, DEVICE_ID, USERNAME, OWNERSHIP " +
+ "FROM WINDOWS_ENROLLMENT_TOKEN WHERE ENROLLMENT_TOKEN = ?";
+ stmt = conn.prepareStatement(selectDBQuery);
+ stmt.setString(1, token);
+ rs = stmt.executeQuery();
+
+ while (rs.next()) {
+ cacheEntry = new MobileCacheEntry();
+ cacheEntry.setDeviceID(rs.getString(WindowsPluginConstants.DEVICE_ID));
+ cacheEntry.setTenantDomain(rs.getString(WindowsPluginConstants.TENANT_DOMAIN));
+ cacheEntry.setTenanatID(rs.getInt(WindowsPluginConstants.TENANT_ID));
+ cacheEntry.setUsername(rs.getString(WindowsPluginConstants.USER_NAME));
+ cacheEntry.setOwnership(rs.getString(WindowsPluginConstants.OWNERSHIP));
+ }
+ } catch (SQLException e) {
+ throw new MobileDeviceManagementDAOException("Error occurred while fetching the Windows device token for the enrollment token '" +
+ token + "' from the Windows db.", e);
+ }
+ return cacheEntry;
+ }
+
+ @Override public MobileCacheEntry getCacheTokenFromDeviceId(String deviceId)
+ throws MobileDeviceManagementDAOException {
+ Connection conn;
+ PreparedStatement stmt = null;
+ ResultSet rs = null;
+ MobileCacheEntry cacheEntry = null;
+ try {
+ conn = WindowsDAOFactory.getConnection();
+ String selectDBQuery = "SELECT TENANT_DOMAIN, TENANT_ID, ENROLLMENT_TOKEN, DEVICE_ID, USERNAME, OWNERSHIP " +
+ "FROM WINDOWS_ENROLLMENT_TOKEN WHERE DEVICE_ID = ?";
+ stmt = conn.prepareStatement(selectDBQuery);
+ stmt.setString(1, deviceId);
+ rs = stmt.executeQuery();
+
+ while (rs.next()) {
+ cacheEntry = new MobileCacheEntry();
+ cacheEntry.setDeviceID(rs.getString(WindowsPluginConstants.DEVICE_ID));
+ cacheEntry.setTenantDomain(rs.getString(WindowsPluginConstants.TENANT_DOMAIN));
+ cacheEntry.setTenanatID(rs.getInt(WindowsPluginConstants.TENANT_ID));
+ cacheEntry.setUsername(rs.getString(WindowsPluginConstants.USER_NAME));
+ cacheEntry.setOwnership(rs.getString(WindowsPluginConstants.OWNERSHIP));
+ }
+ } catch (SQLException e) {
+ throw new MobileDeviceManagementDAOException("Error occurred while fetching the Windows device token for the enrollment token '" +
+ deviceId + "' from the Windows db.", e);
+ }
+ return cacheEntry;
+ }
+
+ @Override
+ public boolean addCacheToken(MobileCacheEntry cacheEntry) throws MobileDeviceManagementDAOException {
+ boolean status = false;
+ Connection conn;
+ PreparedStatement stmt = null;
+ try {
+ conn = WindowsDAOFactory.getConnection();
+ String sql = "INSERT INTO WINDOWS_ENROLLMENT_TOKEN(TENANT_DOMAIN, TENANT_ID, ENROLLMENT_TOKEN, DEVICE_ID, "
+ + "USERNAME, OWNERSHIP) VALUES (?, ?, ?, ?, ?, ?)";
+ stmt = conn.prepareStatement(sql);
+ stmt.setString(1, cacheEntry.getTenantDomain());
+ stmt.setInt(2, cacheEntry.getTenanatID());
+ stmt.setString(3, cacheEntry.getCacheToken());
+ stmt.setString(4, cacheEntry.getDeviceID());
+ stmt.setString(5, cacheEntry.getUsername());
+ stmt.setString(6, cacheEntry.getOwnership());
+ int rows = stmt.executeUpdate();
+ if(rows > 0) {
+ status = true;
+ }
+ } catch (SQLException e) {
+ throw new MobileDeviceManagementDAOException("Error occurred while adding the Windows device enrollment token for'" +
+ cacheEntry.getDeviceID() + "' to the Windows db.", e);
+ } finally {
+ MobileDeviceManagementDAOUtil.cleanupResources(stmt, null);
+ }
+ return status;
+ }
+
+ @Override
+ public boolean updateCacheToken(MobileCacheEntry cacheEntry) throws MobileDeviceManagementDAOException {
+ boolean status = false;
+ Connection conn;
+ PreparedStatement stmt = null;
+ try {
+ conn = WindowsDAOFactory.getConnection();
+ String updateDBQuery =
+ "UPDATE WINDOWS_ENROLLMENT_TOKEN SET TENANT_DOMAIN = ?, TENANT_ID = ?, ENROLLMENT_TOKEN = ?, USERNAME = ?, " +
+ "DEVICE_ID = ? WHERE ENROLLMENT_TOKEN = ?";
+ stmt = conn.prepareStatement(updateDBQuery);
+ stmt.setString(1, cacheEntry.getTenantDomain());
+ stmt.setInt(2, cacheEntry.getTenanatID());
+ stmt.setString(3, cacheEntry.getCacheToken());
+ stmt.setString(4, cacheEntry.getUsername());
+ stmt.setString(5, cacheEntry.getDeviceID());
+ stmt.setString(6, cacheEntry.getCacheToken());
+ int rows = stmt.executeUpdate();
+ if(rows > 0) {
+ status = true;
+ }
+ } catch (SQLException e) {
+ throw new MobileDeviceManagementDAOException("Error occurred while updating the Windows device enrollment token for'" +
+ cacheEntry.getDeviceID() + "' to the Windows db.", e);
+ } finally {
+ MobileDeviceManagementDAOUtil.cleanupResources(stmt, null);
+ }
+ return status;
+ }
+
+ @Override
+ public boolean deleteCacheToken(String mobileDeviceId) throws MobileDeviceManagementDAOException {
+ boolean status = false;
+ Connection conn;
+ PreparedStatement stmt = null;
+ try {
+ conn = WindowsDAOFactory.getConnection();
+ String deleteDBQuery = "DELETE FROM WINDOWS_ENROLLMENT_TOKEN WHERE DEVICE_ID = ?";
+ stmt = conn.prepareStatement(deleteDBQuery);
+ stmt.setString(1, mobileDeviceId);
+ int rows = stmt.executeUpdate();
+ if (rows > 0) {
+ status = true;
+ }
+ } catch (SQLException e) {
+ throw new MobileDeviceManagementDAOException("Error occurred while deleting windows device '" +
+ mobileDeviceId + "'", e);
+ } finally {
+ MobileDeviceManagementDAOUtil.cleanupResources(stmt, null);
+ }
+ return status;
+ }
+}
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/dto/MobileCacheEntry.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/dto/MobileCacheEntry.java
new file mode 100644
index 000000000..6c138ec0a
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/impl/dto/MobileCacheEntry.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * WSO2 Inc. licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License.
+ * you may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.wso2.carbon.device.mgt.mobile.windows.impl.dto;
+
+public class MobileCacheEntry {
+
+ private String cacheToken;
+ private String tenantDomain;
+ private int tenanatID;
+ private String deviceID;
+ private String username;
+ private String ownership;
+
+ public String getTenantDomain() {
+ return tenantDomain;
+ }
+
+ public void setTenantDomain(String tenantDomain) {
+ this.tenantDomain = tenantDomain;
+ }
+
+ public int getTenanatID() {
+ return tenanatID;
+ }
+
+ public void setTenanatID(int tenanatID) {
+ this.tenanatID = tenanatID;
+ }
+
+ public String getCacheToken() {
+ return cacheToken;
+ }
+
+ public void setCacheToken(String cacheToken) {
+ this.cacheToken = cacheToken;
+ }
+
+ public String getDeviceID() {
+ return deviceID;
+ }
+
+ public void setDeviceID(String deviceID) {
+ this.deviceID = deviceID;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getOwnership() {
+ return ownership;
+ }
+
+ public void setOwnership(String ownership) {
+ this.ownership = ownership;
+ }
+}
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/util/WindowsPluginConstants.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/util/WindowsPluginConstants.java
index d7d516b8d..a243cc9c4 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/util/WindowsPluginConstants.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/util/WindowsPluginConstants.java
@@ -52,5 +52,10 @@ public class WindowsPluginConstants {
public static final String LANGUAGE_CODE_ENGLISH_US = "en_US";
public static final String LANGUAGE_CODE_ENGLISH_UK = "en_UK";
+ //properties related to WINDOWS_ENROLLMENT_TOKEN table
+ public static final String TENANT_DOMAIN = "TENANT_DOMAIN";
+ public static final String TENANT_ID = "TENANT_ID";
+ public static final String USER_NAME = "USERNAME";
+ public static final String OWNERSHIP = "OWNERSHIP";
}
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/util/WindowsUtils.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/util/WindowsUtils.java
index 7fba2f5ca..994500f89 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/util/WindowsUtils.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/util/WindowsUtils.java
@@ -18,6 +18,10 @@
package org.wso2.carbon.device.mgt.mobile.windows.impl.util;
+import org.wso2.carbon.context.PrivilegedCarbonContext;
+import org.wso2.carbon.device.mgt.mobile.windows.exception.WindowsDeviceMgtPluginException;
+import org.wso2.carbon.device.mgt.mobile.windows.impl.WindowsTokenService;
+
import java.util.Map;
/**
@@ -32,4 +36,17 @@ public class WindowsUtils {
}
return deviceProperty;
}
+
+ public static WindowsTokenService getEnrollmentTokenService() throws WindowsDeviceMgtPluginException {
+
+ PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
+ WindowsTokenService tokenService = (WindowsTokenService)
+ ctx.getOSGiService(WindowsTokenService.class, null);
+
+ if(tokenService == null) {
+ String msg = "WindowsTokenService is not initialized";
+ throw new WindowsDeviceMgtPluginException(msg);
+ }
+ return tokenService;
+ }
}
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/internal/WindowsDeviceManagementDataHolder.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/internal/WindowsDeviceManagementDataHolder.java
index 600aecc1c..dd2ef82f1 100644
--- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/internal/WindowsDeviceManagementDataHolder.java
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/internal/WindowsDeviceManagementDataHolder.java
@@ -18,6 +18,7 @@
package org.wso2.carbon.device.mgt.mobile.windows.internal;
+import org.wso2.carbon.device.mgt.mobile.windows.impl.WindowsTokenService;
import org.wso2.carbon.registry.core.service.RegistryService;
/**
@@ -26,6 +27,7 @@ import org.wso2.carbon.registry.core.service.RegistryService;
public class WindowsDeviceManagementDataHolder {
private RegistryService registryService;
+ private WindowsTokenService tokenService;
private static WindowsDeviceManagementDataHolder thisInstance = new WindowsDeviceManagementDataHolder();
@@ -44,4 +46,19 @@ public class WindowsDeviceManagementDataHolder {
this.registryService = registryService;
}
+ public WindowsTokenService getTokenService() {
+ return tokenService;
+ }
+
+ public void setTokenService(WindowsTokenService tokenService) {
+ this.tokenService = tokenService;
+ }
+
+ public static WindowsDeviceManagementDataHolder getThisInstance() {
+ return thisInstance;
+ }
+
+ public static void setThisInstance(WindowsDeviceManagementDataHolder thisInstance) {
+ WindowsDeviceManagementDataHolder.thisInstance = thisInstance;
+ }
}
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/internal/WindowsDeviceManagementServiceComponent.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/internal/WindowsDeviceManagementServiceComponent.java
index fd1e661d3..93926a93d 100644
--- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/internal/WindowsDeviceManagementServiceComponent.java
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/internal/WindowsDeviceManagementServiceComponent.java
@@ -23,6 +23,8 @@ import org.apache.commons.logging.LogFactory;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
import org.osgi.service.component.ComponentContext;
+import org.wso2.carbon.device.mgt.mobile.windows.impl.WindowsTokenService;
+import org.wso2.carbon.device.mgt.mobile.windows.impl.WindowsTokenServiceImpl;
import org.wso2.carbon.ndatasource.core.DataSourceService;
import org.wso2.carbon.registry.core.service.RegistryService;
@@ -65,6 +67,8 @@ public class WindowsDeviceManagementServiceComponent {
// bundleContext.registerService(PolicyMonitoringManager.class,
// new WindowsPolicyMonitoringManager(), null);
+ //Enrollment token service
+ bundleContext.registerService(WindowsTokenService.class, new WindowsTokenServiceImpl(), null);
if (log.isDebugEnabled()) {
log.debug("Android Mobile Device Management Service Component has been successfully activated");
@@ -114,4 +118,18 @@ public class WindowsDeviceManagementServiceComponent {
WindowsDeviceManagementDataHolder.getInstance().setRegistryService(null);
}
+ protected void setEnrollmentTokenService(WindowsTokenService service) {
+ if (log.isDebugEnabled()) {
+ log.debug("Setting windows enrollment token service provider");
+ }
+ WindowsDeviceManagementDataHolder.getInstance().setTokenService(service);
+ }
+
+ protected void unsetEnrollmentTokenService() {
+ if (log.isDebugEnabled()) {
+ log.debug("Removing windows enrollment token service provider");
+ }
+ WindowsDeviceManagementDataHolder.getInstance().setTokenService(null);
+ }
+
}
diff --git a/components/mobile-plugins/windows-plugin/pom.xml b/components/mobile-plugins/windows-plugin/pom.xml
index ea94e556a..350f931fe 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
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 80f215344..43001ca38 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
diff --git a/features/analytics-feature/org.wso2.carbon.device.mgt.cdmf.analytics.feature/src/main/resources/p2.inf b/features/analytics-feature/org.wso2.carbon.device.mgt.cdmf.analytics.feature/src/main/resources/p2.inf
index 0959af4a2..7e6390384 100644
--- a/features/analytics-feature/org.wso2.carbon.device.mgt.cdmf.analytics.feature/src/main/resources/p2.inf
+++ b/features/analytics-feature/org.wso2.carbon.device.mgt.cdmf.analytics.feature/src/main/resources/p2.inf
@@ -2,4 +2,8 @@ instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/devicetypes/);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/devicetypes/device_management/);\
+org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/);\
+org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/);\
+org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/carbonapps/);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.cdmf.analytics_${feature.version}/carbonapps/,target:${installFolder}/../../deployment/server/carbonapps/,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.cdmf.analytics_${feature.version}/carbonapps/,target:${installFolder}/../../resources/devicetypes/device_management/,overwrite:true);\
\ No newline at end of file
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 3df7ac9e3..778ba2872 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.iot.analytics.feature
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
pom
WSO2 Carbon - IoT Server Analytics Feature
http://wso2.org
diff --git a/features/analytics-feature/org.wso2.carbon.device.mgt.iot.analytics.feature/src/main/resources/p2.inf b/features/analytics-feature/org.wso2.carbon.device.mgt.iot.analytics.feature/src/main/resources/p2.inf
index 9fc79c3b8..ffbc1a492 100644
--- a/features/analytics-feature/org.wso2.carbon.device.mgt.iot.analytics.feature/src/main/resources/p2.inf
+++ b/features/analytics-feature/org.wso2.carbon.device.mgt.iot.analytics.feature/src/main/resources/p2.inf
@@ -1,5 +1,9 @@
instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/devicetypes/);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/devicetypes/common);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.analytics_${feature.version}/carbonapps/,target:${installFolder}/../../resources/devicetypes/common/,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/);\
+org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/);\
+org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/carbonapps/);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.analytics_${feature.version}/carbonapps/,target:${installFolder}/../../deployment/server/carbonapps/,overwrite:true);\
+
+
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 5ec8eb654..1178975dd 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.iot.device.statistics.dashboard.feature
- 3.0.34-SNAPSHOT
+ 3.0.37-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/src/main/resources/p2.inf b/features/analytics-feature/org.wso2.carbon.iot.device.statistics.dashboard.feature/src/main/resources/p2.inf
index 9f428c072..ecee1af16 100644
--- a/features/analytics-feature/org.wso2.carbon.iot.device.statistics.dashboard.feature/src/main/resources/p2.inf
+++ b/features/analytics-feature/org.wso2.carbon.iot.device.statistics.dashboard.feature/src/main/resources/p2.inf
@@ -2,4 +2,8 @@ instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/devicetypes/);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/devicetypes/device_management/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.iot.device.statistics.dashboard_${feature.version}/carbonapps/,target:${installFolder}/../../resources/devicetypes/device_management/,overwrite:true);\
\ No newline at end of file
+org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/);\
+org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/);\
+org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/carbonapps/);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.iot.device.statistics.dashboard_${feature.version}/carbonapps/,target:${installFolder}/../../resources/devicetypes/device_management/,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.iot.device.statistics.dashboard_${feature.version}/carbonapps/,target:${installFolder}/../../deployment/server/carbonapps/,overwrite:true);\
\ No newline at end of file
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 685672a6a..433490e40 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
diff --git a/features/analytics-feature/pom.xml b/features/analytics-feature/pom.xml
index 1c46a2c46..f328795a8 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
- 3.0.34-SNAPSHOT
+ 3.0.37-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 62e20a53d..96c0145a2 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,72 +23,19 @@
org.wso2.carbon.devicemgt-plugins
androidsense-plugin-feature
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
pom
WSO2 Carbon - IoT Server Android Sense Analytics Feature
http://wso2.org
This feature contains the Android Sense Device type specific analytics implementations for the IoT Server
-
-
- default-profile
-
- true
-
-
-
-
- maven-antrun-plugin
-
-
- test
-
- run
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- cloud
-
-
-
- maven-antrun-plugin
-
-
- test
-
- run
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -210,11 +157,6 @@
org.eclipse.equinox.p2.type.group:true
-
-
- org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.analytics.feature:${carbon.devicemgt.plugins.version}
-
-
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/default.p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/default.p2.inf
deleted file mode 100644
index 6b3219771..000000000
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/default.p2.inf
+++ /dev/null
@@ -1,9 +0,0 @@
-instructions.configure = \
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../analytics/repository/deployment/server/carbonapps/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.analytics_${feature.version}/carbonapps/,target:${installFolder}/../../analytics/repository/deployment/server/carbonapps/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.analytics_${feature.version}/receiver/,target:${installFolder}/../../analytics/repository/deployment/server/eventreceivers/,overwrite:true);\
-
-instructions.unconfigure = \
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../analytics/repository/deployment/server/carbonapps/android_sense.car);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../analytics/repository/deployment/server/eventreceivers/android_sense_receiver-carbon.super.xml);\
-
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/cloud.p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/p2.inf
similarity index 59%
rename from features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/cloud.p2.inf
rename to features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/p2.inf
index b3363450a..f5a9c3dcc 100644
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/cloud.p2.inf
+++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/p2.inf
@@ -1,7 +1,8 @@
instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/carbonapps/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.analytics_${feature.version}/carbonapps/,target:${installFolder}/../../resources/devicetypes/android_sense/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.analytics_${feature.version}/receiver/,target:${installFolder}/../../../../analytics/repository/deployment/server/eventreceivers/,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.analytics_${feature.version}/carbonapps/,target:${installFolder}/../../deployment/server/carbonapps/,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.analytics_${feature.version}/receiver/,target:${installFolder}/../../deployment/server/eventreceivers/,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.analytics_${feature.version}/streams/,target:${installFolder}/../../deployment/server/eventstreams/,overwrite:true);\
instructions.unconfigure = \
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/carbonapps/android_sense.car);\
\ No newline at end of file
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/receiver/android_sense_receiver-carbon.super.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/receiver/android_sense_receiver-carbon.super.xml
index be92cf45b..727aea028 100644
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/receiver/android_sense_receiver-carbon.super.xml
+++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/receiver/android_sense_receiver-carbon.super.xml
@@ -20,8 +20,6 @@
carbon.super/android_sense/+/data
- iot-mqtt
- true
android_sense_receiver-carbon.super
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_sense_streams/org.wso2.iot.android.sense_1.0.0.json b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/streams/org.wso2.iot.android.sense_1.0.0.json
old mode 100755
new mode 100644
similarity index 99%
rename from components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_sense_streams/org.wso2.iot.android.sense_1.0.0.json
rename to features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/streams/org.wso2.iot.android.sense_1.0.0.json
index 878b4b63d..e69eb2fc0
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_sense_streams/org.wso2.iot.android.sense_1.0.0.json
+++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/streams/org.wso2.iot.android.sense_1.0.0.json
@@ -60,4 +60,4 @@
{"name": "data_sent", "type": "LONG"},
{"name": "data_received", "type": "LONG"}
]
-}
+}
\ No newline at end of file
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 d55e095c8..9a16d3637 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.iot.androidsense.backend.feature
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
pom
WSO2 Carbon - IoT Server Android Sense Backend Feature
http://wso2.org
@@ -48,60 +48,6 @@
-
-
-
- default-profile
-
- true
-
-
-
-
- maven-antrun-plugin
-
-
- test
-
- run
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- cloud
-
-
-
- maven-antrun-plugin
-
-
- test
-
- run
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -155,40 +101,79 @@
-
- org.apache.maven.plugins
- maven-antrun-plugin
-
-
-
- create-android-sense-plugin-mgt-schema
- package
-
- run
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+
+
+ unpack
+ package
+
+ unpack
+
+
+
+
+ org.wso2.carbon.devicemgt-plugins
+ org.wso2.carbon.device.mgt.iot.androidsense.analytics
+
+ ${project.version}
+ zip
+ true
+
+ ${project.build.directory}/maven-shared-archive-resources/carbonapps
+
+ **/*
+
+
+
+
+
+ unpack-analytics
+ package
+
+ unpack
+
+
+
+
+ org.wso2.carbon.devicemgt-plugins
+ org.wso2.carbon.device.mgt.iot.analytics
+ ${project.version}
+ zip
+ true
+
+ ${project.build.directory}/maven-shared-archive-resources/carbonapps
+
+ **/*
+
+
+
+
+
+ unpack-geo
+ package
+
+ unpack
+
+
+
+
+ org.wso2.carbon.devicemgt-plugins
+ org.wso2.carbon.iot.geo.dashboard
+ ${project.version}
+ zip
+ true
+
+ ${project.build.directory}/maven-shared-archive-resources/carbonapps
+
+ **/*
+
+
+
+
+
+
org.wso2.maven
@@ -210,10 +195,6 @@
org.eclipse.equinox.p2.type.group:true
-
- org.wso2.carbon.core.server:${carbon.kernel.version}
- org.wso2.carbon.device.mgt.server:${carbon.devicemgt.version}
-
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/datasources/androidsense-datasources.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/datasources/androidsense-datasources.xml
deleted file mode 100644
index 9a1374b09..000000000
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/datasources/androidsense-datasources.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
- org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader
-
-
-
- AndroidSenseDM_DB
- The datasource used for the Android Sense database
-
- jdbc/AndroidSenseDM_DB
-
-
-
- jdbc:h2:repository/database/AndroidSenseDM_DB;DB_CLOSE_ON_EXIT=FALSE
-
- wso2carbon
- wso2carbon
- org.h2.Driver
- 50
- 60000
- true
- SELECT 1
- 30000
-
-
-
-
-
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/h2.sql b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/h2.sql
deleted file mode 100644
index ee3bfa73a..000000000
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/h2.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-
--- -----------------------------------------------------
--- Table `ANDROID_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS `ANDROID_SENSE_DEVICE` (
- `ANDROID_DEVICE_ID` VARCHAR(45) NOT NULL ,
- `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (`ANDROID_DEVICE_ID`) );
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/mssql.sql b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/mssql.sql
deleted file mode 100644
index cf677ff07..000000000
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/mssql.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-
--- -----------------------------------------------------
--- Table `ANDROID_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS ANDROID_SENSE_DEVICE (
- ANDROID_DEVICE_ID VARCHAR(45) NOT NULL ,
- DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (ANDROID_DEVICE_ID) );
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/mysql.sql b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/mysql.sql
deleted file mode 100644
index 4637b4daf..000000000
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/mysql.sql
+++ /dev/null
@@ -1,12 +0,0 @@
--- -----------------------------------------------------
--- Table `ANDROID_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS `ANDROID_SENSE_DEVICE` (
- `ANDROID_DEVICE_ID` VARCHAR(45) NOT NULL ,
- `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (`ANDROID_DEVICE_ID`) )
-ENGINE = InnoDB;
-
-
-
-
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/oracle.sql b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/oracle.sql
deleted file mode 100644
index 6f8537eb8..000000000
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/oracle.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-
--- -----------------------------------------------------
--- Table `ANDROID_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE ANDROID_SENSE_DEVICE (
- ANDROID_DEVICE_ID VARCHAR(45) NOT NULL ,
- DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (ANDROID_DEVICE_ID) );
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/postgresql.sql b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/postgresql.sql
deleted file mode 100644
index 987f4992b..000000000
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/postgresql.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-
--- -----------------------------------------------------
--- Table `ANDROID_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS ANDROID_SENSE_DEVICE (
- ANDROID_DEVICE_ID VARCHAR(45) NOT NULL ,
- DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (ANDROID_DEVICE_ID));
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/default.p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/default.p2.inf
deleted file mode 100644
index 0f300a1e9..000000000
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/default.p2.inf
+++ /dev/null
@@ -1,19 +0,0 @@
-instructions.configure = \
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/android_sense/);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/webapps/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.backend_${feature.version}/webapps/,target:${installFolder}/../../../repository/deployment/server/webapps/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.backend_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/android_sense,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.backend_${feature.version}/datasources/,target:${installFolder}/../../../repository/conf/datasources/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.backend_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\
-
-instructions.unconfigure = \
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/android_sense.war);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/android_sense);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/android_sense);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/sketches/android_sense);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/conf/datasources/androidsense-datasources.xml);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/database/AndroidSenseDM_DB.h2.db);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/devicetypes/android_sense.xml);\
\ No newline at end of file
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/devicetypes/android_sense.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/devicetypes/android_sense.xml
index 764aa311a..9699c5699 100644
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/devicetypes/android_sense.xml
+++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/devicetypes/android_sense.xml
@@ -54,12 +54,6 @@
true
-
-
- androidsense.mqtt.adapter
- 0
- true
-
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/cloud.p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/p2.inf
similarity index 67%
rename from features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/cloud.p2.inf
rename to features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/p2.inf
index 9c796aaa0..28b42a4e8 100644
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/cloud.p2.inf
+++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/p2.inf
@@ -4,18 +4,14 @@ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../reso
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/devicetypes/android_sense/);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/webapps/);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.backend_${feature.version}/webapps/,target:${installFolder}/../../deployment/server/webapps/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.backend_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/android_sense,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.backend_${feature.version}/datasources/,target:${installFolder}/../../conf/datasources/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../database/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.backend_${feature.version}/database/,target:${installFolder}/../../database/,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/devicetypes/);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.backend_${feature.version}/devicetypes/,target:${installFolder}/../../deployment/server/devicetypes/,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.backend_${feature.version}/receiver/,target:${installFolder}/../../resources/devicetypes/android_sense/receiver/,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.backend_${feature.version}/streams/,target:${installFolder}/../../resources/devicetypes/android_sense/streams/,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.backend_${feature.version}/carbonapps/,target:${installFolder}/../../resources/devicetypes/android_sense/,overwrite:true);\
instructions.unconfigure = \
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/webapps/android_sense.war);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/webapps/android_sense);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/android_sense);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../resources/sketches/android_sense);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../conf/datasources/androidsense-datasources.xml);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../database/AndroidSenseDM_DB.h2.db);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/devicetypes/android_sense.xml);\
\ No newline at end of file
+org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/devicetypes/android_sense.xml);\
+org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../resources/devicetypes/android_sense);\
\ No newline at end of file
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/receiver/android_sense_receiver.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/receiver/android_sense_receiver.xml
similarity index 91%
rename from features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/receiver/android_sense_receiver.xml
rename to features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/receiver/android_sense_receiver.xml
index 8261acc13..3faeedaf0 100644
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/receiver/android_sense_receiver.xml
+++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/receiver/android_sense_receiver.xml
@@ -20,8 +20,6 @@
${tenant-domain}/android_sense/+/data
- iot-mqtt
- true
android_sense_receiver-${tenant-domain}
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/streams/org.wso2.iot.android.sense_1.0.0.json b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/streams/org.wso2.iot.android.sense_1.0.0.json
new file mode 100644
index 000000000..e69eb2fc0
--- /dev/null
+++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/streams/org.wso2.iot.android.sense_1.0.0.json
@@ -0,0 +1,63 @@
+{
+ "name": "org.wso2.iot.android.sense",
+ "version": "1.0.0",
+ "nickName": "android_sense_stream",
+ "description": "This hold the device type stream of android sense",
+ "metaData": [
+ {"name": "owner", "type": "STRING"},
+ {"name": "deviceId", "type": "STRING"},
+ {"name": "type", "type": "STRING"},
+ {"name": "timestamp", "type": "LONG"}
+ ],
+ "payloadData": [
+ {"name": "battery", "type": "INT"},
+ {"name": "battery_state", "type": "STRING"},
+ {"name": "battery_status", "type": "STRING"},
+ {"name": "battery_temperature", "type": "INT"},
+ {"name": "gps_lat", "type": "DOUBLE"},
+ {"name": "gps_long", "type": "DOUBLE"},
+ {"name": "accelerometer_x", "type": "FLOAT"},
+ {"name": "accelerometer_y", "type": "FLOAT"},
+ {"name": "accelerometer_z", "type": "FLOAT"},
+ {"name": "speed_limit", "type": "FLOAT"},
+ {"name": "turn_way", "type": "STRING"},
+ {"name": "magnetic_x", "type": "FLOAT"},
+ {"name": "magnetic_y", "type": "FLOAT"},
+ {"name": "magnetic_z", "type": "FLOAT"},
+ {"name": "gyroscope_x", "type": "FLOAT"},
+ {"name": "gyroscope_y", "type": "FLOAT"},
+ {"name": "gyroscope_z", "type": "FLOAT"},
+ {"name": "light", "type": "FLOAT"},
+ {"name": "pressure", "type": "FLOAT"},
+ {"name": "proximity", "type": "FLOAT"},
+ {"name": "gravity_x", "type": "FLOAT"},
+ {"name": "gravity_y", "type": "FLOAT"},
+ {"name": "gravity_z", "type": "FLOAT"},
+ {"name": "rotation_x", "type": "FLOAT"},
+ {"name": "rotation_y", "type": "FLOAT"},
+ {"name": "rotation_z", "type": "FLOAT"},
+ {"name": "word", "type": "STRING"},
+ {"name": "word_sessionId", "type": "STRING"},
+ {"name": "word_status", "type": "STRING"},
+ {"name": "beacon_major", "type": "INT"},
+ {"name": "beacon_minor", "type": "INT"},
+ {"name": "beacon_proximity", "type": "STRING"},
+ {"name": "beacon_uuid", "type": "INT"},
+ {"name": "call_number", "type": "STRING"},
+ {"name": "call_type", "type": "STRING"},
+ {"name": "call_start_time", "type": "LONG"},
+ {"name": "call_end_time", "type": "LONG"},
+ {"name": "screen_state", "type": "STRING"},
+ {"name": "audio_playing", "type": "BOOL"},
+ {"name": "headset_on", "type": "BOOL"},
+ {"name": "music_volume", "type": "INT"},
+ {"name": "activity_type", "type": "INT"},
+ {"name": "confidence", "type": "INT"},
+ {"name": "sms_number", "type": "STRING"},
+ {"name": "application_name", "type": "STRING"},
+ {"name": "action", "type": "STRING"},
+ {"name": "data_type", "type": "STRING"},
+ {"name": "data_sent", "type": "LONG"},
+ {"name": "data_received", "type": "LONG"}
+ ]
+}
\ No newline at end of file
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 b20e040cc..011dede1e 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.iot.androidsense.ui.feature
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
pom
WSO2 Carbon - IoT Server Android Sense UI Feature
http://wso2.org
@@ -42,61 +42,6 @@
h2-database-engine
-
-
-
- default-profile
-
- true
-
-
-
-
- maven-antrun-plugin
-
-
- test
-
- run
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- cloud
-
-
-
- maven-antrun-plugin
-
-
- test
-
- run
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -136,18 +81,6 @@
-
- org.wso2.carbon.devicemgt-plugins
- org.wso2.carbon.device.mgt.iot.androidsense.analytics
-
- ${project.version}
- zip
- true
-
- ${project.build.directory}/maven-shared-archive-resources/carbonapps
-
- **/*
-
org.wso2.carbon.devicemgt-plugins
org.wso2.carbon.device.mgt.iot.androidsense.ui
@@ -163,85 +96,6 @@
-
- unpack-analytics
- package
-
- unpack
-
-
-
-
- org.wso2.carbon.devicemgt-plugins
- org.wso2.carbon.device.mgt.iot.analytics
- ${project.version}
- zip
- true
-
- ${project.build.directory}/maven-shared-archive-resources/carbonapps
-
- **/*
-
-
-
-
-
- unpack-geo
- package
-
- unpack
-
-
-
-
- org.wso2.carbon.devicemgt-plugins
- org.wso2.carbon.iot.geo.dashboard
- ${project.version}
- zip
- true
-
- ${project.build.directory}/maven-shared-archive-resources/carbonapps
-
- **/*
-
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-antrun-plugin
-
-
-
- create-android-sense-plugin-mgt-schema
- package
-
- run
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -265,10 +119,6 @@
org.eclipse.equinox.p2.type.group:true
-
- org.wso2.carbon.core.server:${carbon.kernel.version}
- org.wso2.carbon.device.mgt.server:${carbon.devicemgt.version}
-
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/cloud.p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/cloud.p2.inf
deleted file mode 100644
index 530879010..000000000
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/cloud.p2.inf
+++ /dev/null
@@ -1,27 +0,0 @@
-instructions.configure = \
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/devicetypes/);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/devicetypes/android_sense/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/receiver/,target:${installFolder}/../../resources/devicetypes/android_sense/receiver/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/streams/,target:${installFolder}/../../resources/devicetypes/android_sense/streams/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/carbonapps/,target:${installFolder}/../../../repository/resources/devicetypes/android_sense/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/android_sense,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/datasources/,target:${installFolder}/../../conf/datasources/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/jaggeryapps/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/jaggeryapps/,target:${installFolder}/../../deployment/server/jaggeryapps/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../database/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/database/,target:${installFolder}/../../database/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/devicetypes/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/devicetypes/,target:${installFolder}/../../deployment/server/devicetypes/,overwrite:true);\
-
-instructions.unconfigure = \
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/android_sense);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../resources/sketches/android_sense);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../conf/datasources/androidsense-datasources.xml);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../database/AndroidSenseDM_DB.h2.db);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.analytics-view);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.platform.configuration);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.realtime.analytics-view);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/devicetypes/android_sense.xml);\
\ No newline at end of file
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/datasources/androidsense-datasources.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/datasources/androidsense-datasources.xml
deleted file mode 100644
index 9a1374b09..000000000
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/datasources/androidsense-datasources.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
- org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader
-
-
-
- AndroidSenseDM_DB
- The datasource used for the Android Sense database
-
- jdbc/AndroidSenseDM_DB
-
-
-
- jdbc:h2:repository/database/AndroidSenseDM_DB;DB_CLOSE_ON_EXIT=FALSE
-
- wso2carbon
- wso2carbon
- org.h2.Driver
- 50
- 60000
- true
- SELECT 1
- 30000
-
-
-
-
-
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/h2.sql b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/h2.sql
deleted file mode 100644
index ee3bfa73a..000000000
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/h2.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-
--- -----------------------------------------------------
--- Table `ANDROID_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS `ANDROID_SENSE_DEVICE` (
- `ANDROID_DEVICE_ID` VARCHAR(45) NOT NULL ,
- `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (`ANDROID_DEVICE_ID`) );
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/mssql.sql b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/mssql.sql
deleted file mode 100644
index cf677ff07..000000000
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/mssql.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-
--- -----------------------------------------------------
--- Table `ANDROID_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS ANDROID_SENSE_DEVICE (
- ANDROID_DEVICE_ID VARCHAR(45) NOT NULL ,
- DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (ANDROID_DEVICE_ID) );
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/mysql.sql b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/mysql.sql
deleted file mode 100644
index 4637b4daf..000000000
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/mysql.sql
+++ /dev/null
@@ -1,12 +0,0 @@
--- -----------------------------------------------------
--- Table `ANDROID_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS `ANDROID_SENSE_DEVICE` (
- `ANDROID_DEVICE_ID` VARCHAR(45) NOT NULL ,
- `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (`ANDROID_DEVICE_ID`) )
-ENGINE = InnoDB;
-
-
-
-
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/oracle.sql b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/oracle.sql
deleted file mode 100644
index 6f8537eb8..000000000
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/oracle.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-
--- -----------------------------------------------------
--- Table `ANDROID_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE ANDROID_SENSE_DEVICE (
- ANDROID_DEVICE_ID VARCHAR(45) NOT NULL ,
- DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (ANDROID_DEVICE_ID) );
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/postgresql.sql b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/postgresql.sql
deleted file mode 100644
index 987f4992b..000000000
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/postgresql.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-
--- -----------------------------------------------------
--- Table `ANDROID_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS ANDROID_SENSE_DEVICE (
- ANDROID_DEVICE_ID VARCHAR(45) NOT NULL ,
- DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (ANDROID_DEVICE_ID));
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/default.p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/default.p2.inf
deleted file mode 100644
index 6239a598f..000000000
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/default.p2.inf
+++ /dev/null
@@ -1,25 +0,0 @@
-instructions.configure = \
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/android_sense/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/receiver/,target:${installFolder}/../../../repository/resources/devicetypes/android_sense/receiver/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/streams/,target:${installFolder}/../../../repository/resources/devicetypes/android_sense/streams/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/carbonapps/,target:${installFolder}/../../../repository/resources/devicetypes/android_sense/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/android_sense,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/datasources/,target:${installFolder}/../../../repository/conf/datasources/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\
-
-instructions.unconfigure = \
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/android_sense);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/sketches/android_sense);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/conf/datasources/androidsense-datasources.xml);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/database/AndroidSenseDM_DB.h2.db);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.analytics-view);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.platform.configuration);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.realtime.analytics-view);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/devicetypes/android_sense.xml);\
\ No newline at end of file
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/devicetypes/android_sense.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/devicetypes/android_sense.xml
index 764aa311a..9699c5699 100644
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/devicetypes/android_sense.xml
+++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/devicetypes/android_sense.xml
@@ -54,12 +54,6 @@
true
-
-
- androidsense.mqtt.adapter
- 0
- true
-
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/p2.inf
new file mode 100644
index 000000000..5f2ce03b3
--- /dev/null
+++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/p2.inf
@@ -0,0 +1,12 @@
+instructions.configure = \
+org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/jaggeryapps/);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/jaggeryapps/,target:${installFolder}/../../deployment/server/jaggeryapps/,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/devicetypes/);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/devicetypes/,target:${installFolder}/../../deployment/server/devicetypes/,overwrite:true);\
+
+instructions.unconfigure = \
+org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view);\
+org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view);\
+org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.analytics-view);\
+org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.platform.configuration);\
+org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.realtime.analytics-view);\
\ No newline at end of file
diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/streams/org.wso2.iot.android.sense_1.0.0.json b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/streams/org.wso2.iot.android.sense_1.0.0.json
deleted file mode 100644
index 4a33c4321..000000000
--- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/streams/org.wso2.iot.android.sense_1.0.0.json
+++ /dev/null
@@ -1,222 +0,0 @@
-{
- "name": "org.wso2.iot.android.sense",
- "version": "1.0.0",
- "nickName": "android_sense_stream",
- "description": "This hold the device type stream of android sense",
- "metaData": [
- {
- "name": "owner",
- "type": "STRING"
- },
- {
- "name": "deviceId",
- "type": "STRING"
- },
- {
- "name": "type",
- "type": "STRING"
- },
- {
- "name": "timestamp",
- "type": "LONG"
- }
- ],
- "payloadData": [
- {
- "name": "battery",
- "type": "INT"
- },
- {
- "name": "battery_state",
- "type": "STRING"
- },
- {
- "name": "battery_status",
- "type": "STRING"
- },
- {
- "name": "battery_temperature",
- "type": "INT"
- },
- {
- "name": "gps_lat",
- "type": "DOUBLE"
- },
- {
- "name": "gps_long",
- "type": "DOUBLE"
- },
- {
- "name": "accelerometer_x",
- "type": "FLOAT"
- },
- {
- "name": "accelerometer_y",
- "type": "FLOAT"
- },
- {
- "name": "accelerometer_z",
- "type": "FLOAT"
- },
- {
- "name": "speed_limit",
- "type": "FLOAT"
- },
- {
- "name": "turn_way",
- "type": "STRING"
- },
- {
- "name": "magnetic_x",
- "type": "FLOAT"
- },
- {
- "name": "magnetic_y",
- "type": "FLOAT"
- },
- {
- "name": "magnetic_z",
- "type": "FLOAT"
- },
- {
- "name": "gyroscope_x",
- "type": "FLOAT"
- },
- {
- "name": "gyroscope_y",
- "type": "FLOAT"
- },
- {
- "name": "gyroscope_z",
- "type": "FLOAT"
- },
- {
- "name": "light",
- "type": "FLOAT"
- },
- {
- "name": "pressure",
- "type": "FLOAT"
- },
- {
- "name": "proximity",
- "type": "FLOAT"
- },
- {
- "name": "gravity_x",
- "type": "FLOAT"
- },
- {
- "name": "gravity_y",
- "type": "FLOAT"
- },
- {
- "name": "gravity_z",
- "type": "FLOAT"
- },
- {
- "name": "rotation_x",
- "type": "FLOAT"
- },
- {
- "name": "rotation_y",
- "type": "FLOAT"
- },
- {
- "name": "rotation_z",
- "type": "FLOAT"
- },
- {
- "name": "word",
- "type": "STRING"
- },
- {
- "name": "word_sessionId",
- "type": "STRING"
- },
- {
- "name": "word_status",
- "type": "STRING"
- },
- {
- "name": "beacon_major",
- "type": "INT"
- },
- {
- "name": "beacon_minor",
- "type": "INT"
- },
- {
- "name": "beacon_proximity",
- "type": "STRING"
- },
- {
- "name": "beacon_uuid",
- "type": "INT"
- },
- {
- "name": "call_number",
- "type": "STRING"
- },
- {
- "name": "call_type",
- "type": "STRING"
- },
- {
- "name": "call_start_time",
- "type": "LONG"
- },
- {
- "name": "call_end_time",
- "type": "LONG"
- },
- {
- "name": "screen_state",
- "type": "STRING"
- },
- {
- "name": "audio_playing",
- "type": "BOOL"
- },
- {
- "name": "headset_on",
- "type": "BOOL"
- },
- {
- "name": "music_volume",
- "type": "INT"
- },
- {
- "name": "activity_type",
- "type": "INT"
- },
- {
- "name": "confidence",
- "type": "INT"
- },
- {
- "name": "sms_number",
- "type": "STRING"
- },
- {
- "name": "application_name",
- "type": "STRING"
- },
- {
- "name": "action",
- "type": "STRING"
- },
- {
- "name": "data_type",
- "type": "STRING"
- },
- {
- "name": "data_sent",
- "type": "LONG"
- },
- {
- "name": "data_received",
- "type": "LONG"
- }
- ]
-}
\ No newline at end of file
diff --git a/features/device-types-feature/androidsense-plugin-feature/pom.xml b/features/device-types-feature/androidsense-plugin-feature/pom.xml
index 096ba15b5..efec4feec 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
- 3.0.34-SNAPSHOT
+ 3.0.37-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 f870fc206..48f89f95d 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
@@ -134,11 +134,6 @@
org.eclipse.equinox.p2.type.group:true
-
-
- org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.analytics.feature:${carbon.devicemgt.plugins.version}
-
-
diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/src/main/resources/p2.inf b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/src/main/resources/p2.inf
index 8d76931bf..3e136c2e5 100644
--- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/src/main/resources/p2.inf
+++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/src/main/resources/p2.inf
@@ -3,4 +3,4 @@ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../anal
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino.analytics_${feature.version}/carbonapps/,target:${installFolder}/../../analytics/repository/deployment/server/carbonapps/,overwrite:true);\
instructions.unconfigure = \
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../analytics/repository/deployment/server/carbonapps//arduino.car);\
\ No newline at end of file
+org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../analytics/repository/deployment/server/carbonapps/arduino.car);\
\ No newline at end of file
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 1e1e9e55c..a2efd5675 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
@@ -101,6 +101,59 @@
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+
+
+ unpack
+ package
+
+ unpack
+
+
+
+
+ org.wso2.carbon.devicemgt-plugins
+ org.wso2.carbon.device.mgt.iot.arduino.analytics
+
+ ${project.version}
+ zip
+ true
+
+ ${project.build.directory}/maven-shared-archive-resources/carbonapps
+
+ **/*
+
+
+
+
+
+ unpack-analytics
+ package
+
+ unpack
+
+
+
+
+ org.wso2.carbon.devicemgt-plugins
+ org.wso2.carbon.device.mgt.iot.analytics
+ ${project.version}
+ zip
+ true
+
+ ${project.build.directory}/maven-shared-archive-resources/carbonapps
+
+ **/*
+
+
+
+
+
+
+
org.wso2.maven
carbon-p2-plugin
diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/ArduinoBoardSketch.h b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/agent/ArduinoBoardSketch.h
similarity index 100%
rename from features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/ArduinoBoardSketch.h
rename to features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/agent/ArduinoBoardSketch.h
diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/ArduinoBoardSketch.ino b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/agent/ArduinoBoardSketch.ino
similarity index 100%
rename from features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/ArduinoBoardSketch.ino
rename to features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/agent/ArduinoBoardSketch.ino
diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/Connect.ino b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/agent/Connect.ino
similarity index 100%
rename from features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/Connect.ino
rename to features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/agent/Connect.ino
diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/PollServer.ino b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/agent/PollServer.ino
similarity index 100%
rename from features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/PollServer.ino
rename to features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/agent/PollServer.ino
diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/PushData.ino b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/agent/PushData.ino
similarity index 100%
rename from features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/PushData.ino
rename to features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/agent/PushData.ino
diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/deviceType.png b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/agent/deviceType.png
similarity index 100%
rename from features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/deviceType.png
rename to features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/agent/deviceType.png
diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/sketch.properties b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/agent/sketch.properties
similarity index 100%
rename from features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/sketch.properties
rename to features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/agent/sketch.properties
diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/devicetypes/arduino.xml b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/devicetypes/arduino.xml
index 7871e1d42..c651c04e7 100644
--- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/devicetypes/arduino.xml
+++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/devicetypes/arduino.xml
@@ -31,7 +31,7 @@
- false
+ true
diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/p2.inf b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/p2.inf
index 2bd7898bd..2d9b5bc71 100644
--- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/p2.inf
+++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/p2.inf
@@ -1,12 +1,18 @@
instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\
+org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/);\
+org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/arduino/);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/webapps/);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino.backend_${feature.version}/webapps/,target:${installFolder}/../../../repository/deployment/server/webapps/,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino.backend_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino.backend_${feature.version}/agent/,target:${installFolder}/../../../repository/resources/sketches/arduino/,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino.backend_${feature.version}/carbonapps/,target:${installFolder}/../../../repository/resources/devicetypes/arduino/,overwrite:true);\
instructions.unconfigure = \
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/arduino.war);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/arduino);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/devicetypes/arduino.xml);\
\ No newline at end of file
+org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/devicetypes/arduino.xml);\
+org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/sketches/arduino);\
+org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/devicetypes/arduino.car);\
\ No newline at end of file
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 0813fbe50..d07ae95d8 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/devicetypes/arduino.xml b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/devicetypes/arduino.xml
index 7871e1d42..c651c04e7 100644
--- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/devicetypes/arduino.xml
+++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/devicetypes/arduino.xml
@@ -31,7 +31,7 @@
- false
+ true
diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/p2.inf b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/p2.inf
index 859afd9c4..3ca2ec090 100644
--- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/p2.inf
+++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/p2.inf
@@ -1,21 +1,13 @@
instructions.configure = \
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/arduino/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino.ui_${feature.version}/agent/,target:${installFolder}/../../../repository/resources/sketches/arduino/,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino.ui_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino.ui_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino.ui_${feature.version}/carbonapps/,target:${installFolder}/../../../repository/resources/devicetypes/arduino,overwrite:true);\
instructions.unconfigure = \
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/sketches/arduino);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.device-view);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.type-view);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.analytics-view);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.realtime.analytics-view);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.platform.configuration);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/devicetypes/arduino.car);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/devicetypes/arduino.xml);\
\ No newline at end of file
diff --git a/features/device-types-feature/arduino-plugin-feature/pom.xml b/features/device-types-feature/arduino-plugin-feature/pom.xml
index 347192275..a4ac935a5 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
diff --git a/features/device-types-feature/pom.xml b/features/device-types-feature/pom.xml
index 9794cc1cd..06d7f09f8 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../../pom.xml
4.0.0
device-types-feature
- 3.0.34-SNAPSHOT
+ 3.0.37-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 93db99b41..59a8a7d56 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
@@ -134,11 +134,6 @@
org.eclipse.equinox.p2.type.group:true
-
-
- org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.analytics.feature:${carbon.devicemgt.plugins.version}
-
-
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/p2.inf b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/p2.inf
index ae6c92537..e37b5655c 100644
--- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/p2.inf
+++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/p2.inf
@@ -1,3 +1,5 @@
instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../analytics/repository/deployment/server/carbonapps/);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics_${feature.version}/carbonapps/,target:${installFolder}/../../analytics/repository/deployment/server/carbonapps/,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics_${feature.version}/receiver/,target:${installFolder}/../../analytics/repository/deployment/server/eventreceivers/,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics_${feature.version}/streams/,target:${installFolder}/../../analytics/repository/deployment/server/eventstreams/,overwrite:true);\
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_sense_streams/artifact.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/receiver/raspberrypi_receiver-carbon.super.xml
similarity index 60%
rename from components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_sense_streams/artifact.xml
rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/receiver/raspberrypi_receiver-carbon.super.xml
index 44f173139..0d8b2fd7a 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_sense_streams/artifact.xml
+++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/receiver/raspberrypi_receiver-carbon.super.xml
@@ -16,8 +16,11 @@
~ specific language governing permissions and limitations
~ under the License.
-->
-
-
- org.wso2.iot.android.sense_1.0.0.json
-
-
+
+
+ carbon.super/raspberrypi/+/temperature
+ raspberrypi_receiver-carbon.super
+
+
+
+
diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_stream/org.wso2.iot.raspberrypi_1.0.0.json b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/streams/org.wso2.iot.raspberrypi_1.0.0.json
similarity index 100%
rename from components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_stream/org.wso2.iot.raspberrypi_1.0.0.json
rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/streams/org.wso2.iot.raspberrypi_1.0.0.json
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 0a197e5b1..b058dbc68 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
@@ -103,34 +103,51 @@
org.apache.maven.plugins
- maven-antrun-plugin
+ maven-dependency-plugin
-
- create-raspberrypi-plugin-mgt-schema
+ unpack
package
- run
+ unpack
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ org.wso2.carbon.devicemgt-plugins
+ org.wso2.carbon.device.mgt.iot.raspberrypi.analytics
+
+ ${project.version}
+ zip
+ true
+
+ ${project.build.directory}/maven-shared-archive-resources/carbonapps
+
+ **/*
+
+
+
+
+
+ unpack-analytics
+ package
+
+ unpack
+
+
+
+
+ org.wso2.carbon.devicemgt-plugins
+ org.wso2.carbon.device.mgt.iot.analytics
+ ${project.version}
+ zip
+ true
+
+ ${project.build.directory}/maven-shared-archive-resources/carbonapps
+
+ **/*
+
+
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/Adafruit_Python_DHT.zip b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/Adafruit_Python_DHT.zip
similarity index 100%
rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/Adafruit_Python_DHT.zip
rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/Adafruit_Python_DHT.zip
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/README.md b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/README.md
similarity index 100%
rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/README.md
rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/README.md
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/RaspberryService.sh b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/RaspberryService.sh
similarity index 100%
rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/RaspberryService.sh
rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/RaspberryService.sh
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/deviceConfig.properties b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/deviceConfig.properties
similarity index 100%
rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/deviceConfig.properties
rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/deviceConfig.properties
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/org.eclipse.paho.mqtt.python.tar b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/org.eclipse.paho.mqtt.python.tar
similarity index 100%
rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/org.eclipse.paho.mqtt.python.tar
rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/org.eclipse.paho.mqtt.python.tar
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/sketch.properties b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/sketch.properties
similarity index 100%
rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/sketch.properties
rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/sketch.properties
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/RaspberryAgent.py b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/src/RaspberryAgent.py
similarity index 100%
rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/RaspberryAgent.py
rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/src/RaspberryAgent.py
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/RaspberryStats.log b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/src/RaspberryStats.log
similarity index 100%
rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/RaspberryStats.log
rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/src/RaspberryStats.log
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/httpServer.py b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/src/httpServer.py
similarity index 100%
rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/httpServer.py
rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/src/httpServer.py
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/iotUtils.py b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/src/iotUtils.py
similarity index 100%
rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/iotUtils.py
rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/src/iotUtils.py
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/mqttConnector.py b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/src/mqttConnector.py
similarity index 100%
rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/mqttConnector.py
rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/src/mqttConnector.py
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/running_mode.py b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/src/running_mode.py
similarity index 100%
rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/running_mode.py
rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/src/running_mode.py
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/startService.sh b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/startService.sh
similarity index 100%
rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/startService.sh
rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/startService.sh
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/testAgent.sh b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/testAgent.sh
similarity index 100%
rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/testAgent.sh
rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/agent/testAgent.sh
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/datasources/raspberrypi-datasources.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/datasources/raspberrypi-datasources.xml
deleted file mode 100644
index 62982ef29..000000000
--- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/datasources/raspberrypi-datasources.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
- org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader
-
-
-
-
- RaspberryPi_DB
- The datasource used for the RaspberryPi database
-
- jdbc/RaspberryPiDM_DB
-
-
-
- jdbc:h2:repository/database/RaspberryPiDM_DB;DB_CLOSE_ON_EXIT=FALSE
-
- wso2carbon
- wso2carbon
- org.h2.Driver
- 50
- 60000
- true
- SELECT 1
- 30000
-
-
-
-
-
-
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/h2.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/h2.sql
deleted file mode 100644
index 67e702ec9..000000000
--- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/h2.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-
--- -----------------------------------------------------
--- Table `RASPBERRYPI_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS `RASPBERRYPI_DEVICE` (
- `RASPBERRYPI_DEVICE_ID` VARCHAR(45) NOT NULL ,
- `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (`RASPBERRYPI_DEVICE_ID`) );
-
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/mssql.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/mssql.sql
deleted file mode 100644
index a944f4cb2..000000000
--- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/mssql.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-
--- -----------------------------------------------------
--- Table `RASPBERRYPI_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS RASPBERRYPI_DEVICE (
- RASPBERRYPI_DEVICE_ID VARCHAR(45) NOT NULL ,
- DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (RASPBERRYPI_DEVICE_ID) );
-
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/mysql.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/mysql.sql
deleted file mode 100644
index ad0ec54b7..000000000
--- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/mysql.sql
+++ /dev/null
@@ -1,12 +0,0 @@
--- -----------------------------------------------------
--- Table `RASPBERRYPI_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS `RASPBERRYPI_DEVICE` (
- `RASPBERRYPI_DEVICE_ID` VARCHAR(45) NOT NULL ,
- `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (`RASPBERRYPI_DEVICE_ID`) )
-ENGINE = InnoDB;
-
-
-
-
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/oracle.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/oracle.sql
deleted file mode 100644
index b72ecb564..000000000
--- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/oracle.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-
--- -----------------------------------------------------
--- Table `RASPBERRYPI_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE RASPBERRYPI_DEVICE (
- RASPBERRYPI_DEVICE_ID VARCHAR(45) NOT NULL ,
- DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (RASPBERRYPI_DEVICE_ID) );
-
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/postgresql.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/postgresql.sql
deleted file mode 100644
index a944f4cb2..000000000
--- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/postgresql.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-
--- -----------------------------------------------------
--- Table `RASPBERRYPI_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS RASPBERRYPI_DEVICE (
- RASPBERRYPI_DEVICE_ID VARCHAR(45) NOT NULL ,
- DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (RASPBERRYPI_DEVICE_ID) );
-
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/devicetypes/raspberrypi.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/devicetypes/raspberrypi.xml
index 85db147c6..cc2800ea8 100644
--- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/devicetypes/raspberrypi.xml
+++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/devicetypes/raspberrypi.xml
@@ -31,17 +31,11 @@
- false
+ true
true
-
-
- raspberrypi.mqtt.adapter
- 0
- true
-
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/p2.inf b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/p2.inf
index 5aba54fd9..fdca33545 100644
--- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/p2.inf
+++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/p2.inf
@@ -1,16 +1,19 @@
instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\
+org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/raspberrypi);\
+org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/);\
+org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/raspberrypi/);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.backend_${feature.version}/agent/,target:${installFolder}/../../../repository/resources/sketches/raspberrypi/,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/webapps/);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.backend_${feature.version}/webapps/,target:${installFolder}/../../../repository/deployment/server/webapps/,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/raspberrypi/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.backend_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/raspberrypi,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.backend_${feature.version}/datasources/,target:${installFolder}/../../../conf/datasources/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/database/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.backend_${feature.version}/database/,target:${installFolder}/../../../repository/database/,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.backend_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.backend_${feature.version}/receiver/,target:${installFolder}/../../resources/devicetypes/android_sense/eventreceivers/,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.backend_${feature.version}/streams/,target:${installFolder}/../../resources/devicetypes/android_sense/eventstreams/,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.backend_${feature.version}/carbonapps/,target:${installFolder}/../../resources/devicetypes/android_sense/,overwrite:true);\
instructions.unconfigure = \
@@ -18,7 +21,5 @@ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/raspberrypi);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/raspberrypi);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/sketches/raspberrypi);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../conf/datasources/raspberrypi-datasources.xml);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/database/RaspberryPiDM_DB.h2.db);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/devicetypes/raspberrypi.car);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/devicetypes/raspberrypi.xml);\
\ No newline at end of file
diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_receiver/raspberrypi_receiver.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/receiver/raspberrypi_receiver.xml
similarity index 80%
rename from components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_receiver/raspberrypi_receiver.xml
rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/receiver/raspberrypi_receiver.xml
index 1424b737e..331a954e8 100644
--- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_receiver/raspberrypi_receiver.xml
+++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/receiver/raspberrypi_receiver.xml
@@ -16,11 +16,10 @@
~ specific language governing permissions and limitations
~ under the License.
-->
-
+
${tenant-domain}/raspberrypi/+/temperature
- iot-mqtt
- true
+ raspberrypi_receiver-${tenant-domain}
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/streams/org.wso2.iot.raspberrypi_1.0.0.json b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/streams/org.wso2.iot.raspberrypi_1.0.0.json
new file mode 100644
index 000000000..225db3d1c
--- /dev/null
+++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/streams/org.wso2.iot.raspberrypi_1.0.0.json
@@ -0,0 +1,16 @@
+{
+ "name": "org.wso2.iot.raspberrypi",
+ "version": "1.0.0",
+ "nickName": "raspberrypi",
+ "description": "Temperature data received from the raspberrypi",
+ "metaData": [
+ {"name":"owner","type":"STRING"},
+ {"name":"deviceId","type":"STRING"},
+ {"name":"time","type":"LONG"}
+ ],
+ "payloadData": [
+ {
+ "name": "temperature","type": "FLOAT"
+ }
+ ]
+}
\ 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 d90f1c765..bcfd4f750 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
@@ -99,41 +99,6 @@
-
- org.apache.maven.plugins
- maven-antrun-plugin
-
-
-
- create-raspberrypi-plugin-mgt-schema
- package
-
- run
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
org.wso2.maven
carbon-p2-plugin
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/datasources/raspberrypi-datasources.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/datasources/raspberrypi-datasources.xml
deleted file mode 100644
index 62982ef29..000000000
--- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/datasources/raspberrypi-datasources.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
- org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader
-
-
-
-
- RaspberryPi_DB
- The datasource used for the RaspberryPi database
-
- jdbc/RaspberryPiDM_DB
-
-
-
- jdbc:h2:repository/database/RaspberryPiDM_DB;DB_CLOSE_ON_EXIT=FALSE
-
- wso2carbon
- wso2carbon
- org.h2.Driver
- 50
- 60000
- true
- SELECT 1
- 30000
-
-
-
-
-
-
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/h2.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/h2.sql
deleted file mode 100644
index 67e702ec9..000000000
--- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/h2.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-
--- -----------------------------------------------------
--- Table `RASPBERRYPI_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS `RASPBERRYPI_DEVICE` (
- `RASPBERRYPI_DEVICE_ID` VARCHAR(45) NOT NULL ,
- `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (`RASPBERRYPI_DEVICE_ID`) );
-
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/mssql.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/mssql.sql
deleted file mode 100644
index a944f4cb2..000000000
--- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/mssql.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-
--- -----------------------------------------------------
--- Table `RASPBERRYPI_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS RASPBERRYPI_DEVICE (
- RASPBERRYPI_DEVICE_ID VARCHAR(45) NOT NULL ,
- DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (RASPBERRYPI_DEVICE_ID) );
-
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/mysql.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/mysql.sql
deleted file mode 100644
index ad0ec54b7..000000000
--- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/mysql.sql
+++ /dev/null
@@ -1,12 +0,0 @@
--- -----------------------------------------------------
--- Table `RASPBERRYPI_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS `RASPBERRYPI_DEVICE` (
- `RASPBERRYPI_DEVICE_ID` VARCHAR(45) NOT NULL ,
- `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (`RASPBERRYPI_DEVICE_ID`) )
-ENGINE = InnoDB;
-
-
-
-
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/oracle.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/oracle.sql
deleted file mode 100644
index b72ecb564..000000000
--- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/oracle.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-
--- -----------------------------------------------------
--- Table `RASPBERRYPI_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE RASPBERRYPI_DEVICE (
- RASPBERRYPI_DEVICE_ID VARCHAR(45) NOT NULL ,
- DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (RASPBERRYPI_DEVICE_ID) );
-
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/postgresql.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/postgresql.sql
deleted file mode 100644
index a944f4cb2..000000000
--- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/postgresql.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-
--- -----------------------------------------------------
--- Table `RASPBERRYPI_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS RASPBERRYPI_DEVICE (
- RASPBERRYPI_DEVICE_ID VARCHAR(45) NOT NULL ,
- DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (RASPBERRYPI_DEVICE_ID) );
-
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/devicetypes/raspberrypi.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/devicetypes/raspberrypi.xml
index 85db147c6..cc2800ea8 100644
--- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/devicetypes/raspberrypi.xml
+++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/devicetypes/raspberrypi.xml
@@ -31,17 +31,11 @@
- false
+ true
true
-
-
- raspberrypi.mqtt.adapter
- 0
- true
-
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/p2.inf b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/p2.inf
index 0e1ba6717..619c3134b 100644
--- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/p2.inf
+++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/p2.inf
@@ -1,30 +1,13 @@
instructions.configure = \
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/raspberrypi);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/raspberrypi/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.ui_${feature.version}/agent/,target:${installFolder}/../../../repository/resources/sketches/raspberrypi/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.ui_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/raspberrypi,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.ui_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.ui_${feature.version}/datasources/,target:${installFolder}/../../../conf/datasources/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/database/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.ui_${feature.version}/database/,target:${installFolder}/../../../repository/database/,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.ui_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.ui_${feature.version}/carbonapps/,target:${installFolder}/../../../repository/resources/devicetypes/raspberrypi,overwrite:true);\
-
instructions.unconfigure = \
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/raspberrypi);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/sketches/raspberrypi);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../conf/datasources/raspberrypi-datasources.xml);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/database/RaspberryPiDM_DB.h2.db);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.analytics-view);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.realtime.analytics-view);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.platform.configuration);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/devicetypes/raspberrypi.car);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/devicetypes/raspberrypi.xml);\
\ No newline at end of file
diff --git a/features/device-types-feature/raspberrypi-plugin-feature/pom.xml b/features/device-types-feature/raspberrypi-plugin-feature/pom.xml
index de58a1395..7f9e91a56 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
- 3.0.34-SNAPSHOT
+ 3.0.37-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 bf733dab9..4f76e5497 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
@@ -135,11 +135,6 @@
org.eclipse.equinox.p2.type.group:true
-
-
- org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.analytics.feature:${carbon.devicemgt.plugins.version}
-
-
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/src/main/resources/p2.inf b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/src/main/resources/p2.inf
index f65b61a17..c74ad9297 100644
--- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/src/main/resources/p2.inf
+++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/src/main/resources/p2.inf
@@ -1,6 +1,8 @@
instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../analytics/repository/deployment/server/carbonapps/);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics_${feature.version}/carbonapps/,target:${installFolder}/../../analytics/repository/deployment/server/carbonapps/,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics_${feature.version}/receiver/,target:${installFolder}/../../analytics/repository/deployment/server/eventreceivers/,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics_${feature.version}/streams/,target:${installFolder}/../../analytics/repository/deployment/server/eventstreams/,overwrite:true);\
instructions.unconfigure = \
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/carbonapps/virtualfirealarm.car);\
\ No newline at end of file
diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_stream/artifact.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/src/main/resources/receiver/virtualfirealarm_receiver-carbon.super.xml
similarity index 59%
rename from components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_stream/artifact.xml
rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/src/main/resources/receiver/virtualfirealarm_receiver-carbon.super.xml
index c9779c693..efd5dde7b 100644
--- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_stream/artifact.xml
+++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/src/main/resources/receiver/virtualfirealarm_receiver-carbon.super.xml
@@ -16,8 +16,11 @@
~ specific language governing permissions and limitations
~ under the License.
-->
-
-
- org.wso2.iot.raspberrypi_1.0.0.json
-
-
+
+
+ carbon.super/virtual_firealarm/+/temperature
+ virtualfirealarm_receiver-carbon.super
+
+
+
+
diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/src/main/resources/carbonapps/virtualfirealarm/virtualfirealarm_stream/org.wso2.iot.virtualfirealarm_1.0.0.json b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/src/main/resources/streams/org.wso2.iot.virtualfirealarm_1.0.0.json
similarity index 100%
rename from components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/src/main/resources/carbonapps/virtualfirealarm/virtualfirealarm_stream/org.wso2.iot.virtualfirealarm_1.0.0.json
rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/src/main/resources/streams/org.wso2.iot.virtualfirealarm_1.0.0.json
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 af6e2d664..91954a21e 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
@@ -99,39 +99,82 @@
+
+ copy-agent-jar
+ package
+
+ copy
+
+
+
+
+ org.wso2.carbon.devicemgt-plugins
+ org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl
+
+ true
+ ${project.build.directory}/maven-shared-archive-resources/agent/
+ wso2-firealarm-virtual-agent.jar
+
+
+ org.wso2.carbon.devicemgt-plugins
+ org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.advanced.impl
+
+ true
+ ${project.build.directory}/maven-shared-archive-resources/advanced_agent/
+ wso2-firealarm-virtual-agent-advanced.jar
+
+
+
+
-
org.apache.maven.plugins
- maven-antrun-plugin
+ maven-dependency-plugin
-
- create-virtual-firealarm-plugin-mgt-schema
+ unpack
package
- run
+ unpack
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ org.wso2.carbon.devicemgt-plugins
+ org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics
+
+ ${project.version}
+ zip
+ true
+
+ ${project.build.directory}/maven-shared-archive-resources/carbonapps
+
+ **/*
+
+
+
+
+
+ unpack-analytics
+ package
+
+ unpack
+
+
+
+
+ org.wso2.carbon.devicemgt-plugins
+ org.wso2.carbon.device.mgt.iot.analytics
+ ${project.version}
+ zip
+ true
+
+ ${project.build.directory}/maven-shared-archive-resources/carbonapps
+
+ **/*
+
+
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/advanced_agent/cep_query.txt b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/advanced_agent/cep_query.txt
similarity index 100%
rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/advanced_agent/cep_query.txt
rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/advanced_agent/cep_query.txt
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/advanced_agent/deviceConfig.properties b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/advanced_agent/deviceConfig.properties
similarity index 100%
rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/advanced_agent/deviceConfig.properties
rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/advanced_agent/deviceConfig.properties
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/advanced_agent/sketch.properties b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/advanced_agent/sketch.properties
similarity index 100%
rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/advanced_agent/sketch.properties
rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/advanced_agent/sketch.properties
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/advanced_agent/start-device.bat b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/advanced_agent/start-device.bat
new file mode 100755
index 000000000..3b803066d
--- /dev/null
+++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/advanced_agent/start-device.bat
@@ -0,0 +1,7 @@
+@echo off
+echo.
+echo.WSO2 IOT Sample
+echo.Virtual Fire Alarm
+echo.initializing agent
+echo.
+java -jar wso2-firealarm-virtual-agent-advanced.jar
\ No newline at end of file
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/advanced_agent/start-device.sh b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/advanced_agent/start-device.sh
similarity index 100%
rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/advanced_agent/start-device.sh
rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/advanced_agent/start-device.sh
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/agent/deviceConfig.properties b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/deviceConfig.properties
similarity index 100%
rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/agent/deviceConfig.properties
rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/deviceConfig.properties
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/agent/sketch.properties b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/sketch.properties
similarity index 100%
rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/agent/sketch.properties
rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/sketch.properties
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/start-device.bat b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/start-device.bat
new file mode 100755
index 000000000..f19520f14
--- /dev/null
+++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/start-device.bat
@@ -0,0 +1,7 @@
+@echo off
+echo.
+echo.WSO2 IOT Sample
+echo.Virtual Fire Alarm
+echo.initializing agent
+echo.
+java -jar wso2-firealarm-virtual-agent.jar
\ No newline at end of file
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/agent/start-device.sh b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/start-device.sh
similarity index 100%
rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/agent/start-device.sh
rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/start-device.sh
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/agent/virtual_firealarm.jks b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/virtual_firealarm.jks
similarity index 100%
rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/agent/virtual_firealarm.jks
rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/agent/virtual_firealarm.jks
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/certs/wso2certs.jks b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/certs/wso2certs.jks
deleted file mode 100644
index 00589cdf0..000000000
Binary files a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/certs/wso2certs.jks and /dev/null differ
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/datasources/virtual_firealarm-datasources.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/datasources/virtual_firealarm-datasources.xml
deleted file mode 100644
index a724d94d1..000000000
--- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/datasources/virtual_firealarm-datasources.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
- org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader
-
-
-
-
- VirtualFireAlarmDM_DB
- The datasource used for the Virtual-Firealarm database
-
- jdbc/VirtualFireAlarmDM_DB
-
-
-
- jdbc:h2:repository/database/VirtualFireAlarmDM_DB;DB_CLOSE_ON_EXIT=FALSE
-
- wso2carbon
- wso2carbon
- org.h2.Driver
- 50
- 60000
- true
- SELECT 1
- 30000
-
-
-
-
-
-
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/dbscripts/h2.sql b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/dbscripts/h2.sql
deleted file mode 100644
index 160b437cb..000000000
--- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/dbscripts/h2.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-
--- -----------------------------------------------------
--- Table `FIREALARM_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS `VIRTUAL_FIREALARM_DEVICE` (
- `VIRTUAL_FIREALARM_DEVICE_ID` VARCHAR(45) NOT NULL ,
- `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (`VIRTUAL_FIREALARM_DEVICE_ID`) );
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/dbscripts/mssql.sql b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/dbscripts/mssql.sql
deleted file mode 100644
index 41b7e4848..000000000
--- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/dbscripts/mssql.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-
--- -----------------------------------------------------
--- Table `FIREALARM_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS VIRTUAL_FIREALARM_DEVICE (
- VIRTUAL_FIREALARM_DEVICE_ID VARCHAR(45) NOT NULL ,
- DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (VIRTUAL_FIREALARM_DEVICE_ID) );
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/dbscripts/mysql.sql b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/dbscripts/mysql.sql
deleted file mode 100644
index 432ecbb0e..000000000
--- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/dbscripts/mysql.sql
+++ /dev/null
@@ -1,12 +0,0 @@
--- -----------------------------------------------------
--- Table `FIREALARM_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS `VIRTUAL_FIREALARM_DEVICE` (
- `VIRTUAL_FIREALARM_DEVICE_ID` VARCHAR(45) NOT NULL ,
- `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (`VIRTUAL_FIREALARM_DEVICE_ID`) )
-ENGINE = InnoDB;
-
-
-
-
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/dbscripts/oracle.sql b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/dbscripts/oracle.sql
deleted file mode 100644
index 5583d1694..000000000
--- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/dbscripts/oracle.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-
--- -----------------------------------------------------
--- Table `FIREALARM_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE VIRTUAL_FIREALARM_DEVICE (
- VIRTUAL_FIREALARM_DEVICE_ID VARCHAR(45) NOT NULL ,
- DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (VIRTUAL_FIREALARM_DEVICE_ID) );
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/dbscripts/postgresql.sql b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/dbscripts/postgresql.sql
deleted file mode 100644
index 41b7e4848..000000000
--- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/dbscripts/postgresql.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-
--- -----------------------------------------------------
--- Table `FIREALARM_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS VIRTUAL_FIREALARM_DEVICE (
- VIRTUAL_FIREALARM_DEVICE_ID VARCHAR(45) NOT NULL ,
- DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (VIRTUAL_FIREALARM_DEVICE_ID) );
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/devicetypes/virtual_firealarm.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/devicetypes/virtual_firealarm.xml
index 1fcfec4c6..10f1985ca 100644
--- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/devicetypes/virtual_firealarm.xml
+++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/devicetypes/virtual_firealarm.xml
@@ -36,12 +36,6 @@
true
-
-
- virtualfirealarm.mqtt.adapter
- 0
- true
-
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/p2.inf b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/p2.inf
index fc574d82f..954ded23a 100644
--- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/p2.inf
+++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/p2.inf
@@ -1,25 +1,21 @@
instructions.configure = \
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/webapps/);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend_${feature.version}/webapps/,target:${installFolder}/../../../repository/deployment/server/webapps/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/virtual_firealarm,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend_${feature.version}/datasources/,target:${installFolder}/../../../conf/datasources/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/database/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend_${feature.version}/database/,target:${installFolder}/../../../repository/database/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/security/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend_${feature.version}/certs/,target:${installFolder}/../../../repository/resources/security/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/device-types/);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/);\
+org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\
+org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/virtual_firealarm/);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend_${feature.version}/carbonapps/,target:${installFolder}/../../../repository/resources/devicetypes/virtual_firealarm/,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend_${feature.version}/receiver/,target:${installFolder}/../../../repository/resources/devicetypes/virtual_firealarm/receiver/,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend_${feature.version}/streams/,target:${installFolder}/../../../repository/resources/devicetypes/virtual_firealarm/streams/,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/);\
+org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/virtual_firealarm/);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend_${feature.version}/agent/,target:${installFolder}/../../../repository/resources/sketches/virtual_firealarm/,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/virtual_firealarm_advanced/);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend_${feature.version}/advanced_agent/,target:${installFolder}/../../../repository/resources/sketches/virtual_firealarm_advanced/,overwrite:true);\
instructions.unconfigure = \
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/virtual_firealarm.war);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/virtual_firealarm);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/virtual_firealarm_scep.war);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/virtual_firealarm_scep);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/virtual_firealarm);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../conf/datasources/virtual_firealarm-datasources.xml);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/database/virtualfirealarmDM_DB.h2.db);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/security/wso2certs.jks);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/devicetypes/virtual_firealarm.xml);\
\ No newline at end of file
diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/src/main/resources/carbonapps/virtualfirealarm/virtualfirealarm_receiver/virtualfirealarm_receiver.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/receiver/virtualfirealarm_receiver.xml
similarity index 80%
rename from components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/src/main/resources/carbonapps/virtualfirealarm/virtualfirealarm_receiver/virtualfirealarm_receiver.xml
rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/receiver/virtualfirealarm_receiver.xml
index d46fc1a56..eea9bb117 100644
--- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics/src/main/resources/carbonapps/virtualfirealarm/virtualfirealarm_receiver/virtualfirealarm_receiver.xml
+++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/receiver/virtualfirealarm_receiver.xml
@@ -16,11 +16,10 @@
~ specific language governing permissions and limitations
~ under the License.
-->
-
+
${tenant-domain}/virtual_firealarm/+/temperature
- iot-mqtt
- true
+ virtualfirealarm_receiver-${tenant-domain}
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/streams/org.wso2.iot.virtualfirealarm_1.0.0.json b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/streams/org.wso2.iot.virtualfirealarm_1.0.0.json
new file mode 100644
index 000000000..0ba70911e
--- /dev/null
+++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/streams/org.wso2.iot.virtualfirealarm_1.0.0.json
@@ -0,0 +1,16 @@
+{
+ "name": "org.wso2.iot.virtualfirealarm",
+ "version": "1.0.0",
+ "nickName": "virtual_firealarm",
+ "description": "Temperature data received from the virtual_firealarm",
+ "metaData": [
+ {"name":"owner","type":"STRING"},
+ {"name":"deviceId","type":"STRING"},
+ {"name":"time","type":"LONG"}
+ ],
+ "payloadData": [
+ {
+ "name": "temperature","type": "FLOAT"
+ }
+ ]
+}
\ No newline at end of file
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 933bb8004..f82088c1b 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
@@ -97,68 +97,6 @@
-
- copy-agent-jar
- package
-
- copy
-
-
-
-
- org.wso2.carbon.devicemgt-plugins
- org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl
-
- true
- ${project.build.directory}/maven-shared-archive-resources/agent/
- wso2-firealarm-virtual-agent.jar
-
-
- org.wso2.carbon.devicemgt-plugins
- org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.advanced.impl
-
- true
- ${project.build.directory}/maven-shared-archive-resources/advanced_agent/
- wso2-firealarm-virtual-agent-advanced.jar
-
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-antrun-plugin
-
-
-
- create-virtual-firealarm-plugin-mgt-schema
- package
-
- run
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/certs/wso2certs.jks b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/certs/wso2certs.jks
deleted file mode 100644
index 00589cdf0..000000000
Binary files a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/certs/wso2certs.jks and /dev/null differ
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/datasources/virtual_firealarm-datasources.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/datasources/virtual_firealarm-datasources.xml
deleted file mode 100644
index a724d94d1..000000000
--- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/datasources/virtual_firealarm-datasources.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
- org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader
-
-
-
-
- VirtualFireAlarmDM_DB
- The datasource used for the Virtual-Firealarm database
-
- jdbc/VirtualFireAlarmDM_DB
-
-
-
- jdbc:h2:repository/database/VirtualFireAlarmDM_DB;DB_CLOSE_ON_EXIT=FALSE
-
- wso2carbon
- wso2carbon
- org.h2.Driver
- 50
- 60000
- true
- SELECT 1
- 30000
-
-
-
-
-
-
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/h2.sql b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/h2.sql
deleted file mode 100644
index 160b437cb..000000000
--- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/h2.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-
--- -----------------------------------------------------
--- Table `FIREALARM_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS `VIRTUAL_FIREALARM_DEVICE` (
- `VIRTUAL_FIREALARM_DEVICE_ID` VARCHAR(45) NOT NULL ,
- `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (`VIRTUAL_FIREALARM_DEVICE_ID`) );
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/mssql.sql b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/mssql.sql
deleted file mode 100644
index 41b7e4848..000000000
--- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/mssql.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-
--- -----------------------------------------------------
--- Table `FIREALARM_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS VIRTUAL_FIREALARM_DEVICE (
- VIRTUAL_FIREALARM_DEVICE_ID VARCHAR(45) NOT NULL ,
- DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (VIRTUAL_FIREALARM_DEVICE_ID) );
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/mysql.sql b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/mysql.sql
deleted file mode 100644
index 432ecbb0e..000000000
--- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/mysql.sql
+++ /dev/null
@@ -1,12 +0,0 @@
--- -----------------------------------------------------
--- Table `FIREALARM_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS `VIRTUAL_FIREALARM_DEVICE` (
- `VIRTUAL_FIREALARM_DEVICE_ID` VARCHAR(45) NOT NULL ,
- `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (`VIRTUAL_FIREALARM_DEVICE_ID`) )
-ENGINE = InnoDB;
-
-
-
-
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/oracle.sql b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/oracle.sql
deleted file mode 100644
index 5583d1694..000000000
--- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/oracle.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-
--- -----------------------------------------------------
--- Table `FIREALARM_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE VIRTUAL_FIREALARM_DEVICE (
- VIRTUAL_FIREALARM_DEVICE_ID VARCHAR(45) NOT NULL ,
- DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (VIRTUAL_FIREALARM_DEVICE_ID) );
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/postgresql.sql b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/postgresql.sql
deleted file mode 100644
index 41b7e4848..000000000
--- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/postgresql.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-
--- -----------------------------------------------------
--- Table `FIREALARM_DEVICE`
--- -----------------------------------------------------
-CREATE TABLE IF NOT EXISTS VIRTUAL_FIREALARM_DEVICE (
- VIRTUAL_FIREALARM_DEVICE_ID VARCHAR(45) NOT NULL ,
- DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL,
- PRIMARY KEY (VIRTUAL_FIREALARM_DEVICE_ID) );
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/devicetypes/virtual_firealarm.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/devicetypes/virtual_firealarm.xml
index 1fcfec4c6..145709c86 100644
--- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/devicetypes/virtual_firealarm.xml
+++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/devicetypes/virtual_firealarm.xml
@@ -37,11 +37,6 @@
true
-
- virtualfirealarm.mqtt.adapter
- 0
- true
-
diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/p2.inf b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/p2.inf
index d92250b09..295ac3fc1 100644
--- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/p2.inf
+++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/p2.inf
@@ -1,33 +1,11 @@
instructions.configure = \
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/virtual_firealarm/);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/virtual_firealarm/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui_${feature.version}/agent/,target:${installFolder}/../../../repository/resources/sketches/virtual_firealarm/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/virtual_firealarm_advanced/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui_${feature.version}/advanced_agent/,target:${installFolder}/../../../repository/resources/sketches/virtual_firealarm_advanced/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/virtual_firealarm,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui_${feature.version}/datasources/,target:${installFolder}/../../../conf/datasources/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/database/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui_${feature.version}/database/,target:${installFolder}/../../../repository/database/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/security/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui_${feature.version}/certs/,target:${installFolder}/../../../repository/resources/security/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/device-types/);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui_${feature.version}/carbonapps/,target:${installFolder}/../../../repository/resources/devicetypes/virtual_firealarm/,overwrite:true);\
instructions.unconfigure = \
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/virtual_firealarm);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/sketches/virtual_firealarm);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/sketches/virtual_firealarm_advanced);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../conf/datasources/virtual_firealarm-datasources.xml);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/database/VirtualFireAlarmDM_DB.h2.db);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.device-view);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.policy-edit);\
@@ -36,5 +14,4 @@ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.platform.configuration);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.realtime.analytics-view);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.policy-wizard);\
-org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/security/wso2certs.jks);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/devicetypes/virtual_firealarm.xml);\
\ No newline at end of file
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 d2ec9c0d3..510e8dce4 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
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 6b32ec880..a76353400 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
- 3.0.34-SNAPSHOT
+ 3.0.37-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 3b11e0ba1..c447cc0ce 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
org.wso2.carbon.appmgt.mdm.osgiconnector.feature
pom
- 3.0.34-SNAPSHOT
+ 3.0.37-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
- 3.0.34-SNAPSHOT
+ 3.0.37-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 6ce2935a4..dfb999b64 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
org.wso2.carbon.appmgt.mdm.restconnector.feature
pom
- 3.0.34-SNAPSHOT
+ 3.0.37-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
- 3.0.34-SNAPSHOT
+ 3.0.37-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 a66db4e8d..526334471 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.adapter.feature
pom
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
WSO2 Carbon - Device Management Adapters Feature
http://wso2.org
This feature contains the adapter bundles required for IoT Server
@@ -208,17 +208,6 @@
org.wso2.carbon.identity.carbon.auth.jwt:org.wso2.carbon.identity.authenticator.signedjwt:${identity.carbon.auth.jwt.version}
-
-
- org.wso2.carbon.event.output.adapter.server:${carbon.analytics.common.version}
-
-
- org.wso2.carbon.event.input.adapter.server:${carbon.analytics.common.version}
-
-
- org.wso2.carbon.identity.jwt.client.extension:${carbon.devicemgt.version}
-
-
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 0188ca962..d3e9cabd3 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
org.wso2.extension.siddhi.execution.json.feature
pom
- 3.0.34-SNAPSHOT
+ 3.0.37-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/pom.xml b/features/extensions-feature/pom.xml
index cc869631f..0f2b2d996 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../../pom.xml
4.0.0
extensions-feature
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
pom
WSO2 Carbon - Device Management Extensions
http://wso2.org
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 cd758d3ee..4a05880a4 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.mobile.android.feature
pom
- 3.0.34-SNAPSHOT
+ 3.0.37-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 9ee301ebc..74887ed56 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
4.0.0
android-plugin-feature
- 3.0.34-SNAPSHOT
+ 3.0.37-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 22a790338..565625851 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../../pom.xml
4.0.0
mobile-plugins-feature
- 3.0.34-SNAPSHOT
+ 3.0.37-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 81610eaca..20bc184a7 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.mobile.windows.feature
pom
- 3.0.34-SNAPSHOT
+ 3.0.37-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/h2.sql b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/dbscripts/plugins/h2.sql
index f1749a8a8..7841ec87c 100644
--- a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/dbscripts/plugins/h2.sql
+++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/dbscripts/plugins/h2.sql
@@ -28,3 +28,17 @@ CREATE TABLE IF NOT EXISTS `WIN_FEATURE` (
`DESCRIPTION` VARCHAR(200) NULL,
PRIMARY KEY (`ID`)
);
+
+-- -----------------------------------------------------
+-- Table `WINDOWS_ENROLLMENT_TOKEN`
+-- -----------------------------------------------------
+CREATE TABLE IF NOT EXISTS `WINDOWS_ENROLLMENT_TOKEN` (
+ `ID` INT NOT NULL AUTO_INCREMENT,
+ `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,
+ `OWNERSHIP` VARCHAR(45) NULL,
+ PRIMARY KEY (`ID`)
+);
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 524a483c7..54a7dc720 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
@@ -30,3 +30,17 @@ CREATE TABLE WIN_DEVICE (
DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL,
PRIMARY KEY (DEVICE_ID)
);
+
+-- -----------------------------------------------------
+-- Table `WINDOWS_ENROLLMENT_TOKEN`
+-- -----------------------------------------------------
+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,
+ TENANT_DOMAIN VARCHAR(45) NOT NULL,
+ ENROLLMENT_TOKEN VARCHAR (100) NULL DEFAULT NULL,
+ DEVICE_ID VARCHAR (100) NOT NULL,
+ USERNAME VARCHAR (45) NOT NULL,
+ OWNERSHIP VARCHAR (45) NULL DEFAULT NULL,
+ PRIMARY KEY (ID);
+);
\ 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/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 2ebcc80f7..378d516da 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
@@ -30,5 +30,18 @@ CREATE TABLE IF NOT EXISTS `WIN_FEATURE` (
PRIMARY KEY (`ID`))
ENGINE = InnoDB;
+-- -----------------------------------------------------
+-- Table `WINDOWS_ENROLLMENT_TOKEN`
+-- -----------------------------------------------------
+CREATE TABLE IF NOT EXISTS `WINDOWS_ENROLLMENT_TOKEN` (
+ `ID` INT NOT NULL AUTO_INCREMENT,
+ `TENANT_DOMAIN` VARCHAR(45) NOT NULL,
+ `ENROLLMENT_TOKEN` VARCHAR(100) NULL,
+ `DEVICE_ID` VARCHAR(100) NULL,
+ `USERNAME` VARCHAR(45) NULL,
+ `OWNERSHIP` VARCHAR(45) NULL,
+ PRIMARY KEY (`ID`))
+ENGINE = InnoDB;
+
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 a7a389264..3371fab89 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
@@ -31,6 +31,20 @@ CREATE TABLE WIN_FEATURE (
)
/
+-- -----------------------------------------------------
+-- Table `WINDOWS_ENROLLMENT_TOKEN`
+-- -----------------------------------------------------
+CREATE TABLE WINDOWS_ENROLLMENT_TOKEN (
+ ID INT NOT NULL,
+ TENANT_DOMAIN VARCHAR(45) NOT NULL,
+ ENROLLMENT_TOKEN VARCHAR(100) NULL,
+ DEVICE_ID VARCHAR(100) NULL,
+ USERNAME VARCHAR(45) NULL,
+ OWNERSHIP VARCHAR(45) NULL,
+ PRIMARY KEY (ID)
+)
+/
+
-- -----------------------------------------------------
-- Sequence `WIN_FEATURE_ID_INC_SEQ`
-- -----------------------------------------------------
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 d7444757d..c8af94cd6 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
@@ -29,3 +29,15 @@ CREATE TABLE IF NOT EXISTS WIN_FEATURE (
PRIMARY KEY (ID)
);
+-- -----------------------------------------------------
+-- Table `WINDOWS_ENROLLMENT_TOKEN`
+-- -----------------------------------------------------
+CREATE TABLE IF NOT EXISTS WINDOWS_ENROLLMENT_TOKEN (
+ ID SERIAL NOT NULL,
+ TENANT_DOMAIN VARCHAR(45) NOT NULL,
+ ENROLLMENT_TOKEN VARCHAR(100) NULL,
+ DEVICE_ID VARCHAR(100) NULL,
+ USERNAME VARCHAR(45) NULL,
+ OWNERSHIP VARCHAR(45) NULL,
+ PRIMARY KEY (ID)
+);
diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/devicetypes/windows.xml b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/devicetypes/windows.xml
index 3c7782517..2efa4203e 100644
--- a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/devicetypes/windows.xml
+++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/devicetypes/windows.xml
@@ -166,6 +166,14 @@
+
+ DEVICE_INFO
+ 1
+
+
+ DEVICE_LOCATION
+ 1
+
diff --git a/features/mobile-plugins-feature/windows-plugin-feature/pom.xml b/features/mobile-plugins-feature/windows-plugin-feature/pom.xml
index d8343c932..c0adf763d 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
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
../pom.xml
4.0.0
windows-plugin-feature
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
pom
WSO2 Carbon - Device Management Windows Plugin Feature
http://wso2.org
diff --git a/pom.xml b/pom.xml
index ac1c34096..3c5d5b531 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
org.wso2.carbon.devicemgt-plugins
carbon-device-mgt-plugins-parent
pom
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
WSO2 Carbon - Device Management Plugins Parent
http://wso2.org
WSO2 Carbon - Device Management Plugins Parent
@@ -1132,10 +1132,10 @@
[2.0.0, 3.0.0)
- 1.2.15
+ 1.2.25
- 3.0.34-SNAPSHOT
+ 3.0.37-SNAPSHOT
4.4.8
@@ -1215,6 +1215,7 @@
3.0.0.wso2v1
(3.0.0, 4.0.0]
+ [2.0.0,4.0.0)
0.9.1
1.1.wso2v1
3.2.2