From 429266d9d2677995e4152a7c4c9db9e077e38f08 Mon Sep 17 00:00:00 2001 From: Hasunie Date: Fri, 13 Jan 2017 09:07:33 +0530 Subject: [PATCH 01/10] adding windows synaps configs --- .../windows/api/common/PluginConstants.java | 1 + .../api/services/DeviceManagementService.java | 4 +- .../discovery/impl/DiscoveryServiceImpl.java | 6 +- .../enrollment/EnrollmentService.java | 4 +- .../admin--Windows_10_Device_management.xml | 56 ++++++ ...n--Windows_10_Device_management_v1.0.0.xml | 52 ++++++ .../admin--Windows_10_Enrollment_Service.xml | 56 ++++++ ...--Windows_10_Enrollment_Service_v1.0.0.xml | 44 +++++ ...-Windows_8.1_Device_Management_Service.xml | 54 ++++++ ...s_8.1_Device_Management_Service_v1.0.0.xml | 42 +++++ .../admin--Windows_8.1_Enrollment_Service.xml | 54 ++++++ ...-Windows_8.1_Enrollment_Service_v1.0.0.xml | 42 +++++ ...-Windows_Binary_Security_Token_Service.xml | 54 ++++++ ...s_Binary_Security_Token_Service_v1.0.0.xml | 42 +++++ ...dmin--Windows_Configuration_Management.xml | 54 ++++++ ...indows_Configuration_Management_v1.0.0.xml | 64 +++++++ ...vice_Management_Administrative_Service.xml | 54 ++++++ ...nagement_Administrative_Service_v1.0.0.xml | 174 ++++++++++++++++++ .../apis/admin--Windows_Discovery_Service.xml | 56 ++++++ ...dmin--Windows_Discovery_Service_v1.0.0.xml | 44 +++++ ...min--Windows_Enrollment_policy_Service.xml | 56 ++++++ ...ndows_Enrollment_policy_Service_v1.0.0.xml | 44 +++++ .../main/resources/devicetypes/windows.xml | 7 + .../src/main/resources/p2.inf | 13 +- 24 files changed, 1068 insertions(+), 9 deletions(-) create mode 100644 features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_10_Device_management.xml create mode 100644 features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_10_Device_management_v1.0.0.xml create mode 100644 features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_10_Enrollment_Service.xml create mode 100644 features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_10_Enrollment_Service_v1.0.0.xml create mode 100644 features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_8.1_Device_Management_Service.xml create mode 100644 features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_8.1_Device_Management_Service_v1.0.0.xml create mode 100644 features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_8.1_Enrollment_Service.xml create mode 100644 features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_8.1_Enrollment_Service_v1.0.0.xml create mode 100644 features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Binary_Security_Token_Service.xml create mode 100644 features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Binary_Security_Token_Service_v1.0.0.xml create mode 100644 features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Configuration_Management.xml create mode 100644 features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Configuration_Management_v1.0.0.xml create mode 100644 features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Device_Management_Administrative_Service.xml create mode 100644 features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Device_Management_Administrative_Service_v1.0.0.xml create mode 100644 features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Discovery_Service.xml create mode 100644 features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Discovery_Service_v1.0.0.xml create mode 100644 features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Enrollment_policy_Service.xml create mode 100644 features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Enrollment_policy_Service_v1.0.0.xml 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/common/PluginConstants.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/common/PluginConstants.java index 27a7b479e..bebdafe00 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/common/PluginConstants.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/common/PluginConstants.java @@ -342,6 +342,7 @@ public final class PluginConstants { } public static final String REQUESTED_WIN10_VERSION = "3.0"; public static final String REQUESTED_WIN81_VERSION = "2.0"; + public static final String OS_VERSION = "10"; } /** 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 06ff00717..081158f30 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 @@ -54,8 +54,8 @@ import javax.ws.rs.core.Response; @Tag(name = "windows", description = "") } ) -@Api(value = "Windows 10 Device management", - description = "This carries all the resources related to Windows 10 management session message flow.") +//@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") 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/impl/DiscoveryServiceImpl.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/impl/DiscoveryServiceImpl.java index 08e69af07..da50c09c9 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/impl/DiscoveryServiceImpl.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/impl/DiscoveryServiceImpl.java @@ -68,9 +68,11 @@ public class DiscoveryServiceImpl implements DiscoveryService { String emailId = discoveryRequest.getEmailId(); String[] userDomains = emailId.split(DELIMITER); String domain = userDomains[DOMAIN_SEGMENT]; + String osVersion = discoveryRequest.getOsEdition(); + String[] osVersions = osVersion .split("."); + String os = osVersions[0]; DiscoveryResponse discoveryResponse; - if (PluginConstants.WindowsVersionProperties.REQUESTED_WIN10_VERSION.equals(discoveryRequest.getVersion()) && - FEDERATED.equals(getAuthPolicy())) { + if (PluginConstants.WindowsVersionProperties.OS_VERSION.equals(os) && FEDERATED.equals(getAuthPolicy())) { discoveryResponse = new DiscoveryResponse(); discoveryResponse.setAuthPolicy(FEDERATED); 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 42af80541..2d2586c86 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 @@ -51,8 +51,8 @@ import java.io.UnsupportedEncodingException; @Tag(name = "windows", description = "") } ) -@Api(value = "Windows 10 Enrollment Service", - description = "This carries all the resources related to Windows enrollment.") +//@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) diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_10_Device_management.xml b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_10_Device_management.xml new file mode 100644 index 000000000..84586a896 --- /dev/null +++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_10_Device_management.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + 500 + Status report + Internal Server Error + Faulty invoking through default API + + + + + + +
+ + + + + + + + +
+ + + + + + 60000 + fault + + + + + + + + + + + + + + + + + diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_10_Device_management_v1.0.0.xml b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_10_Device_management_v1.0.0.xml new file mode 100644 index 000000000..2081ae6ef --- /dev/null +++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_10_Device_management_v1.0.0.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_10_Enrollment_Service.xml b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_10_Enrollment_Service.xml new file mode 100644 index 000000000..e901919e3 --- /dev/null +++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_10_Enrollment_Service.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + 500 + Status report + Internal Server Error + Faulty invoking through default API + + + + + + +
+ + + + + + + + +
+ + + + + + 60000 + fault + + + + + + + + + + + + + + + + + diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_10_Enrollment_Service_v1.0.0.xml b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_10_Enrollment_Service_v1.0.0.xml new file mode 100644 index 000000000..ced6d1129 --- /dev/null +++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_10_Enrollment_Service_v1.0.0.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_8.1_Device_Management_Service.xml b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_8.1_Device_Management_Service.xml new file mode 100644 index 000000000..e8756d3bd --- /dev/null +++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_8.1_Device_Management_Service.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + 500 + Status report + Internal Server Error + Faulty invoking through default API + + + + + + +
+ + + + + + + + +
+ + + + + + 60000 + fault + + + + + + + + + + + + + + + diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_8.1_Device_Management_Service_v1.0.0.xml b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_8.1_Device_Management_Service_v1.0.0.xml new file mode 100644 index 000000000..771f35509 --- /dev/null +++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_8.1_Device_Management_Service_v1.0.0.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_8.1_Enrollment_Service.xml b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_8.1_Enrollment_Service.xml new file mode 100644 index 000000000..57c18f375 --- /dev/null +++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_8.1_Enrollment_Service.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + 500 + Status report + Internal Server Error + Faulty invoking through default API + + + + + + +
+ + + + + + + + +
+ + + + + + 60000 + fault + + + + + + + + + + + + + + + diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_8.1_Enrollment_Service_v1.0.0.xml b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_8.1_Enrollment_Service_v1.0.0.xml new file mode 100644 index 000000000..2be45de64 --- /dev/null +++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_8.1_Enrollment_Service_v1.0.0.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Binary_Security_Token_Service.xml b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Binary_Security_Token_Service.xml new file mode 100644 index 000000000..640df9ea0 --- /dev/null +++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Binary_Security_Token_Service.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + 500 + Status report + Internal Server Error + Faulty invoking through default API + + + + + + +
+ + + + + + + + +
+ + + + + + 60000 + fault + + + + + + + + + + + + + + + diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Binary_Security_Token_Service_v1.0.0.xml b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Binary_Security_Token_Service_v1.0.0.xml new file mode 100644 index 000000000..830055ddf --- /dev/null +++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Binary_Security_Token_Service_v1.0.0.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Configuration_Management.xml b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Configuration_Management.xml new file mode 100644 index 000000000..ecabcf446 --- /dev/null +++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Configuration_Management.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + 500 + Status report + Internal Server Error + Faulty invoking through default API + + + + + + +
+ + + + + + + + +
+ + + + + + 60000 + fault + + + + + + + + + + + + + + + diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Configuration_Management_v1.0.0.xml b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Configuration_Management_v1.0.0.xml new file mode 100644 index 000000000..2f5edcf76 --- /dev/null +++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Configuration_Management_v1.0.0.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Device_Management_Administrative_Service.xml b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Device_Management_Administrative_Service.xml new file mode 100644 index 000000000..93a2834aa --- /dev/null +++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Device_Management_Administrative_Service.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + 500 + Status report + Internal Server Error + Faulty invoking through default API + + + + + + +
+ + + + + + + + +
+ + + + + + 60000 + fault + + + + + + + + + + + + + + + diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Device_Management_Administrative_Service_v1.0.0.xml b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Device_Management_Administrative_Service_v1.0.0.xml new file mode 100644 index 000000000..73e001e5c --- /dev/null +++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Device_Management_Administrative_Service_v1.0.0.xml @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Discovery_Service.xml b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Discovery_Service.xml new file mode 100644 index 000000000..63b9966e2 --- /dev/null +++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Discovery_Service.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + 500 + Status report + Internal Server Error + Faulty invoking through default API + + + + + + +
+ + + + + + + + +
+ + + + + + 60000 + fault + + + + + + + + + + + + + + + + + diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Discovery_Service_v1.0.0.xml b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Discovery_Service_v1.0.0.xml new file mode 100644 index 000000000..7bab00a0f --- /dev/null +++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Discovery_Service_v1.0.0.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Enrollment_policy_Service.xml b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Enrollment_policy_Service.xml new file mode 100644 index 000000000..9e2e438d6 --- /dev/null +++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Enrollment_policy_Service.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + 500 + Status report + Internal Server Error + Faulty invoking through default API + + + + + + +
+ + + + + + + + +
+ + + + + + 60000 + fault + + + + + + + + + + + + + + + + + diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Enrollment_policy_Service_v1.0.0.xml b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Enrollment_policy_Service_v1.0.0.xml new file mode 100644 index 000000000..4b6e550a6 --- /dev/null +++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/apis/admin--Windows_Enrollment_policy_Service_v1.0.0.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/devicetypes/windows.xml b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/devicetypes/windows.xml index 517a9fe0b..a20e4ec38 100644 --- a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/devicetypes/windows.xml +++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/devicetypes/windows.xml @@ -120,6 +120,13 @@ type="application/json"> + + Reboot + Reboot the device + + + Device info Request device information diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/p2.inf b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/p2.inf index 2888d1ef1..e284e15ab 100644 --- a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/p2.inf +++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/p2.inf @@ -7,7 +7,15 @@ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../data org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.windows_${feature.version}/database/,target:${installFolder}/../../database/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/devicetypes/);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.windows_${feature.version}/devicetypes/,target:${installFolder}/../../deployment/server/devicetypes/,overwrite:true);\ - +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.windows_${feature.version}/apis/admin--Windows_Discovery_Service.xml,target:${installFolder}/../../deployment/server/synapse-configs/default/api/admin--Windows_Discovery_Service.xml,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.windows_${feature.version}/apis/admin--Windows_Discovery_Service_v1.0.0.xml,target:${installFolder}/../../deployment/server/synapse-configs/default/api/admin--Windows_Discovery_Service_v1.0.0.xml,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.windows_${feature.version}/apis/admin--Windows_Enrollment_policy_Service.xml,target:${installFolder}/../../deployment/server/synapse-configs/default/api/admin--Windows_Enrollment_policy_Service.xml,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.windows_${feature.version}/apis/admin--Windows_Enrollment_policy_Service_v1.0.0.xml,target:${installFolder}/../../deployment/server/synapse-configs/default/api/admin--Windows_Enrollment_policy_Service_v1.0.0.xml,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.windows_${feature.version}/apis/admin--Windows_10_Enrollment_Service.xml,target:${installFolder}/../../deployment/server/synapse-configs/default/api/admin--Windows_10_Enrollment_Service.xml,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.windows_${feature.version}/apis/admin--Windows_10_Enrollment_Service_v1.0.0.xml,target:${installFolder}/../../deployment/server/synapse-configs/default/api/admin--Windows_10_Enrollment_Service_v1.0.0.xml,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.windows_${feature.version}/apis/admin--Windows_10_Device_management.xml,target:${installFolder}/../../deployment/server/synapse-configs/default/api/admin--Windows_10_Device_management.xml,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.windows_${feature.version}/apis/admin--Windows_10_Device_management_v1.0.0.xml,target:${installFolder}/../../deployment/server/synapse-configs/default/api/admin--Windows_10_Device_management_v1.0.0.xml,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.windows_${feature.version}/apis/admin--Windows_10_Device_management.xml,target:${installFolder}/../../deployment/server/synapse-configs/default/api/admin--Windows_10_Device_management.xml,overwrite:true);\ instructions.unconfigure = \ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/webapps/api#device-mgt#windows#v1.0.war);\ @@ -27,5 +35,4 @@ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../dep org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.date-range-picker);\ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/windows);\ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../database/WSO2MobileWindows_DB.h2.db);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../. -./deployment/server/devicetypes/windows.xml);\ \ No newline at end of file +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/devicetypes/windows.xml);\ \ No newline at end of file From 8655da595e85aefcaf5b9ddd2230943ca535b47b Mon Sep 17 00:00:00 2001 From: Hasunie Date: Fri, 13 Jan 2017 16:05:10 +0530 Subject: [PATCH 02/10] removing swagger definition from the soap endpoints --- .../api/services/DeviceManagementService.java | 41 ++++++++----------- .../services/discovery/DiscoveryService.java | 19 +-------- .../discovery/beans/DiscoveryRequest.java | 11 ++++- .../enrollment/EnrollmentService.java | 19 --------- .../api/services/syncml/SyncmlService.java | 19 +-------- .../CertificateEnrollmentPolicyService.java | 18 -------- 6 files changed, 28 insertions(+), 99 deletions(-) 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) From 4c4fd0059342ca31b08a2ead2bdd23256b5dde53 Mon Sep 17 00:00:00 2001 From: Hasunie Date: Fri, 13 Jan 2017 16:06:31 +0530 Subject: [PATCH 03/10] fixing issue in different type of windows device payloads --- .../api/services/discovery/impl/DiscoveryServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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/impl/DiscoveryServiceImpl.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/impl/DiscoveryServiceImpl.java index da50c09c9..2ba4c9abc 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/impl/DiscoveryServiceImpl.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/impl/DiscoveryServiceImpl.java @@ -68,8 +68,8 @@ public class DiscoveryServiceImpl implements DiscoveryService { String emailId = discoveryRequest.getEmailId(); String[] userDomains = emailId.split(DELIMITER); String domain = userDomains[DOMAIN_SEGMENT]; - String osVersion = discoveryRequest.getOsEdition(); - String[] osVersions = osVersion .split("."); + String applicationVersion = discoveryRequest.getApplicationVersion(); + String[] osVersions = applicationVersion .split("\\."); String os = osVersions[0]; DiscoveryResponse discoveryResponse; if (PluginConstants.WindowsVersionProperties.OS_VERSION.equals(os) && FEDERATED.equals(getAuthPolicy())) { From a2ae12f9d18349a7ee0951fea3f1ab398e0a5245 Mon Sep 17 00:00:00 2001 From: Hasunie Date: Fri, 13 Jan 2017 16:08:58 +0530 Subject: [PATCH 04/10] adding windows 10 updates 1607/1511 changes --- .../impl/DeviceManagementServiceImpl.java | 19 +++++++++++++------ .../wstep/CertificateEnrollmentService.java | 19 +------------------ 2 files changed, 14 insertions(+), 24 deletions(-) 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/impl/DeviceManagementServiceImpl.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/impl/DeviceManagementServiceImpl.java index f754ff80c..38dfde51d 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/impl/DeviceManagementServiceImpl.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/impl/DeviceManagementServiceImpl.java @@ -89,7 +89,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { if (modifyEnrollWithMoreDetail(request)) { pendingOperations = operationHandler.getPendingOperations(syncmlDocument); - response = operationReply.generateReply(syncmlDocument,pendingOperations); + response = operationReply.generateReply(syncmlDocument, pendingOperations); return Response.status(Response.Status.OK).entity(response).build(); } else { String msg = "Error occurred in while modify the enrollment."; @@ -101,7 +101,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { log.error(msg); return Response.status(Response.Status.UNAUTHORIZED).entity(msg).build(); } - } else { + } else { if ((syncmlDocument.getBody().getAlert() != null)) { if (!syncmlDocument.getBody().getAlert().getData().equals(Constants.DISENROLL_ALERT_DATA)) { pendingOperations = operationHandler.getPendingOperations(syncmlDocument); @@ -155,8 +155,8 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { private boolean modifyEnrollWithMoreDetail(Document request) throws WindowsDeviceEnrolmentException, WindowsOperationException { - String devMan; - String devMod; + String devMan = null; + String devMod = null; boolean status = false; String user; SyncmlDocument syncmlDocument; @@ -165,8 +165,15 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { syncmlDocument = SyncmlParser.parseSyncmlPayload(request); ReplaceTag replace = syncmlDocument.getBody().getReplace(); List itemList = replace.getItems(); - devMan = itemList.get(PluginConstants.SyncML.DEVICE_MAN_POSITION).getData(); - devMod = itemList.get(PluginConstants.SyncML.DEVICE_MODEL_POSITION).getData(); + for (ItemTag itemTag : itemList) { + String locURI = itemTag.getSource().getLocURI(); + if (OperationCode.Info.MANUFACTURER.getCode().equals(locURI)) { + devMan = itemTag.getData(); + } + if (OperationCode.Info.DEVICE_MODEL.getCode().equals(locURI)) { + devMod = itemTag.getData(); + } + } user = syncmlDocument.getHeader().getSource().getLocName(); AuthenticationInfo authenticationInfo = new AuthenticationInfo(); authenticationInfo.setUsername(user); 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/wstep/CertificateEnrollmentService.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/wstep/CertificateEnrollmentService.java index eb6f7001a..1b29298b3 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/wstep/CertificateEnrollmentService.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/wstep/CertificateEnrollmentService.java @@ -41,24 +41,7 @@ import java.io.UnsupportedEncodingException; /** * Interface of WSTEP implementation. */ -@SwaggerDefinition( - info = @Info( - version = "1.0.0", - title = "", - extensions = { - @Extension(properties = { - @ExtensionProperty(name = "name", value = "Windows 8.1 Enrollment Service"), - @ExtensionProperty(name = "context", - value = "/api/device-mgt/windows/v1.0/deviceenrolment/wstep"), - }) - } - ), - tags = { - @Tag(name = "windows", description = "") - } -) -@Api(value = "Windows Enrollment service Management", - description = "This carries all the resources related to Windows enrollment service.") + @WebService(targetNamespace = PluginConstants.DEVICE_ENROLLMENT_SERVICE_TARGET_NAMESPACE, name = "wstep") @BindingType(value = SOAPBinding.SOAP12HTTP_BINDING) public interface CertificateEnrollmentService { From 97705311b9b1458cd2994a95e0169b230fa30405 Mon Sep 17 00:00:00 2001 From: Hasunie Date: Fri, 13 Jan 2017 16:09:45 +0530 Subject: [PATCH 05/10] removing install app tab from the device view --- .../cdmf.unit.device.type.windows.device-view/device-view.hbs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.hbs b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.hbs index cb00b423a..18345645a 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.hbs +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.hbs @@ -140,12 +140,12 @@ class="hidden-sm">Device Location -