diff --git a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl/pom.xml b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl/pom.xml index 88ac69a666..5ef39018fd 100644 --- a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl/pom.xml +++ b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl/pom.xml @@ -215,6 +215,12 @@ commons-codec + + org.wso2.carbon.devicemgt + org.wso2.carbon.apimgt.annotations + provided + + org.igniterealtime.smack.wso2 smack @@ -248,4 +254,4 @@ - \ No newline at end of file + diff --git a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/VirtualFireAlarmService.java b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/VirtualFireAlarmService.java index a0f41b1164..c45b5d52bd 100644 --- a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/VirtualFireAlarmService.java +++ b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/VirtualFireAlarmService.java @@ -21,6 +21,8 @@ package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service; import org.apache.commons.io.FileUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.apimgt.annotations.api.API; +import org.wso2.carbon.apimgt.annotations.device.feature.Feature; import org.wso2.carbon.certificate.mgt.core.dto.SCEPResponse; import org.wso2.carbon.certificate.mgt.core.exception.KeystoreException; import org.wso2.carbon.certificate.mgt.core.service.CertificateManagementService; @@ -78,6 +80,7 @@ import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; @Path("/VirtualFireAlarmDeviceManager") +@API( name="virtual_firealarm", version="1.0.0", context="/virtual_firealarm") public class VirtualFireAlarmService { private static Log log = LogFactory.getLog(VirtualFireAlarmService.class); @@ -563,6 +566,8 @@ public class VirtualFireAlarmService { */ @Path("controller/bulb/{state}") @POST + @Feature( code="VIRTUALFIREALARM_BULBCONTROL", name="Control Bulb", + description="Switch on/off Virtual Fire Alarm Bulb") public void switchBulb(@HeaderParam("owner") String owner, @HeaderParam("deviceId") String deviceId, @HeaderParam("protocol") String protocol, @@ -644,6 +649,8 @@ public class VirtualFireAlarmService { */ @Path("controller/readsonar") @GET + @Feature( code="VIRTUALFIREALARM_READSONAR", name="Read Sonar", + description="Read Sonar Readings from Virtual Fire Alarm") public String requestSonarReading(@HeaderParam("owner") String owner, @HeaderParam("deviceId") String deviceId, @HeaderParam("protocol") String protocol, @@ -727,6 +734,8 @@ public class VirtualFireAlarmService { @GET @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) + @Feature( code="VIRTUALFIREALARM_REQTEMP", name="Request Tempreature", + description="Request Tempreature reading from Virtual Fire Alarm") public SensorRecord requestTemperature(@HeaderParam("owner") String owner, @HeaderParam("deviceId") String deviceId, @HeaderParam("protocol") String protocol, diff --git a/pom.xml b/pom.xml index f3dbe262a3..83918ea7c2 100644 --- a/pom.xml +++ b/pom.xml @@ -281,6 +281,11 @@ org.wso2.carbon.device.mgt.group.core ${carbon.device.mgt.version} + + org.wso2.carbon.devicemgt + org.wso2.carbon.apimgt.annotations + ${carbon.device.mgt.version} + org.wso2.carbon.devicemgt org.wso2.carbon.device.mgt.group.common