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/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/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/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/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/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/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/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..780b1bc86 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
@@ -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/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/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/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/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/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..e65c24e13 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
@@ -36,59 +36,6 @@
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..00473e05d 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
@@ -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..cafbf36b7 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
@@ -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/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..01c5ae8f0 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
@@ -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..4012b7b48 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
@@ -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/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/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..8acc2be76 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
@@ -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..623f38c4f 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
@@ -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..79736aedb 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
@@ -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/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..450e53afc 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
@@ -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..111672664 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
@@ -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.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.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..eb6ba2bd1 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
@@ -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/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..cbd5278f3 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
@@ -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/pom.xml b/pom.xml
index ac1c34096..566ca7b2e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -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