From fb56dca446e71f63767d44d5dfcfe666e28f138b Mon Sep 17 00:00:00 2001 From: GPrathap Date: Thu, 17 Dec 2015 14:00:20 +0530 Subject: [PATCH 1/3] updated --- .../service/DroneRealTimeService.java | 7 ++++-- .../impl/DroneAnalyzerDeviceDAOImplTest.java | 25 ------------------- pom.xml | 4 +-- 3 files changed, 7 insertions(+), 29 deletions(-) delete mode 100644 components/device-mgt-iot-droneanalyzer/org.wso2.carbon.device.mgt.iot.droneanalyzer/src/test/java/org/wso2/carbon/device/mgt/iot/droneanalyzer/plugin/impl/dao/impl/DroneAnalyzerDeviceDAOImplTest.java diff --git a/components/device-mgt-iot-droneanalyzer/org.wso2.carbon.device.mgt.iot.droneanalyzer.api/src/main/java/org/wso2/carbon/device/mgt/iot/droneanalyzer/service/DroneRealTimeService.java b/components/device-mgt-iot-droneanalyzer/org.wso2.carbon.device.mgt.iot.droneanalyzer.api/src/main/java/org/wso2/carbon/device/mgt/iot/droneanalyzer/service/DroneRealTimeService.java index 5ae5cdc126..c70649511d 100644 --- a/components/device-mgt-iot-droneanalyzer/org.wso2.carbon.device.mgt.iot.droneanalyzer.api/src/main/java/org/wso2/carbon/device/mgt/iot/droneanalyzer/service/DroneRealTimeService.java +++ b/components/device-mgt-iot-droneanalyzer/org.wso2.carbon.device.mgt.iot.droneanalyzer.api/src/main/java/org/wso2/carbon/device/mgt/iot/droneanalyzer/service/DroneRealTimeService.java @@ -21,13 +21,11 @@ package org.wso2.carbon.device.mgt.iot.droneanalyzer.service; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.device.mgt.iot.droneanalyzer.plugin.constants.DroneConstants; import org.wso2.carbon.device.mgt.iot.droneanalyzer.service.transport.DroneAnalyzerXMPPConnector; -import org.wso2.carbon.device.mgt.iot.droneanalyzer.service.transport.DroneXMPPConnector; import org.wso2.carbon.device.mgt.iot.droneanalyzer.service.trasformer.MessageTransformer; import javax.websocket.*; import javax.websocket.server.ServerEndpoint; import java.io.IOException; -import java.nio.channels.ClosedChannelException; @ServerEndpoint("/datastream/drone_status") public class DroneRealTimeService { @@ -42,6 +40,11 @@ public class DroneRealTimeService { xmppConnector.connectLoginAndSetFilterOnReceiver(); } + + /** + * + * @param session + */ @OnOpen public void onOpen(Session session){ log.info(session.getId() + " has opened a connection"); diff --git a/components/device-mgt-iot-droneanalyzer/org.wso2.carbon.device.mgt.iot.droneanalyzer/src/test/java/org/wso2/carbon/device/mgt/iot/droneanalyzer/plugin/impl/dao/impl/DroneAnalyzerDeviceDAOImplTest.java b/components/device-mgt-iot-droneanalyzer/org.wso2.carbon.device.mgt.iot.droneanalyzer/src/test/java/org/wso2/carbon/device/mgt/iot/droneanalyzer/plugin/impl/dao/impl/DroneAnalyzerDeviceDAOImplTest.java deleted file mode 100644 index 32b36fe49b..0000000000 --- a/components/device-mgt-iot-droneanalyzer/org.wso2.carbon.device.mgt.iot.droneanalyzer/src/test/java/org/wso2/carbon/device/mgt/iot/droneanalyzer/plugin/impl/dao/impl/DroneAnalyzerDeviceDAOImplTest.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.wso2.carbon.device.mgt.iot.droneanalyzer.plugin.impl.dao.impl; - -import org.junit.Before; -import org.junit.Test; -import org.wso2.carbon.device.mgt.iot.util.iotdevice.dao.IotDeviceManagementDAOException; - -/** - * Created by geesara on 12/9/15. - */ -public class DroneAnalyzerDeviceDAOImplTest { - DroneAnalyzerDeviceDAOImpl dao; - @Before - public void init(){ - dao = new DroneAnalyzerDeviceDAOImpl(); - } - - //@Test - public void testDBConnenction(){ - try { - dao.deleteIotDevice("device1"); - } catch (IotDeviceManagementDAOException e) { - e.printStackTrace(); - } - } -} diff --git a/pom.xml b/pom.xml index a4cbec451a..e57d2e7dad 100644 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,7 @@ components/device-mgt-iot-digitaldisplay components/device-mgt-iot-droneanalyzer - + components/device-mgt-iot-raspberrypi components/device-mgt-iot-virtualfirealarm @@ -67,7 +67,7 @@ features/device-mgt-iot-digitaldisplay-feature features/device-mgt-iot-droneanalyzer-feature - + features/device-mgt-iot-raspberrypi-feature features/device-mgt-iot-virtualfirealarm-feature From 386c04497f5c62994e9f575561547e31f2cdd357 Mon Sep 17 00:00:00 2001 From: GPrathap Date: Thu, 17 Dec 2015 14:36:46 +0530 Subject: [PATCH 2/3] changed class name --- ...pberrypiMQTTSubscriber.java => RaspberryPiMQTTSubscriber.java} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename components/device-mgt-iot-raspberrypi/org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/transport/{RaspberrypiMQTTSubscriber.java => RaspberryPiMQTTSubscriber.java} (100%) diff --git a/components/device-mgt-iot-raspberrypi/org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/transport/RaspberrypiMQTTSubscriber.java b/components/device-mgt-iot-raspberrypi/org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/transport/RaspberryPiMQTTSubscriber.java similarity index 100% rename from components/device-mgt-iot-raspberrypi/org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/transport/RaspberrypiMQTTSubscriber.java rename to components/device-mgt-iot-raspberrypi/org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/transport/RaspberryPiMQTTSubscriber.java From 0362e66908ae3e601a919baa87f01b4bef8ec627 Mon Sep 17 00:00:00 2001 From: GPrathap Date: Thu, 17 Dec 2015 14:39:55 +0530 Subject: [PATCH 3/3] changed class name --- .../raspberrypi/service/exception/RaspberrypiException.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/device-mgt-iot-raspberrypi/org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/exception/RaspberrypiException.java b/components/device-mgt-iot-raspberrypi/org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/exception/RaspberrypiException.java index d3fd75860b..21063ee9dc 100644 --- a/components/device-mgt-iot-raspberrypi/org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/exception/RaspberrypiException.java +++ b/components/device-mgt-iot-raspberrypi/org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/exception/RaspberrypiException.java @@ -18,14 +18,14 @@ package org.wso2.carbon.device.mgt.iot.raspberrypi.service.exception; -public class RaspberryPiException extends Exception { +public class RaspberrypiException extends Exception { private static final long serialVersionUID = 118512086957330189L; - public RaspberryPiException(String errorMessage) { + public RaspberrypiException(String errorMessage) { super(errorMessage); } - public RaspberryPiException(String errorMessage, Throwable throwable) { + public RaspberrypiException(String errorMessage, Throwable throwable) { super(errorMessage, throwable); } }