diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/DeviceManagementService.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/DeviceManagementService.java index 081158f30..602403cd6 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/DeviceManagementService.java +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/DeviceManagementService.java @@ -21,11 +21,14 @@ package org.wso2.carbon.device.mgt.mobile.windows.api.services; import io.swagger.annotations.*; 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.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.WindowsDeviceEnrolmentException; 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.POST; @@ -38,25 +41,17 @@ import javax.ws.rs.core.Response; /** * Interface for Windows 10 Device management phase. */ -@SwaggerDefinition( - info = @Info( - version = "1.0.0", - title = "", - extensions = { - @Extension(properties = { - @ExtensionProperty(name = "name", value = "Windows 10 Device management"), - @ExtensionProperty(name = "context", - value = "/api/device-mgt/windows/v1.0/management/devicemgt"), - }) - } - ), - tags = { - @Tag(name = "windows", description = "") +@Path("/devicemgt") +@Scopes( + scopes = { + @Scope( + name = "Pending operations", + description = "Register an Android device", + key = "perm:windows:enroll", + permissions = {"/device-mgt/devices/enroll/windows"} + ) } ) -//@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 { @Path("/pending-operations") @POST @@ -68,14 +63,10 @@ public interface DeviceManagementService { notes = "Using this API to fetching more information to enroll the Device and " + "getting pending operations.", tags = "Windows Device Management Administrative Service", - authorizations = { - @Authorization( - value = "permission", - scopes = {@AuthorizationScope( - scope = "/device-mgt/devices/enroll/windows", - description = "Getting pending operations and " + - "device information to enroll the device")} - ) + extensions = { + @Extension(properties = { + @ExtensionProperty(name = Constants.SCOPE, value = "perm:android:enroll") + }) } ) @ApiResponses(value = { diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/discovery/DiscoveryService.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/discovery/DiscoveryService.java index db9a8125d..2b856cb85 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/discovery/DiscoveryService.java +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/discovery/DiscoveryService.java @@ -42,24 +42,7 @@ import javax.xml.ws.soap.SOAPBinding; /** * Interface for Discovery service related operations. */ -@SwaggerDefinition( - info = @Info( - version = "1.0.0", - title = "", - extensions = { - @Extension(properties = { - @ExtensionProperty(name = "name", value = "Windows Discovery Service"), - @ExtensionProperty(name = "context", - value = "/api/device-mgt/windows/v1.0/discovery/post"), - }) - } - ), - tags = { - @Tag(name = "windows", description = "") - } -) -@Api(value = "Windows Discovery Service", - description = "This carries all the resources related to Windows Discovery service.") + @WebService(targetNamespace = PluginConstants.DISCOVERY_SERVICE_TARGET_NAMESPACE, name = "IDiscoveryService") @BindingType(value = SOAPBinding.SOAP12HTTP_BINDING) diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/discovery/beans/DiscoveryRequest.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/discovery/beans/DiscoveryRequest.java index 2c8260fb9..d6e3a185e 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/discovery/beans/DiscoveryRequest.java +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/discovery/beans/DiscoveryRequest.java @@ -86,4 +86,13 @@ public class DiscoveryRequest implements Serializable { this.osEdition = osEdition; } -} \ No newline at end of file + public String getApplicationVersion() { + return applicationVersion; + } + + public void setApplicationVersion(String applicationVersion) { + this.applicationVersion = applicationVersion; + } + + +} diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/enrollment/EnrollmentService.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/enrollment/EnrollmentService.java index 2d2586c86..cb3e38091 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/enrollment/EnrollmentService.java +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/enrollment/EnrollmentService.java @@ -35,25 +35,6 @@ import javax.xml.ws.ResponseWrapper; import javax.xml.ws.soap.SOAPBinding; import java.io.UnsupportedEncodingException; -@SwaggerDefinition( - info = @Info( - version = "1.0.0", - title = "", - extensions = { - @io.swagger.annotations.Extension(properties = { - @ExtensionProperty(name = "name", value = "Windows 10 Enrollment Service"), - @ExtensionProperty(name = "context", - value = "/api/device-mgt/windows/v1.0/deviceenrolment/enrollment"), - }) - } - ), - tags = { - @Tag(name = "windows", description = "") - } -) -//@Api(value = "Windows 10 Enrollment Service", -// description = "This carries all the resources related to Windows enrollment.") - @WebService(targetNamespace = PluginConstants.DEVICE_ENROLLMENT_SERVICE_TARGET_NAMESPACE, name = "enrollment") @BindingType(value = SOAPBinding.SOAP12HTTP_BINDING) public interface EnrollmentService { diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/syncml/SyncmlService.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/syncml/SyncmlService.java index 7ba8c570b..d165763ae 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/syncml/SyncmlService.java +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/syncml/SyncmlService.java @@ -37,24 +37,7 @@ import javax.ws.rs.core.Response; /** * Interface for Windows 8.1 enrollment flow. */ -@SwaggerDefinition( - info = @Info( - version = "1.0.0", - title = "", - extensions = { - @Extension(properties = { - @ExtensionProperty(name = "name", value = "Windows 8.1 Device Management Service"), - @ExtensionProperty(name = "context", - value = "/api/device-mgt/windows/v1.0/syncml"), - }) - } - ), - tags = { - @Tag(name = "windows", description = "") - } -) -@Api(value = "Windows 8.1 Device Management Service", - description = "This carries all the resources related to Windows syncml message flow.") + @Path("/devicemanagement") public interface SyncmlService { diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/xcep/CertificateEnrollmentPolicyService.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/xcep/CertificateEnrollmentPolicyService.java index 0934824c9..91cb4de1c 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/xcep/CertificateEnrollmentPolicyService.java +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/xcep/CertificateEnrollmentPolicyService.java @@ -41,24 +41,6 @@ import javax.xml.ws.soap.SOAPBinding; * Interface for MS-XCEP implementation. */ -@SwaggerDefinition( - info = @Info( - version = "1.0.0", - title = "", - extensions = { - @io.swagger.annotations.Extension(properties = { - @ExtensionProperty(name = "name", value = "Windows Enrollment policy Service"), - @ExtensionProperty(name = "context", - value = "/api/device-mgt/windows/v1.0/certificatepolicy/xcep"), - }) - } - ), - tags = { - @Tag(name = "windows", description = "") - } -) -@Api(value = "Windows Enrollment policy Service", - description = "This carries all the resources related to Windows enrollment policy.") @WebService(targetNamespace = PluginConstants.CERTIFICATE_ENROLLMENT_POLICY_SERVICE_TARGET_NAMESPACE, name = "IPolicy") @BindingType(value = SOAPBinding.SOAP12HTTP_BINDING)