changed package from dao to dot

application-manager-new
Shabirmean 9 years ago
parent 4ae7f221c5
commit 5bf09ef1ed

@ -44,9 +44,9 @@ import org.wso2.carbon.device.mgt.iot.common.exception.DeviceControllerException
import org.wso2.carbon.device.mgt.iot.common.util.ZipArchive; import org.wso2.carbon.device.mgt.iot.common.util.ZipArchive;
import org.wso2.carbon.device.mgt.iot.common.util.ZipUtil; import org.wso2.carbon.device.mgt.iot.common.util.ZipUtil;
import org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.plugin.constants.VirtualFireAlarmConstants; import org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.plugin.constants.VirtualFireAlarmConstants;
import org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl.dao.TemperatureRecord; import org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl.dto.TemperatureRecord;
import org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl.util.DataHolder; import org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl.util.DataHolder;
import org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl.dao.DeviceJSON; import org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl.dto.DeviceJSON;
import org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl.util.VirtualFireAlarmMQTTSubscriber; import org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl.util.VirtualFireAlarmMQTTSubscriber;
import org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl.util.VirtualFireAlarmXMPPConnector; import org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl.util.VirtualFireAlarmXMPPConnector;

@ -1,4 +1,4 @@
package org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl.dao; package org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl.dto;
import org.codehaus.jackson.annotate.JsonIgnoreProperties; import org.codehaus.jackson.annotate.JsonIgnoreProperties;

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl.dao; package org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl.dto;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlRootElement;

@ -16,7 +16,7 @@
package org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl.util; package org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl.util;
import org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl.dao.TemperatureRecord; import org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl.dto.TemperatureRecord;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;

@ -13,6 +13,8 @@ import org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.plugin.constants
.VirtualFireAlarmConstants; .VirtualFireAlarmConstants;
import org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl.VirtualFireAlarmService; import org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl.VirtualFireAlarmService;
import java.util.Calendar;
public class VirtualFireAlarmXMPPConnector extends XmppConnector { public class VirtualFireAlarmXMPPConnector extends XmppConnector {
private static Log log = LogFactory.getLog(VirtualFireAlarmXMPPConnector.class); private static Log log = LogFactory.getLog(VirtualFireAlarmXMPPConnector.class);
@ -71,6 +73,8 @@ public class VirtualFireAlarmXMPPConnector extends XmppConnector {
} }
} else if(subject.equals("CONTROL-REPLY")) { } else if(subject.equals("CONTROL-REPLY")) {
log.info("XMPP: Reply Message [" + message + "] from [" + from + "]"); log.info("XMPP: Reply Message [" + message + "] from [" + from + "]");
float temperature = Float.parseFloat(message.split(":")[1]);
DataHolder.getThisInstance().setTemperature(deviceId, temperature, Calendar.getInstance().getTimeInMillis());
} else { } else {
log.info("SOME XMPP Message [" + message + "] from " + from + "]"); log.info("SOME XMPP Message [" + message + "] from " + from + "]");
} }

Loading…
Cancel
Save