Refactored scopes strings

merge-requests/1/head
Milan Perera 8 years ago
parent 855162c028
commit d2d912fb6d

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

@ -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);
}

@ -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";
}

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

@ -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);
}

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

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

@ -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);
}

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

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

@ -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);
}

@ -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")
})
}
)

@ -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")
})
}
)

@ -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")
})
}
)

@ -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")
})
}
)

@ -372,5 +372,14 @@
</exclusion>
</exclusions>
</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>
</project>

@ -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")
})
}
)

@ -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")
})
}
)

@ -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")
})
}
)

Loading…
Cancel
Save