Refactored scopes strings

revert-dabc3590
Milan Perera 8 years ago
parent 855162c028
commit d2d912fb6d

@ -153,6 +153,10 @@
<artifactId>org.wso2.carbon.device.mgt.extensions</artifactId> <artifactId>org.wso2.carbon.device.mgt.extensions</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.apimgt.annotations</artifactId>
</dependency>
</dependencies> </dependencies>

@ -19,14 +19,13 @@
package org.wso2.carbon.device.mgt.iot.androidsense.service.impl; package org.wso2.carbon.device.mgt.iot.androidsense.service.impl;
import io.swagger.annotations.SwaggerDefinition; import io.swagger.annotations.*;
import io.swagger.annotations.Info;
import io.swagger.annotations.ExtensionProperty;
import io.swagger.annotations.Extension;
import io.swagger.annotations.Tag;
import org.wso2.carbon.apimgt.annotations.api.Scope; 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.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
@SwaggerDefinition( @SwaggerDefinition(
@ -44,6 +43,16 @@ import javax.ws.rs.core.Response;
@Tag(name = "android_sense", description = "") @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 { public interface AndroidSenseService {
/** /**
@ -54,7 +63,19 @@ public interface AndroidSenseService {
*/ */
@Path("device/{deviceId}/words") @Path("device/{deviceId}/words")
@POST @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); Response sendKeyWords(@PathParam("deviceId") String deviceId, @QueryParam("keywords") String keywords);
/** /**
@ -65,12 +86,36 @@ public interface AndroidSenseService {
*/ */
@Path("device/{deviceId}/words/threshold") @Path("device/{deviceId}/words/threshold")
@POST @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); Response sendThreshold(@PathParam("deviceId") String deviceId, @QueryParam("threshold") String threshold);
@Path("device/{deviceId}/words") @Path("device/{deviceId}/words")
@DELETE @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); Response removeKeyWords(@PathParam("deviceId") String deviceId, @QueryParam("words") String words);
/** /**
@ -79,8 +124,20 @@ public interface AndroidSenseService {
@Path("stats/{deviceId}/sensors/{sensorName}") @Path("stats/{deviceId}/sensors/{sensorName}")
@GET @GET
@Consumes("application/json") @Consumes("application/json")
//@Scope(key = "device:android-sense:enroll", name = "", description = "")
@Produces("application/json") @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, Response getAndroidSenseDeviceStats(@PathParam("deviceId") String deviceId, @PathParam("sensorName") String sensor,
@QueryParam("from") long from, @QueryParam("to") long to); @QueryParam("from") long from, @QueryParam("to") long to);
@ -89,7 +146,19 @@ public interface AndroidSenseService {
*/ */
@Path("device/{device_id}/register") @Path("device/{device_id}/register")
@POST @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); Response register(@PathParam("device_id") String deviceId, @QueryParam("deviceName") String deviceName);
} }

@ -42,4 +42,6 @@ public class AndroidSenseConstants {
public static final String CONFIG_TYPE = "general"; public static final String CONFIG_TYPE = "general";
public static final String DEFAULT_ENDPOINT = "tcp://localhost:1886"; public static final String DEFAULT_ENDPOINT = "tcp://localhost:1886";
public static final String SCOPE = "scope";
} }

@ -141,6 +141,10 @@
<artifactId>org.wso2.carbon.analytics.api</artifactId> <artifactId>org.wso2.carbon.analytics.api</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.apimgt.annotations</artifactId>
</dependency>
</dependencies> </dependencies>
<build> <build>

@ -18,15 +18,14 @@
package org.wso2.carbon.device.mgt.iot.arduino.service.impl; package org.wso2.carbon.device.mgt.iot.arduino.service.impl;
import io.swagger.annotations.SwaggerDefinition; import io.swagger.annotations.*;
import io.swagger.annotations.Info;
import io.swagger.annotations.ExtensionProperty;
import io.swagger.annotations.Extension;
import io.swagger.annotations.Tag;
import org.wso2.carbon.apimgt.annotations.api.Scope; 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.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
@SwaggerDefinition( @SwaggerDefinition(
@ -44,26 +43,72 @@ import javax.ws.rs.core.Response;
@Tag(name = "arduino", description = "") @Tag(name = "arduino", description = "")
} }
) )
@Scopes(
scopes = {
@Scope(
name = "Enroll device",
description = "",
key = "perm:arduino:enroll",
permissions = {"/device-mgt/devices/enroll/arduino"}
)
}
)
public interface ArduinoService { public interface ArduinoService {
@Path("device/{deviceId}/bulb") @Path("device/{deviceId}/bulb")
@POST @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); Response switchBulb(@PathParam("deviceId") String deviceId, @QueryParam("state") String state);
@Path("device/{deviceId}/controls") @Path("device/{deviceId}/controls")
@GET @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); Response readControls(@PathParam("deviceId") String deviceId);
/** /**
* Retreive Sensor data for the device type * Retrieve Sensor data for the device type
*/ */
@Path("device/stats/{deviceId}") @Path("device/stats/{deviceId}")
@GET @GET
@Consumes("application/json") @Consumes("application/json")
@Produces("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, Response getArduinoTemperatureStats(@PathParam("deviceId") String deviceId, @QueryParam("from") long from,
@QueryParam("to") long to); @QueryParam("to") long to);
@ -73,7 +118,19 @@ public interface ArduinoService {
@Path("device/download") @Path("device/download")
@GET @GET
@Produces("application/octet-stream") @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); Response downloadSketch(@QueryParam("deviceName") String customDeviceName);
} }

@ -27,4 +27,6 @@ public class ArduinoConstants {
public static final String APIM_APPLICATION_TOKEN_VALIDITY_PERIOD = "3600"; public static final String APIM_APPLICATION_TOKEN_VALIDITY_PERIOD = "3600";
public static final String SCOPE = "scope";
} }

@ -121,7 +121,11 @@
<artifactId>org.wso2.carbon.device.mgt.extensions</artifactId> <artifactId>org.wso2.carbon.device.mgt.extensions</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
</dependencies> <dependency>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.apimgt.annotations</artifactId>
</dependency>
</dependencies>
<build> <build>

@ -18,12 +18,10 @@
package org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl; package org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl;
import io.swagger.annotations.SwaggerDefinition; import io.swagger.annotations.*;
import io.swagger.annotations.Info;
import io.swagger.annotations.ExtensionProperty;
import io.swagger.annotations.Extension;
import io.swagger.annotations.Tag;
import org.wso2.carbon.apimgt.annotations.api.Scope; 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.*;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
@ -44,11 +42,33 @@ import javax.ws.rs.core.Response;
@Tag(name = "raspberrypi", description = "") @Tag(name = "raspberrypi", description = "")
} }
) )
@Scopes(
scopes = {
@Scope(
name = "Enroll device",
description = "",
key = "perm:raspberrypi:enroll",
permissions = {"/device-mgt/devices/enroll/raspberrypi"}
)
}
)
public interface RaspberryPiService { public interface RaspberryPiService {
@Path("device/{deviceId}/bulb") @Path("device/{deviceId}/bulb")
@POST @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); Response switchBulb(@PathParam("deviceId") String deviceId, @QueryParam("state") String state);
/** /**
@ -58,7 +78,19 @@ public interface RaspberryPiService {
@GET @GET
@Consumes("application/json") @Consumes("application/json")
@Produces("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, Response getRaspberryPiTemperatureStats(@PathParam("deviceId") String deviceId,
@QueryParam("from") long from, @QueryParam("to") long to); @QueryParam("from") long from, @QueryParam("to") long to);
@ -68,7 +100,19 @@ public interface RaspberryPiService {
@Path("device/download") @Path("device/download")
@GET @GET
@Produces(MediaType.APPLICATION_JSON) @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); Response downloadSketch(@QueryParam("deviceName") String deviceName, @QueryParam("sketch_type") String sketchType);
} }

@ -33,4 +33,6 @@ public class RaspberrypiConstants {
public static final String APIM_APPLICATION_TOKEN_VALIDITY_PERIOD = "3600"; public static final String APIM_APPLICATION_TOKEN_VALIDITY_PERIOD = "3600";
public static final String SCOPE = "scope";
} }

@ -240,7 +240,11 @@
<artifactId>org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin</artifactId> <artifactId>org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
</dependencies> <dependency>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.apimgt.annotations</artifactId>
</dependency>
</dependencies>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>

@ -18,14 +18,12 @@
package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl; package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl;
import io.swagger.annotations.SwaggerDefinition; import io.swagger.annotations.*;
import io.swagger.annotations.Info;
import io.swagger.annotations.ExtensionProperty;
import io.swagger.annotations.Extension;
import io.swagger.annotations.Tag;
import org.wso2.carbon.apimgt.annotations.api.Scope; import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.apimgt.annotations.api.Scopes;
import javax.ws.rs.*; import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
/** /**
@ -50,8 +48,20 @@ import javax.ws.rs.core.Response;
@Tag(name = "virtual_firealarm", description = "") @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 { 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 * 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 * 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 @POST
@Path("device/{deviceId}/buzz") @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, Response switchBuzzer(@PathParam("deviceId") String deviceId,
@FormParam("state") String state); @FormParam("state") String state);
@ -72,7 +94,19 @@ public interface VirtualFireAlarmService {
*/ */
@Path("device/stats/{deviceId}") @Path("device/stats/{deviceId}")
@GET @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") @Consumes("application/json")
@Produces("application/json") @Produces("application/json")
Response getVirtualFirealarmStats(@PathParam("deviceId") String deviceId, @QueryParam("from") long from, Response getVirtualFirealarmStats(@PathParam("deviceId") String deviceId, @QueryParam("from") long from,
@ -81,7 +115,19 @@ public interface VirtualFireAlarmService {
@Path("device/download") @Path("device/download")
@GET @GET
@Produces("application/zip") @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); Response downloadSketch(@QueryParam("deviceName") String deviceName, @QueryParam("sketchType") String sketchType);
} }

@ -70,151 +70,151 @@ import java.util.List;
@Scope( @Scope(
name = "Lock Device", name = "Lock Device",
description = "Hard lock own 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"} permissions = {"/device-mgt/devices/owning-device/operations/android/lock"}
), ),
@Scope( @Scope(
name = "Unlock Device", name = "Unlock Device",
description = "Unlock permanently locked 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"} permissions = {"/device-mgt/devices/owning-device/operations/android/unlock"}
), ),
@Scope( @Scope(
name = "Get Location", name = "Get Location",
description = "Request device location coordinates", description = "Request device location coordinates",
key = "cdmf:android:location", key = "perm:android:location",
permissions = {"/device-mgt/devices/owning-device/operations/android/location"} permissions = {"/device-mgt/devices/owning-device/operations/android/location"}
), ),
@Scope( @Scope(
name = "Clear Password", name = "Clear Password",
description = "Clear the password on Android devices", 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"} permissions = {"/device-mgt/devices/owning-device/operations/android/clear-password"}
), ),
@Scope( @Scope(
name = "Control Camera", name = "Control Camera",
description = "Enabling or Disabling the Camera on Android Devices", 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"} permissions = {"/device-mgt/devices/owning-device/operations/android/camera"}
), ),
@Scope( @Scope(
name = "Get Info", name = "Get Info",
description = "Requesting device information from Android Devices", description = "Requesting device information from Android Devices",
key = "cdmf:android:info", key = "perm:android:info",
permissions = {"/device-mgt/devices/owning-device/operations/android/info"} permissions = {"/device-mgt/devices/owning-device/operations/android/info"}
), ),
@Scope( @Scope(
name = "Get Logs", name = "Get Logs",
description = "Requesting Logcat Details from Android Devices", description = "Requesting Logcat Details from Android Devices",
key = "cdmf:android:logcat", key = "perm:android:logcat",
permissions = {"/device-mgt/devices/owning-device/operations/android/logcat"} permissions = {"/device-mgt/devices/owning-device/operations/android/logcat"}
), ),
@Scope( @Scope(
name = "Enterprise Wipe", name = "Enterprise Wipe",
description = "Enterprise Wiping Android Devices", 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"} permissions = {"/device-mgt/devices/owning-device/operations/android/enterprise-wipe"}
), ),
@Scope( @Scope(
name = "Factory Reset", name = "Factory Reset",
description = "Factory Resetting Android Devices", description = "Factory Resetting Android Devices",
key = "cdmf:android:wipe", key = "perm:android:wipe",
permissions = {"/device-mgt/devices/owning-device/operations/android/wipe"} permissions = {"/device-mgt/devices/owning-device/operations/android/wipe"}
), ),
@Scope( @Scope(
name = "Get Installed Applications", name = "Get Installed Applications",
description = "Get list of 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"} permissions = {"/device-mgt/devices/owning-device/operations/android/applications"}
), ),
@Scope( @Scope(
name = "Ring Device", name = "Ring Device",
description = "Ring Android devices", description = "Ring Android devices",
key = "cdmf:android:ring", key = "perm:android:ring",
permissions = {"/device-mgt/devices/owning-device/operations/android/ring"} permissions = {"/device-mgt/devices/owning-device/operations/android/ring"}
), ),
@Scope( @Scope(
name = "Reboot Device", name = "Reboot Device",
description = "Reboot Android devices", description = "Reboot Android devices",
key = "cdmf:android:reboot", key = "perm:android:reboot",
permissions = {"/device-mgt/devices/owning-device/operations/android/reboot"} permissions = {"/device-mgt/devices/owning-device/operations/android/reboot"}
), ),
@Scope( @Scope(
name = "Mute Device", name = "Mute Device",
description = "Mute Android devices", description = "Mute Android devices",
key = "cdmf:android:mute", key = "perm:android:mute",
permissions = {"/device-mgt/devices/owning-device/operations/android/mute"} permissions = {"/device-mgt/devices/owning-device/operations/android/mute"}
), ),
@Scope( @Scope(
name = "Install Applications", name = "Install Applications",
description = "Installing an Application on Android Devices", 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"} permissions = {"/device-mgt/devices/owning-device/operations/android/install-app"}
), ),
@Scope( @Scope(
name = "Update Applications", name = "Update Applications",
description = "Updating an Application on Android Devices", 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"} permissions = {"/device-mgt/devices/owning-device/operations/android/update-app"}
), ),
@Scope( @Scope(
name = "Uninstall Applications", name = "Uninstall Applications",
description = "Uninstalling an Application on Android Devices", 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"} permissions = {"/device-mgt/devices/owning-device/operations/android/uninstall-app"}
), ),
@Scope( @Scope(
name = "Blacklist Applications", name = "Blacklist Applications",
description = "Blacklisting applications on Android Devices", 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"} permissions = {"/device-mgt/devices/owning-device/operations/android/blacklist-app"}
), ),
@Scope( @Scope(
name = "Upgrade Firmware", name = "Upgrade Firmware",
description = "Upgrading Firmware of Android Devices", 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"} permissions = {"/device-mgt/devices/owning-device/operations/android/upgrade"}
), ),
@Scope( @Scope(
name = "Configure VPN", name = "Configure VPN",
description = "Configure VPN on Android Device", 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"} permissions = {"/device-mgt/devices/owning-device/operations/android/vpn"}
), ),
@Scope( @Scope(
name = "Send Notification", name = "Send Notification",
description = "Sending a notification to Android Device", 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"} permissions = {"/device-mgt/devices/owning-device/operations/android/send-notification"}
), ),
@Scope( @Scope(
name = "Configure Wi-Fi", name = "Configure Wi-Fi",
description = "Configure Wi-Fi on Android Device", 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"} permissions = {"/device-mgt/devices/owning-device/operations/android/wifi"}
), ),
@Scope( @Scope(
name = "Encrypt Storage", name = "Encrypt Storage",
description = "Encrypting storage on Android Device", 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"} permissions = {"/device-mgt/devices/owning-device/operations/android/encrypt"}
), ),
@Scope( @Scope(
name = "Change Password", name = "Change Password",
description = "Changing the lock code of an Android Device", 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"} permissions = {"/device-mgt/devices/owning-device/operations/android/change-lock-code"}
), ),
@Scope( @Scope(
name = "Password Policy", name = "Password Policy",
description = "Set password policy of an Android Device", 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"} permissions = {"/device-mgt/devices/owning-device/operations/android/password-policy"}
), ),
@Scope( @Scope(
name = "Add Web clip", name = "Add Web clip",
description = "Setting a Web Clip on Android Devices", 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"} permissions = {"/device-mgt/devices/owning-device/operations/android/webclip"}
) )
} }
@ -233,7 +233,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @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.", tags = "Android Device Management Administrative Service.",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:control-camera") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:control-camera")
}) })
} ) } )
@ApiResponses(value = { @ApiResponses(value = {
@ -541,7 +541,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:set-webclip") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:set-webclip")
}) })
} }
) )

@ -69,13 +69,13 @@ import java.util.List;
@Scope( @Scope(
name = "Enroll Device", name = "Enroll Device",
description = "Register an Android device", description = "Register an Android device",
key = "cdmf:android:enroll", key = "perm:android:enroll",
permissions = {"/device-mgt/devices/enroll/android"} permissions = {"/device-mgt/devices/enroll/android"}
), ),
@Scope( @Scope(
name = "Un-enroll Device", name = "Un-enroll Device",
description = "Unregister an Android device", description = "Unregister an Android device",
key = "cdmf:android:disenroll", key = "perm:android:disenroll",
permissions = {"/device-mgt/devices/disenroll/android"} permissions = {"/device-mgt/devices/disenroll/android"}
) )
} }
@ -93,7 +93,7 @@ public interface DeviceManagementService {
tags = "Android Device Management", tags = "Android Device Management",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Device Management",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:disenroll") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:disenroll")
}) })
} }
) )

@ -67,19 +67,19 @@ import javax.ws.rs.core.Response;
@Scope( @Scope(
name = "Enroll Device", name = "Enroll Device",
description = "Register an Android device", description = "Register an Android device",
key = "cdmf:android:enroll", key = "perm:android:enroll",
permissions = {"/device-mgt/devices/enroll/android"} permissions = {"/device-mgt/devices/enroll/android"}
), ),
@Scope( @Scope(
name = "View Configurations", name = "View Configurations",
description = "Getting Android Platform Configurations", description = "Getting Android Platform Configurations",
key = "cdmf:android:view-configuration", key = "perm:android:view-configuration",
permissions = {"/device-mgt/platform-configurations/view"} permissions = {"/device-mgt/platform-configurations/view"}
), ),
@Scope( @Scope(
name = "Manage Configurations", name = "Manage Configurations",
description = "Updating Android Platform Configurations", description = "Updating Android Platform Configurations",
key = "cdmf:android:manage-configuration", key = "perm:android:manage-configuration",
permissions = {"/device-mgt/platform-configurations/manage"} permissions = {"/device-mgt/platform-configurations/manage"}
) )
} }
@ -96,7 +96,7 @@ public interface DeviceTypeConfigurationService {
tags = "Android Configuration Management", tags = "Android Configuration Management",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Configuration Management",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Android Configuration Management",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:enroll") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:enroll")
}) })
} }
) )

@ -67,7 +67,7 @@ import javax.ws.rs.core.Response;
@Scope( @Scope(
name = "Enroll Device", name = "Enroll Device",
description = "Register an Android device", description = "Register an Android device",
key = "cdmf:android:enroll", key = "perm:android:enroll",
permissions = {"/device-mgt/devices/enroll/android"} permissions = {"/device-mgt/devices/enroll/android"}
) )
} }
@ -85,7 +85,7 @@ public interface EventReceiverService {
tags = "Event Receiver", tags = "Event Receiver",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Event Receiver",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "cdmf:android:enroll") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:enroll")
}) })
} }
) )

@ -372,5 +372,14 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.apimgt.annotations</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.apimgt.annotations</artifactId>
<version>2.0.3-SNAPSHOT</version>
</dependency>
</dependencies> </dependencies>
</project> </project>

@ -76,19 +76,19 @@ import javax.ws.rs.core.Response;
@Scope( @Scope(
name = "Enroll Device", name = "Enroll Device",
description = "Register an Windows device", description = "Register an Windows device",
key = "cdmf:windows:enroll", key = "perm:windows:enroll",
permissions = {"/device-mgt/devices/enroll/windows"} permissions = {"/device-mgt/devices/enroll/windows"}
), ),
@Scope( @Scope(
name = "View Configurations", name = "View Configurations",
description = "Getting Windows Platform Configurations", description = "Getting Windows Platform Configurations",
key = "cdmf:windows:view-configuration", key = "perm:windows:view-configuration",
permissions = {"/device-mgt/platform-configurations/view"} permissions = {"/device-mgt/platform-configurations/view"}
), ),
@Scope( @Scope(
name = "Manage Configurations", name = "Manage Configurations",
description = "Updating Windows Platform Configurations", description = "Updating Windows Platform Configurations",
key = "cdmf:windows:manage-configuration", key = "perm:windows:manage-configuration",
permissions = {"/device-mgt/platform-configurations/manage"} permissions = {"/device-mgt/platform-configurations/manage"}
) )
} }
@ -105,7 +105,7 @@ public interface ConfigurationMgtService {
tags = "Windows Configuration Management", tags = "Windows Configuration Management",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Windows Configuration Management",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Windows Configuration Management",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "cdmf:windows:enroll") @ExtensionProperty(name = Constants.SCOPE, value = "perm:windows:enroll")
}) })
} }
) )

@ -69,31 +69,31 @@ import java.util.List;
@Scope( @Scope(
name = "Lock Device", name = "Lock Device",
description = "Adding a Device Lock on Windows devices.", 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"} permissions = {"/device-mgt/devices/owning-device/operations/windows/lock"}
), ),
@Scope( @Scope(
name = "Un-enroll Device", name = "Un-enroll Device",
description = "Unregister an Windows device", description = "Unregister an Windows device",
key = "cdmf:windows:disenroll", key = "perm:windows:disenroll",
permissions = {"/device-mgt/devices/disenroll/windows"} permissions = {"/device-mgt/devices/disenroll/windows"}
), ),
@Scope( @Scope(
name = "Factory Reset", name = "Factory Reset",
description = "Factory Resetting Windows Devices", description = "Factory Resetting Windows Devices",
key = "cdmf:windows:wipe", key = "perm:windows:wipe",
permissions = {"/device-mgt/devices/owning-device/operations/windows/wipe"} permissions = {"/device-mgt/devices/owning-device/operations/windows/wipe"}
), ),
@Scope( @Scope(
name = "Ring Device", name = "Ring Device",
description = "Ring Windows devices", description = "Ring Windows devices",
key = "cdmf:windows:ring", key = "perm:windows:ring",
permissions = {"/device-mgt/devices/owning-device/operations/windows/ring"} permissions = {"/device-mgt/devices/owning-device/operations/windows/ring"}
), ),
@Scope( @Scope(
name = "Lock Reset", name = "Lock Reset",
description = "Lock reset on Windows devices", 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"} permissions = {"/device-mgt/devices/owning-device/operations/windows/lock-reset"}
) )
} }
@ -111,7 +111,7 @@ public interface DeviceManagementAdminService {
tags = "Windows Device Management Administrative Service", tags = "Windows Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @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.", tags = "Windows Device Management Administrative Service.",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Windows Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Windows Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @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", tags = "Windows Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "cdmf:windows:lock-reset") @ExtensionProperty(name = Constants.SCOPE, value = "perm:windows:lock-reset")
}) })
} }
) )

@ -65,7 +65,7 @@ import javax.ws.rs.core.Response;
@Scope( @Scope(
name = "Enroll Device", name = "Enroll Device",
description = "Register Windows device", description = "Register Windows device",
key = "cdmf:windows:enroll", key = "perm:windows:enroll",
permissions = {"/device-mgt/devices/enroll/windows"} permissions = {"/device-mgt/devices/enroll/windows"}
) )
} }
@ -84,7 +84,7 @@ public interface BSTProvider {
tags = "BST Provider", tags = "BST Provider",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "cdmf:windows:enroll") @ExtensionProperty(name = Constants.SCOPE, value = "perm:windows:enroll")
}) })
} }
) )

Loading…
Cancel
Save