From b6d82ed4b6a4fff68defda61465691a849da7d7a Mon Sep 17 00:00:00 2001 From: NuwanSameera Date: Thu, 10 Dec 2015 10:42:17 +0530 Subject: [PATCH] digital display plugin updated --- .../pom.xml | 123 +++++++++++++++++- .../digitaldisplay/api/dto/DeviceJSON.java | 3 - ...igitalDisplayMqttCommunicationHandler.java | 2 +- .../src/main/webapp/WEB-INF/cxf-servlet.xml | 8 +- .../src/main/webapp/WEB-INF/web.xml | 52 +++++--- .../digitaldisplay-overview.hbs | 4 +- .../digitaldisplay-overview.js | 2 +- 7 files changed, 161 insertions(+), 33 deletions(-) diff --git a/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/pom.xml b/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/pom.xml index 9f2601ea3d..4b4a374a07 100644 --- a/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/pom.xml +++ b/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/pom.xml @@ -23,15 +23,42 @@ org.wso2.carbon.devicemgt org.wso2.carbon.device.mgt.common + provided org.wso2.carbon.devicemgt org.wso2.carbon.device.mgt.core + provided + + + org.apache.axis2.wso2 + axis2-client + + + - javax - javaee-api - 7.0 + org.wso2.carbon.devicemgt + org.wso2.carbon.device.mgt.analytics + provided + + + org.apache.axis2.wso2 + axis2-client + + + + + + org.wso2.carbon.devicemgt + org.wso2.carbon.certificate.mgt.core + provided + + + commons-codec.wso2 + commons-codec + + @@ -50,10 +77,12 @@ cxf-rt-transports-http provided + org.eclipse.paho mqtt-client + provided @@ -61,11 +90,13 @@ org.apache.httpcomponents httpasyncclient 4.1 + provided org.wso2.carbon.device.mgt.iot org.wso2.carbon.device.mgt.iot.common 1.0.0-SNAPSHOT + provided @@ -95,6 +126,92 @@ provided + + commons-httpclient.wso2 + commons-httpclient + provided + + + + org.wso2.carbon + org.wso2.carbon.utils + provided + + + org.bouncycastle.wso2 + bcprov-jdk15on + + + org.wso2.carbon + org.wso2.carbon.user.api + + + org.wso2.carbon + org.wso2.carbon.queuing + + + org.wso2.carbon + org.wso2.carbon.base + + + org.apache.axis2.wso2 + axis2 + + + org.igniterealtime.smack.wso2 + smack + + + org.igniterealtime.smack.wso2 + smackx + + + jaxen + jaxen + + + commons-fileupload.wso2 + commons-fileupload + + + org.apache.ant.wso2 + ant + + + org.apache.ant.wso2 + ant + + + commons-httpclient.wso2 + commons-httpclient + + + org.eclipse.equinox + javax.servlet + + + org.wso2.carbon + org.wso2.carbon.registry.api + + + + + + commons-codec + commons-codec + + + + org.igniterealtime.smack.wso2 + smack + provided + + + org.igniterealtime.smack.wso2 + smackx + provided + + diff --git a/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/src/main/java/org/wso2/carbon/device/mgt/iot/digitaldisplay/api/dto/DeviceJSON.java b/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/src/main/java/org/wso2/carbon/device/mgt/iot/digitaldisplay/api/dto/DeviceJSON.java index 3d6ab403e4..08979a267b 100644 --- a/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/src/main/java/org/wso2/carbon/device/mgt/iot/digitaldisplay/api/dto/DeviceJSON.java +++ b/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/src/main/java/org/wso2/carbon/device/mgt/iot/digitaldisplay/api/dto/DeviceJSON.java @@ -30,7 +30,4 @@ public class DeviceJSON { @XmlElement(required = true) public String owner; @XmlElement(required = true) public String deviceId; @XmlElement(required = true) public String reply; - @XmlElement public Long time; - @XmlElement public String key; - @XmlElement public float value; } diff --git a/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/src/main/java/org/wso2/carbon/device/mgt/iot/digitaldisplay/api/util/DigitalDisplayMqttCommunicationHandler.java b/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/src/main/java/org/wso2/carbon/device/mgt/iot/digitaldisplay/api/util/DigitalDisplayMqttCommunicationHandler.java index 7f561119a0..3c545a58fb 100644 --- a/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/src/main/java/org/wso2/carbon/device/mgt/iot/digitaldisplay/api/util/DigitalDisplayMqttCommunicationHandler.java +++ b/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/src/main/java/org/wso2/carbon/device/mgt/iot/digitaldisplay/api/util/DigitalDisplayMqttCommunicationHandler.java @@ -4,7 +4,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.eclipse.paho.client.mqttv3.MqttException; import org.eclipse.paho.client.mqttv3.MqttMessage; -import org.wso2.carbon.device.mgt.iot.common.controlqueue.mqtt.MqttConfig; +import org.wso2.carbon.device.mgt.iot.controlqueue.mqtt.MqttConfig; import org.wso2.carbon.device.mgt.iot.digitaldisplay.constants.DigitalDisplayConstants; import org.wso2.carbon.device.mgt.iot.digitaldisplay.api.transport.CommunicationHandlerException; import org.wso2.carbon.device.mgt.iot.digitaldisplay.api.transport.MQTTCommunicationHandler; diff --git a/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/src/main/webapp/WEB-INF/cxf-servlet.xml b/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/src/main/webapp/WEB-INF/cxf-servlet.xml index 76868065ad..cf04c1c49c 100644 --- a/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/src/main/webapp/WEB-INF/cxf-servlet.xml +++ b/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/src/main/webapp/WEB-INF/cxf-servlet.xml @@ -27,7 +27,7 @@ + class="org.wso2.carbon.device.mgt.iot.digitaldisplay.api.DigitalDisplayControllerService"> @@ -39,7 +39,7 @@ + class="org.wso2.carbon.device.mgt.iot.digitaldisplay.api.DigitalDisplayManagerService"> @@ -49,11 +49,9 @@ + class="org.wso2.carbon.device.mgt.iot.digitaldisplay.api.util.DigitalDisplayMqttCommunicationHandler" > - - diff --git a/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/src/main/webapp/WEB-INF/web.xml b/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/src/main/webapp/WEB-INF/web.xml index 539e3e5b19..5d7b23a701 100644 --- a/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/src/main/webapp/WEB-INF/web.xml +++ b/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/src/main/webapp/WEB-INF/web.xml @@ -1,22 +1,38 @@ - - + + - DigitalDisplay - DigitalDisplay - - - CXFServlet - org.apache.cxf.transport.servlet.CXFServlet - 1 - - - - - CXFServlet - /* - + version="2.5"> + Digital-Display-Agent-Webapp + + JAX-WS/JAX-RS MDM Android Endpoint + JAX-WS/JAX-RS Servlet + CXFServlet + + org.apache.cxf.transport.servlet.CXFServlet + + 1 + + + CXFServlet + /* + diff --git a/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/jaggerryapps/devicemgt/app/units/iot.unit.device.digitaldisplay-overview/digitaldisplay-overview.hbs b/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/jaggerryapps/devicemgt/app/units/iot.unit.device.digitaldisplay-overview/digitaldisplay-overview.hbs index b6ee822acd..05562c9289 100644 --- a/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/jaggerryapps/devicemgt/app/units/iot.unit.device.digitaldisplay-overview/digitaldisplay-overview.hbs +++ b/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/jaggerryapps/devicemgt/app/units/iot.unit.device.digitaldisplay-overview/digitaldisplay-overview.hbs @@ -1,9 +1,9 @@
- {{unit "cdmf.unit.device.overview.firealarm-display-image"}} + {{unit "cdmf.unit.device.overview.digital-display-image"}}
-
Device Overview - Virtual Firealarm
+
Device Overview - Digital Display
{{#defineZone "device-detail-properties"}} diff --git a/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/jaggerryapps/devicemgt/app/units/iot.unit.device.digitaldisplay-overview/digitaldisplay-overview.js b/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/jaggerryapps/devicemgt/app/units/iot.unit.device.digitaldisplay-overview/digitaldisplay-overview.js index 4db0045b5e..b9bffdecd8 100644 --- a/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/jaggerryapps/devicemgt/app/units/iot.unit.device.digitaldisplay-overview/digitaldisplay-overview.js +++ b/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/jaggerryapps/devicemgt/app/units/iot.unit.device.digitaldisplay-overview/digitaldisplay-overview.js @@ -13,7 +13,7 @@ function onRequest (context) { if (deviceInfo != undefined && String(deviceInfo.toString()).length > 0) { deviceInfo = parse(stringify(deviceInfo)); viewModel.system = device.properties.IMEI; - viewModel.machine = "Virtual Firealarm"; + viewModel.machine = "Digital Display"; viewModel.vendor = device.properties.VENDOR; } device.viewModel = viewModel;