From e69ede507d139ef81ca01b6373f21609becae57f Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Tue, 27 Jun 2017 13:04:58 +0530 Subject: [PATCH] adding POLICY_REVOKE constant --- .../service/impl/VirtualFireAlarmServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java index f04922d58..69cee6588 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java @@ -34,6 +34,7 @@ import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroupConstants; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; import org.wso2.carbon.device.mgt.core.operation.mgt.CommandOperation; +import org.wso2.carbon.device.mgt.core.operation.mgt.ConfigOperation; import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.constants.VirtualFireAlarmConstants; import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.dto.SensorRecord; import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.util.APIUtil; @@ -96,9 +97,8 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { String publishTopic = APIUtil.getTenantDomainOftheUser() + "/" + VirtualFireAlarmConstants.DEVICE_TYPE + "/" + deviceId; - Operation commandOp = new CommandOperation(); + ConfigOperation commandOp = new ConfigOperation(); commandOp.setCode("buzz"); - commandOp.setType(Operation.Type.COMMAND); commandOp.setEnabled(true); commandOp.setPayLoad(actualMessage);