From 1bcea7cc1b6fbf58418d94f43601d55d99835a21 Mon Sep 17 00:00:00 2001 From: charitha Date: Fri, 25 Nov 2016 14:22:00 +0530 Subject: [PATCH 01/10] Move components with org.wso2.mdm group id to org.wso2.carbon.devicemgt group --- .../dynamic-client-web-proxy/pom.xml | 5 ++--- .../dynamic-client-registration/dynamic-client-web/pom.xml | 5 ++--- .../pom.xml | 5 +++-- pom.xml | 5 +++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/components/identity-extensions/dynamic-client-registration/dynamic-client-web-proxy/pom.xml b/components/identity-extensions/dynamic-client-registration/dynamic-client-web-proxy/pom.xml index 336e3112d7..6eb38b205c 100644 --- a/components/identity-extensions/dynamic-client-registration/dynamic-client-web-proxy/pom.xml +++ b/components/identity-extensions/dynamic-client-registration/dynamic-client-web-proxy/pom.xml @@ -16,7 +16,8 @@ ~ under the License. --> - + dynamic-client-registration @@ -26,9 +27,7 @@ 4.0.0 - org.wso2.mdm dynamic-client-web-proxy - 2.0.1-SNAPSHOT WSO2 Carbon - Proxy endpoint of Dynamic Client Registration Web Service WSO2 Carbon - Dynamic Client Registration Web Proxy war diff --git a/components/identity-extensions/dynamic-client-registration/dynamic-client-web/pom.xml b/components/identity-extensions/dynamic-client-registration/dynamic-client-web/pom.xml index 20ecc08c74..95db22be32 100644 --- a/components/identity-extensions/dynamic-client-registration/dynamic-client-web/pom.xml +++ b/components/identity-extensions/dynamic-client-registration/dynamic-client-web/pom.xml @@ -16,7 +16,8 @@ ~ under the License. --> - + dynamic-client-registration @@ -26,9 +27,7 @@ 4.0.0 - org.wso2.mdm dynamic-client-web - 2.0.1-SNAPSHOT WSO2 Carbon - Dynamic Client Registration Web Service WSO2 Carbon - Dynamic Client Registration Web war diff --git a/features/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration.server.feature/pom.xml b/features/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration.server.feature/pom.xml index a44ec0f52c..b43201e0f9 100644 --- a/features/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration.server.feature/pom.xml +++ b/features/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration.server.feature/pom.xml @@ -18,7 +18,8 @@ ~ under the License. --> - + org.wso2.carbon.devicemgt @@ -96,7 +97,7 @@ - org.wso2.mdm + org.wso2.carbon.devicemgt dynamic-client-web ${carbon.device.mgt.version} war diff --git a/pom.xml b/pom.xml index 7f0b6e4112..1e1180f9bd 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,8 @@ ~ under the License. --> - + 4.0.0 org.wso2.carbon.devicemgt @@ -246,7 +247,7 @@ ${carbon.device.mgt.version} - org.wso2.mdm + org.wso2.carbon.devicemgt dynamic-client-web ${carbon.device.mgt.version} From d90c9ab68a7d406e6fa9f033ca2376a7e3833a53 Mon Sep 17 00:00:00 2001 From: Imesh Chandrasiri Date: Mon, 28 Nov 2016 11:33:16 +0530 Subject: [PATCH 02/10] Data table fix when list view --- .../cdmf.unit.ui.theme/public/css/custom-desktop.css | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.theme/public/css/custom-desktop.css b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.theme/public/css/custom-desktop.css index 1a89379d3f..0f440ddf2a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.theme/public/css/custom-desktop.css +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.theme/public/css/custom-desktop.css @@ -6510,4 +6510,14 @@ select > option:hover { /* Adding style for required fields */ .required:before { content: "*"; +} + +.table.list-table:not(.grid-view){ + margin: 0px !important; +} +.table.list-table:not(.grid-view) > thead, .table.list-table:not(.grid-view) > tbody, .table.list-table:not(.grid-view) > tfoot{ + margin-bottom: 10px !important; +} +.table.list-table:not(.grid-view) tbody{ + margin: 0px !important; } \ No newline at end of file From a56b953fcb71818ee82bc0256fee2cb295309d49 Mon Sep 17 00:00:00 2001 From: Imesh Chandrasiri Date: Tue, 29 Nov 2016 13:32:29 +0530 Subject: [PATCH 03/10] Validation error fix --- .../pages/cdmf.page.group.create/create.hbs | 6 +- .../public/js/group-add.js | 61 +++++++++++++++++-- 2 files changed, 61 insertions(+), 6 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.create/create.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.create/create.hbs index 8ae4393a8f..9d9edd0c53 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.create/create.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.create/create.hbs @@ -36,9 +36,11 @@ - {{#defineZone "device-detail-properties"}} -
- - - -
-
- -
- {{unit "cdmf.unit.device.details" device=device}} -
-
-
Policies
-
- -
-
- No policies found -
-
-
+
+ +
+
+ + + {{#defineZone "device-view-tab-contents"}} + {{#defineZone "device-details-tab-contents"}} +
+

+ + No Device details avaialbe yet. +

- - - - - Add device specific policy -
- -
-
Policy Compliance
-
- -
-
Device Location
-
-
-
-
- Not available yet -
-
-
-
-
-
Operations Log
-
- -
+ {{/defineZone}} + {{/defineZone}} +
- - {{/defineZone}} +
{{else}}

@@ -206,6 +173,7 @@

Device not found

+
You have tried to access either a removed or non-existing device. {{/if}} @@ -221,7 +189,4 @@ - {{/zone}} \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.view/view.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.view/view.js index 209f3c0654..c93097ab79 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.view/view.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.view/view.js @@ -95,8 +95,8 @@ function onRequest(context) { if (filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_TOTAL_MEMORY"] != 0) { viewModel["internalMemory"]["usage"] = Math. round((filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_TOTAL_MEMORY"] - - filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_AVAILABLE_MEMORY"]) - / filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_TOTAL_MEMORY"] * 10000) / 100; + filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_AVAILABLE_MEMORY"]) + / filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["INTERNAL_TOTAL_MEMORY"] * 10000) / 100; } else { viewModel["internalMemory"]["usage"] = 0; } @@ -107,8 +107,8 @@ function onRequest(context) { if (filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_TOTAL_MEMORY"] != 0) { viewModel["externalMemory"]["usage"] = Math. round((filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_TOTAL_MEMORY"] - - filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_AVAILABLE_MEMORY"]) - / filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_TOTAL_MEMORY"] * 10000) / 100; + filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_AVAILABLE_MEMORY"]) + / filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["EXTERNAL_TOTAL_MEMORY"] * 10000) / 100; } else { viewModel["externalMemory"]["usage"] = 0; } @@ -122,8 +122,8 @@ function onRequest(context) { if (filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["DeviceCapacity"] != 0) { viewModel["internalMemory"]["usage"] = Math. round((filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["DeviceCapacity"] - - filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["AvailableDeviceCapacity"]) - / filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["DeviceCapacity"] * 10000) / 100; + filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["AvailableDeviceCapacity"]) + / filteredDeviceData["initialDeviceInfo"]["DEVICE_INFO"]["DeviceCapacity"] * 10000) / 100; } else { viewModel["internalMemory"]["usage"] = 0; } @@ -162,8 +162,8 @@ function onRequest(context) { if (filteredDeviceData["latestDeviceInfo"]["totalRAMMemory"] != 0) { viewModel["ramUsage"]["value"] = Math. round((filteredDeviceData["latestDeviceInfo"]["totalRAMMemory"] - - filteredDeviceData["latestDeviceInfo"]["availableRAMMemory"]) - / filteredDeviceData["latestDeviceInfo"]["totalRAMMemory"] * 10000) / 100; + filteredDeviceData["latestDeviceInfo"]["availableRAMMemory"]) + / filteredDeviceData["latestDeviceInfo"]["totalRAMMemory"] * 10000) / 100; } else { viewModel["ramUsage"]["value"] = 0; } @@ -174,8 +174,8 @@ function onRequest(context) { if (filteredDeviceData["latestDeviceInfo"]["internalTotalMemory"] != 0) { viewModel["internalMemory"]["usage"] = Math. round((filteredDeviceData["latestDeviceInfo"]["internalTotalMemory"] - - filteredDeviceData["latestDeviceInfo"]["internalAvailableMemory"]) - / filteredDeviceData["latestDeviceInfo"]["internalTotalMemory"] * 10000) / 100; + filteredDeviceData["latestDeviceInfo"]["internalAvailableMemory"]) + / filteredDeviceData["latestDeviceInfo"]["internalTotalMemory"] * 10000) / 100; } else { viewModel["internalMemory"]["usage"] = 0; } @@ -186,8 +186,8 @@ function onRequest(context) { if (filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] != 0) { viewModel["externalMemory"]["usage"] = Math. round((filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] - - filteredDeviceData["latestDeviceInfo"]["externalAvailableMemory"]) - / filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] * 10000) / 100; + filteredDeviceData["latestDeviceInfo"]["externalAvailableMemory"]) + / filteredDeviceData["latestDeviceInfo"]["externalTotalMemory"] * 10000) / 100; } else { viewModel["externalMemory"]["usage"] = 0; } @@ -196,7 +196,7 @@ function onRequest(context) { viewModel["deviceInfoAvailable"] = false; } - deviceViewData["deviceView"] = viewModel; + deviceViewData["device"] = viewModel; } else if (response["status"] == "unauthorized") { deviceViewData["deviceFound"] = true; deviceViewData["isAuthorized"] = false; From 564cece94b204d2f574250d22419d092a7308e6e Mon Sep 17 00:00:00 2001 From: charitha Date: Wed, 30 Nov 2016 17:11:01 +0530 Subject: [PATCH 09/10] Bug fixes --- .../mgt/core/dao/impl/GroupDAOImpl.java | 5 ++ .../DeviceManagementProviderServiceImpl.java | 1 + .../app/modules/business-controllers/user.js | 12 ++-- .../jaggeryapps/devicemgt/app/modules/init.js | 4 +- .../cdmf.page.groups/public/js/listing.js | 70 ++++++++----------- .../cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs | 11 +-- 6 files changed, 46 insertions(+), 57 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/GroupDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/GroupDAOImpl.java index 52dba3579a..7d9947a421 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/GroupDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/GroupDAOImpl.java @@ -105,6 +105,11 @@ public class GroupDAOImpl implements GroupDAO { stmt.setInt(1, groupId); stmt.setInt(2, tenantId); stmt.executeUpdate(); + sql = "DELETE FROM DM_DEVICE_GROUP_POLICY WHERE DEVICE_GROUP_ID = ? AND TENANT_ID = ?"; + stmt = conn.prepareStatement(sql); + stmt.setInt(1, groupId); + stmt.setInt(2, tenantId); + stmt.executeUpdate(); } catch (SQLException e) { throw new GroupManagementDAOException("Error occurred while removing mappings for group.'", e); } finally { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java index 4053c641e3..948b38976f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java @@ -1903,6 +1903,7 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv defaultGroup = new DeviceGroup(groupName); // Setting system level user (wso2.system.user) as the owner defaultGroup.setOwner(CarbonConstants.REGISTRY_SYSTEM_USERNAME); + defaultGroup.setDescription("Default system group for devices with " + groupName + " ownership."); try { service.createGroup(defaultGroup, DeviceGroupConstants.Roles.DEFAULT_ADMIN_ROLE, DeviceGroupConstants.Permissions.DEFAULT_ADMIN_PERMISSIONS); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/user.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/user.js index 0283fd214d..f8a0fd1ad4 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/user.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/user.js @@ -500,10 +500,11 @@ var userModule = function () { publicMethods.getUIPermissions = function () { var permissions = {}; - if (publicMethods.isAuthorized("/permission/admin/device-mgt/devices/list")) { + if (publicMethods.isAuthorized("/permission/admin/device-mgt/devices/any-device")) { permissions["LIST_DEVICES"] = true; + permissions["LIST_OWN_DEVICES"] = true; } - if (publicMethods.isAuthorized("/permission/admin/device-mgt/user/devices/list")) { + if (publicMethods.isAuthorized("/permission/admin/device-mgt/devices/owning-device")) { permissions["LIST_OWN_DEVICES"] = true; } if (publicMethods.isAuthorized("/permission/admin/device-mgt/admin/groups/view")) { @@ -524,10 +525,10 @@ var userModule = function () { if (publicMethods.isAuthorized("/permission/admin/device-mgt/user/policies/list")) { permissions["LIST_POLICIES"] = true; } - if (publicMethods.isAuthorized("/permission/admin/device-mgt/user/devices/add")) { + if (publicMethods.isAuthorized("/permission/admin/device-mgt/devices/add")) { permissions["ADD_DEVICE"] = true; } - if (publicMethods.isAuthorized("/permission/admin/device-mgt/user/groups/add")) { + if (publicMethods.isAuthorized("/permission/admin/device-mgt/groups/add")) { permissions["ADD_GROUP"] = true; } if (publicMethods.isAuthorized("/permission/admin/device-mgt/users/add")) { @@ -542,9 +543,6 @@ var userModule = function () { if (publicMethods.isAuthorized("/permission/admin/device-mgt/groups/devices/view")) { permissions["VIEW_GROUP_DEVICES"] = true; } - if (publicMethods.isAuthorized("/permission/admin/device-mgt/groups/roles/create")) { - permissions["CREATE_GROUP_ROLES"] = true; - } if (publicMethods.isAuthorized("/permission/admin/device-mgt/groups/roles/view")) { permissions["VIEW_GROUP_ROLES"] = true; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/init.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/init.js index bf5f26cac8..bc0fa5abb0 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/init.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/init.js @@ -29,7 +29,9 @@ var carbonServer = new carbonModule.server.Server({ application.put("carbonServer", carbonServer); var permissions = { - "/permission/admin/device-mgt/devices": ["ui.execute"], + "/permission/admin/device-mgt/devices/enroll": ["ui.execute"], + "/permission/admin/device-mgt/devices/disenroll": ["ui.execute"], + "/permission/admin/device-mgt/devices/owning-device": ["ui.execute"], "/permission/admin/device-mgt/groups": ["ui.execute"], "/permission/admin/device-mgt/notifications": ["ui.execute"], "/permission/admin/device-mgt/policies": ["ui.execute"], diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/public/js/listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/public/js/listing.js index 439861e956..af4c5606f6 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/public/js/listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/public/js/listing.js @@ -93,7 +93,7 @@ function loadGroups() { var currentUser = groupListing.data("currentUser"); var serviceURL; if ($.hasPermission("LIST_ALL_GROUPS")) { - serviceURL = "/api/device-mgt/v1.0/groups"; + serviceURL = "/api/device-mgt/v1.0/admin/groups"; } else if ($.hasPermission("LIST_GROUPS")) { //Get authenticated users groups serviceURL = "/api/device-mgt/v1.0/groups/user/" + currentUser; @@ -113,8 +113,7 @@ function loadGroups() { groupId: data.deviceGroups[index].id, name: data.deviceGroups[index].name, description: data.deviceGroups[index].description, - owner: data.deviceGroups[index].owner, - dateOfCreation: data.deviceGroups[index].dateOfCreation + owner: data.deviceGroups[index].owner }) }); var json = { @@ -153,7 +152,7 @@ function loadGroups() { data: 'id', class: 'text-right content-fill text-left-on-grid-view no-wrap', render: function (id, type, row, meta) { - var html; + var html = ''; if ($.hasPermission("VIEW_GROUP_DEVICES")) { html = '' + @@ -166,46 +165,39 @@ function loadGroups() { '' + ''; - } else { - html = ''; - } - if ($.hasPermission("SHARE_GROUP")) { - html += - ''; - } else { - html += ''; - } - if ($.hasPermission("UPDATE_GROUP")) { - html += - '' + - ''; - } else { - html += ''; } - if ($.hasPermission("REMOVE_GROUP")) { - html += - '' - + - ''; - } else { - html += ''; + if (row.owner != "wso2.system.user") { + if ($.hasPermission("SHARE_GROUP")) { + html += + ''; + } + if ($.hasPermission("UPDATE_GROUP")) { + html += + '' + + ''; + } + if ($.hasPermission("REMOVE_GROUP")) { + html += + '' + + + ''; + } } return html; } } - ]; var fnCreatedRow = function (row, data) { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs index 232e2c9d77..0a6a7d5b7e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs @@ -30,22 +30,13 @@ {{/if}} - {{#if permissions.LIST_DEVICES_ADMIN}} + {{#if permissions.LIST_OWN_DEVICES}}
  • Device Management
  • - {{else}} - {{#if permissions.LIST_OWN_DEVICES}} -
  • - - - Device Management - -
  • - {{/if}} {{/if}} {{#if permissions.LIST_GROUPS}}
  • From 0879a75f7bd46c5e69036d571d5fc23a9aa5823b Mon Sep 17 00:00:00 2001 From: geethkokila Date: Wed, 30 Nov 2016 17:46:01 +0530 Subject: [PATCH 10/10] Fixing the serializing issue of device groups. --- .../wso2/carbon/policy/mgt/common/DeviceGroupWrapper.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/src/main/java/org/wso2/carbon/policy/mgt/common/DeviceGroupWrapper.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/src/main/java/org/wso2/carbon/policy/mgt/common/DeviceGroupWrapper.java index 3457873b08..dc30981603 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/src/main/java/org/wso2/carbon/policy/mgt/common/DeviceGroupWrapper.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/src/main/java/org/wso2/carbon/policy/mgt/common/DeviceGroupWrapper.java @@ -22,8 +22,12 @@ package org.wso2.carbon.policy.mgt.common; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; + @ApiModel(value = "DeviceGroupWrapper", description = "This class carries information related to device groups expect users and devices.") -public class DeviceGroupWrapper { +public class DeviceGroupWrapper implements Serializable { + + private static final long serialVersionUID = 1998101722L; @ApiModelProperty(name = "id", value = "Id of the group", required = true) private int id;