diff --git a/components/device-mgt-iot-raspberrypi/org.wso2.carbon.device.mgt.iot.raspberrypi.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/controller/service/impl/transport/RaspberryPiMQTTConnector.java b/components/device-mgt-iot-raspberrypi/org.wso2.carbon.device.mgt.iot.raspberrypi.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/controller/service/impl/transport/RaspberryPiMQTTConnector.java index be2da09251..e9ba3d5039 100644 --- a/components/device-mgt-iot-raspberrypi/org.wso2.carbon.device.mgt.iot.raspberrypi.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/controller/service/impl/transport/RaspberryPiMQTTConnector.java +++ b/components/device-mgt-iot-raspberrypi/org.wso2.carbon.device.mgt.iot.raspberrypi.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/controller/service/impl/transport/RaspberryPiMQTTConnector.java @@ -160,7 +160,7 @@ public class RaspberryPiMQTTConnector extends MQTTTransportHandler { public void processIncomingMessage(MqttMessage message) throws TransportHandlerException { } - + @Override public void publishDeviceData() throws TransportHandlerException { diff --git a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java index f5dd270230..f415ef9e00 100644 --- a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java +++ b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/core/AgentConstants.java @@ -29,7 +29,7 @@ public class AgentConstants { public static final String DEVICE_CONTROLLER_API_EP = "/virtual_firealarm/controller"; public static final String DEVICE_ENROLLMENT_API_EP = "/scep"; public static final String DEVICE_REGISTER_API_EP = "/register"; - public static final String DEVICE_PUSH_TEMPERATURE_API_EP = "/push_temperature"; + public static final String DEVICE_PUSH_TEMPERATURE_API_EP = "/temperature"; public static final String PUSH_DATA_PAYLOAD = "{\"owner\":\"%s\",\"deviceId\":\"%s\",\"reply\":\"%s\",\"value\":\"%s\"}"; diff --git a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.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.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/VirtualFireAlarmControllerService.java similarity index 95% rename from components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/VirtualFireAlarmService.java rename to components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/VirtualFireAlarmControllerService.java index bd17b86986..6c989a73e4 100644 --- a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.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.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/VirtualFireAlarmControllerService.java @@ -16,7 +16,7 @@ * under the License. */ -package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service; +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -36,14 +36,14 @@ import org.wso2.carbon.device.mgt.iot.sensormgt.SensorDataManager; import org.wso2.carbon.device.mgt.iot.sensormgt.SensorRecord; import org.wso2.carbon.device.mgt.iot.transport.TransportHandlerException; import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.constants.VirtualFireAlarmConstants; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.dto.DeviceJSON; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.exception.VirtualFireAlarmException; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.transport.VirtualFireAlarmMQTTConnector; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.transport.VirtualFireAlarmXMPPConnector; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.util.SecurityManager; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.util.VirtualFireAlarmServiceUtils; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.util.scep.ContentType; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.util.scep.SCEPOperation; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.dto.DeviceJSON; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.exception.VirtualFireAlarmException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.transport.VirtualFireAlarmMQTTConnector; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.transport.VirtualFireAlarmXMPPConnector; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.util.SecurityManager; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.util.VirtualFireAlarmServiceUtils; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.util.scep.ContentType; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.util.scep.SCEPOperation; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -73,8 +73,8 @@ import java.util.concurrent.ConcurrentHashMap; @API(name = "virtual_firealarm", version = "1.0.0", context = "/virtual_firealarm") @DeviceType(value = "virtual_firealarm") @SuppressWarnings("Non-Annoted WebService") -public class VirtualFireAlarmService { - private static Log log = LogFactory.getLog(VirtualFireAlarmService.class); +public class VirtualFireAlarmControllerService { + private static Log log = LogFactory.getLog(VirtualFireAlarmControllerService.class); //TODO; replace this tenant domain private static final String SUPER_TENANT = "carbon.super"; @@ -238,8 +238,8 @@ public class VirtualFireAlarmService { * @param response the HTTP servlet response object received by default as part of the HTTP call to this API. */ @POST - @Path("controller/buzzer") - @Feature(code = "buzzer", name = "Buzzer On / Off", type = "operation", + @Path("controller/buzz") + @Feature(code = "buzz", name = "Buzzer On / Off", type = "operation", description = "Switch on/off Virtual Fire Alarm Buzzer. (On / Off)") public void switchBulb(@HeaderParam("owner") String owner, @HeaderParam("deviceId") String deviceId, @@ -326,10 +326,10 @@ public class VirtualFireAlarmService { * whose humidity reading was requested. */ @GET - @Path("controller/readhumidity") + @Path("controller/humidity") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) - @Feature(code = "readhumidity", name = "Humidity", type = "monitor", + @Feature(code = "humidity", name = "Humidity", type = "monitor", description = "Read Humidity Readings from Virtual Fire Alarm") public SensorRecord requestHumidity(@HeaderParam("owner") String owner, @HeaderParam("deviceId") String deviceId, @@ -407,10 +407,10 @@ public class VirtualFireAlarmService { * whose temperature reading was requested. */ @GET - @Path("controller/readtemperature") + @Path("controller/temperature") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) - @Feature(code = "readtemperature", name = "Temperature", type = "monitor", + @Feature(code = "temperature", name = "Temperature", type = "monitor", description = "Request Temperature reading from Virtual Fire Alarm") public SensorRecord requestTemperature(@HeaderParam("owner") String owner, @HeaderParam("deviceId") String deviceId, @@ -486,7 +486,7 @@ public class VirtualFireAlarmService { * @param response the HTTP servlet response object received by default as part of the HTTP call to this API. */ @POST - @Path("controller/push_temperature") + @Path("controller/temperature") @Consumes(MediaType.APPLICATION_JSON) public void pushTemperatureData(final DeviceJSON dataMsg, @Context HttpServletResponse response) { String deviceId = dataMsg.deviceId; diff --git a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/dto/DeviceJSON.java b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/dto/DeviceJSON.java similarity index 93% rename from components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/dto/DeviceJSON.java rename to components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/dto/DeviceJSON.java index 3d86d79bb1..4bb1acb73c 100644 --- a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/dto/DeviceJSON.java +++ b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/dto/DeviceJSON.java @@ -16,7 +16,7 @@ * under the License. */ -package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.dto; +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.dto; import org.codehaus.jackson.annotate.JsonIgnoreProperties; diff --git a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/exception/VirtualFireAlarmException.java b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/exception/VirtualFireAlarmException.java similarity index 91% rename from components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/exception/VirtualFireAlarmException.java rename to components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/exception/VirtualFireAlarmException.java index 9f9ca0253f..4dd6faacb8 100644 --- a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/exception/VirtualFireAlarmException.java +++ b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/exception/VirtualFireAlarmException.java @@ -16,7 +16,7 @@ * under the License. */ -package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.exception; +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.exception; public class VirtualFireAlarmException extends Exception { private static final long serialVersionUID = 118512086957330189L; diff --git a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/transport/VirtualFireAlarmMQTTConnector.java b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/transport/VirtualFireAlarmMQTTConnector.java similarity index 96% rename from components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/transport/VirtualFireAlarmMQTTConnector.java rename to components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/transport/VirtualFireAlarmMQTTConnector.java index 620ca3c757..8782317909 100644 --- a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/transport/VirtualFireAlarmMQTTConnector.java +++ b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/transport/VirtualFireAlarmMQTTConnector.java @@ -16,7 +16,7 @@ * under the License. */ -package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.transport; +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.transport; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -28,9 +28,9 @@ import org.wso2.carbon.device.mgt.iot.sensormgt.SensorDataManager; import org.wso2.carbon.device.mgt.iot.transport.TransportHandlerException; import org.wso2.carbon.device.mgt.iot.transport.mqtt.MQTTTransportHandler; import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.constants.VirtualFireAlarmConstants; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.exception.VirtualFireAlarmException; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.util.SecurityManager; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.util.VirtualFireAlarmServiceUtils; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.exception.VirtualFireAlarmException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.util.SecurityManager; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.util.VirtualFireAlarmServiceUtils; import java.io.File; import java.nio.charset.StandardCharsets; diff --git a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/transport/VirtualFireAlarmXMPPConnector.java b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/transport/VirtualFireAlarmXMPPConnector.java similarity index 96% rename from components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/transport/VirtualFireAlarmXMPPConnector.java rename to components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/transport/VirtualFireAlarmXMPPConnector.java index 8957c3d9e9..f93f9e1b01 100644 --- a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/transport/VirtualFireAlarmXMPPConnector.java +++ b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/transport/VirtualFireAlarmXMPPConnector.java @@ -16,7 +16,7 @@ * under the License. */ -package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.transport; +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.transport; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -30,9 +30,9 @@ import org.wso2.carbon.device.mgt.iot.sensormgt.SensorDataManager; import org.wso2.carbon.device.mgt.iot.transport.TransportHandlerException; import org.wso2.carbon.device.mgt.iot.transport.xmpp.XMPPTransportHandler; import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.constants.VirtualFireAlarmConstants; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.exception.VirtualFireAlarmException; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.util.SecurityManager; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.util.VirtualFireAlarmServiceUtils; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.exception.VirtualFireAlarmException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.util.SecurityManager; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.util.VirtualFireAlarmServiceUtils; import java.io.File; import java.security.PrivateKey; diff --git a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/util/SecurityManager.java b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/util/SecurityManager.java similarity index 98% rename from components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/util/SecurityManager.java rename to components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/util/SecurityManager.java index 169e3eca57..5098e4eab3 100644 --- a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/util/SecurityManager.java +++ b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/util/SecurityManager.java @@ -16,14 +16,14 @@ * under the License. */ -package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.util; +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.util; import org.apache.commons.codec.binary.Base64; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.certificate.mgt.core.exception.KeystoreException; import org.wso2.carbon.certificate.mgt.core.util.ConfigurationUtil; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.exception.VirtualFireAlarmException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.exception.VirtualFireAlarmException; import javax.crypto.BadPaddingException; import javax.crypto.Cipher; diff --git a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/util/VirtualFireAlarmServiceUtils.java b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/util/VirtualFireAlarmServiceUtils.java similarity index 98% rename from components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/util/VirtualFireAlarmServiceUtils.java rename to components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/util/VirtualFireAlarmServiceUtils.java index 8ac34ec438..0997c7039f 100644 --- a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/util/VirtualFireAlarmServiceUtils.java +++ b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/util/VirtualFireAlarmServiceUtils.java @@ -16,7 +16,7 @@ * under the License. */ -package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.util; +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.util; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -33,7 +33,7 @@ import org.wso2.carbon.device.mgt.analytics.exception.DataPublisherConfiguration import org.wso2.carbon.device.mgt.analytics.service.DeviceAnalyticsService; import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.constants.VirtualFireAlarmConstants; -import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.exception.VirtualFireAlarmException; +import org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.exception.VirtualFireAlarmException; import javax.ws.rs.HttpMethod; import java.io.BufferedReader; diff --git a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/util/scep/ContentType.java b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/util/scep/ContentType.java similarity index 91% rename from components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/util/scep/ContentType.java rename to components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/util/scep/ContentType.java index db84c48811..879309c122 100644 --- a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/util/scep/ContentType.java +++ b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/util/scep/ContentType.java @@ -16,7 +16,7 @@ * under the License. */ -package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.util.scep; +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.util.scep; public class ContentType { public static final String X_PKI_MESSAGE = "application/x-pki-message"; diff --git a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/util/scep/SCEPOperation.java b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/util/scep/SCEPOperation.java similarity index 91% rename from components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/util/scep/SCEPOperation.java rename to components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/util/scep/SCEPOperation.java index 5434816b75..f9f8f08980 100644 --- a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/util/scep/SCEPOperation.java +++ b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/controller/service/impl/util/scep/SCEPOperation.java @@ -16,7 +16,7 @@ * under the License. */ -package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.util.scep; +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.util.scep; public enum SCEPOperation { GET_CA_CERT("GetCACert"), diff --git a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/webapp/META-INF/resources.xml b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/webapp/META-INF/resources.xml deleted file mode 100644 index fecdf716a4..0000000000 --- a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/webapp/META-INF/resources.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - Any - PUT - http://localhost:9763/virtual_firealarm/manager/device/register - /manager/device/register/* - - - Any - DELETE - http://localhost:9763/virtual_firealarm/manager/device/remove - /manager/device/remove/* - - - Any - POST - http://localhost:9763/virtual_firealarm/manager/device/update - /manager/device/update/* - - - Any - GET - http://localhost:9763/virtual_firealarm/manager/device - /manager/device/* - - - Any - GET - http://localhost:9763/virtual_firealarm/manager/devices - /manager/devices/* - - - Any - GET - http://localhost:9763/virtual_firealarm/manager/device/{sketch_type}/download - /manager/device/{sketch_type}/download - - - Any - GET - http://localhost:9763/virtual_firealarm/manager/device/{sketch_type}/generate_link - /manager/device/{sketch_type}/generate_link - - - - Any - POST - http://localhost:9763/virtual_firealarm/controller/register/{owner}/{deviceId}/{ip}/{port} - /controller/register/{owner}/{deviceId}/{ip}/{port} - - - Any - POST - http://localhost:9763/virtual_firealarm/controller/controller/bulb/{state} - /controller/bulb/{state} - - - Any - GET - http://localhost:9763/virtual_firealarm/controller/controller/readhumidity - /controller/readhumidity - - - Any - GET - http://localhost:9763/virtual_firealarm/controller/controller/readtemperature - /controller/readtemperature - - - Any - POST - http://localhost:9763/virtual_firealarm/controller/controller/push_temperature - /controller/push_temperature - - \ No newline at end of file diff --git a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/webapp/WEB-INF/cxf-servlet.xml b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/webapp/WEB-INF/cxf-servlet.xml index 7a3021647e..fdb49fd8a9 100644 --- a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/webapp/WEB-INF/cxf-servlet.xml +++ b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl/src/main/webapp/WEB-INF/cxf-servlet.xml @@ -24,10 +24,10 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd"> - + - + @@ -39,13 +39,13 @@ + class="org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.util.SecurityManager"> + class="org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.transport.VirtualFireAlarmMQTTConnector"> + class="org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl.transport.VirtualFireAlarmXMPPConnector"> diff --git a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.mgt.service.impl/pom.xml b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.manager.service.impl/pom.xml similarity index 98% rename from components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.mgt.service.impl/pom.xml rename to components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.manager.service.impl/pom.xml index e0d84b85d3..ac6dce5cf8 100644 --- a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.mgt.service.impl/pom.xml +++ b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.manager.service.impl/pom.xml @@ -28,7 +28,7 @@ 4.0.0 - org.wso2.carbon.device.mgt.iot.virtualfirealarm.mgt.service.impl + org.wso2.carbon.device.mgt.iot.virtualfirealarm.manager.service.impl 1.9.2-SNAPSHOT war WSO2 Carbon - IoT Server VirtualFireAlarm API diff --git a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.mgt.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.manager.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/manager/service/impl/VirtualFireAlarmManagerService.java similarity index 98% rename from components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.mgt.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/VirtualFireAlarmService.java rename to components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.manager.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/manager/service/impl/VirtualFireAlarmManagerService.java index 8942857a35..45debcd89d 100644 --- a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.mgt.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.manager.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/manager/service/impl/VirtualFireAlarmManagerService.java @@ -16,7 +16,7 @@ * under the License. */ -package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service; +package org.wso2.carbon.device.mgt.iot.virtualfirealarm.manager.service.impl; import org.apache.commons.io.FileUtils; import org.apache.commons.logging.Log; @@ -61,11 +61,11 @@ import java.util.List; import java.util.UUID; @API(name = "virtual_firealarm", version = "1.0.0", context = "/virtual_firealarm") -public class VirtualFireAlarmService { +public class VirtualFireAlarmManagerService { //TODO; replace this tenant domain private static final String SUPER_TENANT = "carbon.super"; - private static Log log = LogFactory.getLog(VirtualFireAlarmService.class); + private static Log log = LogFactory.getLog(VirtualFireAlarmManagerService.class); @Context //injected response proxy supporting multiple thread private HttpServletResponse response; @@ -395,5 +395,4 @@ public class VirtualFireAlarmService { zipFile.setDeviceId(deviceId); return zipFile; } - } diff --git a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.mgt.service.impl/src/main/webapp/META-INF/webapp-classloading.xml b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.manager.service.impl/src/main/webapp/META-INF/webapp-classloading.xml similarity index 100% rename from components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.mgt.service.impl/src/main/webapp/META-INF/webapp-classloading.xml rename to components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.manager.service.impl/src/main/webapp/META-INF/webapp-classloading.xml diff --git a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.mgt.service.impl/src/main/webapp/WEB-INF/cxf-servlet.xml b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.manager.service.impl/src/main/webapp/WEB-INF/cxf-servlet.xml similarity index 85% rename from components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.mgt.service.impl/src/main/webapp/WEB-INF/cxf-servlet.xml rename to components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.manager.service.impl/src/main/webapp/WEB-INF/cxf-servlet.xml index e93c885e1f..532cd8e978 100644 --- a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.mgt.service.impl/src/main/webapp/WEB-INF/cxf-servlet.xml +++ b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.manager.service.impl/src/main/webapp/WEB-INF/cxf-servlet.xml @@ -24,10 +24,10 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd"> - + - + diff --git a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.mgt.service.impl/src/main/webapp/WEB-INF/web.xml b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.manager.service.impl/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.mgt.service.impl/src/main/webapp/WEB-INF/web.xml rename to components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.manager.service.impl/src/main/webapp/WEB-INF/web.xml diff --git a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.mgt.service.impl/src/main/webapp/META-INF/resources.xml b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.mgt.service.impl/src/main/webapp/META-INF/resources.xml deleted file mode 100644 index fecdf716a4..0000000000 --- a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.mgt.service.impl/src/main/webapp/META-INF/resources.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - Any - PUT - http://localhost:9763/virtual_firealarm/manager/device/register - /manager/device/register/* - - - Any - DELETE - http://localhost:9763/virtual_firealarm/manager/device/remove - /manager/device/remove/* - - - Any - POST - http://localhost:9763/virtual_firealarm/manager/device/update - /manager/device/update/* - - - Any - GET - http://localhost:9763/virtual_firealarm/manager/device - /manager/device/* - - - Any - GET - http://localhost:9763/virtual_firealarm/manager/devices - /manager/devices/* - - - Any - GET - http://localhost:9763/virtual_firealarm/manager/device/{sketch_type}/download - /manager/device/{sketch_type}/download - - - Any - GET - http://localhost:9763/virtual_firealarm/manager/device/{sketch_type}/generate_link - /manager/device/{sketch_type}/generate_link - - - - Any - POST - http://localhost:9763/virtual_firealarm/controller/register/{owner}/{deviceId}/{ip}/{port} - /controller/register/{owner}/{deviceId}/{ip}/{port} - - - Any - POST - http://localhost:9763/virtual_firealarm/controller/controller/bulb/{state} - /controller/bulb/{state} - - - Any - GET - http://localhost:9763/virtual_firealarm/controller/controller/readhumidity - /controller/readhumidity - - - Any - GET - http://localhost:9763/virtual_firealarm/controller/controller/readtemperature - /controller/readtemperature - - - Any - POST - http://localhost:9763/virtual_firealarm/controller/controller/push_temperature - /controller/push_temperature - - \ No newline at end of file diff --git a/components/device-mgt-iot-virtualfirealarm/pom.xml b/components/device-mgt-iot-virtualfirealarm/pom.xml index 090e580ff6..ce31ede52b 100644 --- a/components/device-mgt-iot-virtualfirealarm/pom.xml +++ b/components/device-mgt-iot-virtualfirealarm/pom.xml @@ -38,7 +38,7 @@ org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin.impl org.wso2.carbon.device.mgt.iot.virtualfirealarm.controller.service.impl - org.wso2.carbon.device.mgt.iot.virtualfirealarm.mgt.service.impl + org.wso2.carbon.device.mgt.iot.virtualfirealarm.manager.service.impl org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.advanced.impl diff --git a/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/pom.xml b/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/pom.xml index 4e36ca3363..0563afee0c 100644 --- a/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/pom.xml +++ b/features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/pom.xml @@ -44,7 +44,7 @@ org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.virtualfirealarm.mgt.service.impl + org.wso2.carbon.device.mgt.iot.virtualfirealarm.manager.service.impl 1.9.2-SNAPSHOT war @@ -110,7 +110,7 @@ org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.virtualfirealarm.mgt.service.impl + org.wso2.carbon.device.mgt.iot.virtualfirealarm.manager.service.impl war true diff --git a/pom.xml b/pom.xml index fe97a1f3c7..a3f9ec752e 100644 --- a/pom.xml +++ b/pom.xml @@ -492,7 +492,7 @@ org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.virtualfirealarm.mgt.service.impl + org.wso2.carbon.device.mgt.iot.virtualfirealarm.manager.service.impl ${carbon.iot.device.mgt.version} war