|
|
@ -21,11 +21,14 @@ package org.wso2.carbon.device.mgt.mobile.windows.api.services;
|
|
|
|
|
|
|
|
|
|
|
|
import io.swagger.annotations.*;
|
|
|
|
import io.swagger.annotations.*;
|
|
|
|
import org.w3c.dom.Document;
|
|
|
|
import org.w3c.dom.Document;
|
|
|
|
|
|
|
|
import org.wso2.carbon.apimgt.annotations.api.Scope;
|
|
|
|
|
|
|
|
import org.wso2.carbon.apimgt.annotations.api.Scopes;
|
|
|
|
import org.wso2.carbon.device.mgt.common.notification.mgt.NotificationManagementException;
|
|
|
|
import org.wso2.carbon.device.mgt.common.notification.mgt.NotificationManagementException;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsConfigurationException;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsConfigurationException;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsDeviceEnrolmentException;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsDeviceEnrolmentException;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.windows.api.operations.WindowsOperationException;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.windows.api.operations.WindowsOperationException;
|
|
|
|
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.windows.api.operations.util.Constants;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.ws.rs.Consumes;
|
|
|
|
import javax.ws.rs.Consumes;
|
|
|
|
import javax.ws.rs.POST;
|
|
|
|
import javax.ws.rs.POST;
|
|
|
@ -38,25 +41,17 @@ import javax.ws.rs.core.Response;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Interface for Windows 10 Device management phase.
|
|
|
|
* Interface for Windows 10 Device management phase.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@SwaggerDefinition(
|
|
|
|
@Path("/devicemgt")
|
|
|
|
info = @Info(
|
|
|
|
@Scopes(
|
|
|
|
version = "1.0.0",
|
|
|
|
scopes = {
|
|
|
|
title = "",
|
|
|
|
@Scope(
|
|
|
|
extensions = {
|
|
|
|
name = "Pending operations",
|
|
|
|
@Extension(properties = {
|
|
|
|
description = "Register an Android device",
|
|
|
|
@ExtensionProperty(name = "name", value = "Windows 10 Device management"),
|
|
|
|
key = "perm:windows:enroll",
|
|
|
|
@ExtensionProperty(name = "context",
|
|
|
|
permissions = {"/device-mgt/devices/enroll/windows"}
|
|
|
|
value = "/api/device-mgt/windows/v1.0/management/devicemgt"),
|
|
|
|
)
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
tags = {
|
|
|
|
|
|
|
|
@Tag(name = "windows", description = "")
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
)
|
|
|
|
)
|
|
|
|
//@Api(value = "Windows 10 Device management",
|
|
|
|
|
|
|
|
// description = "This carries all the resources related to Windows 10 management session message flow.")
|
|
|
|
|
|
|
|
@Path("/devicemgt")
|
|
|
|
|
|
|
|
public interface DeviceManagementService {
|
|
|
|
public interface DeviceManagementService {
|
|
|
|
@Path("/pending-operations")
|
|
|
|
@Path("/pending-operations")
|
|
|
|
@POST
|
|
|
|
@POST
|
|
|
@ -68,14 +63,10 @@ public interface DeviceManagementService {
|
|
|
|
notes = "Using this API to fetching more information to enroll the Device and " +
|
|
|
|
notes = "Using this API to fetching more information to enroll the Device and " +
|
|
|
|
"getting pending operations.",
|
|
|
|
"getting pending operations.",
|
|
|
|
tags = "Windows Device Management Administrative Service",
|
|
|
|
tags = "Windows Device Management Administrative Service",
|
|
|
|
authorizations = {
|
|
|
|
extensions = {
|
|
|
|
@Authorization(
|
|
|
|
@Extension(properties = {
|
|
|
|
value = "permission",
|
|
|
|
@ExtensionProperty(name = Constants.SCOPE, value = "perm:android:enroll")
|
|
|
|
scopes = {@AuthorizationScope(
|
|
|
|
})
|
|
|
|
scope = "/device-mgt/devices/enroll/windows",
|
|
|
|
|
|
|
|
description = "Getting pending operations and " +
|
|
|
|
|
|
|
|
"device information to enroll the device")}
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
)
|
|
|
|
)
|
|
|
|
@ApiResponses(value = {
|
|
|
|
@ApiResponses(value = {
|
|
|
|