diff --git a/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.plugin/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/plugin/constants/AndroidSenseConstants.java b/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.plugin/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/plugin/constants/AndroidSenseConstants.java index 9666dcc826..0ed7a9dd7b 100644 --- a/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.plugin/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/plugin/constants/AndroidSenseConstants.java +++ b/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.plugin/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/plugin/constants/AndroidSenseConstants.java @@ -21,7 +21,6 @@ public class AndroidSenseConstants { public final static String DEVICE_TYPE = "android_sense"; public final static String DEVICE_PLUGIN_DEVICE_NAME = "DEVICE_NAME"; public final static String DEVICE_PLUGIN_DEVICE_ID = "ANDROID_DEVICE_ID"; - public final static String DEVICE_TYPE_PROVIDER_DOMAIN = "carbon.super"; //Android Sense Stream definitions. public static final String ACCELEROMETER_STREAM_DEFINITION = "org.wso2.iot.devices.accelerometer"; public static final String BATTERY_STREAM_DEFINITION = "org.wso2.iot.devices.battery"; diff --git a/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.service.impl/src/main/webapp/META-INF/permissions.xml b/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.service.impl/src/main/webapp/META-INF/permissions.xml index d099e50e56..780d13f662 100644 --- a/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.service.impl/src/main/webapp/META-INF/permissions.xml +++ b/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.service.impl/src/main/webapp/META-INF/permissions.xml @@ -28,153 +28,153 @@ - + + add sensor information - /login + /device-mgt/user/device/sensors /device/sensors POST - + android_sense_device Get light information - /login + /device-mgt/user/device/sensors/light /device/*/sensors/light GET - + android_sense_user Get battery information - /login + /device-mgt/user/device/sensors/battery /device/*/sensors/battery GET - + android_sense_user Get gps information - /login + /device-mgt/user/device/sensors/gps /device/*/sensors/gps GET - + android_sense_user Get magnetic information - /login + /device-mgt/user/device/sensors/magnetic /device/*/sensors/magnetic GET - + android_sense_user Get accelerometer information - /login + /device-mgt/user/device/accelerometer /device/*/sensors/accelerometer GET - + android_sense_user Get rotation information - /login + /device-mgt/user/device/sensors/rotation /device/*/sensors/rotation GET - + android_sense_user Get proximity information - /login + /device-mgt/user/device/sensors/proximity /device/*/sensors/proximity GET - + android_sense_user Get gyroscope information - /login + /device-mgt/user/device/gyroscope /device/*/sensors/gyroscope GET - + android_sense_user Get pressure information - /login + /device-mgt/user/device/sensors/pressure /device/*/sensors/pressure GET - + android_sense_user Get gravity information - /login + /device-mgt/user/device/sensors/gravity /device/*/sensors/gravity GET - + android_sense_user Get words information - /login + /device-mgt/user/device/sensors/words /device/*/sensors/words GET - + android_sense_user Get words information - /login + /device-mgt/user/device/sensors/word /device/*/sensors/words POST - + android_sense_user set word threshold information - /login + /device-mgt/user/device/sensors/words/threshold /device/*/sensors/words/threshold POST - + android_sense_user delete words - /login + /device-mgt/user/device/sensors/words /device/*/sensors/words DELETE - + android_sense_user get device stats - /login + /device-mgt/user/device/stats /stats/device/*/sensors/* GET - + android_sense_device - Get device /device-mgt/user/devices/list /devices/* GET - + android_sense_user Add device /device-mgt/user/devices/add /devices/register POST - + android_sense_user Remove device /device-mgt/user/devices/remove /devices/* DELETE - + android_sense_user Download device /device-mgt/user/devices/add /devices/*/download GET - + android_sense_user Update device /device-mgt/user/devices/update /devices/* POST - + android_sense_user diff --git a/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/ArduinoControllerService.java b/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/ArduinoControllerService.java index de47023574..02e39d88b4 100644 --- a/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/ArduinoControllerService.java +++ b/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/ArduinoControllerService.java @@ -39,7 +39,7 @@ import javax.ws.rs.core.Response; @DeviceType(value = "arduino") public interface ArduinoControllerService { - @Path("register/device/{deviceId}/{ip}/{port}") + @Path("device/register/{deviceId}/{ip}/{port}") @POST Response registerDeviceIP(@PathParam("deviceId") String deviceId, @PathParam("ip") String deviceIP, @PathParam("port") String devicePort, @Context HttpServletRequest request); @@ -58,16 +58,16 @@ public interface ArduinoControllerService { "from Arduino agent") Response requestTemperature(@PathParam("deviceId") String deviceId, @QueryParam("protocol") String protocol); - @Path("sensor") + @Path("device/sensor") @POST @Consumes(MediaType.APPLICATION_JSON) Response pushData(DeviceData dataMsg); - @Path("{deviceId}/controls") + @Path("device/{deviceId}/controls") @GET Response readControls(@PathParam("deviceId") String deviceId, @QueryParam("protocol") String protocol); - @Path("temperature") + @Path("device/temperature") @POST @Consumes(MediaType.APPLICATION_JSON) Response pushTemperatureData(final DeviceData dataMsg, @Context HttpServletRequest request); @@ -75,7 +75,7 @@ public interface ArduinoControllerService { /** * Retreive Sensor data for the device type */ - @Path("stats/device/{deviceId}/sensors/temperature") + @Path("device/stats/{deviceId}/sensors/temperature") @GET @Consumes("application/json") @Produces("application/json") diff --git a/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.service.impl/src/main/webapp/META-INF/permissions.xml b/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.service.impl/src/main/webapp/META-INF/permissions.xml index b202144cd3..25e832f36e 100644 --- a/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.service.impl/src/main/webapp/META-INF/permissions.xml +++ b/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.service.impl/src/main/webapp/META-INF/permissions.xml @@ -28,88 +28,83 @@ + Register Device - /login - /register/device/*/*/* + /device-mgt/user/device/register + /device/register/*/*/* POST - + arduino_device - get device bulb statjs - /login + control bulb + /device-mgt/user/device/bulb /device/*/bulb - GET - + POST + arduino_user get device temperature - /login + /device-mgt/user/device/temperature /device/*/temperature GET - + arduino_user - get device temperature - /login - /device/*/temperature - GET - - - - get device temperature - /login - /sensor + push data + /device-mgt/user/device/push-data + /device/sensor POST - + arduino_device get controls - /login + /device-mgt/user/device/controls /device/*/controls POST - + arduino_device push temperature - /login - /temperature + /device-mgt/user/device/temperature + /device/temperature POST - + arduino_device - get temperature - /login - /stats/device/*/sensors/temperature + get temperature stats + /device-mgt/user/device/ + /device/stats/*/sensors/temperature GET - + arduino_device Get device /device-mgt/user/devices/list /devices/* GET - + arduino_user Remove device /device-mgt/user/devices/remove /devices/* DELETE - + arduino_user Download device /device-mgt/user/devices/add /devices/download GET - + arduino_user Update device /device-mgt/user/devices/update /devices/* PUT - + arduino_user - \ No newline at end of file + + diff --git a/components/iot-plugins/digital-display-plugin/org.wso2.carbon.device.mgt.iot.digitaldisplay.service.impl/src/main/webapp/META-INF/permissions.xml b/components/iot-plugins/digital-display-plugin/org.wso2.carbon.device.mgt.iot.digitaldisplay.service.impl/src/main/webapp/META-INF/permissions.xml index 54f242bbae..654f4e6187 100644 --- a/components/iot-plugins/digital-display-plugin/org.wso2.carbon.device.mgt.iot.digitaldisplay.service.impl/src/main/webapp/META-INF/permissions.xml +++ b/components/iot-plugins/digital-display-plugin/org.wso2.carbon.device.mgt.iot.digitaldisplay.service.impl/src/main/webapp/META-INF/permissions.xml @@ -26,6 +26,7 @@ it will result 403 error at the runtime. --> + @@ -33,105 +34,105 @@ /device-mgt/user/devices/list /devices/* GET - + digital_display_user Remove device /device-mgt/user/devices/remove /devices/* DELETE - + digital_display_user Download device /device-mgt/user/devices/add /devices/*/download GET - + digital_display_user Update device /device-mgt/user/devices/update /devices/* POST - + digital_display_user - - + Restart Browser + /device-mgt/user/device /device/*/restart-browser POST - + digital_display_user - - + Terminate Display + /device-mgt/user/device/terminate-display /device/*/terminate-display POST - + digital_display_user - - + Restart Display + /device-mgt/user/device/restart-display /device/*/restart-display POST - + digital_display_user - - + Edit Sequence + /device-mgt/user/device/edit-sequence /device/*/edit-sequence POST - + digital_display_user - - + Upload Content + /device-mgt/user/device/upload-content /device/*/upload-content POST - + digital_display_user - - + Add Resource + /device-mgt/user/device/add-resource /device/*/add-resource POST - + digital_display_user - - + Remove Resource + /device-mgt/user/device/remove-resource /device/*/remove-resource POST - + digital_display_user - - + Restart Server + /device-mgt/user/device/restart-server /device/*/restart-server POST - + digital_display_user - - + Take Screenshot + /device-mgt/user/device/screenshot /device/*/screenshot POST - + digital_display_user - - + Get Device Stats + /device-mgt/user/device/get-device-status /device/*/get-device-status POST - + digital_display_user - - + Get Content List + /device-mgt/user/device/get-content-list /device/*/get-content-list POST - + digital_display_user diff --git a/components/iot-plugins/drone-analyzer-plugin/org.wso2.carbon.device.mgt.iot.droneanalyzer.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/droneanalyzer/service/impl/util/DroneAnalyzerServiceUtils.java b/components/iot-plugins/drone-analyzer-plugin/org.wso2.carbon.device.mgt.iot.droneanalyzer.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/droneanalyzer/service/impl/util/DroneAnalyzerServiceUtils.java index 4b01bd8d63..12f2d07161 100644 --- a/components/iot-plugins/drone-analyzer-plugin/org.wso2.carbon.device.mgt.iot.droneanalyzer.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/droneanalyzer/service/impl/util/DroneAnalyzerServiceUtils.java +++ b/components/iot-plugins/drone-analyzer-plugin/org.wso2.carbon.device.mgt.iot.droneanalyzer.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/droneanalyzer/service/impl/util/DroneAnalyzerServiceUtils.java @@ -30,7 +30,6 @@ import java.io.File; public class DroneAnalyzerServiceUtils { - private static final String SUPER_TENANT = "carbon.super"; private static org.apache.commons.logging.Log log = LogFactory.getLog(DroneAnalyzerServiceUtils.class); public static void sendCommandViaXMPP(String deviceOwner, String deviceId, String resource, diff --git a/components/iot-plugins/drone-analyzer-plugin/org.wso2.carbon.device.mgt.iot.droneanalyzer.service.impl/src/main/webapp/META-INF/permissions.xml b/components/iot-plugins/drone-analyzer-plugin/org.wso2.carbon.device.mgt.iot.droneanalyzer.service.impl/src/main/webapp/META-INF/permissions.xml index f25c321b80..65670d7ce0 100644 --- a/components/iot-plugins/drone-analyzer-plugin/org.wso2.carbon.device.mgt.iot.droneanalyzer.service.impl/src/main/webapp/META-INF/permissions.xml +++ b/components/iot-plugins/drone-analyzer-plugin/org.wso2.carbon.device.mgt.iot.droneanalyzer.service.impl/src/main/webapp/META-INF/permissions.xml @@ -26,6 +26,7 @@ it will result 403 error at the runtime. --> + @@ -33,55 +34,56 @@ /device-mgt/user/devices/list /devices/* GET - + drone_analyzer_user Remove device /device-mgt/user/devices/remove /devices/* DELETE - + drone_analyzer_user Download device /device-mgt/user/devices/add /devices/*/download GET - + drone_analyzer_user Update device /device-mgt/user/devices/update /devices/* POST - + drone_analyzer_user - - + Get Devices + /device-mgt/user/devices /devices GET - + drone_analyzer_user - - + Generate Link + /device-mgt/user/devices/generate_link /devices/*/generate_link GET - + drone_analyzer_user - - + Register Device + /device-mgt/user/device/register /device/register/*/*/* POST - + drone_analyzer_device - - + Send Command + /device-mgt/user/device/send_command /device/*/send_command POST - + drone_analyzer_user - \ No newline at end of file + + diff --git a/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/util/RaspberrypiServiceUtils.java b/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/util/RaspberrypiServiceUtils.java index e0c98e7b64..cb4d52c487 100644 --- a/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/util/RaspberrypiServiceUtils.java +++ b/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/util/RaspberrypiServiceUtils.java @@ -45,8 +45,6 @@ import java.util.concurrent.Future; public class RaspberrypiServiceUtils { private static final Log log = LogFactory.getLog(RaspberrypiServiceUtils.class); - //TODO; replace this tenant domain - private static final String SUPER_TENANT = "carbon.super"; private static final String TEMPERATURE_STREAM_DEFINITION = "org.wso2.iot.devices.temperature"; public static String sendCommandViaHTTP(final String deviceHTTPEndpoint, String urlContext, diff --git a/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl/src/main/webapp/META-INF/permissions.xml b/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl/src/main/webapp/META-INF/permissions.xml index 5128de1ed5..fbd9db29c2 100644 --- a/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl/src/main/webapp/META-INF/permissions.xml +++ b/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl/src/main/webapp/META-INF/permissions.xml @@ -26,83 +26,85 @@ it will result 403 error at the runtime. --> - + + Get device /device-mgt/user/devices/list /devices/* GET - + raspberrypi_user Remove device /device-mgt/user/devices/remove /devices/* DELETE - + raspberrypi_user Download device /device-mgt/user/devices/add /devices/*/download GET - + raspberrypi_user Update device /device-mgt/user/devices/update /devices/* POST - + raspberrypi_user - - + Get Devices + /device-mgt/user/devices /devices GET - + raspberrypi_user - - + Generate Link + /device-mgt/user/devices/generate_link /devices/*/generate_link GET - + raspberrypi_user - - + Register Device + /device-mgt/user/device/register /device/register/*/*/* POST - + raspberrypi_device - - + Control Bulb + /device-mgt/user/device/bulb /device/*/bulb POST - + raspberrypi_user - - + Read Temperature + /device-mgt/user/device/readtemperature /device/*/readtemperature GET - + raspberrypi_user - - + Push Temperature + /device-mgt/user/device/push_temperature /device/push_temperature POST - + raspberrypi_device - - + Get Temperature Data + /device-mgt/user/device/sensors/temperature /device/stats/*/sensors/temperature GET - + raspberrypi_user + \ No newline at end of file diff --git a/components/iot-plugins/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl/src/main/webapp/META-INF/permissions.xml b/components/iot-plugins/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl/src/main/webapp/META-INF/permissions.xml index 7ae82a8312..2221af5d66 100644 --- a/components/iot-plugins/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl/src/main/webapp/META-INF/permissions.xml +++ b/components/iot-plugins/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl/src/main/webapp/META-INF/permissions.xml @@ -33,90 +33,90 @@ /device-mgt/user/devices/list /devices/* GET - + virtual_firealarm_user Remove device /device-mgt/user/devices/remove /devices/* DELETE - + virtual_firealarm_user Download device /device-mgt/user/devices/add /devices/*/download GET - + virtual_firealarm_user Update device /device-mgt/user/devices/update /devices/* POST - + virtual_firealarm_user - - + Get Devices + /device-mgt/user/devices /devices GET - + virtual_firealarm_user - - + Generate Link + /device-mgt/user/devices/generate_link /devices/*/generate_link GET - + virtual_firealarm_user - - + Register Device + /device-mgt/user/device/register /device/register/*/*/* POST - + virtual_firealarm_device - - + Control Buzz + /device-mgt/user/device/buzz /device/*/buzz POST - + virtual_firealarm_user - - + Get Temperature + /device-mgt/user/device/temperature /device/*/temperature GET - + virtual_firealarm_user - - + Push Temperature + /device-mgt/user/device/temperature /device/temperature POST - + virtual_firealarm_device - - + Get SCEP + /device-mgt/user/device/scep /device/scep GET - + virtual_firealarm_user - - + Push SCEP + /device-mgt/user/device/scep /device/scep POST - + virtual_firealarm_device - - + Get Stats + /device-mgt/user/device/stats /device/stats/*/sensors/* GET - + virtual_firealarm_device \ No newline at end of file