mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Implemented permission based authorization
This commit is contained in:
parent
5900f4873d
commit
cbae4e207d
@ -20,6 +20,7 @@ package org.wso2.carbon.mdm.services.android.services;
|
|||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import org.wso2.carbon.apimgt.annotations.api.API;
|
import org.wso2.carbon.apimgt.annotations.api.API;
|
||||||
|
import org.wso2.carbon.apimgt.annotations.api.Permission;
|
||||||
import org.wso2.carbon.apimgt.annotations.api.Scope;
|
import org.wso2.carbon.apimgt.annotations.api.Scope;
|
||||||
import org.wso2.carbon.device.mgt.common.operation.mgt.Activity;
|
import org.wso2.carbon.device.mgt.common.operation.mgt.Activity;
|
||||||
import org.wso2.carbon.mdm.services.android.bean.wrapper.*;
|
import org.wso2.carbon.mdm.services.android.bean.wrapper.*;
|
||||||
@ -92,7 +93,7 @@ public interface DeviceManagementAdminService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding a new lock operation.")
|
"Server error occurred while adding a new lock operation.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:operation:lock", name = "Lock device", description = "")
|
@Permission(name = "Lock Device", permission = "/device-mgt/devices/android/operations/lock")
|
||||||
Response configureDeviceLock(
|
Response configureDeviceLock(
|
||||||
@ApiParam(name = "deviceLockBeanWrapper",
|
@ApiParam(name = "deviceLockBeanWrapper",
|
||||||
value = "Device lock configurations with device IDs") DeviceLockBeanWrapper deviceLockBeanWrapper);
|
value = "Device lock configurations with device IDs") DeviceLockBeanWrapper deviceLockBeanWrapper);
|
||||||
@ -146,7 +147,7 @@ public interface DeviceManagementAdminService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding a new un-lock operation.")
|
"Server error occurred while adding a new un-lock operation.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:operation:unlock", name = "Unlock device", description = "")
|
@Permission(name = "Unlock Device", permission = "/device-mgt/devices/android/operations/unlock")
|
||||||
Response configureDeviceUnlock(
|
Response configureDeviceUnlock(
|
||||||
@ApiParam(name = "deviceIDs", value = "DeviceIds to be enable device unlock operation")
|
@ApiParam(name = "deviceIDs", value = "DeviceIds to be enable device unlock operation")
|
||||||
List<String> deviceIDs);
|
List<String> deviceIDs);
|
||||||
@ -199,7 +200,7 @@ public interface DeviceManagementAdminService {
|
|||||||
code = 500,
|
code = 500,
|
||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding a new get-location operation.")})
|
"Server error occurred while adding a new get-location operation.")})
|
||||||
@Scope(key = "device:android:operation:location", name = "Get device location", description = "")
|
@Permission(name = "Get Device Location", permission = "/device-mgt/devices/android/operations/location")
|
||||||
Response getDeviceLocation(
|
Response getDeviceLocation(
|
||||||
@ApiParam(name = "deviceIDs", value = "DeviceIDs to be requested to get device location")
|
@ApiParam(name = "deviceIDs", value = "DeviceIDs to be requested to get device location")
|
||||||
List<String> deviceIDs);
|
List<String> deviceIDs);
|
||||||
@ -252,7 +253,7 @@ public interface DeviceManagementAdminService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding a new clear password operation.")
|
"Server error occurred while adding a new clear password operation.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:operation:clear-password", name = "Clear password of device", description = "")
|
@Permission(name = "Clear Password of Device", permission = "/device-mgt/devices/android/operations/clear-password")
|
||||||
Response removePassword(
|
Response removePassword(
|
||||||
@ApiParam(name = "deviceIDs",
|
@ApiParam(name = "deviceIDs",
|
||||||
value = "DeviceIds to be requested to remove password") List<String> deviceIDs);
|
value = "DeviceIds to be requested to remove password") List<String> deviceIDs);
|
||||||
@ -305,7 +306,7 @@ public interface DeviceManagementAdminService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding a new control camera operation.")
|
"Server error occurred while adding a new control camera operation.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:operation:camera", name = "Enable/Disable camera", description = "")
|
@Permission(name = "Manage Camera", permission = "/device-mgt/devices/android/operations/camera")
|
||||||
Response configureCamera(
|
Response configureCamera(
|
||||||
@ApiParam(name = "cameraBeanWrapper", value = "Camera enable/disable configurations with device IDs")
|
@ApiParam(name = "cameraBeanWrapper", value = "Camera enable/disable configurations with device IDs")
|
||||||
CameraBeanWrapper cameraBeanWrapper);
|
CameraBeanWrapper cameraBeanWrapper);
|
||||||
@ -361,19 +362,19 @@ public interface DeviceManagementAdminService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding a new device info operation.")
|
"Server error occurred while adding a new device info operation.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:operation:info", name = "Get device information", description = "")
|
@Permission(name = "Get Device Information", permission = "/device-mgt/devices/android/operations/info")
|
||||||
Response getDeviceInformation(
|
Response getDeviceInformation(
|
||||||
@ApiParam(name = "deviceIds", value = "Device IDs to be requested to get device information")
|
@ApiParam(name = "deviceIds", value = "Device IDs to be requested to get device information")
|
||||||
List<String> deviceIDs);
|
List<String> deviceIDs);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/info")
|
@Path("/logcat")
|
||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
consumes = MediaType.APPLICATION_JSON,
|
consumes = MediaType.APPLICATION_JSON,
|
||||||
produces = MediaType.APPLICATION_JSON,
|
produces = MediaType.APPLICATION_JSON,
|
||||||
httpMethod = "POST",
|
httpMethod = "POST",
|
||||||
value = "Requesting Information from Android Devices",
|
value = "Requesting logcat from Android Devices",
|
||||||
notes = "Using this REST API you are able to request for Android device details. Once this REST API is" +
|
notes = "Using this REST API you are able to request for Android device log details. Once this REST API is" +
|
||||||
" executed it will be in the Android operation queue until the device calls the server to retrieve " +
|
" executed it will be in the Android operation queue until the device calls the server to retrieve " +
|
||||||
"the list of operations that needs to be executed on the device",
|
"the list of operations that needs to be executed on the device",
|
||||||
response = Activity.class,
|
response = Activity.class,
|
||||||
@ -417,6 +418,7 @@ public interface DeviceManagementAdminService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding a new device logcat operation.")
|
"Server error occurred while adding a new device logcat operation.")
|
||||||
})
|
})
|
||||||
|
@Permission(name = "Get Logs", permission = "/device-mgt/devices/android/operations/logcat")
|
||||||
Response getDeviceLogcat(
|
Response getDeviceLogcat(
|
||||||
@ApiParam(name = "deviceIds", value = "Device IDs to be requested to get device logcat")
|
@ApiParam(name = "deviceIds", value = "Device IDs to be requested to get device logcat")
|
||||||
List<String> deviceIDs);
|
List<String> deviceIDs);
|
||||||
@ -470,7 +472,7 @@ public interface DeviceManagementAdminService {
|
|||||||
code = 500,
|
code = 500,
|
||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding a enterprise wipe operation.")})
|
"Server error occurred while adding a enterprise wipe operation.")})
|
||||||
@Scope(key = "device:android:operation:enterprise-wipe", name = "Enterprise wipe", description = "")
|
@Permission(name = "Enterprise Wipe", permission = "/device-mgt/devices/android/operations/enterprise-wipe")
|
||||||
Response wipeDevice(@ApiParam(name = "deviceIDs", value = "Device IDs to be requested to do enterprise-wipe")
|
Response wipeDevice(@ApiParam(name = "deviceIDs", value = "Device IDs to be requested to do enterprise-wipe")
|
||||||
List<String> deviceIDs);
|
List<String> deviceIDs);
|
||||||
|
|
||||||
@ -522,7 +524,7 @@ public interface DeviceManagementAdminService {
|
|||||||
code = 500,
|
code = 500,
|
||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding a device wipe operation.")})
|
"Server error occurred while adding a device wipe operation.")})
|
||||||
@Scope(key = "device:android:operation:wipe", name = "Factory reset device", description = "")
|
@Permission(name = "Factory Reset", permission = "/device-mgt/devices/android/operations/wipe")
|
||||||
Response wipeData(
|
Response wipeData(
|
||||||
@ApiParam(name = "wipeDataBeanWrapper", value = "Configurations and DeviceIds needed to do wipe-data")
|
@ApiParam(name = "wipeDataBeanWrapper", value = "Configurations and DeviceIds needed to do wipe-data")
|
||||||
WipeDataBeanWrapper wipeDataBeanWrapper);
|
WipeDataBeanWrapper wipeDataBeanWrapper);
|
||||||
@ -579,7 +581,7 @@ public interface DeviceManagementAdminService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding a new get-applications operation.")
|
"Server error occurred while adding a new get-applications operation.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:operation:applications", name = "Get installed applications", description = "")
|
@Permission(name = "Get Installed Application", permission = "/device-mgt/devices/android/operations/applications")
|
||||||
Response getApplications(
|
Response getApplications(
|
||||||
@ApiParam(name = "deviceIDs", value = "Device Ids needed to get applications that are already installed")
|
@ApiParam(name = "deviceIDs", value = "Device Ids needed to get applications that are already installed")
|
||||||
List<String> deviceIDs);
|
List<String> deviceIDs);
|
||||||
@ -632,7 +634,7 @@ public interface DeviceManagementAdminService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding a new device ring operation.")
|
"Server error occurred while adding a new device ring operation.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:operation:ring", name = "Ring device", description = "")
|
@Permission(name = "Ring Device", permission = "/device-mgt/devices/android/operations/ring")
|
||||||
Response ringDevice(
|
Response ringDevice(
|
||||||
@ApiParam(name = "deviceIDs", value = "Device Ids needed for ring")
|
@ApiParam(name = "deviceIDs", value = "Device Ids needed for ring")
|
||||||
List<String> deviceIDs);
|
List<String> deviceIDs);
|
||||||
@ -685,7 +687,7 @@ public interface DeviceManagementAdminService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding a new device reboot operation.")
|
"Server error occurred while adding a new device reboot operation.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:operation:reboot", name = "Reboot device", description = "")
|
@Permission(name = "Reboot Device", permission = "/device-mgt/devices/android/operations/reboot")
|
||||||
Response rebootDevice(
|
Response rebootDevice(
|
||||||
@ApiParam(name = "deviceIDs", value = "Device Ids needed for reboot.")
|
@ApiParam(name = "deviceIDs", value = "Device Ids needed for reboot.")
|
||||||
List<String> deviceIDs);
|
List<String> deviceIDs);
|
||||||
@ -738,7 +740,7 @@ public interface DeviceManagementAdminService {
|
|||||||
"Server error occurred while adding a new device mute operation.")
|
"Server error occurred while adding a new device mute operation.")
|
||||||
})
|
})
|
||||||
@Path("/mute")
|
@Path("/mute")
|
||||||
@Scope(key = "device:android:operation:mute", name = "Mute device", description = "")
|
@Permission(name = "Mute Device", permission = "/device-mgt/devices/android/operations/mute")
|
||||||
Response muteDevice(
|
Response muteDevice(
|
||||||
@ApiParam(name = "deviceIDs", value = "DeviceIDs need to be muted")
|
@ApiParam(name = "deviceIDs", value = "DeviceIDs need to be muted")
|
||||||
List<String> deviceIDs);
|
List<String> deviceIDs);
|
||||||
@ -794,7 +796,7 @@ public interface DeviceManagementAdminService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding a new install-application operation.")
|
"Server error occurred while adding a new install-application operation.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:operation:install-app", name = "Install applications", description = "")
|
@Permission(name = "Install Applications", permission = "/device-mgt/devices/android/operations/install-app")
|
||||||
Response installApplication(
|
Response installApplication(
|
||||||
@ApiParam(name = "applicationInstallationBeanWrapper", value = "Properties of installed apps and device IDs")
|
@ApiParam(name = "applicationInstallationBeanWrapper", value = "Properties of installed apps and device IDs")
|
||||||
ApplicationInstallationBeanWrapper applicationInstallationBeanWrapper);
|
ApplicationInstallationBeanWrapper applicationInstallationBeanWrapper);
|
||||||
@ -850,7 +852,7 @@ public interface DeviceManagementAdminService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding a new update-application operation.")
|
"Server error occurred while adding a new update-application operation.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:operation:update-app", name = "Update installed applications", description = "")
|
@Permission(name = "Update installed applications", permission = "/device-mgt/devices/android/operations/update-app")
|
||||||
Response updateApplication(
|
Response updateApplication(
|
||||||
@ApiParam(name = "applicationUpdateBeanWrapper", value = "Properties of updated apps and device IDs")
|
@ApiParam(name = "applicationUpdateBeanWrapper", value = "Properties of updated apps and device IDs")
|
||||||
ApplicationUpdateBeanWrapper applicationUpdateBeanWrapper);
|
ApplicationUpdateBeanWrapper applicationUpdateBeanWrapper);
|
||||||
@ -903,7 +905,7 @@ public interface DeviceManagementAdminService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding a new uninstall-application operation.")
|
"Server error occurred while adding a new uninstall-application operation.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:operation:uninstall-app", name = "Uninstall applications", description = "")
|
@Permission(name = "Uninstall Applications", permission = "/device-mgt/devices/android/operations/uninstall-app")
|
||||||
Response uninstallApplication(
|
Response uninstallApplication(
|
||||||
@ApiParam(name = "applicationUninstallationBeanWrapper",
|
@ApiParam(name = "applicationUninstallationBeanWrapper",
|
||||||
value = "applicationUninstallationConfigs and Device Ids")
|
value = "applicationUninstallationConfigs and Device Ids")
|
||||||
@ -958,7 +960,7 @@ public interface DeviceManagementAdminService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding a new blacklist-applications operation.")
|
"Server error occurred while adding a new blacklist-applications operation.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:operation:blacklist-app", name = "Blacklist applications", description = "")
|
@Permission(name = "Blacklist Applications", permission = "/device-mgt/devices/android/operations/blacklist-app")
|
||||||
Response blacklistApplications(
|
Response blacklistApplications(
|
||||||
@ApiParam(name = "blacklistApplicationsBeanWrapper", value = "BlacklistApplications " +
|
@ApiParam(name = "blacklistApplicationsBeanWrapper", value = "BlacklistApplications " +
|
||||||
"Configuration and DeviceIds")
|
"Configuration and DeviceIds")
|
||||||
@ -1013,7 +1015,7 @@ public interface DeviceManagementAdminService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding a new upgrade firmware operation.")
|
"Server error occurred while adding a new upgrade firmware operation.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:operation:upgrade", name = "Upgrade firmware", description = "")
|
@Permission(name = "Upgrade Firmware", permission = "/device-mgt/devices/android/operations/upgrade")
|
||||||
Response upgradeFirmware(
|
Response upgradeFirmware(
|
||||||
@ApiParam(name = "upgradeFirmwareBeanWrapper",
|
@ApiParam(name = "upgradeFirmwareBeanWrapper",
|
||||||
value = "Firmware upgrade configuration and DeviceIds")
|
value = "Firmware upgrade configuration and DeviceIds")
|
||||||
@ -1068,7 +1070,7 @@ public interface DeviceManagementAdminService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding a new configure VPN operation.")
|
"Server error occurred while adding a new configure VPN operation.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:operation:vpn", name = "Add VPN profiles", description = "")
|
@Permission(name = "Add VPN", permission = "/device-mgt/devices/android/operations/vpn")
|
||||||
Response configureVPN(
|
Response configureVPN(
|
||||||
@ApiParam(name = "vpnBeanWrapper",
|
@ApiParam(name = "vpnBeanWrapper",
|
||||||
value = "VPN configuration and DeviceIds")
|
value = "VPN configuration and DeviceIds")
|
||||||
@ -1122,7 +1124,7 @@ public interface DeviceManagementAdminService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding a new send notification operation.")
|
"Server error occurred while adding a new send notification operation.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:operation:notification", name = "Send notifications", description = "")
|
@Permission(name = "Send Notifications", permission = "/device-mgt/devices/android/operations/notification")
|
||||||
Response sendNotification(
|
Response sendNotification(
|
||||||
@ApiParam(name = "notificationBeanWrapper",
|
@ApiParam(name = "notificationBeanWrapper",
|
||||||
value = "Notification Configurations and device Ids")
|
value = "Notification Configurations and device Ids")
|
||||||
@ -1176,7 +1178,7 @@ public interface DeviceManagementAdminService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding a new configure wifi operation.")
|
"Server error occurred while adding a new configure wifi operation.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:operation:wifi", name = "Add WiFi configurations", description = "")
|
@Permission(name = "Add Wifi Configuration", permission = "/device-mgt/devices/android/operations/wifi")
|
||||||
Response configureWifi(
|
Response configureWifi(
|
||||||
@ApiParam(name = "wifiBeanWrapper",
|
@ApiParam(name = "wifiBeanWrapper",
|
||||||
value = "WifiConfigurations and Device Ids") WifiBeanWrapper wifiBeanWrapper);
|
value = "WifiConfigurations and Device Ids") WifiBeanWrapper wifiBeanWrapper);
|
||||||
@ -1229,7 +1231,7 @@ public interface DeviceManagementAdminService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding a new encrypt storage operation.")
|
"Server error occurred while adding a new encrypt storage operation.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:operation:encrypt", name = "Encrypt device", description = "")
|
@Permission(name = "Encrypt Device", permission = "/device-mgt/devices/android/operations/encrypt")
|
||||||
Response encryptStorage(
|
Response encryptStorage(
|
||||||
@ApiParam(name = "encryptionBeanWrapper",
|
@ApiParam(name = "encryptionBeanWrapper",
|
||||||
value = "Configurations and deviceIds need to be done data encryption")
|
value = "Configurations and deviceIds need to be done data encryption")
|
||||||
@ -1283,7 +1285,7 @@ public interface DeviceManagementAdminService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding a new change lock code operation.")
|
"Server error occurred while adding a new change lock code operation.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:operation:change-lock", name = "Change password of device", description = "")
|
@Permission(name = "Change Password of Device", permission = "/device-mgt/devices/android/operations/change-lock")
|
||||||
Response changeLockCode(
|
Response changeLockCode(
|
||||||
@ApiParam(name = "lockCodeBeanWrapper",
|
@ApiParam(name = "lockCodeBeanWrapper",
|
||||||
value = "Configurations and device Ids need to be done change lock code")
|
value = "Configurations and device Ids need to be done change lock code")
|
||||||
@ -1337,7 +1339,7 @@ public interface DeviceManagementAdminService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding a new set password policy operation.")
|
"Server error occurred while adding a new set password policy operation.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:operation:password-policy", name = "Set password policy", description = "")
|
@Permission(name = "Set Password Policy", permission = "/device-mgt/devices/android/operations/password-policy")
|
||||||
Response setPasswordPolicy(
|
Response setPasswordPolicy(
|
||||||
@ApiParam(name = "passwordPolicyBeanWrapper",
|
@ApiParam(name = "passwordPolicyBeanWrapper",
|
||||||
value = "Password Policy Configurations and Device Ids")
|
value = "Password Policy Configurations and Device Ids")
|
||||||
@ -1391,7 +1393,7 @@ public interface DeviceManagementAdminService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding a new set webclip operation.")
|
"Server error occurred while adding a new set webclip operation.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:operation:webclip", name = "Add webclips", description = "")
|
@Permission(name = "Add Webclips", permission = "/device-mgt/devices/android/operations/webclip")
|
||||||
Response setWebClip(
|
Response setWebClip(
|
||||||
@ApiParam(name = "webClipBeanWrapper",
|
@ApiParam(name = "webClipBeanWrapper",
|
||||||
value = "Configurations to need set web clip on device and device Ids")
|
value = "Configurations to need set web clip on device and device Ids")
|
||||||
|
|||||||
@ -20,6 +20,7 @@ package org.wso2.carbon.mdm.services.android.services;
|
|||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import org.wso2.carbon.apimgt.annotations.api.API;
|
import org.wso2.carbon.apimgt.annotations.api.API;
|
||||||
|
import org.wso2.carbon.apimgt.annotations.api.Permission;
|
||||||
import org.wso2.carbon.apimgt.annotations.api.Scope;
|
import org.wso2.carbon.apimgt.annotations.api.Scope;
|
||||||
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
|
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
|
||||||
import org.wso2.carbon.mdm.services.android.bean.wrapper.AndroidApplication;
|
import org.wso2.carbon.mdm.services.android.bean.wrapper.AndroidApplication;
|
||||||
@ -87,7 +88,7 @@ public interface DeviceManagementService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while updating the application list.")
|
"Server error occurred while updating the application list.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:enroll", name = "Enroll Android device", description = "")
|
@Permission(name = "Enroll Device", permission = "/device-mgt/devices/android/enroll")
|
||||||
Response updateApplicationList(
|
Response updateApplicationList(
|
||||||
@ApiParam(
|
@ApiParam(
|
||||||
name = "id",
|
name = "id",
|
||||||
@ -141,7 +142,7 @@ public interface DeviceManagementService {
|
|||||||
code = 500,
|
code = 500,
|
||||||
message = "Internal Server Error. \n Server error occurred while fetching policies.")
|
message = "Internal Server Error. \n Server error occurred while fetching policies.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:enroll", name = "Enroll Android device", description = "")
|
@Permission(name = "Enroll Device", permission = "/device-mgt/devices/android/enroll")
|
||||||
Response getPendingOperations(
|
Response getPendingOperations(
|
||||||
@ApiParam(
|
@ApiParam(
|
||||||
name = "id",
|
name = "id",
|
||||||
@ -206,7 +207,7 @@ public interface DeviceManagementService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding a new policy.")
|
"Server error occurred while adding a new policy.")
|
||||||
})
|
})
|
||||||
|
@Permission(name = "Enroll Device", permission = "/device-mgt/devices/android/enroll")
|
||||||
Response enrollDevice(@ApiParam(name = "device", value = "Device Information to be enroll")
|
Response enrollDevice(@ApiParam(name = "device", value = "Device Information to be enroll")
|
||||||
@Valid AndroidDevice device);
|
@Valid AndroidDevice device);
|
||||||
|
|
||||||
@ -245,7 +246,7 @@ public interface DeviceManagementService {
|
|||||||
code = 500,
|
code = 500,
|
||||||
message = "Internal Server Error. \n Server error occurred while fetching the enrollment status of the Android device.")
|
message = "Internal Server Error. \n Server error occurred while fetching the enrollment status of the Android device.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:enroll", name = "Enroll Android device", description = "")
|
@Permission(name = "Enroll Device", permission = "/device-mgt/devices/android/enroll")
|
||||||
Response isEnrolled(
|
Response isEnrolled(
|
||||||
@ApiParam(
|
@ApiParam(
|
||||||
name = "id",
|
name = "id",
|
||||||
@ -299,7 +300,7 @@ public interface DeviceManagementService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while updating the device enrollment.")
|
"Server error occurred while updating the device enrollment.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:enroll", name = "Enroll Android device", description = "")
|
@Permission(name = "Enroll Device", permission = "/device-mgt/devices/android/enroll")
|
||||||
Response modifyEnrollment(
|
Response modifyEnrollment(
|
||||||
@ApiParam(
|
@ApiParam(
|
||||||
name = "id",
|
name = "id",
|
||||||
@ -329,7 +330,7 @@ public interface DeviceManagementService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while dis-enrolling the device.")
|
"Server error occurred while dis-enrolling the device.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:disenroll", name = "Enroll Android device", description = "")
|
@Permission(name = "Enroll Device", permission = "/device-mgt/devices/android/enroll")
|
||||||
Response disEnrollDevice(
|
Response disEnrollDevice(
|
||||||
@ApiParam(
|
@ApiParam(
|
||||||
name = "id",
|
name = "id",
|
||||||
|
|||||||
@ -20,6 +20,7 @@ package org.wso2.carbon.mdm.services.android.services;
|
|||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import org.wso2.carbon.apimgt.annotations.api.API;
|
import org.wso2.carbon.apimgt.annotations.api.API;
|
||||||
|
import org.wso2.carbon.apimgt.annotations.api.Permission;
|
||||||
import org.wso2.carbon.apimgt.annotations.api.Scope;
|
import org.wso2.carbon.apimgt.annotations.api.Scope;
|
||||||
import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration;
|
import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration;
|
||||||
import org.wso2.carbon.mdm.services.android.bean.AndroidPlatformConfiguration;
|
import org.wso2.carbon.mdm.services.android.bean.AndroidPlatformConfiguration;
|
||||||
@ -81,7 +82,7 @@ public interface DeviceTypeConfigurationService {
|
|||||||
code = 500,
|
code = 500,
|
||||||
message = "Internal Server Error. \n Server error occurred while fetching Android platform configuration.")
|
message = "Internal Server Error. \n Server error occurred while fetching Android platform configuration.")
|
||||||
})
|
})
|
||||||
@Scope(key = "configuration:view", name = "View configurations", description = "")
|
@Permission(name = "View Configurations", permission = "/device-mgt/configurations/view")
|
||||||
Response getConfiguration(
|
Response getConfiguration(
|
||||||
@ApiParam(
|
@ApiParam(
|
||||||
name = "If-Modified-Since",
|
name = "If-Modified-Since",
|
||||||
@ -131,7 +132,7 @@ public interface DeviceTypeConfigurationService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while modifying Android platform configuration.")
|
"Server error occurred while modifying Android platform configuration.")
|
||||||
})
|
})
|
||||||
@Scope(key = "configuration:manage", name = "Add configurations", description = "")
|
@Permission(name = "Manage Configurations", permission = "/device-mgt/configurations/manage")
|
||||||
Response updateConfiguration(
|
Response updateConfiguration(
|
||||||
@ApiParam(name = "configuration",
|
@ApiParam(name = "configuration",
|
||||||
value = "AndroidPlatformConfiguration")
|
value = "AndroidPlatformConfiguration")
|
||||||
@ -179,7 +180,7 @@ public interface DeviceTypeConfigurationService {
|
|||||||
code = 500,
|
code = 500,
|
||||||
message = "Internal Server Error. \n Server error occurred while fetching Android license configuration.")
|
message = "Internal Server Error. \n Server error occurred while fetching Android license configuration.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:enroll", name = "Enroll Android device", description = "")
|
@Permission(name = "Enroll Device", permission = "/device-mgt/devices/android/enroll")
|
||||||
Response getLicense(
|
Response getLicense(
|
||||||
@ApiParam(
|
@ApiParam(
|
||||||
name = "If-Modified-Since",
|
name = "If-Modified-Since",
|
||||||
|
|||||||
@ -20,6 +20,7 @@ package org.wso2.carbon.mdm.services.android.services;
|
|||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import org.wso2.carbon.apimgt.annotations.api.API;
|
import org.wso2.carbon.apimgt.annotations.api.API;
|
||||||
|
import org.wso2.carbon.apimgt.annotations.api.Permission;
|
||||||
import org.wso2.carbon.apimgt.annotations.api.Scope;
|
import org.wso2.carbon.apimgt.annotations.api.Scope;
|
||||||
import org.wso2.carbon.mdm.services.android.bean.DeviceState;
|
import org.wso2.carbon.mdm.services.android.bean.DeviceState;
|
||||||
import org.wso2.carbon.mdm.services.android.bean.wrapper.EventBeanWrapper;
|
import org.wso2.carbon.mdm.services.android.bean.wrapper.EventBeanWrapper;
|
||||||
@ -90,7 +91,7 @@ public interface EventReceiverService {
|
|||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while publishing events.")
|
"Server error occurred while publishing events.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:event:manage", name = "Publish events to DAS", description = "")
|
@Permission(name = "Publish Events to DAS", permission = "/device-mgt/devices/android/events/manage")
|
||||||
Response publishEvents(
|
Response publishEvents(
|
||||||
@ApiParam(
|
@ApiParam(
|
||||||
name = "eventBeanWrapper",
|
name = "eventBeanWrapper",
|
||||||
@ -140,7 +141,7 @@ public interface EventReceiverService {
|
|||||||
code = 500,
|
code = 500,
|
||||||
message = "Error occurred while getting published events for specific device.")
|
message = "Error occurred while getting published events for specific device.")
|
||||||
})
|
})
|
||||||
@Scope(key = "device:android:event:read", name = "View events", description = "")
|
@Permission(name = "Publish Events to DAS", permission = "/device-mgt/devices/android/events/manage")
|
||||||
Response retrieveAlerts(
|
Response retrieveAlerts(
|
||||||
@ApiParam(
|
@ApiParam(
|
||||||
name = "id",
|
name = "id",
|
||||||
|
|||||||
@ -19,6 +19,7 @@
|
|||||||
package org.wso2.carbon.device.mgt.mobile.windows.api.services;
|
package org.wso2.carbon.device.mgt.mobile.windows.api.services;
|
||||||
|
|
||||||
import org.wso2.carbon.apimgt.annotations.api.API;
|
import org.wso2.carbon.apimgt.annotations.api.API;
|
||||||
|
import org.wso2.carbon.apimgt.annotations.api.Permission;
|
||||||
import org.wso2.carbon.apimgt.annotations.api.Scope;
|
import org.wso2.carbon.apimgt.annotations.api.Scope;
|
||||||
import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration;
|
import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration;
|
||||||
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsConfigurationException;
|
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsConfigurationException;
|
||||||
@ -49,7 +50,7 @@ public interface ConfigurationMgtService {
|
|||||||
* @throws WindowsConfigurationException
|
* @throws WindowsConfigurationException
|
||||||
*/
|
*/
|
||||||
@POST
|
@POST
|
||||||
@Scope(key = "configuration:manage", name = "Add configurations", description = "")
|
@Permission(name = "Manage Configurations", permission = "/device-mgt/configurations/manage")
|
||||||
Message ConfigureSettings(PlatformConfiguration configuration) throws WindowsConfigurationException;
|
Message ConfigureSettings(PlatformConfiguration configuration) throws WindowsConfigurationException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -59,7 +60,7 @@ public interface ConfigurationMgtService {
|
|||||||
* @throws WindowsConfigurationException
|
* @throws WindowsConfigurationException
|
||||||
*/
|
*/
|
||||||
@GET
|
@GET
|
||||||
@Scope(key = "configuration:view", name = "View configurations", description = "")
|
@Permission(name = "View Configurations", permission = "/device-mgt/configurations/view")
|
||||||
PlatformConfiguration getConfiguration() throws WindowsConfigurationException;
|
PlatformConfiguration getConfiguration() throws WindowsConfigurationException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -70,6 +71,6 @@ public interface ConfigurationMgtService {
|
|||||||
* @throws WindowsConfigurationException
|
* @throws WindowsConfigurationException
|
||||||
*/
|
*/
|
||||||
@PUT
|
@PUT
|
||||||
@Scope(key = "configuration:manage", name = "Add configurations", description = "")
|
@Permission(name = "Manage Configurations", permission = "/device-mgt/configurations/manage")
|
||||||
Message updateConfiguration(PlatformConfiguration configuration) throws WindowsConfigurationException;
|
Message updateConfiguration(PlatformConfiguration configuration) throws WindowsConfigurationException;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user