diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/pom.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/pom.xml index 1cf3ce06ad..4a4a2f845c 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/pom.xml +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/pom.xml @@ -153,6 +153,10 @@ org.wso2.carbon.device.mgt.extensions provided + + org.wso2.carbon.devicemgt + org.wso2.carbon.apimgt.annotations + diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/service/impl/AndroidSenseService.java b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/service/impl/AndroidSenseService.java index 6a215bf7c5..dab39be0a7 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/service/impl/AndroidSenseService.java +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/service/impl/AndroidSenseService.java @@ -19,14 +19,13 @@ package org.wso2.carbon.device.mgt.iot.androidsense.service.impl; -import io.swagger.annotations.SwaggerDefinition; -import io.swagger.annotations.Info; -import io.swagger.annotations.ExtensionProperty; -import io.swagger.annotations.Extension; -import io.swagger.annotations.Tag; +import io.swagger.annotations.*; import org.wso2.carbon.apimgt.annotations.api.Scope; +import org.wso2.carbon.apimgt.annotations.api.Scopes; +import org.wso2.carbon.device.mgt.iot.androidsense.service.impl.constants.AndroidSenseConstants; import javax.ws.rs.*; +import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; @SwaggerDefinition( @@ -44,6 +43,16 @@ import javax.ws.rs.core.Response; @Tag(name = "android_sense", description = "") } ) +@Scopes( + scopes = { + @Scope( + name = "Enroll device", + description = "", + key = "perm:android-sense:enroll", + permissions = {"/device-mgt/devices/enroll/android-sense"} + ) + } +) public interface AndroidSenseService { /** @@ -54,7 +63,19 @@ public interface AndroidSenseService { */ @Path("device/{deviceId}/words") @POST - //@Scope(key = "device:android-sense:enroll", name = "", description = "") + @ApiOperation( + consumes = MediaType.APPLICATION_JSON, + httpMethod = "POST", + value = "Send the key words to the device", + notes = "", + response = Response.class, + tags = "android_sense", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = AndroidSenseConstants.SCOPE, value = "perm:android-sense:enroll") + }) + } + ) Response sendKeyWords(@PathParam("deviceId") String deviceId, @QueryParam("keywords") String keywords); /** @@ -65,12 +86,36 @@ public interface AndroidSenseService { */ @Path("device/{deviceId}/words/threshold") @POST - //@Scope(key = "device:android-sense:enroll", name = "", description = "") + @ApiOperation( + consumes = MediaType.APPLICATION_JSON, + httpMethod = "POST", + value = "Send threshold value to the device", + notes = "", + response = Response.class, + tags = "android_sense", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = AndroidSenseConstants.SCOPE, value = "perm:android-sense:enroll") + }) + } + ) Response sendThreshold(@PathParam("deviceId") String deviceId, @QueryParam("threshold") String threshold); @Path("device/{deviceId}/words") @DELETE - //@Scope(key = "device:android-sense:enroll", name = "", description = "") + @ApiOperation( + consumes = MediaType.APPLICATION_JSON, + httpMethod = "DELETE", + value = "Remove key words from the device", + notes = "", + response = Response.class, + tags = "android_sense", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = AndroidSenseConstants.SCOPE, value = "perm:android-sense:enroll") + }) + } + ) Response removeKeyWords(@PathParam("deviceId") String deviceId, @QueryParam("words") String words); /** @@ -79,8 +124,20 @@ public interface AndroidSenseService { @Path("stats/{deviceId}/sensors/{sensorName}") @GET @Consumes("application/json") - //@Scope(key = "device:android-sense:enroll", name = "", description = "") @Produces("application/json") + @ApiOperation( + consumes = MediaType.APPLICATION_JSON, + httpMethod = "GET", + value = "Retrieve Sensor data for the device type", + notes = "", + response = Response.class, + tags = "android_sense", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = AndroidSenseConstants.SCOPE, value = "perm:android-sense:enroll") + }) + } + ) Response getAndroidSenseDeviceStats(@PathParam("deviceId") String deviceId, @PathParam("sensorName") String sensor, @QueryParam("from") long from, @QueryParam("to") long to); @@ -89,7 +146,19 @@ public interface AndroidSenseService { */ @Path("device/{device_id}/register") @POST - //@Scope(key = "device:android-sense:enroll", name = "", description = "") + @ApiOperation( + consumes = MediaType.APPLICATION_JSON, + httpMethod = "POST", + value = "Enroll device", + notes = "", + response = Response.class, + tags = "android_sense", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = AndroidSenseConstants.SCOPE, value = "perm:android-sense:enroll") + }) + } + ) Response register(@PathParam("device_id") String deviceId, @QueryParam("deviceName") String deviceName); } diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/service/impl/constants/AndroidSenseConstants.java b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/service/impl/constants/AndroidSenseConstants.java index e1419844c7..68678d0006 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/service/impl/constants/AndroidSenseConstants.java +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/service/impl/constants/AndroidSenseConstants.java @@ -42,4 +42,6 @@ public class AndroidSenseConstants { public static final String CONFIG_TYPE = "general"; public static final String DEFAULT_ENDPOINT = "tcp://localhost:1886"; + public static final String SCOPE = "scope"; + } diff --git a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/pom.xml b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/pom.xml index 55154f46a7..9b2465e218 100644 --- a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/pom.xml +++ b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/pom.xml @@ -141,6 +141,10 @@ org.wso2.carbon.analytics.api provided + + org.wso2.carbon.devicemgt + org.wso2.carbon.apimgt.annotations + diff --git a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/ArduinoService.java b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/ArduinoService.java index 1dd0500134..3ed382479a 100644 --- a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/ArduinoService.java +++ b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/ArduinoService.java @@ -18,15 +18,14 @@ package org.wso2.carbon.device.mgt.iot.arduino.service.impl; -import io.swagger.annotations.SwaggerDefinition; -import io.swagger.annotations.Info; -import io.swagger.annotations.ExtensionProperty; -import io.swagger.annotations.Extension; -import io.swagger.annotations.Tag; +import io.swagger.annotations.*; import org.wso2.carbon.apimgt.annotations.api.Scope; +import org.wso2.carbon.apimgt.annotations.api.Scopes; +import org.wso2.carbon.device.mgt.iot.arduino.service.impl.constants.ArduinoConstants; import javax.ws.rs.*; +import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; @SwaggerDefinition( @@ -44,26 +43,72 @@ import javax.ws.rs.core.Response; @Tag(name = "arduino", description = "") } ) +@Scopes( + scopes = { + @Scope( + name = "Enroll device", + description = "", + key = "perm:arduino:enroll", + permissions = {"/device-mgt/devices/enroll/arduino"} + ) + } +) public interface ArduinoService { @Path("device/{deviceId}/bulb") @POST - //@Scope(key = "device:arduino:enroll", name = "", description = "") + @ApiOperation( + consumes = MediaType.APPLICATION_JSON, + httpMethod = "POST", + value = "Switch bulb", + notes = "", + response = Response.class, + tags = "arduino", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = ArduinoConstants.SCOPE, value = "perm:arduino:enroll") + }) + } + ) Response switchBulb(@PathParam("deviceId") String deviceId, @QueryParam("state") String state); @Path("device/{deviceId}/controls") @GET - //@Scope(key = "device:arduino:enroll", name = "", description = "") + @ApiOperation( + consumes = MediaType.APPLICATION_JSON, + httpMethod = "POST", + value = "Read controls", + notes = "", + response = Response.class, + tags = "arduino", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = ArduinoConstants.SCOPE, value = "perm:arduino:enroll") + }) + } + ) Response readControls(@PathParam("deviceId") String deviceId); /** - * Retreive Sensor data for the device type + * Retrieve Sensor data for the device type */ @Path("device/stats/{deviceId}") @GET @Consumes("application/json") @Produces("application/json") - //@Scope(key = "device:arduino:enroll", name = "", description = "") + @ApiOperation( + consumes = MediaType.APPLICATION_JSON, + httpMethod = "POST", + value = "Retrieve Sensor data for the device type", + notes = "", + response = Response.class, + tags = "arduino", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = ArduinoConstants.SCOPE, value = "perm:arduino:enroll") + }) + } + ) Response getArduinoTemperatureStats(@PathParam("deviceId") String deviceId, @QueryParam("from") long from, @QueryParam("to") long to); @@ -73,7 +118,19 @@ public interface ArduinoService { @Path("device/download") @GET @Produces("application/octet-stream") - //@Scope(key = "device:arduino:enroll", name = "", description = "") + @ApiOperation( + consumes = MediaType.APPLICATION_JSON, + httpMethod = "POST", + value = "Download device agent", + notes = "", + response = Response.class, + tags = "arduino", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = ArduinoConstants.SCOPE, value = "perm:arduino:enroll") + }) + } + ) Response downloadSketch(@QueryParam("deviceName") String customDeviceName); } diff --git a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/constants/ArduinoConstants.java b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/constants/ArduinoConstants.java index ebf84d9ea9..4f3a042c9a 100644 --- a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/constants/ArduinoConstants.java +++ b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/constants/ArduinoConstants.java @@ -27,4 +27,6 @@ public class ArduinoConstants { public static final String APIM_APPLICATION_TOKEN_VALIDITY_PERIOD = "3600"; + public static final String SCOPE = "scope"; + } diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/pom.xml b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/pom.xml index 8df74b2f26..ddae87c220 100644 --- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/pom.xml +++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/pom.xml @@ -121,7 +121,11 @@ org.wso2.carbon.device.mgt.extensions provided - + + org.wso2.carbon.devicemgt + org.wso2.carbon.apimgt.annotations + + diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/RaspberryPiService.java b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/RaspberryPiService.java index 816f3e6b9a..1f227e630e 100644 --- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/RaspberryPiService.java +++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/RaspberryPiService.java @@ -18,12 +18,10 @@ package org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl; -import io.swagger.annotations.SwaggerDefinition; -import io.swagger.annotations.Info; -import io.swagger.annotations.ExtensionProperty; -import io.swagger.annotations.Extension; -import io.swagger.annotations.Tag; +import io.swagger.annotations.*; import org.wso2.carbon.apimgt.annotations.api.Scope; +import org.wso2.carbon.apimgt.annotations.api.Scopes; +import org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl.constants.RaspberrypiConstants; import javax.ws.rs.*; import javax.ws.rs.core.MediaType; @@ -44,11 +42,33 @@ import javax.ws.rs.core.Response; @Tag(name = "raspberrypi", description = "") } ) +@Scopes( + scopes = { + @Scope( + name = "Enroll device", + description = "", + key = "perm:raspberrypi:enroll", + permissions = {"/device-mgt/devices/enroll/raspberrypi"} + ) + } +) public interface RaspberryPiService { @Path("device/{deviceId}/bulb") @POST - //@Scope(key = "device:raspberrypi:enroll", name = "", description = "") + @ApiOperation( + consumes = MediaType.APPLICATION_JSON, + httpMethod = "POST", + value = "Switch bulb", + notes = "", + response = Response.class, + tags = "raspberrypi", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = RaspberrypiConstants.SCOPE, value = "perm:raspberrypi:enroll") + }) + } + ) Response switchBulb(@PathParam("deviceId") String deviceId, @QueryParam("state") String state); /** @@ -58,7 +78,19 @@ public interface RaspberryPiService { @GET @Consumes("application/json") @Produces("application/json") - //@Scope(key = "device:raspberrypi:enroll", name = "", description = "") + @ApiOperation( + consumes = MediaType.APPLICATION_JSON, + httpMethod = "POST", + value = "Retreive Sensor data for the device type", + notes = "", + response = Response.class, + tags = "raspberrypi", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = RaspberrypiConstants.SCOPE, value = "perm:raspberrypi:enroll") + }) + } + ) Response getRaspberryPiTemperatureStats(@PathParam("deviceId") String deviceId, @QueryParam("from") long from, @QueryParam("to") long to); @@ -68,7 +100,19 @@ public interface RaspberryPiService { @Path("device/download") @GET @Produces(MediaType.APPLICATION_JSON) - //@Scope(key = "device:raspberrypi:enroll", name = "", description = "") + @ApiOperation( + consumes = MediaType.APPLICATION_JSON, + httpMethod = "POST", + value = "Download the agent.", + notes = "", + response = Response.class, + tags = "raspberrypi", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = RaspberrypiConstants.SCOPE, value = "perm:raspberrypi:enroll") + }) + } + ) Response downloadSketch(@QueryParam("deviceName") String deviceName, @QueryParam("sketch_type") String sketchType); } diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/constants/RaspberrypiConstants.java b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/constants/RaspberrypiConstants.java index 168cb7d6d3..00919d6f6b 100644 --- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/constants/RaspberrypiConstants.java +++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/constants/RaspberrypiConstants.java @@ -33,4 +33,6 @@ public class RaspberrypiConstants { public static final String APIM_APPLICATION_TOKEN_VALIDITY_PERIOD = "3600"; + public static final String SCOPE = "scope"; + } diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/pom.xml b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/pom.xml index 59ccc4a793..6c9cc0636a 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/pom.xml +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/pom.xml @@ -240,7 +240,11 @@ org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin provided - + + org.wso2.carbon.devicemgt + org.wso2.carbon.apimgt.annotations + + diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java index 62be0f612f..6585280f0e 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java @@ -18,14 +18,12 @@ package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl; -import io.swagger.annotations.SwaggerDefinition; -import io.swagger.annotations.Info; -import io.swagger.annotations.ExtensionProperty; -import io.swagger.annotations.Extension; -import io.swagger.annotations.Tag; +import io.swagger.annotations.*; import org.wso2.carbon.apimgt.annotations.api.Scope; +import org.wso2.carbon.apimgt.annotations.api.Scopes; import javax.ws.rs.*; +import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; /** @@ -50,8 +48,20 @@ import javax.ws.rs.core.Response; @Tag(name = "virtual_firealarm", description = "") } ) +@Scopes( + scopes = { + @Scope( + name = "Enroll device", + description = "", + key = "perm:firealarm:enroll", + permissions = {"/device-mgt/devices/enroll/firealarm"} + ) + } +) public interface VirtualFireAlarmService { + String SCOPE = "scope"; + /** * This is an API called/used from within the Server(Front-End) or by a device Owner. It sends a control command to * the VirtualFirealarm device to switch `ON` or `OFF` its buzzer. The method also takes in the protocol to be used @@ -63,7 +73,19 @@ public interface VirtualFireAlarmService { */ @POST @Path("device/{deviceId}/buzz") - //@Scope(key = "device:firealarm:enroll", name = "", description = "") + @ApiOperation( + consumes = MediaType.APPLICATION_JSON, + httpMethod = "POST", + value = "Switch Buzzer", + notes = "", + response = Response.class, + tags = "virtual_firealarm", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = SCOPE, value = "perm:firealarm:enroll") + }) + } + ) Response switchBuzzer(@PathParam("deviceId") String deviceId, @FormParam("state") String state); @@ -72,7 +94,19 @@ public interface VirtualFireAlarmService { */ @Path("device/stats/{deviceId}") @GET - //@Scope(key = "device:firealarm:enroll", name = "", description = "") + @ApiOperation( + consumes = MediaType.APPLICATION_JSON, + httpMethod = "GET", + value = "Retrieve Sensor data for the device type", + notes = "", + response = Response.class, + tags = "virtual_firealarm", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = SCOPE, value = "perm:firealarm:enroll") + }) + } + ) @Consumes("application/json") @Produces("application/json") Response getVirtualFirealarmStats(@PathParam("deviceId") String deviceId, @QueryParam("from") long from, @@ -81,7 +115,19 @@ public interface VirtualFireAlarmService { @Path("device/download") @GET @Produces("application/zip") - //@Scope(key = "device:firealarm:enroll", name = "", description = "") + @ApiOperation( + consumes = MediaType.APPLICATION_JSON, + httpMethod = "GET", + value = "Download agent", + notes = "", + response = Response.class, + tags = "virtual_firealarm", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = SCOPE, value = "perm:firealarm:enroll") + }) + } + ) Response downloadSketch(@QueryParam("deviceName") String deviceName, @QueryParam("sketchType") String sketchType); } diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementAdminService.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementAdminService.java index d752a30779..9094a28a25 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementAdminService.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementAdminService.java @@ -70,151 +70,151 @@ import java.util.List; @Scope( name = "Lock Device", description = "Hard lock own device", - key = "cdmf:android:lock-devices", + key = "perm:android:lock-devices", permissions = {"/device-mgt/devices/owning-device/operations/android/lock"} ), @Scope( name = "Unlock Device", description = "Unlock permanently locked device", - key = "cdmf:android:unlock-devices", + key = "perm:android:unlock-devices", permissions = {"/device-mgt/devices/owning-device/operations/android/unlock"} ), @Scope( name = "Get Location", description = "Request device location coordinates", - key = "cdmf:android:location", + key = "perm:android:location", permissions = {"/device-mgt/devices/owning-device/operations/android/location"} ), @Scope( name = "Clear Password", description = "Clear the password on Android devices", - key = "cdmf:android:clear-password", + key = "perm:android:clear-password", permissions = {"/device-mgt/devices/owning-device/operations/android/clear-password"} ), @Scope( name = "Control Camera", description = "Enabling or Disabling the Camera on Android Devices", - key = "cdmf:android:control-camera", + key = "perm:android:control-camera", permissions = {"/device-mgt/devices/owning-device/operations/android/camera"} ), @Scope( name = "Get Info", description = "Requesting device information from Android Devices", - key = "cdmf:android:info", + key = "perm:android:info", permissions = {"/device-mgt/devices/owning-device/operations/android/info"} ), @Scope( name = "Get Logs", description = "Requesting Logcat Details from Android Devices", - key = "cdmf:android:logcat", + key = "perm:android:logcat", permissions = {"/device-mgt/devices/owning-device/operations/android/logcat"} ), @Scope( name = "Enterprise Wipe", description = "Enterprise Wiping Android Devices", - key = "cdmf:android:enterprise-wipe", + key = "perm:android:enterprise-wipe", permissions = {"/device-mgt/devices/owning-device/operations/android/enterprise-wipe"} ), @Scope( name = "Factory Reset", description = "Factory Resetting Android Devices", - key = "cdmf:android:wipe", + key = "perm:android:wipe", permissions = {"/device-mgt/devices/owning-device/operations/android/wipe"} ), @Scope( name = "Get Installed Applications", description = "Get list of installed applications", - key = "cdmf:android:applications", + key = "perm:android:applications", permissions = {"/device-mgt/devices/owning-device/operations/android/applications"} ), @Scope( name = "Ring Device", description = "Ring Android devices", - key = "cdmf:android:ring", + key = "perm:android:ring", permissions = {"/device-mgt/devices/owning-device/operations/android/ring"} ), @Scope( name = "Reboot Device", description = "Reboot Android devices", - key = "cdmf:android:reboot", + key = "perm:android:reboot", permissions = {"/device-mgt/devices/owning-device/operations/android/reboot"} ), @Scope( name = "Mute Device", description = "Mute Android devices", - key = "cdmf:android:mute", + key = "perm:android:mute", permissions = {"/device-mgt/devices/owning-device/operations/android/mute"} ), @Scope( name = "Install Applications", description = "Installing an Application on Android Devices", - key = "cdmf:android:install-application", + key = "perm:android:install-application", permissions = {"/device-mgt/devices/owning-device/operations/android/install-app"} ), @Scope( name = "Update Applications", description = "Updating an Application on Android Devices", - key = "cdmf:android:update-application", + key = "perm:android:update-application", permissions = {"/device-mgt/devices/owning-device/operations/android/update-app"} ), @Scope( name = "Uninstall Applications", description = "Uninstalling an Application on Android Devices", - key = "cdmf:android:uninstall-application", + key = "perm:android:uninstall-application", permissions = {"/device-mgt/devices/owning-device/operations/android/uninstall-app"} ), @Scope( name = "Blacklist Applications", description = "Blacklisting applications on Android Devices", - key = "cdmf:android:blacklist-applications", + key = "perm:android:blacklist-applications", permissions = {"/device-mgt/devices/owning-device/operations/android/blacklist-app"} ), @Scope( name = "Upgrade Firmware", description = "Upgrading Firmware of Android Devices", - key = "cdmf:android:upgrade-firmware", + key = "perm:android:upgrade-firmware", permissions = {"/device-mgt/devices/owning-device/operations/android/upgrade"} ), @Scope( name = "Configure VPN", description = "Configure VPN on Android Device", - key = "cdmf:android:configure-vpn", + key = "perm:android:configure-vpn", permissions = {"/device-mgt/devices/owning-device/operations/android/vpn"} ), @Scope( name = "Send Notification", description = "Sending a notification to Android Device", - key = "cdmf:android:send-notification", + key = "perm:android:send-notification", permissions = {"/device-mgt/devices/owning-device/operations/android/send-notification"} ), @Scope( name = "Configure Wi-Fi", description = "Configure Wi-Fi on Android Device", - key = "cdmf:android:configure-wifi", + key = "perm:android:configure-wifi", permissions = {"/device-mgt/devices/owning-device/operations/android/wifi"} ), @Scope( name = "Encrypt Storage", description = "Encrypting storage on Android Device", - key = "cdmf:android:encrypt-storage", + key = "perm:android:encrypt-storage", permissions = {"/device-mgt/devices/owning-device/operations/android/encrypt"} ), @Scope( name = "Change Password", description = "Changing the lock code of an Android Device", - key = "cdmf:android:change-lock-code", + key = "perm:android:change-lock-code", permissions = {"/device-mgt/devices/owning-device/operations/android/change-lock-code"} ), @Scope( name = "Password Policy", description = "Set password policy of an Android Device", - key = "cdmf:android:set-password-policy", + key = "perm:android:set-password-policy", permissions = {"/device-mgt/devices/owning-device/operations/android/password-policy"} ), @Scope( name = "Add Web clip", description = "Setting a Web Clip on Android Devices", - key = "cdmf:android:set-webclip", + key = "perm:android:set-webclip", permissions = {"/device-mgt/devices/owning-device/operations/android/webclip"} ) } @@ -233,7 +233,7 @@ public interface DeviceManagementAdminService { tags = "Android Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:lock-devices") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:lock-devices") }) } ) @@ -296,7 +296,7 @@ public interface DeviceManagementAdminService { tags = "Android Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:unlock-devices") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:unlock-devices") }) } ) @@ -359,7 +359,7 @@ public interface DeviceManagementAdminService { tags = "Android Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:location") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:location") }) } ) @@ -418,7 +418,7 @@ public interface DeviceManagementAdminService { tags = "Android Device Management Administrative Service.", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:clear-password") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:clear-password") }) } ) @@ -476,7 +476,7 @@ public interface DeviceManagementAdminService { tags = "Android Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:control-camera") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:control-camera") }) } ) @ApiResponses(value = { @@ -541,7 +541,7 @@ public interface DeviceManagementAdminService { tags = "Android Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:info") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:info") }) } ) @@ -604,7 +604,7 @@ public interface DeviceManagementAdminService { tags = "Android Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:logcat") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:logcat") }) } ) @@ -666,7 +666,7 @@ public interface DeviceManagementAdminService { tags = "Android Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:enterprise-wipe") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:enterprise-wipe") }) } ) @@ -726,7 +726,7 @@ public interface DeviceManagementAdminService { tags = "Android Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:wipe") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:wipe") }) } ) @@ -790,7 +790,7 @@ public interface DeviceManagementAdminService { tags = "Android Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:applications") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:applications") }) } ) @@ -850,7 +850,7 @@ public interface DeviceManagementAdminService { tags = "Android Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:ring") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:ring") }) } ) @@ -910,7 +910,7 @@ public interface DeviceManagementAdminService { tags = "Android Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:reboot") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:reboot") }) } ) @@ -970,7 +970,7 @@ public interface DeviceManagementAdminService { tags = "Android Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:mute") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:mute") }) } ) @@ -1032,7 +1032,7 @@ public interface DeviceManagementAdminService { tags = "Android Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:install-application") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:install-application") }) } ) @@ -1097,7 +1097,7 @@ public interface DeviceManagementAdminService { tags = "Android Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:update-application") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:update-application") }) } ) @@ -1159,7 +1159,7 @@ public interface DeviceManagementAdminService { tags = "Android Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:uninstall-application") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:uninstall-application") }) } ) @@ -1225,7 +1225,7 @@ public interface DeviceManagementAdminService { tags = "Android Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:blacklist-applications") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:blacklist-applications") }) } ) @@ -1287,7 +1287,7 @@ public interface DeviceManagementAdminService { tags = "Android Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:upgrade-firmware") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:upgrade-firmware") }) } ) @@ -1351,7 +1351,7 @@ public interface DeviceManagementAdminService { tags = "Android Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:configure-vpn") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:configure-vpn") }) } ) @@ -1411,7 +1411,7 @@ public interface DeviceManagementAdminService { tags = "Android Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:send-notification") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:send-notification") }) } ) @@ -1472,7 +1472,7 @@ public interface DeviceManagementAdminService { tags = "Android Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:configure-wifi") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:configure-wifi") }) } ) @@ -1534,7 +1534,7 @@ public interface DeviceManagementAdminService { tags = "Android Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:encrypt-storage") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:encrypt-storage") }) } ) @@ -1596,7 +1596,7 @@ public interface DeviceManagementAdminService { tags = "Android Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:change-lock-code") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:change-lock-code") }) } ) @@ -1658,7 +1658,7 @@ public interface DeviceManagementAdminService { tags = "Android Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:set-password-policy") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:set-password-policy") }) } ) @@ -1718,7 +1718,7 @@ public interface DeviceManagementAdminService { tags = "Android Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:set-webclip") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:set-webclip") }) } ) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementService.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementService.java index 777c9582bc..62194a1481 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementService.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementService.java @@ -69,13 +69,13 @@ import java.util.List; @Scope( name = "Enroll Device", description = "Register an Android device", - key = "cdmf:android:enroll", + key = "perm:android:enroll", permissions = {"/device-mgt/devices/enroll/android"} ), @Scope( name = "Un-enroll Device", description = "Unregister an Android device", - key = "cdmf:android:disenroll", + key = "perm:android:disenroll", permissions = {"/device-mgt/devices/disenroll/android"} ) } @@ -93,7 +93,7 @@ public interface DeviceManagementService { tags = "Android Device Management", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:enroll") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:enroll") }) } ) @@ -158,7 +158,7 @@ public interface DeviceManagementService { tags = "Android Device Management", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:enroll") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:enroll") }) } ) @@ -222,7 +222,7 @@ public interface DeviceManagementService { tags = "Android Device Management", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:enroll") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:enroll") }) } ) @@ -277,7 +277,7 @@ public interface DeviceManagementService { tags = "Android Device Management", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:enroll") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:enroll") }) } ) @@ -330,7 +330,7 @@ public interface DeviceManagementService { tags = "Android Device Management", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:enroll") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:enroll") }) } ) @@ -386,7 +386,7 @@ public interface DeviceManagementService { tags = "Android Device Management", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:disenroll") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:disenroll") }) } ) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceTypeConfigurationService.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceTypeConfigurationService.java index 09a731df4d..de9ccb1808 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceTypeConfigurationService.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceTypeConfigurationService.java @@ -67,19 +67,19 @@ import javax.ws.rs.core.Response; @Scope( name = "Enroll Device", description = "Register an Android device", - key = "cdmf:android:enroll", + key = "perm:android:enroll", permissions = {"/device-mgt/devices/enroll/android"} ), @Scope( name = "View Configurations", description = "Getting Android Platform Configurations", - key = "cdmf:android:view-configuration", + key = "perm:android:view-configuration", permissions = {"/device-mgt/platform-configurations/view"} ), @Scope( name = "Manage Configurations", description = "Updating Android Platform Configurations", - key = "cdmf:android:manage-configuration", + key = "perm:android:manage-configuration", permissions = {"/device-mgt/platform-configurations/manage"} ) } @@ -96,7 +96,7 @@ public interface DeviceTypeConfigurationService { tags = "Android Configuration Management", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:view-configuration") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:view-configuration") }) } ) @@ -150,7 +150,7 @@ public interface DeviceTypeConfigurationService { tags = "Android Configuration Management", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:manage-configuration") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:manage-configuration") }) } ) @@ -205,7 +205,7 @@ public interface DeviceTypeConfigurationService { tags = "Android Configuration Management", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:enroll") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:enroll") }) } ) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/EventReceiverService.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/EventReceiverService.java index 89e8dd44c9..d24b7afa73 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/EventReceiverService.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/EventReceiverService.java @@ -67,7 +67,7 @@ import javax.ws.rs.core.Response; @Scope( name = "Enroll Device", description = "Register an Android device", - key = "cdmf:android:enroll", + key = "perm:android:enroll", permissions = {"/device-mgt/devices/enroll/android"} ) } @@ -85,7 +85,7 @@ public interface EventReceiverService { tags = "Event Receiver", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:enroll") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:enroll") }) } ) @@ -148,7 +148,7 @@ public interface EventReceiverService { tags = "Event Receiver", extensions = { @Extension(properties = { - @ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:enroll") + @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:enroll") }) } ) diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/pom.xml b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/pom.xml index 53533a75c6..e0ba6a441a 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/pom.xml +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/pom.xml @@ -372,5 +372,14 @@ + + org.wso2.carbon.devicemgt + org.wso2.carbon.apimgt.annotations + + + org.wso2.carbon.devicemgt + org.wso2.carbon.apimgt.annotations + 2.0.3-SNAPSHOT + diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/ConfigurationMgtService.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/ConfigurationMgtService.java index 5b69ba25d7..8bb90b1958 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/ConfigurationMgtService.java +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/ConfigurationMgtService.java @@ -76,19 +76,19 @@ import javax.ws.rs.core.Response; @Scope( name = "Enroll Device", description = "Register an Windows device", - key = "cdmf:windows:enroll", + key = "perm:windows:enroll", permissions = {"/device-mgt/devices/enroll/windows"} ), @Scope( name = "View Configurations", description = "Getting Windows Platform Configurations", - key = "cdmf:windows:view-configuration", + key = "perm:windows:view-configuration", permissions = {"/device-mgt/platform-configurations/view"} ), @Scope( name = "Manage Configurations", description = "Updating Windows Platform Configurations", - key = "cdmf:windows:manage-configuration", + key = "perm:windows:manage-configuration", permissions = {"/device-mgt/platform-configurations/manage"} ) } @@ -105,7 +105,7 @@ public interface ConfigurationMgtService { tags = "Windows Configuration Management", extensions = { @Extension(properties = { - @ExtensionProperty(name = Constants.SCOPE, value = "cdmf:windows:view-configuration") + @ExtensionProperty(name = Constants.SCOPE, value = "perm:windows:view-configuration") }) } ) @@ -164,7 +164,7 @@ public interface ConfigurationMgtService { tags = "Windows Configuration Management", extensions = { @Extension(properties = { - @ExtensionProperty(name = Constants.SCOPE, value = "cdmf:windows:manage-configuration") + @ExtensionProperty(name = Constants.SCOPE, value = "perm:windows:manage-configuration") }) } ) @@ -220,7 +220,7 @@ public interface ConfigurationMgtService { tags = "Windows Configuration Management", extensions = { @Extension(properties = { - @ExtensionProperty(name = Constants.SCOPE, value = "cdmf:windows:enroll") + @ExtensionProperty(name = Constants.SCOPE, value = "perm:windows:enroll") }) } ) diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/DeviceManagementAdminService.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/DeviceManagementAdminService.java index c054f821f8..288378dd92 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/DeviceManagementAdminService.java +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/DeviceManagementAdminService.java @@ -69,31 +69,31 @@ import java.util.List; @Scope( name = "Lock Device", description = "Adding a Device Lock on Windows devices.", - key = "cdmf:windows:lock-devices", + key = "perm:windows:lock-devices", permissions = {"/device-mgt/devices/owning-device/operations/windows/lock"} ), @Scope( name = "Un-enroll Device", description = "Unregister an Windows device", - key = "cdmf:windows:disenroll", + key = "perm:windows:disenroll", permissions = {"/device-mgt/devices/disenroll/windows"} ), @Scope( name = "Factory Reset", description = "Factory Resetting Windows Devices", - key = "cdmf:windows:wipe", + key = "perm:windows:wipe", permissions = {"/device-mgt/devices/owning-device/operations/windows/wipe"} ), @Scope( name = "Ring Device", description = "Ring Windows devices", - key = "cdmf:windows:ring", + key = "perm:windows:ring", permissions = {"/device-mgt/devices/owning-device/operations/windows/ring"} ), @Scope( name = "Lock Reset", description = "Lock reset on Windows devices", - key = "cdmf:windows:lock-reset", + key = "perm:windows:lock-reset", permissions = {"/device-mgt/devices/owning-device/operations/windows/lock-reset"} ) } @@ -111,7 +111,7 @@ public interface DeviceManagementAdminService { tags = "Windows Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = Constants.SCOPE, value = "cdmf:windows:lock-devices") + @ExtensionProperty(name = Constants.SCOPE, value = "perm:windows:lock-devices") }) } ) @@ -170,7 +170,7 @@ public interface DeviceManagementAdminService { tags = "Windows Device Management Administrative Service.", extensions = { @Extension(properties = { - @ExtensionProperty(name = Constants.SCOPE, value = "cdmf:windows:disenroll") + @ExtensionProperty(name = Constants.SCOPE, value = "perm:windows:disenroll") }) } ) @@ -231,7 +231,7 @@ public interface DeviceManagementAdminService { tags = "Windows Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = Constants.SCOPE, value = "cdmf:windows:wipe") + @ExtensionProperty(name = Constants.SCOPE, value = "perm:windows:wipe") }) } ) @@ -289,7 +289,7 @@ public interface DeviceManagementAdminService { tags = "Windows Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = Constants.SCOPE, value = "cdmf:windows:ring") + @ExtensionProperty(name = Constants.SCOPE, value = "perm:windows:ring") }) } ) @@ -348,7 +348,7 @@ public interface DeviceManagementAdminService { tags = "Windows Device Management Administrative Service", extensions = { @Extension(properties = { - @ExtensionProperty(name = Constants.SCOPE, value = "cdmf:windows:lock-reset") + @ExtensionProperty(name = Constants.SCOPE, value = "perm:windows:lock-reset") }) } ) diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/authbst/BSTProvider.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/authbst/BSTProvider.java index 5b55a8ed07..7926260f22 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/authbst/BSTProvider.java +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/authbst/BSTProvider.java @@ -65,7 +65,7 @@ import javax.ws.rs.core.Response; @Scope( name = "Enroll Device", description = "Register Windows device", - key = "cdmf:windows:enroll", + key = "perm:windows:enroll", permissions = {"/device-mgt/devices/enroll/windows"} ) } @@ -84,7 +84,7 @@ public interface BSTProvider { tags = "BST Provider", extensions = { @Extension(properties = { - @ExtensionProperty(name = Constants.SCOPE, value = "cdmf:windows:enroll") + @ExtensionProperty(name = Constants.SCOPE, value = "perm:windows:enroll") }) } )