diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_active_stack_chart_gadget/Android_Active_Stack_Chart/gadget.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_active_stack_chart_gadget/Android_Active_Stack_Chart/gadget.xml
index 751516183..b1bec1194 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_active_stack_chart_gadget/Android_Active_Stack_Chart/gadget.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_active_stack_chart_gadget/Android_Active_Stack_Chart/gadget.xml
@@ -31,7 +31,7 @@
-
+
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_active_time_chart_gadget/Android_Active_Time_Chart/gadget.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_active_time_chart_gadget/Android_Active_Time_Chart/gadget.xml
index 0b480df1d..1d78e66b9 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_active_time_chart_gadget/Android_Active_Time_Chart/gadget.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_active_time_chart_gadget/Android_Active_Time_Chart/gadget.xml
@@ -31,7 +31,7 @@
-
+
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_activity_chart_gadget/Android_Activity_Chart/gadget.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_activity_chart_gadget/Android_Activity_Chart/gadget.xml
index 688a06fb6..352af8b27 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_activity_chart_gadget/Android_Activity_Chart/gadget.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_activity_chart_gadget/Android_Activity_Chart/gadget.xml
@@ -31,7 +31,7 @@
-
+
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_battery_level_chart_gadget/Android_Battery_Level_Chart/gadget.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_battery_level_chart_gadget/Android_Battery_Level_Chart/gadget.xml
index 236ab3a42..3c0b85373 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_battery_level_chart_gadget/Android_Battery_Level_Chart/gadget.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_battery_level_chart_gadget/Android_Battery_Level_Chart/gadget.xml
@@ -33,7 +33,7 @@
-
+
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_battery_percentage_chart_gadget/Android_Battery_Percentage_Chart/gadget.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_battery_percentage_chart_gadget/Android_Battery_Percentage_Chart/gadget.xml
index 7f87225af..9eadeb816 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_battery_percentage_chart_gadget/Android_Battery_Percentage_Chart/gadget.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_battery_percentage_chart_gadget/Android_Battery_Percentage_Chart/gadget.xml
@@ -33,7 +33,7 @@
-
+
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_call_time_chart_gadget/Android_Call_Time_Chart/gadget.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_call_time_chart_gadget/Android_Call_Time_Chart/gadget.xml
index 20cba23be..8f70e9739 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_call_time_chart_gadget/Android_Call_Time_Chart/gadget.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_call_time_chart_gadget/Android_Call_Time_Chart/gadget.xml
@@ -31,7 +31,7 @@
-
+
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_data_usage_chart_gadget/Android_Data_Usage_Chart/gadget.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_data_usage_chart_gadget/Android_Data_Usage_Chart/gadget.xml
index 93cc23bfe..eaf67f256 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_data_usage_chart_gadget/Android_Data_Usage_Chart/gadget.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_data_usage_chart_gadget/Android_Data_Usage_Chart/gadget.xml
@@ -31,7 +31,7 @@
-
+
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_details_gadget/Android_Details/gadget.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_details_gadget/Android_Details/gadget.xml
index 9a0e01a43..0b0bc0e09 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_details_gadget/Android_Details/gadget.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_details_gadget/Android_Details/gadget.xml
@@ -32,7 +32,7 @@
-
+
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_device_grouping_gadget/device-grouping/index.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_device_grouping_gadget/device-grouping/index.xml
index 8b83c0d74..b921c37a7 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_device_grouping_gadget/device-grouping/index.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_device_grouping_gadget/device-grouping/index.xml
@@ -50,7 +50,7 @@
@@ -58,7 +58,7 @@
-
+
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_filtered_by_gadget/filtered-by/index.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_filtered_by_gadget/filtered-by/index.xml
index eaf96d302..44a225a47 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_filtered_by_gadget/filtered-by/index.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_filtered_by_gadget/filtered-by/index.xml
@@ -46,7 +46,7 @@
-
+
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_frequent_contacts_list_gadget/Android_Frequent_Contacts_List/gadget.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_frequent_contacts_list_gadget/Android_Frequent_Contacts_List/gadget.xml
index 60ccb6396..09da41da9 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_frequent_contacts_list_gadget/Android_Frequent_Contacts_List/gadget.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_frequent_contacts_list_gadget/Android_Frequent_Contacts_List/gadget.xml
@@ -35,7 +35,7 @@
-
+
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_headset_usage_chart_gadget/Android_Headset_Usage_Chart/gadget.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_headset_usage_chart_gadget/Android_Headset_Usage_Chart/gadget.xml
index 557b82176..5bebedd5a 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_headset_usage_chart_gadget/Android_Headset_Usage_Chart/gadget.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_headset_usage_chart_gadget/Android_Headset_Usage_Chart/gadget.xml
@@ -31,7 +31,7 @@
-
+
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_location_map_gadget/Android_Location_Map/gadget.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_location_map_gadget/Android_Location_Map/gadget.xml
index fd37a4b39..18df1d726 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_location_map_gadget/Android_Location_Map/gadget.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_location_map_gadget/Android_Location_Map/gadget.xml
@@ -35,7 +35,7 @@
-
+
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_non_compliant_features_gadget/non-compliant-features/index.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_non_compliant_features_gadget/non-compliant-features/index.xml
index 5a94be07f..6a32bf37f 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_non_compliant_features_gadget/non-compliant-features/index.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_non_compliant_features_gadget/non-compliant-features/index.xml
@@ -50,7 +50,7 @@
-
+
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_realtime_audio_gadget/Android_Realtime_Audio/gadget.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_realtime_audio_gadget/Android_Realtime_Audio/gadget.xml
index 01a31c7e1..cde265670 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_realtime_audio_gadget/Android_Realtime_Audio/gadget.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_realtime_audio_gadget/Android_Realtime_Audio/gadget.xml
@@ -4,11 +4,11 @@
-
+
-
+
@@ -37,13 +37,13 @@
-
+
-
+
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_realtime_battery_gadget/Android_Realtime_Battery/gadget.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_realtime_battery_gadget/Android_Realtime_Battery/gadget.xml
index 322b5e657..334d78791 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_realtime_battery_gadget/Android_Realtime_Battery/gadget.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_realtime_battery_gadget/Android_Realtime_Battery/gadget.xml
@@ -4,11 +4,11 @@
-
+
-
+
@@ -37,12 +37,14 @@
-
+
-
+
+
+
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_realtime_call_gadget/Android_Realtime_Call/gadget.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_realtime_call_gadget/Android_Realtime_Call/gadget.xml
index 6d4eda421..d05839859 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_realtime_call_gadget/Android_Realtime_Call/gadget.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_realtime_call_gadget/Android_Realtime_Call/gadget.xml
@@ -4,11 +4,11 @@
-
+
-
+
@@ -37,13 +37,14 @@
-
+
+
+
-
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_realtime_data_gadget/Android_Realtime_Data/gadget.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_realtime_data_gadget/Android_Realtime_Data/gadget.xml
index 74c95aa74..f0029bc7b 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_realtime_data_gadget/Android_Realtime_Data/gadget.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_realtime_data_gadget/Android_Realtime_Data/gadget.xml
@@ -4,11 +4,11 @@
-
+
-
+
@@ -37,7 +37,7 @@
-
+
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_realtime_screen_gadget/Android_Realtime_Screen/gadget.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_realtime_screen_gadget/Android_Realtime_Screen/gadget.xml
index f7daab521..e7243f551 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_realtime_screen_gadget/Android_Realtime_Screen/gadget.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_realtime_screen_gadget/Android_Realtime_Screen/gadget.xml
@@ -4,11 +4,11 @@
-
+
-
+
@@ -37,12 +37,14 @@
-
+
-
+
+
+
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_realtime_sms_gadget/Android_Realtime_SMS/gadget.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_realtime_sms_gadget/Android_Realtime_SMS/gadget.xml
index a61e51424..ed4e50008 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_realtime_sms_gadget/Android_Realtime_SMS/gadget.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_realtime_sms_gadget/Android_Realtime_SMS/gadget.xml
@@ -4,11 +4,11 @@
-
+
-
+
@@ -37,11 +37,11 @@
-
+
-
+
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_screen_on_chart_gadget/Android_Screen_On_Chart/gadget.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_screen_on_chart_gadget/Android_Screen_On_Chart/gadget.xml
index 7706136be..e58b3410e 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_screen_on_chart_gadget/Android_Screen_On_Chart/gadget.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_screen_on_chart_gadget/Android_Screen_On_Chart/gadget.xml
@@ -31,7 +31,7 @@
-
+
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_sms_chart_gadget/Android_SMS_Chart/gadget.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_sms_chart_gadget/Android_SMS_Chart/gadget.xml
index da096fcf8..c55103985 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_sms_chart_gadget/Android_SMS_Chart/gadget.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_sms_chart_gadget/Android_SMS_Chart/gadget.xml
@@ -31,7 +31,7 @@
-
+
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_un_secured_devices_gadget/un-secured-devices/index.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_un_secured_devices_gadget/un-secured-devices/index.xml
index 5d0e5b6c7..7a48acdb0 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_un_secured_devices_gadget/un-secured-devices/index.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics2/src/main/resources/carbonapps/android_analytics/android_un_secured_devices_gadget/un-secured-devices/index.xml
@@ -46,7 +46,7 @@
-
+
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/service/impl/AndroidSenseService.java b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/service/impl/AndroidSenseService.java
index 348a9008d..e09fd22ff 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/service/impl/AndroidSenseService.java
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/service/impl/AndroidSenseService.java
@@ -16,9 +16,14 @@
* under the License.
*/
+
package org.wso2.carbon.device.mgt.iot.androidsense.service.impl;
-import org.wso2.carbon.apimgt.annotations.api.API;
+import io.swagger.annotations.SwaggerDefinition;
+import io.swagger.annotations.Info;
+import io.swagger.annotations.ExtensionProperty;
+import io.swagger.annotations.Extension;
+import io.swagger.annotations.Tag;
import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.device.mgt.extensions.feature.mgt.annotations.DeviceType;
import org.wso2.carbon.device.mgt.extensions.feature.mgt.annotations.Feature;
@@ -27,7 +32,21 @@ import javax.ws.rs.*;
import javax.ws.rs.core.Response;
@DeviceType(value = "android_sense")
-@API(name = "android_sense", version = "1.0.0", context = "/android_sense", tags = {"android_sense"})
+@SwaggerDefinition(
+ info = @Info(
+ version = "1.0.0",
+ title = "",
+ extensions = {
+ @Extension(properties = {
+ @ExtensionProperty(name = "name", value = "android_sense"),
+ @ExtensionProperty(name = "context", value = "/android_sense"),
+ })
+ }
+ ),
+ tags = {
+ @Tag(name = "android_sense", description = "")
+ }
+)
public interface AndroidSenseService {
/**
diff --git a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/ArduinoService.java b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/ArduinoService.java
index 9e0c97ec3..97cf4ad1f 100644
--- a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/ArduinoService.java
+++ b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/ArduinoService.java
@@ -18,7 +18,12 @@
package org.wso2.carbon.device.mgt.iot.arduino.service.impl;
-import org.wso2.carbon.apimgt.annotations.api.API;
+import io.swagger.annotations.SwaggerDefinition;
+import io.swagger.annotations.Info;
+import io.swagger.annotations.ExtensionProperty;
+import io.swagger.annotations.Extension;
+import io.swagger.annotations.Tag;
+
import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.device.mgt.extensions.feature.mgt.annotations.DeviceType;
import org.wso2.carbon.device.mgt.extensions.feature.mgt.annotations.Feature;
@@ -26,7 +31,21 @@ import org.wso2.carbon.device.mgt.extensions.feature.mgt.annotations.Feature;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
-@API(name = "arduino", version = "1.0.0", context = "/arduino", tags = {"arduino"})
+@SwaggerDefinition(
+ info = @Info(
+ version = "1.0.0",
+ title = "",
+ extensions = {
+ @Extension(properties = {
+ @ExtensionProperty(name = "name", value = "arduino"),
+ @ExtensionProperty(name = "context", value = "/arduino"),
+ })
+ }
+ ),
+ tags = {
+ @Tag(name = "arduino", description = "")
+ }
+)
@DeviceType(value = "arduino")
public interface ArduinoService {
diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/RaspberryPiService.java b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/RaspberryPiService.java
index 00236ddbe..757e6ff56 100644
--- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/RaspberryPiService.java
+++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/RaspberryPiService.java
@@ -18,7 +18,11 @@
package org.wso2.carbon.device.mgt.iot.raspberrypi.service.impl;
-import org.wso2.carbon.apimgt.annotations.api.API;
+import io.swagger.annotations.SwaggerDefinition;
+import io.swagger.annotations.Info;
+import io.swagger.annotations.ExtensionProperty;
+import io.swagger.annotations.Extension;
+import io.swagger.annotations.Tag;
import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.device.mgt.extensions.feature.mgt.annotations.DeviceType;
import org.wso2.carbon.device.mgt.extensions.feature.mgt.annotations.Feature;
@@ -27,7 +31,21 @@ import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
-@API(name = "raspberrypi", version = "1.0.0", context = "/raspberrypi", tags = {"raspberrypi"})
+@SwaggerDefinition(
+ info = @Info(
+ version = "1.0.0",
+ title = "",
+ extensions = {
+ @Extension(properties = {
+ @ExtensionProperty(name = "name", value = "raspberrypi"),
+ @ExtensionProperty(name = "context", value = "/raspberrypi"),
+ })
+ }
+ ),
+ tags = {
+ @Tag(name = "raspberrypi", description = "")
+ }
+)
@DeviceType(value = "raspberrypi")
public interface RaspberryPiService {
diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java
index 9d89050fb..faf40c962 100644
--- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java
+++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmService.java
@@ -18,7 +18,11 @@
package org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl;
-import org.wso2.carbon.apimgt.annotations.api.API;
+import io.swagger.annotations.SwaggerDefinition;
+import io.swagger.annotations.Info;
+import io.swagger.annotations.ExtensionProperty;
+import io.swagger.annotations.Extension;
+import io.swagger.annotations.Tag;
import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.device.mgt.extensions.feature.mgt.annotations.DeviceType;
import org.wso2.carbon.device.mgt.extensions.feature.mgt.annotations.Feature;
@@ -33,7 +37,21 @@ import javax.ws.rs.core.Response;
* the transport 'Connectors' [XMPP & MQTT] specific to the VirtualFirealarm device-type in order to communicate with
* such devices and to receive messages form it.
*/
-@API(name = "virtual_firealarm", version = "1.0.0", context = "/virtual_firealarm", tags = {"virtual_firealarm"})
+@SwaggerDefinition(
+ info = @Info(
+ version = "1.0.0",
+ title = "",
+ extensions = {
+ @Extension(properties = {
+ @ExtensionProperty(name = "name", value = "virtual_firealarm"),
+ @ExtensionProperty(name = "context", value = "/virtual_firealarm"),
+ })
+ }
+ ),
+ tags = {
+ @Tag(name = "virtual_firealarm", description = "")
+ }
+)
@DeviceType(value = "virtual_firealarm")
public interface VirtualFireAlarmService {
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementAdminService.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementAdminService.java
index 773d5645f..e24f6fbfa 100644
--- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementAdminService.java
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementAdminService.java
@@ -18,10 +18,19 @@
*/
package org.wso2.carbon.mdm.services.android.services;
-import io.swagger.annotations.*;
-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 io.swagger.annotations.SwaggerDefinition;
+import io.swagger.annotations.Info;
+import io.swagger.annotations.ExtensionProperty;
+import io.swagger.annotations.Extension;
+import io.swagger.annotations.Tag;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.AuthorizationScope;
+import io.swagger.annotations.Authorization;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import io.swagger.annotations.ResponseHeader;
import org.wso2.carbon.device.mgt.common.operation.mgt.Activity;
import org.wso2.carbon.mdm.services.android.bean.wrapper.*;
@@ -34,10 +43,23 @@ import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.List;
-@API(name = "Android Device Management Administrative Service", version = "1.0.0",
- context = "/api/device-mgt/android/v1.0/admin/devices",
- tags = {"devicemgt_android"})
-
+@SwaggerDefinition(
+ info = @Info(
+ version = "1.0.0",
+ title = "",
+ extensions = {
+ @Extension(properties = {
+ @ExtensionProperty(name = "name",
+ value = "Android Device Management Administrative Service"),
+ @ExtensionProperty(name = "context",
+ value = "/api/device-mgt/android/v1.0/admin/devices"),
+ })
+ }
+ ),
+ tags = {
+ @Tag(name = "devicemgt_android", description = "")
+ }
+)
@Path("/admin/devices")
@Api(value = "Android Device Management Administrative Service", description = "Device management related admin APIs.")
@Produces(MediaType.APPLICATION_JSON)
@@ -53,7 +75,15 @@ public interface DeviceManagementAdminService {
notes = "Using this API you have the option of hard locking an Android device, where the Administrator " +
"permanently locks the device or screen locking an Android device.",
response = Activity.class,
- tags = "Android Device Management Administrative Service"
+ tags = "Android Device Management Administrative Service",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(
+ scope = "/device-mgt/devices/owning-device/operations/android/lock",
+ description = "Lock Device") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -93,7 +123,6 @@ public interface DeviceManagementAdminService {
message = "Internal Server Error. \n " +
"Server error occurred while locking the device.")
})
- @Permission(name = "Lock Device", permission = "/device-mgt/devices/owning-device/operations/android/lock")
Response configureDeviceLock(
@ApiParam(
name = "deviceLock",
@@ -112,7 +141,16 @@ public interface DeviceManagementAdminService {
responseContainer = "List",
notes = "Unlock devices that were locked permanently using the hard lock operation. Devices that are hard locked can only be unlocked by the EMM administrator.",
response = Activity.class,
- tags = "Android Device Management Administrative Service")
+ tags = "Android Device Management Administrative Service",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(
+ scope = "/device-mgt/devices/owning-device/operations/android/unlock",
+ description = "Unlock Device") }
+ )
+ }
+ )
@ApiResponses(value = {
@ApiResponse(
code = 201,
@@ -151,7 +189,6 @@ public interface DeviceManagementAdminService {
message = "Internal Server Error. \n " +
"Server error occurred while unlocking the device.")
})
- @Permission(name = "Unlock Device", permission = "/device-mgt/devices/owning-device/operations/android/unlock")
Response configureDeviceUnlock(
@ApiParam(
name = "deviceIDs",
@@ -170,7 +207,16 @@ public interface DeviceManagementAdminService {
notes = "Request location coordinates of Android devices. \n" +
"Example: In situations where you have lost your device and need to find out where it is, you can use this REST API to get the location of the device.",
response = Activity.class,
- tags = "Android Device Management Administrative Service")
+ tags = "Android Device Management Administrative Service",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(
+ scope = "/device-mgt/devices/owning-device/operations/android/location",
+ description = "Get Device Location") }
+ )
+ }
+ )
@ApiResponses(value = {
@ApiResponse(
code = 201,
@@ -208,7 +254,6 @@ public interface DeviceManagementAdminService {
code = 500,
message = "Internal Server Error. \n " +
"Server error occurred while adding a new get-location operation.")})
- @Permission(name = "Get Device Location", permission = "/device-mgt/devices/owning-device/operations/android/location")
Response getDeviceLocation(
@ApiParam(
name = "deviceIDs",
@@ -224,7 +269,15 @@ public interface DeviceManagementAdminService {
value = "Clearing the Password on Android Devices",
notes = "Clear the password on Android devices",
response = Activity.class,
- tags = "Android Device Management Administrative Service."
+ tags = "Android Device Management Administrative Service.",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(
+ scope = "/device-mgt/devices/owning-device/operations/android/clear-password",
+ description = "Clear Password of Device") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -264,7 +317,6 @@ public interface DeviceManagementAdminService {
message = "Internal Server Error. \n " +
"Server error occurred while adding a new clear password operation.")
})
- @Permission(name = "Clear Password of Device", permission = "/device-mgt/devices/owning-device/operations/android/clear-password")
Response removePassword(
@ApiParam(name = "deviceIDs",
value = "Provide the ID of the Android device. Multiple device IDs can be added by using comma separated values. ",
@@ -278,7 +330,13 @@ public interface DeviceManagementAdminService {
value = "Enabling or Disabling the Camera on Android Devices",
notes = "Enable or disable the camera on Android devices.",
response = Activity.class,
- tags = "Android Device Management Administrative Service"
+ tags = "Android Device Management Administrative Service",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(scope = "/device-mgt/devices/owning-device/operations/android/camera", description = "Manage Camera") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -318,7 +376,6 @@ public interface DeviceManagementAdminService {
message = "Internal Server Error. \n " +
"Server error occurred while adding the new camera control operation.")
})
- @Permission(name = "Manage Camera", permission = "/device-mgt/devices/owning-device/operations/android/camera")
Response configureCamera(
@ApiParam(
name = "cameraControl",
@@ -340,7 +397,15 @@ public interface DeviceManagementAdminService {
" 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",
response = Activity.class,
- tags = "Android Device Management Administrative Service"
+ tags = "Android Device Management Administrative Service",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(
+ scope = "/device-mgt/devices/owning-device/operations/android/info",
+ description = "Get Device Information") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -380,7 +445,6 @@ public interface DeviceManagementAdminService {
message = "Internal Server Error. \n " +
"Server error occurred while adding a new device info operation.")
})
- @Permission(name = "Get Device Information", permission = "/device-mgt/devices/owning-device/operations/android/info")
Response getDeviceInformation(
@ApiParam(
name = "deviceIds",
@@ -399,7 +463,15 @@ public interface DeviceManagementAdminService {
" 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.",
response = Activity.class,
- tags = "Android Device Management Administrative Service"
+ tags = "Android Device Management Administrative Service",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(
+ scope = "/device-mgt/devices/owning-device/operations/android/logcat",
+ description = "Get Logs") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -439,7 +511,6 @@ public interface DeviceManagementAdminService {
message = "Internal Server Error. \n " +
"Server error occurred while adding a new device logcat operation.")
})
- @Permission(name = "Get Logs", permission = "/device-mgt/devices/owning-device/operations/android/logcat")
Response getDeviceLogcat(
@ApiParam(
name = "deviceIds",
@@ -457,7 +528,15 @@ public interface DeviceManagementAdminService {
notes = "Enterprise wipe is the process of deleting enterprise related data on a device while keeping the " +
"personal data intact. You are able to enterprise wipe Android devices using this REST API.",
response = Activity.class,
- tags = "Android Device Management Administrative Service"
+ tags = "Android Device Management Administrative Service",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(
+ scope = "/device-mgt/devices/owning-device/operations/android/enterprise-wipe",
+ description = "Enterprise Wipe") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -496,7 +575,6 @@ public interface DeviceManagementAdminService {
code = 500,
message = "Internal Server Error. \n " +
"Server error occurred while adding the enterprise wipe operation.")})
- @Permission(name = "Enterprise Wipe", permission = "/device-mgt/devices/owning-device/operations/android/enterprise-wipe")
Response wipeDevice(
@ApiParam(
name = "deviceIDs",
@@ -513,7 +591,15 @@ public interface DeviceManagementAdminService {
notes = "Factory rest or erase all the data stored on the Android devices " +
"to restore them back to the original system.",
response = Activity.class,
- tags = "Android Device Management Administrative Service"
+ tags = "Android Device Management Administrative Service",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(
+ scope = "/device-mgt/devices/owning-device/operations/android/wipe",
+ description = "Factory Reset") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -552,7 +638,6 @@ public interface DeviceManagementAdminService {
code = 500,
message = "Internal Server Error. \n " +
"Server error occurred while adding the device wipe operation.")})
- @Permission(name = "Factory Reset", permission = "/device-mgt/devices/owning-device/operations/android/wipe")
Response wipeData(
@ApiParam(
name = "wipeData",
@@ -573,7 +658,15 @@ public interface DeviceManagementAdminService {
"until the device calls the server to retrieve the list of operations that needs to be executed " +
"on the device.",
response = Activity.class,
- tags = "Android Device Management Administrative Service"
+ tags = "Android Device Management Administrative Service",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(
+ scope = "/device-mgt/devices/owning-device/operations/android/applications",
+ description = "Get Installed Application") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -613,7 +706,6 @@ public interface DeviceManagementAdminService {
message = "Internal Server Error. \n " +
"Server error occurred while adding the new get-applications operation.")
})
- @Permission(name = "Get Installed Application", permission = "/device-mgt/devices/owning-device/operations/android/applications")
Response getApplications(
@ApiParam(
name = "deviceIDs",
@@ -629,7 +721,15 @@ public interface DeviceManagementAdminService {
value = "Ringing Android Devices",
notes = "Ring Android devices.",
response = Activity.class,
- tags = "Android Device Management Administrative Service"
+ tags = "Android Device Management Administrative Service",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(
+ scope = "/device-mgt/devices/owning-device/operations/android/ring",
+ description = "Ring Device") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -669,7 +769,6 @@ public interface DeviceManagementAdminService {
message = "Internal Server Error. \n " +
"Server error occurred while adding a new device ring operation.")
})
- @Permission(name = "Ring Device", permission = "/device-mgt/devices/owning-device/operations/android/ring")
Response ringDevice(
@ApiParam(
name = "deviceIDs",
@@ -685,7 +784,15 @@ public interface DeviceManagementAdminService {
value = "Rebooting Android Devices",
notes = "Reboot or restart your Android devices.",
response = Activity.class,
- tags = "Android Device Management Administrative Service"
+ tags = "Android Device Management Administrative Service",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(
+ scope = "/device-mgt/devices/owning-device/operations/android/reboot",
+ description = "Reboot Device") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -725,7 +832,6 @@ public interface DeviceManagementAdminService {
message = "Internal Server Error. \n " +
"Server error occurred while adding the new device reboot operation.")
})
- @Permission(name = "Reboot Device", permission = "/device-mgt/devices/owning-device/operations/android/reboot")
Response rebootDevice(
@ApiParam(
name = "deviceIDs",
@@ -740,7 +846,15 @@ public interface DeviceManagementAdminService {
value = "Muting Android Devices",
notes = "Mute or enable a silent profile for Android devices.",
response = Activity.class,
- tags = "Android Device Management Administrative Service"
+ tags = "Android Device Management Administrative Service",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(
+ scope = "/device-mgt/devices/owning-device/operations/android/mute",
+ description = "Mute Device") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -781,7 +895,6 @@ public interface DeviceManagementAdminService {
"Server error occurred while adding a new device mute operation.")
})
@Path("/mute")
- @Permission(name = "Mute Device", permission = "/device-mgt/devices/owning-device/operations/android/mute")
Response muteDevice(
@ApiParam(
name = "deviceIDs",
@@ -799,7 +912,15 @@ public interface DeviceManagementAdminService {
notes = "Install an application on an Android device. If the device you are installing the application has the WSO2 system service application installed," +
" the application installation will happen in silent mode, else the device user's consent will be required.",
response = Activity.class,
- tags = "Android Device Management Administrative Service"
+ tags = "Android Device Management Administrative Service",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(
+ scope = "/device-mgt/devices/owning-device/operations/android/install-app",
+ description = "Install Applications") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -839,7 +960,6 @@ public interface DeviceManagementAdminService {
message = "Internal Server Error. \n " +
"Server error occurred while adding a new install-application operation.")
})
- @Permission(name = "Install Applications", permission = "/device-mgt/devices/owning-device/operations/android/install-app")
Response installApplication(
@ApiParam(
name = "applicationInstallation",
@@ -860,7 +980,15 @@ public interface DeviceManagementAdminService {
" has the WSO2 system service application installed, the application update will happen in silent " +
"mode, else the device user's consent is required.",
response = Activity.class,
- tags = "Android Device Management Administrative Service"
+ tags = "Android Device Management Administrative Service",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(
+ scope = "/device-mgt/devices/owning-device/operations/android/update-app",
+ description = "Update installed applications") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -900,7 +1028,6 @@ public interface DeviceManagementAdminService {
message = "Internal Server Error. \n " +
"Server error occurred while adding the new update-application operation.")
})
- @Permission(name = "Update installed applications", permission = "/device-mgt/devices/owning-device/operations/android/update-app")
Response updateApplication(
@ApiParam(
name = "applicationUpdate",
@@ -918,7 +1045,15 @@ public interface DeviceManagementAdminService {
value = "Uninstalling an Application from Android Devices",
notes = "Uninstall an application from Android devices.",
response = Activity.class,
- tags = "Android Device Management Administrative Service"
+ tags = "Android Device Management Administrative Service",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(
+ scope = "/device-mgt/devices/owning-device/operations/android/uninstall-app",
+ description = "Uninstall Applications") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -958,7 +1093,6 @@ public interface DeviceManagementAdminService {
message = "Internal Server Error. \n " +
"Server error occurred while adding a new uninstall-application operation.")
})
- @Permission(name = "Uninstall Applications", permission = "/device-mgt/devices/owning-device/operations/android/uninstall-app")
Response uninstallApplication(
@ApiParam(
name = "applicationUninstallation",
@@ -980,7 +1114,15 @@ public interface DeviceManagementAdminService {
" Android operating systems and after, the blacklisted apps will be hidden. Blacklisting can be used on both BYOD and " +
"COPE devices. Applications can be blacklisted via the application restriction policy too.",
response = Activity.class,
- tags = "Android Device Management Administrative Service"
+ tags = "Android Device Management Administrative Service",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(
+ scope = "/device-mgt/devices/owning-device/operations/android/blacklist-app",
+ description = "Blacklist Applications") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -1020,7 +1162,6 @@ public interface DeviceManagementAdminService {
message = "Internal Server Error. \n " +
"Server error occurred while adding the new blacklist-applications operation.")
})
- @Permission(name = "Blacklist Applications", permission = "/device-mgt/devices/owning-device/operations/android/blacklist-app")
Response blacklistApplications(
@ApiParam(
name = "blacklistApplications",
@@ -1038,7 +1179,15 @@ public interface DeviceManagementAdminService {
value = "UUpgrading Firmware of Android Devices",
notes = "Upgrade the firmware of Android devices.",
response = Activity.class,
- tags = "Android Device Management Administrative Service"
+ tags = "Android Device Management Administrative Service",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(
+ scope = "/device-mgt/devices/owning-device/operations/android/upgrade",
+ description = "Upgrade Firmware") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -1078,7 +1227,6 @@ public interface DeviceManagementAdminService {
message = "Internal Server Error. \n " +
"Server error occurred while adding a new upgrade firmware operation.")
})
- @Permission(name = "Upgrade Firmware", permission = "/device-mgt/devices/owning-device/operations/android/upgrade")
Response upgradeFirmware(
@ApiParam(
name = "upgradeFirmware",
@@ -1098,7 +1246,15 @@ public interface DeviceManagementAdminService {
value = "Configuring VPN on Android devices",
notes = "Configure VPN on Android devices.",
response = Activity.class,
- tags = "Android Device Management Administrative Service"
+ tags = "Android Device Management Administrative Service",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(
+ scope = "/device-mgt/devices/owning-device/operations/android/vpn",
+ description = "Add VPN") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -1138,7 +1294,6 @@ public interface DeviceManagementAdminService {
message = "Internal Server Error. \n " +
"Server error occurred while configuring the VPN.")
})
- @Permission(name = "Add VPN", permission = "/device-mgt/devices/owning-device/operations/android/vpn")
Response configureVPN(
@ApiParam(
name = "vpnBean",
@@ -1154,7 +1309,15 @@ public interface DeviceManagementAdminService {
value = "Sending a Notification to Android Devices",
notes = "Send a notification or message to Android devices.",
response = Activity.class,
- tags = "Android Device Management Administrative Service"
+ tags = "Android Device Management Administrative Service",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(
+ scope = "/device-mgt/devices/owning-device/operations/android/send-notification",
+ description = "Send Notifications") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -1194,7 +1357,6 @@ public interface DeviceManagementAdminService {
message = "Internal Server Error. \n " +
"Server error occurred while adding a new send notification operation.")
})
- @Permission(name = "Send Notifications", permission = "/device-mgt/devices/owning-device/operations/android/send-notification")
Response sendNotification(
@ApiParam(
name = "notification",
@@ -1211,7 +1373,15 @@ public interface DeviceManagementAdminService {
value = "Configuring Wi-Fi on Android Devices",
notes = "Configure Wi-Fi on Android devices.",
response = Activity.class,
- tags = "Android Device Management Administrative Service"
+ tags = "Android Device Management Administrative Service",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(
+ scope = "/device-mgt/devices/owning-device/operations/android/wifi",
+ description = "Add Wifi Configuration") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -1251,7 +1421,6 @@ public interface DeviceManagementAdminService {
message = "Internal Server Error. \n " +
"Server error occurred while configuring Wi-Fi.")
})
- @Permission(name = "Add Wifi Configuration", permission = "/device-mgt/devices/owning-device/operations/android/wifi")
Response configureWifi(
@ApiParam(
name = "wifi",
@@ -1269,7 +1438,15 @@ public interface DeviceManagementAdminService {
value = "Encrypting Storage on Android Devices",
notes = "Encrypt the data stored on Android devices.",
response = Activity.class,
- tags = "Android Device Management Administrative Service"
+ tags = "Android Device Management Administrative Service",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(
+ scope = "/device-mgt/devices/owning-device/operations/android/encrypt",
+ description = "Encrypt Device") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -1309,7 +1486,6 @@ public interface DeviceManagementAdminService {
message = "Internal Server Error. \n " +
"Server error occurred while adding a new encrypt storage operation.")
})
- @Permission(name = "Encrypt Device", permission = "/device-mgt/devices/owning-device/operations/android/encrypt")
Response encryptStorage(
@ApiParam(
name = "encryption",
@@ -1327,7 +1503,15 @@ public interface DeviceManagementAdminService {
value = "Changing the Lock Code on Android Devices",
notes = "Change the lock code on Android devices.",
response = Activity.class,
- tags = "Android Device Management Administrative Service"
+ tags = "Android Device Management Administrative Service",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(
+ scope = "/device-mgt/devices/owning-device/operations/android/change-lock-code",
+ description = "Change Password of Device") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -1367,7 +1551,6 @@ public interface DeviceManagementAdminService {
message = "Internal Server Error. \n " +
"Server error occurred while adding a new change lock code operation.")
})
- @Permission(name = "Change Password of Device", permission = "/device-mgt/devices/owning-device/operations/android/change-lock-code")
Response changeLockCode(
@ApiParam(
name = "lockCode",
@@ -1385,7 +1568,15 @@ public interface DeviceManagementAdminService {
value = "Setting a Password Policy on Android Devices",
notes = "Set a password policy on Android devices.",
response = Activity.class,
- tags = "Android Device Management Administrative Service"
+ tags = "Android Device Management Administrative Service",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(
+ scope = "/device-mgt/devices/owning-device/operations/android/password-policy",
+ description = "Set Password Policy") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -1425,7 +1616,6 @@ public interface DeviceManagementAdminService {
message = "Internal Server Error. \n " +
"Server error occurred while adding a new set password policy operation.")
})
- @Permission(name = "Set Password Policy", permission = "/device-mgt/devices/owning-device/operations/android/password-policy")
Response setPasswordPolicy(
@ApiParam(
name = "passwordPolicy",
@@ -1441,7 +1631,15 @@ public interface DeviceManagementAdminService {
value = "Setting a Web Clip on Android Devices",
notes = "Set a web clip on Android devices. A web clip is used to add a bookmark to a web application.",
response = Activity.class,
- tags = "Android Device Management Administrative Service"
+ tags = "Android Device Management Administrative Service",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(
+ scope = "/device-mgt/devices/owning-device/operations/android/webclip",
+ description = "Add Webclips") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -1481,7 +1679,6 @@ public interface DeviceManagementAdminService {
message = "Internal Server Error. \n " +
"Server error occurred while adding adding a the set web clip operation.")
})
- @Permission(name = "Add Webclips", permission = "/device-mgt/devices/owning-device/operations/android/webclip")
Response setWebClip(
@ApiParam(
name = "webClip",
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementService.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementService.java
index 04d4098b5..5bf5fef24 100644
--- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementService.java
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementService.java
@@ -18,9 +18,20 @@
*/
package org.wso2.carbon.mdm.services.android.services;
-import io.swagger.annotations.*;
-import org.wso2.carbon.apimgt.annotations.api.API;
-import org.wso2.carbon.apimgt.annotations.api.Permission;
+import io.swagger.annotations.SwaggerDefinition;
+import io.swagger.annotations.Info;
+import io.swagger.annotations.ExtensionProperty;
+import io.swagger.annotations.Extension;
+import io.swagger.annotations.Tag;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.AuthorizationScope;
+import io.swagger.annotations.Authorization;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import io.swagger.annotations.ResponseHeader;
+
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.AndroidDevice;
@@ -34,10 +45,21 @@ import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.List;
-@API(name = "Android Device Management", version = "1.0.0",
- context = "/api/device-mgt/android/v1.0/devices",
- tags = {"devicemgt_android"})
-
+@SwaggerDefinition(
+ info = @Info(
+ version = "1.0.0",
+ title = "",
+ extensions = {
+ @Extension(properties = {
+ @ExtensionProperty(name = "name", value = "Android Device Management"),
+ @ExtensionProperty(name = "context", value = "/api/device-mgt/android/v1.0/devices"),
+ })
+ }
+ ),
+ tags = {
+ @Tag(name = "devicemgt_android", description = "")
+ }
+)
@Api(value = "Android Device Management",
description = "This carries all the resources related to the Android device management functionalities.")
@Path("/devices")
@@ -53,7 +75,14 @@ public interface DeviceManagementService {
httpMethod = "PUT",
value = "Updating the Application Details on Android Devices",
notes = "Update the details of the applications that are installed on Android devices.",
- tags = "Android Device Management"
+ tags = "Android Device Management",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(scope = "/device-mgt/devices/enroll/android",
+ description = "Enroll Device") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -88,7 +117,6 @@ public interface DeviceManagementService {
message = "Internal Server Error. \n " +
"Server error occurred while updating the application list.")
})
- @Permission(name = "Enroll Device", permission = "/device-mgt/devices/enroll/android")
Response updateApplicationList(
@ApiParam(
name = "id",
@@ -114,7 +142,15 @@ public interface DeviceManagementService {
" While getting the pending operations the details of the operations executed at the device end is shared with the server. " +
"The server then updates the status of the operations that were carried out on the device.",
response = Operation.class,
- tags = "Android Device Management")
+ tags = "Android Device Management",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(scope = "/device-mgt/devices/enroll/android",
+ description = "Enroll Device") }
+ )
+ }
+ )
@ApiResponses(value = {
@ApiResponse(
code = 200,
@@ -144,7 +180,6 @@ public interface DeviceManagementService {
code = 500,
message = "Internal Server Error. \n Server error occurred while fetching the list of pending operations.")
})
- @Permission(name = "Enroll Device", permission = "/device-mgt/devices/enroll/android")
Response getPendingOperations(
@ApiParam(
name = "id",
@@ -173,7 +208,14 @@ public interface DeviceManagementService {
" the Android Agent on the device, before being able to register the device with WSO2 EMM. Instead," +
" you can use this REST API to register an Android device with WSO2 EMM, without having to install" +
" an Android Agent. This API can be mainly used to test the device enrollment process.",
- tags = "Android Device Management"
+ tags = "Android Device Management",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(scope = "/device-mgt/devices/enroll/android",
+ description = "Enroll Device") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -212,7 +254,6 @@ public interface DeviceManagementService {
message = "Internal Server Error. \n " +
"Server error occurred while adding a new device.")
})
- @Permission(name = "Enroll Device", permission = "/device-mgt/devices/enroll/android")
Response enrollDevice(@ApiParam(
name = "device",
value = "The properties required to enroll a device.")
@@ -224,7 +265,14 @@ public interface DeviceManagementService {
httpMethod = "GET",
value = "Getting the Registration Status of an Android Device",
notes = "Use this REST API to retrieve the registration status of an Android device.",
- tags = "Android Device Management"
+ tags = "Android Device Management",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(scope = "/device-mgt/devices/enroll/android",
+ description = "Enroll Device") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -253,7 +301,6 @@ public interface DeviceManagementService {
code = 500,
message = "Internal Server Error. \n Server error occurred while fetching the enrollment status of the Android device.")
})
- @Permission(name = "Enroll Device", permission = "/device-mgt/devices/enroll/android")
Response isEnrolled(
@ApiParam(
name = "id",
@@ -273,7 +320,14 @@ public interface DeviceManagementService {
httpMethod = "PUT",
value = "Updating the Registration Details of an Android Device",
notes = "Use this REST API to update the registration details of an Android device.",
- tags = "Android Device Management"
+ tags = "Android Device Management",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(scope = "/device-mgt/devices/enroll/android",
+ description = "Enroll Device") }
+ )
+ }
)
@ApiResponses(
value = {
@@ -309,7 +363,6 @@ public interface DeviceManagementService {
message = "Internal Server Error. \n " +
"Server error occurred while updating the device enrollment.")
})
- @Permission(name = "Enroll Device", permission = "/device-mgt/devices/enroll/android")
Response modifyEnrollment(
@ApiParam(
name = "id",
@@ -325,7 +378,13 @@ public interface DeviceManagementService {
httpMethod = "DELETE",
value = "Unregistering an Android Device",
notes = "Use this REST API to unregister an Android device.",
- tags = "Android Device Management"
+ tags = "Android Device Management",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(scope = "/device-mgt/devices/disenroll/android", description = "Disenroll Device") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -339,7 +398,6 @@ public interface DeviceManagementService {
message = "Internal Server Error. \n " +
"Server error occurred while dis-enrolling the device.")
})
- @Permission(name = "Disenroll Device", permission = "/device-mgt/devices/disenroll/android")
Response disEnrollDevice(
@ApiParam(
name = "id",
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceTypeConfigurationService.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceTypeConfigurationService.java
index 051146d03..3eab30e35 100644
--- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceTypeConfigurationService.java
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceTypeConfigurationService.java
@@ -18,9 +18,19 @@
*/
package org.wso2.carbon.mdm.services.android.services;
-import io.swagger.annotations.*;
-import org.wso2.carbon.apimgt.annotations.api.API;
-import org.wso2.carbon.apimgt.annotations.api.Permission;
+import io.swagger.annotations.SwaggerDefinition;
+import io.swagger.annotations.Info;
+import io.swagger.annotations.ExtensionProperty;
+import io.swagger.annotations.Extension;
+import io.swagger.annotations.Tag;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.AuthorizationScope;
+import io.swagger.annotations.Authorization;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import io.swagger.annotations.ResponseHeader;
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.exception.AndroidAgentException;
@@ -30,10 +40,23 @@ import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
-@API(name = "Android Configuration Management", version = "1.0.0",
- context = "/api/device-mgt/android/v1.0/configuration",
- tags = {"devicemgt_android"})
-
+@SwaggerDefinition(
+ info = @Info(
+ version = "1.0.0",
+ title = "",
+ extensions = {
+ @Extension(properties = {
+ @ExtensionProperty(name = "name",
+ value = "Android Configuration Management"),
+ @ExtensionProperty(name = "context",
+ value = "/api/device-mgt/android/v1.0/configuration"),
+ })
+ }
+ ),
+ tags = {
+ @Tag(name = "devicemgt_android", description = "")
+ }
+)
@Api(value = "Android Configuration Management", description = "This API carries all the resource used to mange the Android platform configurations.")
@Path("/configuration")
@Produces(MediaType.APPLICATION_JSON)
@@ -47,7 +70,14 @@ public interface DeviceTypeConfigurationService {
value = "Getting Android Platform Configurations",
notes = "Get the Android platform configuration details using this REST API.",
response = PlatformConfiguration.class,
- tags = "Android Configuration Management"
+ tags = "Android Configuration Management",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(scope = "/device-mgt/platform-configurations/view",
+ description = "View Configurations") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -80,7 +110,6 @@ public interface DeviceTypeConfigurationService {
code = 500,
message = "Internal Server Error. \n Server error occurred while fetching the Android platform configuration.")
})
- @Permission(name = "View Configurations", permission = "/device-mgt/platform-configurations/view")
Response getConfiguration(
@ApiParam(
name = "If-Modified-Since",
@@ -97,7 +126,14 @@ public interface DeviceTypeConfigurationService {
httpMethod = "PUT",
value = "Updating Android Platform Configurations",
notes = "Update the Android platform configurations using this REST API.",
- tags = "Android Configuration Management"
+ tags = "Android Configuration Management",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(scope = "/device-mgt/platform-configurations/manage",
+ description = "Manage Configurations") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -132,7 +168,6 @@ public interface DeviceTypeConfigurationService {
message = "Internal Server Error. \n " +
"Server error occurred while modifying the Android platform configuration.")
})
- @Permission(name = "Manage Configurations", permission = "/device-mgt/platform-configurations/manage")
Response updateConfiguration(
@ApiParam(name = "configuration",
value = "The properties to update the Android platform configurations.")
@@ -148,7 +183,15 @@ public interface DeviceTypeConfigurationService {
notes = "Use this REST API to retrieve the license agreement that is used for the Android device " +
"registration process.",
response = String.class,
- tags = "Android Configuration Management")
+ tags = "Android Configuration Management",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(scope = "/device-mgt/devices/enroll/android",
+ description = "Enroll Device") }
+ )
+ }
+ )
@ApiResponses(value = {
@ApiResponse(
code = 200,
@@ -180,7 +223,6 @@ public interface DeviceTypeConfigurationService {
code = 500,
message = "Internal Server Error. \n Server error occurred while fetching the Android license configuration.")
})
- @Permission(name = "Enroll Device", permission = "/device-mgt/devices/enroll/android")
Response getLicense(
@ApiParam(
name = "If-Modified-Since",
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/EventReceiverService.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/EventReceiverService.java
index c37cc5191..744655768 100644
--- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/EventReceiverService.java
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/EventReceiverService.java
@@ -18,10 +18,19 @@
*/
package org.wso2.carbon.mdm.services.android.services;
-import io.swagger.annotations.*;
-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 io.swagger.annotations.SwaggerDefinition;
+import io.swagger.annotations.Info;
+import io.swagger.annotations.ExtensionProperty;
+import io.swagger.annotations.Extension;
+import io.swagger.annotations.Tag;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.AuthorizationScope;
+import io.swagger.annotations.Authorization;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import io.swagger.annotations.ResponseHeader;
import org.wso2.carbon.mdm.services.android.bean.DeviceState;
import org.wso2.carbon.mdm.services.android.bean.wrapper.EventBeanWrapper;
@@ -31,10 +40,21 @@ import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
-@API(name = "Android Event Receiver", version = "1.0.0",
- context = "/api/device-mgt/android/v1.0/events",
- tags = {"devicemgt_android"})
-
+@SwaggerDefinition(
+ info = @Info(
+ version = "1.0.0",
+ title = "",
+ extensions = {
+ @Extension(properties = {
+ @ExtensionProperty(name = "name", value = "Android Event Receiver"),
+ @ExtensionProperty(name = "context", value = "/api/device-mgt/android/v1.0/events"),
+ })
+ }
+ ),
+ tags = {
+ @Tag(name = "devicemgt_android", description = "")
+ }
+)
@Api(value = "Event Receiver", description = "Event publishing/retrieving related APIs. To enable event publishing/retrieving you need to" +
" configure WSO2 EMM as explained in https://docs.wso2.com/display/EMM220/Managing+Event+Publishing+with+WSO2+Data+Analytics+Server, " +
"https://docs.wso2.com/display/EMM220/Creating+a+New+Event+Stream+and+Receiver")
@@ -51,7 +71,14 @@ public interface EventReceiverService {
httpMethod = "POST",
value = "Publishing Events",
notes = "Publish events received by the WSO2 EMM Android client to the WSO2 Data Analytics Server (DAS) using this API.",
- tags = "Event Receiver"
+ tags = "Event Receiver",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(scope = "/device-mgt/devices/enroll/android",
+ description = "Publish Events to DAS") }
+ )
+ }
)
@ApiResponses(
value = {
@@ -91,7 +118,6 @@ public interface EventReceiverService {
message = "Internal Server Error. \n " +
"Server error occurred while publishing events.")
})
- @Permission(name = "Publish Events to DAS", permission = "/device-mgt/devices/enroll/android")
Response publishEvents(
@ApiParam(
name = "eventBeanWrapper",
@@ -110,7 +136,14 @@ public interface EventReceiverService {
"(This cannot be combined with the to and from parameters).",
response = DeviceState.class,
responseContainer = "List",
- tags = "Event Receiver"
+ tags = "Event Receiver",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(scope = "/device-mgt/devices/enroll/android",
+ description = "Publish Events to DAS") }
+ )
+ }
)
@ApiResponses(
value = {
@@ -140,7 +173,6 @@ public interface EventReceiverService {
code = 500,
message = "Error occurred while getting the published events for the specified device.")
})
- @Permission(name = "Publish Events to DAS", permission = "/device-mgt/devices/enroll/android")
Response retrieveAlerts(
@ApiParam(
name = "id",
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/ConfigurationMgtService.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/ConfigurationMgtService.java
index 076c56bc4..ab4c2574b 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/ConfigurationMgtService.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/ConfigurationMgtService.java
@@ -18,9 +18,20 @@
package org.wso2.carbon.device.mgt.mobile.windows.api.services;
-import io.swagger.annotations.*;
-import org.wso2.carbon.apimgt.annotations.api.API;
-import org.wso2.carbon.apimgt.annotations.api.Permission;
+import io.swagger.annotations.SwaggerDefinition;
+import io.swagger.annotations.Info;
+import io.swagger.annotations.ExtensionProperty;
+import io.swagger.annotations.Extension;
+import io.swagger.annotations.Tag;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.AuthorizationScope;
+import io.swagger.annotations.Authorization;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import io.swagger.annotations.ResponseHeader;
+
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.util.Message;
@@ -34,9 +45,23 @@ import javax.ws.rs.core.Response;
* Windows Platform Configuration REST-API implementation.
* All end points supports JSON, XMl with content negotiation.
*/
-@API(name = "Windows Configuration Management", version = "1.0.0",
- context = "/api/device-mgt/windows/v1.0/services/configuration",
- tags = {"windows"})
+
+@SwaggerDefinition(
+ info = @Info(
+ version = "1.0.0",
+ title = "",
+ extensions = {
+ @Extension(properties = {
+ @ExtensionProperty(name = "name", value = "Windows Configuration Management"),
+ @ExtensionProperty(name = "context",
+ value = "/api/device-mgt/windows/v1.0/services/configuration"),
+ })
+ }
+ ),
+ tags = {
+ @Tag(name = "devicemgt_windows", description = "")
+ }
+)
@Api(value = "Windows Configuration Management",
description = "This carries all the resources related to Windows configurations management functionalities")
@WebService
@@ -52,7 +77,14 @@ public interface ConfigurationMgtService {
value = "Getting Windows Platform Configurations",
notes = "Get the Windows platform configuration details using this REST API.",
response = PlatformConfiguration.class,
- tags = "Windows Configuration Management"
+ tags = "Windows Configuration Management",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(scope = "/device-mgt/platform-configurations/view",
+ description = "View Configurations") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -85,7 +117,6 @@ public interface ConfigurationMgtService {
code = 500,
message = "Internal Server Error. \n Server error occurred while fetching the Windows platform configuration.")
})
- @Permission(name = "View Configurations", permission = "/device-mgt/platform-configurations/view")
PlatformConfiguration getConfiguration() throws WindowsConfigurationException;
/**
@@ -102,7 +133,14 @@ public interface ConfigurationMgtService {
httpMethod = "PUT",
value = "Updating Windows Platform Configurations",
notes = "Update the Windows platform configurations using this REST API.",
- tags = "Windows Configuration Management"
+ tags = "Windows Configuration Management",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(scope = "/device-mgt/configurations/manage",
+ description = "Manage Configurations") }
+ )
+ }
)
@ApiResponses(value = {
@ApiResponse(
@@ -137,7 +175,6 @@ public interface ConfigurationMgtService {
message = "Internal Server Error. \n " +
"Server error occurred while modifying the Windows platform configurations.")
})
- @Permission(name = "Manage Configurations", permission = "/device-mgt/configurations/manage")
Message updateConfiguration
( @ApiParam(
name = "configuration",
@@ -154,7 +191,15 @@ public interface ConfigurationMgtService {
notes = "Use this REST API to retrieve the license agreement that is used for the Windows device " +
"registration process.",
response = String.class,
- tags = "Windows Configuration Management")
+ tags = "Windows Configuration Management",
+ authorizations = {
+ @Authorization(
+ value="permission",
+ scopes = { @AuthorizationScope(scope = "/device-mgt/devices/enroll/windows",
+ description = "Enroll Device") }
+ )
+ }
+ )
@ApiResponses(value = {
@ApiResponse(
code = 200,
@@ -186,7 +231,6 @@ public interface ConfigurationMgtService {
code = 500,
message = "Internal Server Error. \n Server error occurred while fetching the Windows license configuration.")
})
- @Permission(name = "Enroll Device", permission = "/device-mgt/devices/enroll/windows")
Response getLicense(
@ApiParam(
name = "If-Modified-Since",
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/DeviceManagementAdminService.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/DeviceManagementAdminService.java
index 5cfa31fd4..5e325938c 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/DeviceManagementAdminService.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/DeviceManagementAdminService.java
@@ -18,8 +18,12 @@
package org.wso2.carbon.device.mgt.mobile.windows.api.services;
+import io.swagger.annotations.SwaggerDefinition;
+import io.swagger.annotations.Info;
+import io.swagger.annotations.ExtensionProperty;
+import io.swagger.annotations.Extension;
+import io.swagger.annotations.Tag;
import io.swagger.annotations.Api;
-import org.wso2.carbon.apimgt.annotations.api.API;
import org.wso2.carbon.apimgt.annotations.api.Permission;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsDeviceEnrolmentException;
@@ -38,9 +42,24 @@ import java.util.List;
*/
@Api(value = "Windows Device Management Administrative Service",
description = "Device management related admin APIs.")
-@API(name = "Windows Device Management Administrative Service", version = "1.0.0",
- context = "/api/device-mgt/windows/v1.0/admin/devices",
- tags = {"devicemgt_windows"})
+
+@SwaggerDefinition(
+ info = @Info(
+ version = "1.0.0",
+ title = "",
+ extensions = {
+ @Extension(properties = {
+ @ExtensionProperty(name = "name",
+ value = "Windows Device Management Administrative Service"),
+ @ExtensionProperty(name = "context",
+ value = "/api/device-mgt/windows/v1.0/admin/devices"),
+ })
+ }
+ ),
+ tags = {
+ @Tag(name = "devicemgt_windows", description = "")
+ }
+)
@WebService
@Path("/admin/devices")
@Consumes(MediaType.APPLICATION_JSON)
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 8734124df..63d046860 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
@@ -18,8 +18,12 @@
package org.wso2.carbon.device.mgt.mobile.windows.api.services;
+import io.swagger.annotations.SwaggerDefinition;
+import io.swagger.annotations.Info;
+import io.swagger.annotations.ExtensionProperty;
+import io.swagger.annotations.Extension;
+import io.swagger.annotations.Tag;
import io.swagger.annotations.Api;
-import org.wso2.carbon.apimgt.annotations.api.API;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.license.mgt.License;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsConfigurationException;
@@ -40,9 +44,22 @@ import java.util.List;
*/
@Api(value = "Windows Device Management",
description = "This carries all the resources related to Windows device management functionalities")
-@API(name = "Windows Device Management", version = "1.0.0",
- context = "/api/device-mgt/windows/v1.0/devices",
- tags = {"devicemgt_windows"})
+
+@SwaggerDefinition(
+ info = @Info(
+ version = "1.0.0",
+ title = "",
+ extensions = {
+ @Extension(properties = {
+ @ExtensionProperty(name = "name", value = "Windows Device Management"),
+ @ExtensionProperty(name = "context", value = "/api/device-mgt/windows/v1.0/devices"),
+ })
+ }
+ ),
+ tags = {
+ @Tag(name = "devicemgt_windows", description = "")
+ }
+)
@WebService
@Path("/devices")
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/assembly/src.xml b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/assembly/src.xml
index 2797034e0..3815c75d7 100644
--- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/assembly/src.xml
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/assembly/src.xml
@@ -29,7 +29,17 @@
${basedir}/src/main/resources/jaggeryapps/devicemgt
- /
+ /devicemgt
+ true
+
+
+ ${basedir}/src/main/resources/jaggeryapps/uuf-template-app
+ /windows-web-agent
+ true
+
+
+ ${basedir}/src/main/resources/jaggeryapps/windows-web-agent
+ /windows-web-agenttrue
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/conf/app-conf.json b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/conf/app-conf.json
new file mode 100644
index 000000000..63bcd3f5f
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/conf/app-conf.json
@@ -0,0 +1,45 @@
+{
+ "appName": "UUF Template App",
+ "cachingEnabled": false,
+ "debuggingEnabled": false,
+ "permissionRoot": "/",
+ "loginPage": "uuf.page.sign-in",
+ "adminServicesUrl": "https://${server.ip}:${server.https_port}/admin/services/",
+ "authModule": {
+ "enabled": true,
+ "login": {
+ "onSuccess": {
+ "script": "/app/modules/login.js",
+ "page": "uuf.page.home"
+ },
+ "onFail": {
+ "script": "/app/modules/login.js",
+ "page": "uuf.page.sign-in"
+ }
+ },
+ "logout": {
+ "onSuccess": {
+ "script": "/app/modules/logout.js",
+ "page": "uuf.page.sign-in"
+ },
+ "onFail": {
+ "script": "/app/modules/logout.js",
+ "page": "uuf.page.home"
+ }
+ },
+ "sso": {
+ "enabled": false,
+ "issuer": "uuf",
+ "responseSigningEnabled": true,
+ "keyStoreName": "repository/resources/security/wso2carbon.jks",
+ "keyStorePassword": "wso2carbon",
+ "identityProviderAlias": "wso2carbon",
+ "identityProviderUrl": "https://${server.ip}:${server.https_port}/samlsso",
+ "intermediatePage": "uuf.page.sso-intermediate"
+ }
+ },
+ "errorPages": {
+ "404": "uuf.page.error",
+ "default": "uuf.page.error"
+ }
+}
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/conf/uuf-conf.json b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/conf/uuf-conf.json
new file mode 100644
index 000000000..72d2df1ed
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/conf/uuf-conf.json
@@ -0,0 +1,4 @@
+{
+ "displayName": "UUF Template App",
+ "logLevel": "debug"
+}
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/layouts/uuf.layout.default.hbs b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/layouts/uuf.layout.default.hbs
new file mode 100644
index 000000000..a67a3e63e
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/layouts/uuf.layout.default.hbs
@@ -0,0 +1,67 @@
+{{!--
+* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+* WSO2 Inc. licenses this file to you under the Apache License,
+* Version 2.0 (the "License"); you may not use this file except
+* in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+--}}
+
+
+
+
+
+
+
+
+ {{#defineZone "title"}}WSO2 Template{{/defineZone}}
+ {{defineZone "favicon"}}
+ {{defineZone "topCss"}}
+ {{defineZone "topJs"}}
+
+
+
+{{defineZone "header"}}
+
+
+
+
+ {{defineZone "navbars"}}
+
+
+
+
+{{defineZone "sidePanes"}}
+
+
+
+
+ {{defineZone "contentTitle"}}
+
+
+ {{defineZone "content"}}
+
+
+
+
+
+
+
+
+
+{{defineZone "bottomJs"}}
+
+
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/layouts/uuf.layout.sign-in.hbs b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/layouts/uuf.layout.sign-in.hbs
new file mode 100644
index 000000000..3283927e5
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/layouts/uuf.layout.sign-in.hbs
@@ -0,0 +1,56 @@
+{{!--
+* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+* WSO2 Inc. licenses this file to you under the Apache License,
+* Version 2.0 (the "License"); you may not use this file except
+* in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+--}}
+
+
+
+
+
+
+
+
+ {{#defineZone "title"}}WSO2 Template{{/defineZone}}
+ {{defineZone "favicon"}}
+ {{defineZone "topCss"}}
+ {{defineZone "topJs"}}
+
+
+
+{{defineZone "header"}}
+
+
+
+
+
+
+ {{defineZone "content"}}
+
+
+
+
+
+
+
+
+
+{{defineZone "bottomJs"}}
+
+
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.error/error.hbs b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.error/error.hbs
new file mode 100644
index 000000000..a4a31d008
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.error/error.hbs
@@ -0,0 +1,38 @@
+{{!
+ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+}}
+{{#zone "title"}}Error | {{@app.conf.appName}}{{/zone}}
+
+{{#zone "breadcrumbs"}}
+
+{{/zone}}
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.error/error.json b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.error/error.json
new file mode 100644
index 000000000..c60eb5207
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.error/error.json
@@ -0,0 +1,6 @@
+{
+ "version": "1.0.0",
+ "uri": "/error/default",
+ "layout": "uuf.layout.default",
+ "isAnonymous": true
+}
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sign-in/public/js/sign-in-validations.js b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sign-in/public/js/sign-in-validations.js
new file mode 100644
index 000000000..2db2c795f
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sign-in/public/js/sign-in-validations.js
@@ -0,0 +1,24 @@
+$(document).ready(function(){
+ $("#signInForm").validate({
+ rules: {
+ username: {
+ required: true,
+ minlength: 3
+ },
+ password: {
+ required: true,
+ minlength: 3
+ }
+ },
+ messages: {
+ username: {
+ required: "Please enter a username",
+ minlength: "Your username must consist of at least 3 characters"
+ },
+ password: {
+ required: "Please provide a password",
+ minlength: "Your password must be at least 3 characters long"
+ }
+ }
+ });
+});
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sign-in/sign-in.hbs b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sign-in/sign-in.hbs
new file mode 100644
index 000000000..06fde86ec
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sign-in/sign-in.hbs
@@ -0,0 +1,63 @@
+{{!
+ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+}}
+{{#zone "title"}}Sign In | {{@app.conf.appName}}{{/zone}}
+
+{{~#zone "content"}}
+
+
+
+
+ {{#defineZone "signIn-title" scope="protected"}}Sign In to UUF Template App{{/defineZone}}
+
+
+
+ {{#if message}}
+
+ {{message}}!
+
+ {{/if}}
+
+
+
+
+{{/zone}}
+
+{{! sign-in form validation}}
+{{~unit "uuf.unit.lib.form-validation"}}
+{{~#zone "bottomJs"}}
+ {{~js "js/sign-in-validations.js"}}
+{{/zone}}
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sign-in/sign-in.js b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sign-in/sign-in.js
new file mode 100644
index 000000000..939e7c82b
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sign-in/sign-in.js
@@ -0,0 +1,30 @@
+function onRequest(context) {
+ var authModuleConfigs = context.app.conf["authModule"];
+ if (authModuleConfigs && (authModuleConfigs["enabled"].toString() == "true")) {
+ // Auth module is enabled.
+ if (context.user) {
+ // User is already logged in.
+ response.sendRedirect(context.app.context + "/");
+ exit();
+ } else {
+ // User is not logged in.
+ var ssoConfigs = authModuleConfigs["sso"];
+ if (ssoConfigs && (ssoConfigs["enabled"].toString() == "true")) {
+ // SSO is enabled in Auth module.
+ var redirectUri = context.app.context + "/uuf/login";
+ var queryString = request.getQueryString();
+ if (queryString && (queryString.length > 0)) {
+ redirectUri = redirectUri + "?" + queryString;
+ }
+ response.sendRedirect(encodeURI(redirectUri));
+ exit();
+ } else {
+ // Generic login process is enabled.
+ return {
+ message: request.getParameter("error"),
+ referer: request.getParameter("referer")
+ };
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sign-in/sign-in.json b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sign-in/sign-in.json
new file mode 100644
index 000000000..4bafc2dbb
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sign-in/sign-in.json
@@ -0,0 +1,6 @@
+{
+ "version": "1.0.0",
+ "uri": "/signin",
+ "layout": "uuf.layout.sign-in",
+ "isAnonymous": true
+}
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sign-out/sign-out.hbs b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sign-out/sign-out.hbs
new file mode 100644
index 000000000..23e70695f
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sign-out/sign-out.hbs
@@ -0,0 +1,18 @@
+{{!
+ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+}}
+{{! This template won't be rendered. So nothing is here }}
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sign-out/sign-out.js b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sign-out/sign-out.js
new file mode 100644
index 000000000..527c97733
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sign-out/sign-out.js
@@ -0,0 +1,16 @@
+function onRequest(context) {
+ var authModuleConfigs = context.app.conf["authModule"];
+ if (authModuleConfigs && (authModuleConfigs["enabled"].toString() == "true")) {
+ // Auth module is enabled.
+ if (context.user) {
+ // User is logged in.
+ response.sendRedirect(context.app.context + "/uuf/logout");
+ exit();
+ } else {
+ // User is already logged out.
+ response.sendRedirect(context.app.context + "/");
+ exit();
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sign-out/sign-out.json b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sign-out/sign-out.json
new file mode 100644
index 000000000..0667f6f06
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sign-out/sign-out.json
@@ -0,0 +1,5 @@
+{
+ "version": "1.0.0",
+ "uri": "/signout",
+ "layout": "uuf.layout.sign-in"
+}
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sso-intermediate/sso-intermediate.hbs b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sso-intermediate/sso-intermediate.hbs
new file mode 100644
index 000000000..73de91e94
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sso-intermediate/sso-intermediate.hbs
@@ -0,0 +1,45 @@
+{{!
+ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+}}
+{{#zone "title"}}Sign In | {{@app.conf.appName}}{{/zone}}
+
+{{unit "uuf.unit.theme"}}
+{{unit "uuf.unit.header.logo"}}{{unit "uuf.unit.header"}}
+{{unit "uuf.unit.footer"}}
+
+{{#zone "content"}}
+
+
+ You are now being redirected to Identity Server. If the redirection fails, please click
+ on the button below.
+
+
+
+
+
+
+{{/zone}}
+
+{{#zone "bottomJs"}}
+
+{{/zone}}
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sso-intermediate/sso-intermediate.json b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sso-intermediate/sso-intermediate.json
new file mode 100644
index 000000000..e3c6cdde2
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/pages/uuf.page.sso-intermediate/sso-intermediate.json
@@ -0,0 +1,6 @@
+{
+ "version": "1.0.0",
+ "uri": "//",
+ "layout": "uuf.layout.sign-in",
+ "isAnonymous": true
+}
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.alert/alert.hbs b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.alert/alert.hbs
new file mode 100644
index 000000000..51a365f77
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.alert/alert.hbs
@@ -0,0 +1,27 @@
+{{!
+ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+}}
+
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.alert/alert.js b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.alert/alert.js
new file mode 100644
index 000000000..aa4e1482f
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.alert/alert.js
@@ -0,0 +1,15 @@
+function onRequest(context) {
+ var type = context.unit.params.type;
+ switch (type) {
+ case "success":
+ return {icon: "ok"};
+ case "info":
+ return {icon: "info"};
+ case "warning":
+ return {icon: "warning"};
+ case "danger":
+ return {icon: "error"};
+ default:
+ return {icon: "ok"};
+ }
+}
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.alert/alert.json b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.alert/alert.json
new file mode 100644
index 000000000..f2f22da9a
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.alert/alert.json
@@ -0,0 +1,4 @@
+{
+ "version": "1.0.0",
+ "isAnonymous": true
+}
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.favicon/favicon.hbs b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.favicon/favicon.hbs
new file mode 100644
index 000000000..8274b5e66
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.favicon/favicon.hbs
@@ -0,0 +1,20 @@
+{{!
+ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+}}
+{{#zone "favicon"}}
+
+{{/zone}}
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.favicon/favicon.json b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.favicon/favicon.json
new file mode 100644
index 000000000..6e8b1666c
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.favicon/favicon.json
@@ -0,0 +1,8 @@
+{
+ "version": "1.0.0",
+ "pushedUris": [
+ "/",
+ "/{+any}"
+ ],
+ "isAnonymous": true
+}
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.favicon/public/img/favicon.png b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.favicon/public/img/favicon.png
new file mode 100644
index 000000000..a1deab358
Binary files /dev/null and b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.favicon/public/img/favicon.png differ
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.footer/footer.hbs b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.footer/footer.hbs
new file mode 100644
index 000000000..e726ab6dd
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.footer/footer.hbs
@@ -0,0 +1,23 @@
+{{!
+ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+}}
+{{#zone "footer"}}
+
+{{/zone}}
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.footer/footer.json b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.footer/footer.json
new file mode 100644
index 000000000..6e8b1666c
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.footer/footer.json
@@ -0,0 +1,8 @@
+{
+ "version": "1.0.0",
+ "pushedUris": [
+ "/",
+ "/{+any}"
+ ],
+ "isAnonymous": true
+}
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.header.logo/logo.hbs b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.header.logo/logo.hbs
new file mode 100644
index 000000000..4ce5f300d
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.header.logo/logo.hbs
@@ -0,0 +1,27 @@
+{{!
+ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+}}
+{{#zone "brand"}}
+
+
+
+
+{{/zone}}
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.header.logo/logo.json b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.header.logo/logo.json
new file mode 100644
index 000000000..38acf5dc9
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.header.logo/logo.json
@@ -0,0 +1,9 @@
+{
+ "version": "1.0.0",
+ "index": 9100,
+ "pushedUris": [
+ "/",
+ "/{+any}"
+ ],
+ "isAnonymous": true
+}
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.header.logo/public/img/logo.png b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.header.logo/public/img/logo.png
new file mode 100644
index 000000000..8fc1947a6
Binary files /dev/null and b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.header.logo/public/img/logo.png differ
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.header.user-menu/user-menu.hbs b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.header.user-menu/user-menu.hbs
new file mode 100644
index 000000000..d14d5dfed
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.header.user-menu/user-menu.hbs
@@ -0,0 +1,39 @@
+{{!
+ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+}}
+{{#zone "userMenu"}}
+
+{{/zone}}
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.header.user-menu/user-menu.json b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.header.user-menu/user-menu.json
new file mode 100644
index 000000000..614b0890b
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.header.user-menu/user-menu.json
@@ -0,0 +1,8 @@
+{
+ "version": "1.0.0",
+ "index": 9110,
+ "pushedUris": [
+ "/",
+ "/{+any}"
+ ]
+}
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.header/header.hbs b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.header/header.hbs
new file mode 100644
index 000000000..fe6c030d2
--- /dev/null
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.header/header.hbs
@@ -0,0 +1,29 @@
+{{!
+ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+
+ WSO2 Inc. licenses this file to you under the Apache License,
+ Version 2.0 (the "License"); you may not use this file except
+ in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+}}
+{{#zone "header"}}
+
+
+ * @type array
+ * @default []
+ */
+ "aanFeatures": [],
+
+ /**
+ * Store data information - see {@link DataTable.models.oRow} for detailed
+ * information.
+ * @type array
+ * @default []
+ */
+ "aoData": [],
+
+ /**
+ * Array of indexes which are in the current display (after filtering etc)
+ * @type array
+ * @default []
+ */
+ "aiDisplay": [],
+
+ /**
+ * Array of indexes for display - no filtering
+ * @type array
+ * @default []
+ */
+ "aiDisplayMaster": [],
+
+ /**
+ * Store information about each column that is in use
+ * @type array
+ * @default []
+ */
+ "aoColumns": [],
+
+ /**
+ * Store information about the table's header
+ * @type array
+ * @default []
+ */
+ "aoHeader": [],
+
+ /**
+ * Store information about the table's footer
+ * @type array
+ * @default []
+ */
+ "aoFooter": [],
+
+ /**
+ * Store the applied global search information in case we want to force a
+ * research or compare the old search to a new one.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @namespace
+ * @extends DataTable.models.oSearch
+ */
+ "oPreviousSearch": {},
+
+ /**
+ * Store the applied search for each column - see
+ * {@link DataTable.models.oSearch} for the format that is used for the
+ * filtering information for each column.
+ * @type array
+ * @default []
+ */
+ "aoPreSearchCols": [],
+
+ /**
+ * Sorting that is applied to the table. Note that the inner arrays are
+ * used in the following manner:
+ *
+ *
Index 0 - column number
+ *
Index 1 - current sorting direction
+ *
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type array
+ * @todo These inner arrays should really be objects
+ */
+ "aaSorting": null,
+
+ /**
+ * Sorting that is always applied to the table (i.e. prefixed in front of
+ * aaSorting).
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type array
+ * @default []
+ */
+ "aaSortingFixed": [],
+
+ /**
+ * Classes to use for the striping of a table.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type array
+ * @default []
+ */
+ "asStripeClasses": null,
+
+ /**
+ * If restoring a table - we should restore its striping classes as well
+ * @type array
+ * @default []
+ */
+ "asDestroyStripes": [],
+
+ /**
+ * If restoring a table - we should restore its width
+ * @type int
+ * @default 0
+ */
+ "sDestroyWidth": 0,
+
+ /**
+ * Callback functions array for every time a row is inserted (i.e. on a draw).
+ * @type array
+ * @default []
+ */
+ "aoRowCallback": [],
+
+ /**
+ * Callback functions for the header on each draw.
+ * @type array
+ * @default []
+ */
+ "aoHeaderCallback": [],
+
+ /**
+ * Callback function for the footer on each draw.
+ * @type array
+ * @default []
+ */
+ "aoFooterCallback": [],
+
+ /**
+ * Array of callback functions for draw callback functions
+ * @type array
+ * @default []
+ */
+ "aoDrawCallback": [],
+
+ /**
+ * Array of callback functions for row created function
+ * @type array
+ * @default []
+ */
+ "aoRowCreatedCallback": [],
+
+ /**
+ * Callback functions for just before the table is redrawn. A return of
+ * false will be used to cancel the draw.
+ * @type array
+ * @default []
+ */
+ "aoPreDrawCallback": [],
+
+ /**
+ * Callback functions for when the table has been initialised.
+ * @type array
+ * @default []
+ */
+ "aoInitComplete": [],
+
+
+ /**
+ * Callbacks for modifying the settings to be stored for state saving, prior to
+ * saving state.
+ * @type array
+ * @default []
+ */
+ "aoStateSaveParams": [],
+
+ /**
+ * Callbacks for modifying the settings that have been stored for state saving
+ * prior to using the stored values to restore the state.
+ * @type array
+ * @default []
+ */
+ "aoStateLoadParams": [],
+
+ /**
+ * Callbacks for operating on the settings object once the saved state has been
+ * loaded
+ * @type array
+ * @default []
+ */
+ "aoStateLoaded": [],
+
+ /**
+ * Cache the table ID for quick access
+ * @type string
+ * @default Empty string
+ */
+ "sTableId": "",
+
+ /**
+ * The TABLE node for the main table
+ * @type node
+ * @default null
+ */
+ "nTable": null,
+
+ /**
+ * Permanent ref to the thead element
+ * @type node
+ * @default null
+ */
+ "nTHead": null,
+
+ /**
+ * Permanent ref to the tfoot element - if it exists
+ * @type node
+ * @default null
+ */
+ "nTFoot": null,
+
+ /**
+ * Permanent ref to the tbody element
+ * @type node
+ * @default null
+ */
+ "nTBody": null,
+
+ /**
+ * Cache the wrapper node (contains all DataTables controlled elements)
+ * @type node
+ * @default null
+ */
+ "nTableWrapper": null,
+
+ /**
+ * Indicate if when using server-side processing the loading of data
+ * should be deferred until the second draw.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ * @default false
+ */
+ "bDeferLoading": false,
+
+ /**
+ * Indicate if all required information has been read in
+ * @type boolean
+ * @default false
+ */
+ "bInitialised": false,
+
+ /**
+ * Information about open rows. Each object in the array has the parameters
+ * 'nTr' and 'nParent'
+ * @type array
+ * @default []
+ */
+ "aoOpenRows": [],
+
+ /**
+ * Dictate the positioning of DataTables' control elements - see
+ * {@link DataTable.model.oInit.sDom}.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ * @default null
+ */
+ "sDom": null,
+
+ /**
+ * Search delay (in mS)
+ * @type integer
+ * @default null
+ */
+ "searchDelay": null,
+
+ /**
+ * Which type of pagination should be used.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ * @default two_button
+ */
+ "sPaginationType": "two_button",
+
+ /**
+ * The state duration (for `stateSave`) in seconds.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type int
+ * @default 0
+ */
+ "iStateDuration": 0,
+
+ /**
+ * Array of callback functions for state saving. Each array element is an
+ * object with the following parameters:
+ *
+ *
function:fn - function to call. Takes two parameters, oSettings
+ * and the JSON string to save that has been thus far created. Returns
+ * a JSON string to be inserted into a json object
+ * (i.e. '"param": [ 0, 1, 2]')
+ *
string:sName - name of callback
+ *
+ * @type array
+ * @default []
+ */
+ "aoStateSave": [],
+
+ /**
+ * Array of callback functions for state loading. Each array element is an
+ * object with the following parameters:
+ *
+ *
function:fn - function to call. Takes two parameters, oSettings
+ * and the object stored. May return false to cancel state loading