From c29bf24a756ff75c0975bb3da78e0a18e2efe37d Mon Sep 17 00:00:00 2001 From: Madawa Soysa Date: Thu, 17 Nov 2016 17:54:25 +0530 Subject: [PATCH 01/17] Adding mobile devices to default groupes based on device ownership Adding mobile devices to default system generated groups based on the device ownership (BYOD, COPE) --- .../mgt/common/group/mgt/DeviceGroup.java | 7 ++ .../group/mgt/DeviceGroupConstants.java | 12 ++++ .../DeviceManagementProviderServiceImpl.java | 72 ++++++++++++++++++- .../GroupManagementProviderService.java | 25 ++++++- .../GroupManagementProviderServiceImpl.java | 49 +++++++++++++ 5 files changed, 161 insertions(+), 4 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/group/mgt/DeviceGroup.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/group/mgt/DeviceGroup.java index d4417bf58a..bb59bd1798 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/group/mgt/DeviceGroup.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/group/mgt/DeviceGroup.java @@ -48,6 +48,13 @@ public class DeviceGroup implements Serializable { private Long dateOfLastUpdate; private String owner; + public DeviceGroup() {} + + public DeviceGroup(String name, String description) { + this.name = name; + this.description = description; + } + public int getGroupId() { return id; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/group/mgt/DeviceGroupConstants.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/group/mgt/DeviceGroupConstants.java index aab0fc16f3..488c8034e2 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/group/mgt/DeviceGroupConstants.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/group/mgt/DeviceGroupConstants.java @@ -79,4 +79,16 @@ public class DeviceGroupConstants { public static final String[] DEFAULT_VIEW_EVENTS_PERMISSIONS = {"/permission/device-mgt/user/groups/device_events"}; } + + /** + * Holds the constants related to default (System Generated) groups. + */ + public static class DefaultGroups { + public static final String BYOD_GROUP_NAME = "BYOD"; + public static final String BYOD_GROUP_DESCRIPTION = "This is the default group for BYOD (Bring Your Own Device)" + + " type devices."; + public static final String COPE_GROUP_NAME = "COPE"; + public static final String COPE_GROUP_DESCRIPTION = "This is the default group for COPE (Corporate Owned) type" + + " devices."; + } } 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 1811cc36f3..37d9cb9fe3 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 @@ -20,11 +20,16 @@ package org.wso2.carbon.device.mgt.core.service; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.context.CarbonContext; +import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.device.mgt.common.*; import org.wso2.carbon.device.mgt.common.app.mgt.Application; import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; import org.wso2.carbon.device.mgt.common.device.details.DeviceInfo; import org.wso2.carbon.device.mgt.common.device.details.DeviceLocation; +import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroup; +import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroupConstants; +import org.wso2.carbon.device.mgt.common.group.mgt.GroupAlreadyExistException; +import org.wso2.carbon.device.mgt.common.group.mgt.GroupManagementException; import org.wso2.carbon.device.mgt.common.license.mgt.License; import org.wso2.carbon.device.mgt.common.license.mgt.LicenseManagementException; import org.wso2.carbon.device.mgt.common.operation.mgt.Activity; @@ -130,7 +135,6 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv return false; } deviceManager.enrollDevice(device); - if (deviceManager.isClaimable(deviceIdentifier)) { device.getEnrolmentInfo().setStatus(EnrolmentInfo.Status.INACTIVE); } else { @@ -221,6 +225,9 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv status = true; } + if (status) { + addDeviceToGroups(deviceIdentifier, device.getEnrolmentInfo().getOwnership()); + } return status; } @@ -1834,4 +1841,67 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv return deviceManagementService.getDeviceManager(); } + /** + * Adds the enrolled devices to the default groups based on ownership + * + * @param deviceIdentifier of the device. + * @param ownerShip of the device. + * @throws DeviceManagementException If error occurred in adding the device to the group. + */ + private void addDeviceToGroups(DeviceIdentifier deviceIdentifier, EnrolmentInfo.OwnerShip ownerShip) + throws DeviceManagementException { + GroupManagementProviderService groupManagementProviderService = new GroupManagementProviderServiceImpl(); + DeviceGroup defaultGroup = null; + try { + if (ownerShip == EnrolmentInfo.OwnerShip.BYOD) { + defaultGroup = createDefaultGroup(groupManagementProviderService, + DeviceGroupConstants.DefaultGroups.BYOD_GROUP_NAME, + DeviceGroupConstants.DefaultGroups.BYOD_GROUP_DESCRIPTION); + } else if (ownerShip == EnrolmentInfo.OwnerShip.COPE) { + defaultGroup = createDefaultGroup(groupManagementProviderService, + DeviceGroupConstants.DefaultGroups.COPE_GROUP_NAME, + DeviceGroupConstants.DefaultGroups.COPE_GROUP_DESCRIPTION); + } + if (defaultGroup != null) { + groupManagementProviderService.addDevice(defaultGroup.getGroupId(), deviceIdentifier); + } + } catch (DeviceNotFoundException e) { + throw new DeviceManagementException("Unable to find the device with the id: '" + deviceIdentifier.getId(), + e); + } catch (GroupManagementException | GroupAlreadyExistException e) { + throw new DeviceManagementException("An error occurred when adding the device to the group.", e); + } + } + + /** + * Checks for the default group existence and create group based on device ownership + * + * @param service {@link GroupManagementProviderService} + * @param groupName of the group to create. + * @param groupDescription of the group to create. + * @return Group with details. + * @throws GroupManagementException + * @throws GroupAlreadyExistException + */ + private DeviceGroup createDefaultGroup(GroupManagementProviderService service, String groupName, + String groupDescription) throws GroupManagementException, GroupAlreadyExistException { + DeviceGroup defaultGroup = service.getGroup(groupName); + if (defaultGroup == null) { + defaultGroup = new DeviceGroup(groupName, groupDescription); + defaultGroup.setOwner(PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername()); + defaultGroup.setDateOfCreation(new Date().getTime()); + defaultGroup.setDateOfLastUpdate(new Date().getTime()); + try { + service.createGroup(defaultGroup, DeviceGroupConstants.Roles.DEFAULT_ADMIN_ROLE, + DeviceGroupConstants.Permissions.DEFAULT_ADMIN_PERMISSIONS); + } catch (GroupAlreadyExistException e) { + if (log.isDebugEnabled()) { + log.debug("Default group: " + defaultGroup.getName() + " already exists.", e); + } + } + return service.getGroup(groupName); + } else { + return defaultGroup; + } + } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderService.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderService.java index 4be6e298d8..7fcdb6708c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderService.java @@ -29,6 +29,7 @@ import org.wso2.carbon.device.mgt.common.group.mgt.GroupAlreadyExistException; import org.wso2.carbon.device.mgt.common.group.mgt.GroupManagementException; import org.wso2.carbon.device.mgt.common.group.mgt.GroupUser; import org.wso2.carbon.device.mgt.common.group.mgt.RoleDoesNotExistException; +import org.wso2.carbon.device.mgt.core.dao.GroupManagementDAOException; import org.wso2.carbon.user.core.multiplecredentials.UserDoesNotExistException; import java.util.List; @@ -76,6 +77,15 @@ public interface GroupManagementProviderService { */ DeviceGroup getGroup(int groupId) throws GroupManagementException; + /** + * Get the device group provided the device group id. + * + * @param groupName of the group. + * @return group with details. + * @throws GroupManagementException + */ + DeviceGroup getGroup(String groupName) throws GroupManagementException; + /** * Get all device groups in tenant. * @@ -211,15 +221,24 @@ public interface GroupManagementProviderService { */ int getDeviceCount(int groupId) throws GroupManagementException; + /** + * @param groupId of the group. + * @param deviceIdentifier of the device to add. + * @throws DeviceNotFoundException If device does not exist. + * @throws GroupManagementException If unable to add device to the group. + */ + void addDevice(int groupId, DeviceIdentifier deviceIdentifier) + throws DeviceNotFoundException, GroupManagementException; + /** * Add device to device group. * - * @param groupId of the group. + * @param groupId of the group. * @param deviceIdentifiers of devices. * @throws GroupManagementException */ - void addDevices(int groupId, List deviceIdentifiers) throws GroupManagementException, - DeviceNotFoundException; + void addDevices(int groupId, List deviceIdentifiers) + throws GroupManagementException, DeviceNotFoundException; /** * Remove device from device group. diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderServiceImpl.java index 575f19dcbe..a711a45da6 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderServiceImpl.java @@ -188,6 +188,25 @@ public class GroupManagementProviderServiceImpl implements GroupManagementProvid return deviceGroup; } + /** + * {@inheritDoc} + */ + @Override + public DeviceGroup getGroup(String groupName) throws GroupManagementException { + DeviceGroup deviceGroup; + try { + GroupManagementDAOFactory.openConnection(); + deviceGroup = this.groupDAO.getGroup(groupName, CarbonContext.getThreadLocalCarbonContext().getTenantId()); + } catch (GroupManagementDAOException e) { + throw new GroupManagementException("Error occurred while obtaining group with name: '" + groupName + "'", e); + } catch (SQLException e) { + throw new GroupManagementException("Error occurred while opening a connection to the data source.", e); + } finally { + GroupManagementDAOFactory.closeConnection(); + } + return deviceGroup; + } + @Override public List getGroups() throws GroupManagementException { List deviceGroups = new ArrayList<>(); @@ -587,6 +606,36 @@ public class GroupManagementProviderServiceImpl implements GroupManagementProvid } } + /** + * {@inheritDoc} + */ + @Override + public void addDevice(int groupId, DeviceIdentifier deviceIdentifier) + throws DeviceNotFoundException, GroupManagementException { + Device device; + try { + int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); + GroupManagementDAOFactory.beginTransaction(); + device = DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().getDevice(deviceIdentifier); + if (device == null) { + throw new DeviceNotFoundException("Device not found for id '" + deviceIdentifier.getId() + "'"); + } + if (!this.groupDAO.isDeviceMappedToGroup(groupId, device.getId(), tenantId)) { + this.groupDAO.addDevice(groupId, device.getId(), tenantId); + } + GroupManagementDAOFactory.commitTransaction(); + } catch (DeviceManagementException e) { + throw new GroupManagementException("Error occurred while retrieving device.", e); + } catch (GroupManagementDAOException e) { + GroupManagementDAOFactory.rollbackTransaction(); + throw new GroupManagementException("Error occurred while adding device to group.", e); + } catch (TransactionManagementException e) { + throw new GroupManagementException("Error occurred while initiating transaction.", e); + } finally { + GroupManagementDAOFactory.closeConnection(); + } + } + /** * {@inheritDoc} */ From 2164a30f8805313f2c6ba7bea858adb3e8c4d91c Mon Sep 17 00:00:00 2001 From: Madawa Soysa Date: Mon, 21 Nov 2016 16:16:00 +0530 Subject: [PATCH 02/17] changing group owner to super user Changing the owner of the default system generated groups from the group creator to the super user of the system. --- .../DeviceManagementProviderServiceImpl.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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 37d9cb9fe3..6c62345aaa 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 @@ -37,6 +37,7 @@ import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; import org.wso2.carbon.device.mgt.core.DeviceManagementPluginRepository; +import org.wso2.carbon.device.mgt.core.config.identity.IdentityConfigurations; import org.wso2.carbon.device.mgt.core.dao.*; import org.wso2.carbon.device.mgt.core.device.details.mgt.dao.DeviceDetailsDAO; import org.wso2.carbon.device.mgt.core.device.details.mgt.dao.DeviceDetailsMgtDAOException; @@ -1868,7 +1869,7 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv } catch (DeviceNotFoundException e) { throw new DeviceManagementException("Unable to find the device with the id: '" + deviceIdentifier.getId(), e); - } catch (GroupManagementException | GroupAlreadyExistException e) { + } catch (GroupManagementException | UserStoreException e) { throw new DeviceManagementException("An error occurred when adding the device to the group.", e); } } @@ -1876,19 +1877,20 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv /** * Checks for the default group existence and create group based on device ownership * - * @param service {@link GroupManagementProviderService} + * @param service {@link GroupManagementProviderService} instance. * @param groupName of the group to create. * @param groupDescription of the group to create. * @return Group with details. * @throws GroupManagementException - * @throws GroupAlreadyExistException */ private DeviceGroup createDefaultGroup(GroupManagementProviderService service, String groupName, - String groupDescription) throws GroupManagementException, GroupAlreadyExistException { + String groupDescription) throws GroupManagementException, UserStoreException { DeviceGroup defaultGroup = service.getGroup(groupName); if (defaultGroup == null) { defaultGroup = new DeviceGroup(groupName, groupDescription); - defaultGroup.setOwner(PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername()); + defaultGroup.setOwner( + PrivilegedCarbonContext.getThreadLocalCarbonContext().getUserRealm().getRealmConfiguration() + .getAdminUserName()); defaultGroup.setDateOfCreation(new Date().getTime()); defaultGroup.setDateOfLastUpdate(new Date().getTime()); try { @@ -1896,7 +1898,8 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv DeviceGroupConstants.Permissions.DEFAULT_ADMIN_PERMISSIONS); } catch (GroupAlreadyExistException e) { if (log.isDebugEnabled()) { - log.debug("Default group: " + defaultGroup.getName() + " already exists.", e); + log.debug("Default group: " + defaultGroup.getName() + " already exists. Skipping group creation.", + e); } } return service.getGroup(groupName); From 8ab73ce07d72ad9c3d6bf3ee3ca374c5f6396a91 Mon Sep 17 00:00:00 2001 From: Madawa Soysa Date: Mon, 21 Nov 2016 16:16:33 +0530 Subject: [PATCH 03/17] fixing issue with javadocs --- .../device/mgt/core/service/GroupManagementProviderService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderService.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderService.java index 7fcdb6708c..3aded5fc07 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderService.java @@ -78,7 +78,7 @@ public interface GroupManagementProviderService { DeviceGroup getGroup(int groupId) throws GroupManagementException; /** - * Get the device group provided the device group id. + * Get the device group provided the device group name. * * @param groupName of the group. * @return group with details. From 2f431504fe817f3f72b0b535a16749de66f8a757 Mon Sep 17 00:00:00 2001 From: Madawa Soysa Date: Tue, 22 Nov 2016 13:25:27 +0530 Subject: [PATCH 04/17] creating groups from ownership and changing group owner This commit includes following changes, Creating groups using the device ownership Changing the default system group owner to wso2.system.user --- .../mgt/common/group/mgt/DeviceGroup.java | 3 +- .../group/mgt/DeviceGroupConstants.java | 12 ------- .../DeviceManagementProviderServiceImpl.java | 31 ++++++------------- 3 files changed, 11 insertions(+), 35 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/group/mgt/DeviceGroup.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/group/mgt/DeviceGroup.java index bb59bd1798..6617ab3bc8 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/group/mgt/DeviceGroup.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/group/mgt/DeviceGroup.java @@ -50,9 +50,8 @@ public class DeviceGroup implements Serializable { public DeviceGroup() {} - public DeviceGroup(String name, String description) { + public DeviceGroup(String name) { this.name = name; - this.description = description; } public int getGroupId() { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/group/mgt/DeviceGroupConstants.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/group/mgt/DeviceGroupConstants.java index 488c8034e2..aab0fc16f3 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/group/mgt/DeviceGroupConstants.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/group/mgt/DeviceGroupConstants.java @@ -79,16 +79,4 @@ public class DeviceGroupConstants { public static final String[] DEFAULT_VIEW_EVENTS_PERMISSIONS = {"/permission/device-mgt/user/groups/device_events"}; } - - /** - * Holds the constants related to default (System Generated) groups. - */ - public static class DefaultGroups { - public static final String BYOD_GROUP_NAME = "BYOD"; - public static final String BYOD_GROUP_DESCRIPTION = "This is the default group for BYOD (Bring Your Own Device)" - + " type devices."; - public static final String COPE_GROUP_NAME = "COPE"; - public static final String COPE_GROUP_DESCRIPTION = "This is the default group for COPE (Corporate Owned) type" - + " devices."; - } } 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 6c62345aaa..eeac1846d4 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 @@ -19,8 +19,8 @@ package org.wso2.carbon.device.mgt.core.service; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.CarbonConstants; import org.wso2.carbon.context.CarbonContext; -import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.device.mgt.common.*; import org.wso2.carbon.device.mgt.common.app.mgt.Application; import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; @@ -1846,30 +1846,21 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv * Adds the enrolled devices to the default groups based on ownership * * @param deviceIdentifier of the device. - * @param ownerShip of the device. + * @param ownership of the device. * @throws DeviceManagementException If error occurred in adding the device to the group. */ - private void addDeviceToGroups(DeviceIdentifier deviceIdentifier, EnrolmentInfo.OwnerShip ownerShip) + private void addDeviceToGroups(DeviceIdentifier deviceIdentifier, EnrolmentInfo.OwnerShip ownership) throws DeviceManagementException { GroupManagementProviderService groupManagementProviderService = new GroupManagementProviderServiceImpl(); - DeviceGroup defaultGroup = null; try { - if (ownerShip == EnrolmentInfo.OwnerShip.BYOD) { - defaultGroup = createDefaultGroup(groupManagementProviderService, - DeviceGroupConstants.DefaultGroups.BYOD_GROUP_NAME, - DeviceGroupConstants.DefaultGroups.BYOD_GROUP_DESCRIPTION); - } else if (ownerShip == EnrolmentInfo.OwnerShip.COPE) { - defaultGroup = createDefaultGroup(groupManagementProviderService, - DeviceGroupConstants.DefaultGroups.COPE_GROUP_NAME, - DeviceGroupConstants.DefaultGroups.COPE_GROUP_DESCRIPTION); - } + DeviceGroup defaultGroup = createDefaultGroup(groupManagementProviderService, ownership.toString()); if (defaultGroup != null) { groupManagementProviderService.addDevice(defaultGroup.getGroupId(), deviceIdentifier); } } catch (DeviceNotFoundException e) { throw new DeviceManagementException("Unable to find the device with the id: '" + deviceIdentifier.getId(), e); - } catch (GroupManagementException | UserStoreException e) { + } catch (GroupManagementException e) { throw new DeviceManagementException("An error occurred when adding the device to the group.", e); } } @@ -1879,18 +1870,16 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv * * @param service {@link GroupManagementProviderService} instance. * @param groupName of the group to create. - * @param groupDescription of the group to create. * @return Group with details. * @throws GroupManagementException */ - private DeviceGroup createDefaultGroup(GroupManagementProviderService service, String groupName, - String groupDescription) throws GroupManagementException, UserStoreException { + private DeviceGroup createDefaultGroup(GroupManagementProviderService service, String groupName) + throws GroupManagementException { DeviceGroup defaultGroup = service.getGroup(groupName); if (defaultGroup == null) { - defaultGroup = new DeviceGroup(groupName, groupDescription); - defaultGroup.setOwner( - PrivilegedCarbonContext.getThreadLocalCarbonContext().getUserRealm().getRealmConfiguration() - .getAdminUserName()); + defaultGroup = new DeviceGroup(groupName); + // Setting system level user (wso2.system.user) as the owner + defaultGroup.setOwner(CarbonConstants.REGISTRY_SYSTEM_USERNAME); defaultGroup.setDateOfCreation(new Date().getTime()); defaultGroup.setDateOfLastUpdate(new Date().getTime()); try { From c07d77b85dfab60be08824e2322a37a5d006fa43 Mon Sep 17 00:00:00 2001 From: charitha Date: Tue, 22 Nov 2016 21:13:18 +0530 Subject: [PATCH 05/17] Updated group sharing model --- .../service/api/GroupManagementService.java | 157 +------ .../impl/GroupManagementServiceImpl.java | 69 +-- .../mgt/common/group/mgt/DeviceGroup.java | 21 - .../carbon/device/mgt/core/dao/GroupDAO.java | 102 +++++ .../mgt/core/dao/impl/GroupDAOImpl.java | 360 +++++++++++++-- .../core/dao/util/GroupManagementDAOUtil.java | 2 - .../GroupManagementProviderService.java | 67 +-- .../GroupManagementProviderServiceImpl.java | 411 +++++------------- .../mgt/core/common/TestDataHolder.java | 2 - .../mgt/core/dao/GroupPersistTests.java | 4 - .../src/test/resources/sql/h2.sql | 12 +- .../src/main/resources/dbscripts/cdm/h2.sql | 12 +- .../main/resources/dbscripts/cdm/mssql.sql | 46 ++ .../main/resources/dbscripts/cdm/mysql.sql | 40 ++ .../main/resources/dbscripts/cdm/oracle.sql | 28 +- .../resources/dbscripts/cdm/postgresql.sql | 30 ++ 16 files changed, 735 insertions(+), 628 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GroupManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GroupManagementService.java index b7630f1643..64e56d1254 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GroupManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GroupManagementService.java @@ -19,26 +19,38 @@ package org.wso2.carbon.device.mgt.jaxrs.service.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 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.Authorization; +import io.swagger.annotations.AuthorizationScope; +import io.swagger.annotations.Extension; +import io.swagger.annotations.ExtensionProperty; +import io.swagger.annotations.Info; import io.swagger.annotations.ResponseHeader; +import io.swagger.annotations.SwaggerDefinition; +import io.swagger.annotations.Tag; import org.apache.axis2.transport.http.HTTPConstants; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroup; -import org.wso2.carbon.device.mgt.jaxrs.beans.*; +import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceGroupList; +import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceGroupShare; +import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceGroupUsersList; +import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceList; +import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse; import javax.validation.Valid; -import javax.ws.rs.*; +import javax.ws.rs.Consumes; +import javax.ws.rs.DELETE; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import java.util.List; @@ -475,126 +487,6 @@ public interface GroupManagementService { required = true) @Valid DeviceGroupShare deviceGroupShare); - @Path("/id/{groupId}/users") - @GET - @ApiOperation( - produces = MediaType.APPLICATION_JSON, - httpMethod = HTTPConstants.HEADER_GET, - value = "View list of users of a device group.", - notes = "Returns details of users which particular group has been shared with.", - tags = "Device Group Management", - authorizations = { - @Authorization( - value="permission", - scopes = { @AuthorizationScope(scope = "/device-mgt/groups/users/view", - description = "View users") } - ) - } - ) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "OK. \n Successfully fetched the users.", - response = DeviceGroupUsersList.class, - responseHeaders = { - @ResponseHeader( - name = "Content-Type", - description = "The content type of the body"), - @ResponseHeader( - name = "ETag", - description = "Entity Tag of the response resource.\n" + - "Used by caches, or in conditional requests."), - @ResponseHeader( - name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + - "Used by caches, or in conditional requests."), - }), - @ApiResponse( - code = 304, - message = "Not Modified. \n Empty body because the client has already the latest version of " + - "the requested resource."), - @ApiResponse( - code = 404, - message = "No groups found.", - response = ErrorResponse.class), - @ApiResponse( - code = 406, - message = "Not Acceptable.\n The requested media type is not supported."), - @ApiResponse( - code = 500, - message = "Internal Server Error. \n Server error occurred while fetching the users.", - response = ErrorResponse.class) - }) - Response getUsersOfGroup(@ApiParam( - name = "groupId", - value = "ID of the group.", - required = true) - @PathParam("groupId") int groupId); - - - @Path("id/{groupId}/roles/create") - @POST - @ApiOperation( - produces = MediaType.APPLICATION_JSON, - httpMethod = HTTPConstants.HEADER_GET, - value = "Create a group sharing role to a device group.", - notes = "Group sharing is done through a group sharing role.", - tags = "Device Group Management", - authorizations = { - @Authorization( - value="permission", - scopes = { @AuthorizationScope(scope = "/device-mgt/groups/roles/create", - description = "Create roles") } - ) - } - ) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "OK. \n Successfully created the role.", - response = DeviceGroupUsersList.class, - responseHeaders = { - @ResponseHeader( - name = "Content-Type", - description = "The content type of the body"), - @ResponseHeader( - name = "ETag", - description = "Entity Tag of the response resource.\n" + - "Used by caches, or in conditional requests."), - @ResponseHeader( - name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + - "Used by caches, or in conditional requests."), - }), - @ApiResponse( - code = 304, - message = "Not Modified. \n Empty body because the client has already the latest version of " + - "the requested resource."), - @ApiResponse( - code = 404, - message = "No groups found.", - response = ErrorResponse.class), - @ApiResponse( - code = 406, - message = "Not Acceptable.\n The requested media type is not supported."), - @ApiResponse( - code = 500, - message = "Internal Server Error. \n Server error occurred while creating the role.", - response = ErrorResponse.class) - }) - Response createGroupSharingRole( - @ApiParam( - name = "groupId", - value = "ID of the group.", - required = true) - @PathParam("groupId") int groupId, - @ApiParam( - name = "userName", - value = "User name of the current user.", - required = false) - @QueryParam("userName") String userName, - @ApiParam( - name = "roleInfo", - value = "Group role information with permissions and users", - required = true) - @Valid RoleInfo roleInfo); - @Path("/id/{groupId}/roles") @GET @ApiOperation( @@ -647,12 +539,7 @@ public interface GroupManagementService { name = "groupId", value = "ID of the group.", required = true) - @PathParam("groupId") int groupId, - @ApiParam( - name = "userName", - value = "User name of the current user.", - required = false) - @QueryParam("userName") String userName); + @PathParam("groupId") int groupId); @Path("/id/{groupId}/devices") @GET diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GroupManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GroupManagementServiceImpl.java index 90208d4409..89d8f8cf55 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GroupManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GroupManagementServiceImpl.java @@ -31,19 +31,17 @@ import org.wso2.carbon.device.mgt.common.PaginationResult; import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroup; import org.wso2.carbon.device.mgt.common.group.mgt.GroupAlreadyExistException; import org.wso2.carbon.device.mgt.common.group.mgt.GroupManagementException; -import org.wso2.carbon.device.mgt.common.group.mgt.GroupUser; import org.wso2.carbon.device.mgt.common.group.mgt.RoleDoesNotExistException; import org.wso2.carbon.device.mgt.core.service.GroupManagementProviderService; -import org.wso2.carbon.device.mgt.jaxrs.beans.*; +import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceGroupList; +import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceGroupShare; +import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceList; +import org.wso2.carbon.device.mgt.jaxrs.beans.RoleList; import org.wso2.carbon.device.mgt.jaxrs.service.api.GroupManagementService; import org.wso2.carbon.device.mgt.jaxrs.service.impl.util.RequestValidationUtil; import org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils; -import org.wso2.carbon.user.api.UserStoreException; -import org.wso2.carbon.user.api.UserStoreManager; -import org.wso2.carbon.user.core.multiplecredentials.UserDoesNotExistException; import javax.ws.rs.core.Response; -import java.util.Date; import java.util.List; public class GroupManagementServiceImpl implements GroupManagementService { @@ -100,8 +98,6 @@ public class GroupManagementServiceImpl implements GroupManagementService { return Response.status(Response.Status.BAD_REQUEST).build(); } group.setOwner(owner); - group.setDateOfCreation(new Date().getTime()); - group.setDateOfLastUpdate(new Date().getTime()); try { DeviceMgtAPIUtils.getGroupManagementProviderService().createGroup(group, DEFAULT_ADMIN_ROLE, DEFAULT_ADMIN_PERMISSIONS); return Response.status(Response.Status.CREATED).build(); @@ -171,66 +167,21 @@ public class GroupManagementServiceImpl implements GroupManagementService { public Response manageGroupSharing(int groupId, DeviceGroupShare deviceGroupShare) { try { DeviceMgtAPIUtils.getGroupManagementProviderService() - .manageGroupSharing(groupId, deviceGroupShare.getUsername(), deviceGroupShare.getGroupRoles()); + .manageGroupSharing(groupId, deviceGroupShare.getGroupRoles()); return Response.status(Response.Status.OK).build(); } catch (GroupManagementException e) { String msg = "Error occurred while managing group share."; log.error(msg, e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); - } catch (RoleDoesNotExistException | UserDoesNotExistException e) { + } catch (RoleDoesNotExistException e) { return Response.status(Response.Status.BAD_REQUEST).entity(e.getMessage()).build(); } } @Override - public Response getUsersOfGroup(int groupId) { + public Response getRolesOfGroup(int groupId) { try { - List groupUsers = DeviceMgtAPIUtils.getGroupManagementProviderService().getUsers(groupId); - if (groupUsers != null && groupUsers.size() > 0) { - DeviceGroupUsersList deviceGroupUsersList = new DeviceGroupUsersList(); - deviceGroupUsersList.setList(groupUsers); - deviceGroupUsersList.setCount(groupUsers.size()); - return Response.status(Response.Status.OK).entity(deviceGroupUsersList).build(); - } else { - return Response.status(Response.Status.NOT_FOUND).build(); - } - } catch (GroupManagementException e) { - String msg = "Error occurred while getting users of the group."; - log.error(msg, e); - return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); - } - } - - @Override - public Response createGroupSharingRole(int groupId, String userName, RoleInfo roleInfo) { - try { - DeviceMgtAPIUtils.getGroupManagementProviderService() - .addGroupSharingRole(userName, groupId, roleInfo.getRoleName(), roleInfo.getPermissions()); - return Response.status(Response.Status.CREATED).build(); - } catch (GroupManagementException e) { - String msg = "Error occurred while creating group sharing role."; - log.error(msg, e); - return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); - } - } - - @Override - public Response getRolesOfGroup(int groupId, String userName) { - try { - List groupRoles; - if(userName != null) { - UserStoreManager userStoreManager = DeviceMgtAPIUtils.getUserStoreManager(); - if (!userStoreManager.isExistingUser(userName)) { - // returning response with bad request state - return Response.status(Response.Status.CONFLICT).entity( - new ErrorResponse.ErrorResponseBuilder().setMessage("User by username: " + - userName + " doesn't exists. Therefore, request made to get user " + - "was refused.").build()).build(); - } - groupRoles = DeviceMgtAPIUtils.getGroupManagementProviderService().getRoles(userName, groupId); - } else { - groupRoles = DeviceMgtAPIUtils.getGroupManagementProviderService().getRoles(groupId); - } + List groupRoles = DeviceMgtAPIUtils.getGroupManagementProviderService().getRoles(groupId); if(groupRoles != null && groupRoles.size() > 0) { RoleList deviceGroupRolesList = new RoleList(); @@ -244,10 +195,6 @@ public class GroupManagementServiceImpl implements GroupManagementService { String msg = "Error occurred while getting roles of the group."; log.error(msg, e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); - } catch (UserStoreException e) { - String msg = "Error while retrieving the user."; - log.error(msg, e); - return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/group/mgt/DeviceGroup.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/group/mgt/DeviceGroup.java index d4417bf58a..c85fa314df 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/group/mgt/DeviceGroup.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/group/mgt/DeviceGroup.java @@ -20,10 +20,7 @@ package org.wso2.carbon.device.mgt.common.group.mgt; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; import java.io.Serializable; -import java.util.List; /** * Holds Device Group details and expose to external access @@ -44,8 +41,6 @@ public class DeviceGroup implements Serializable { required = true) private String name; - private Long dateOfCreation; - private Long dateOfLastUpdate; private String owner; public int getGroupId() { @@ -72,22 +67,6 @@ public class DeviceGroup implements Serializable { this.name = name; } - public Long getDateOfCreation() { - return dateOfCreation; - } - - public void setDateOfCreation(Long dateOfCreation) { - this.dateOfCreation = dateOfCreation; - } - - public Long getDateOfLastUpdate() { - return dateOfLastUpdate; - } - - public void setDateOfLastUpdate(Long dateOfLastUpdate) { - this.dateOfLastUpdate = dateOfLastUpdate; - } - public String getOwner() { return owner; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/GroupDAO.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/GroupDAO.java index b367d2c347..2536aa40e2 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/GroupDAO.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/GroupDAO.java @@ -86,6 +86,18 @@ public interface GroupDAO { */ List getGroups(GroupPaginationRequest paginationRequest, int tenantId) throws GroupManagementDAOException; + /** + * Get paginated list of Device Groups in tenant with specified device group ids. + * + * @param paginationRequest to filter results. + * @param deviceGroupIds of groups required. + * @param tenantId of user's tenant. + * @return List of all Device Groups in tenant. + * @throws GroupManagementDAOException + */ + List getGroups(GroupPaginationRequest paginationRequest, List deviceGroupIds, + int tenantId) throws GroupManagementDAOException; + /** * Get the list of Device Groups in tenant. * @@ -178,4 +190,94 @@ public interface GroupDAO { List getDevices(int groupId, int startIndex, int rowCount, int tenantId) throws GroupManagementDAOException; + /** + * Get all user roles for device group. + * + * @param groupId of the group + * @param tenantId of user's tenant. + * @return list of roles + * @throws GroupManagementDAOException + */ + List getRoles(int groupId, int tenantId) throws GroupManagementDAOException; + + /** + * Add user role for device group. + * + * @param groupId of the group. + * @param role to be added. + * @param tenantId of user's tenant. + * @throws GroupManagementDAOException + */ + void addRole(int groupId, String role, int tenantId) throws GroupManagementDAOException; + + /** + * Add user role for device group. + * + * @param groupId of the group. + * @param role to be removed. + * @param tenantId of user's tenant. + * @throws GroupManagementDAOException + */ + void removeRole(int groupId, String role, int tenantId) throws GroupManagementDAOException; + + /** + * Get all device groups which shared with a user role. + * + * @param roles of the group. + * @param tenantId of user's tenant. + * @return list of device groups. + * @throws GroupManagementDAOException + */ + List getGroups(String[] roles, int tenantId) throws GroupManagementDAOException; + + /** + * Get all device group ids which shared with a user role. + * + * @param roles of the group. + * @param tenantId of user's tenant. + * @return list of device group ids. + * @throws GroupManagementDAOException + */ + List getGroupIds(String[] roles, int tenantId) throws GroupManagementDAOException; + + /** + * Get count of all device groups which shared with a user role. + * + * @param roles of the group. + * @param tenantId of user's tenant. + * @return count of device groups. + * @throws GroupManagementDAOException + */ + int getGroupsCount(String[] roles, int tenantId) throws GroupManagementDAOException; + + /** + * Get all device groups which owned by user. + * + * @param username of the owner. + * @param tenantId of user's tenant. + * @return list of device groups. + * @throws GroupManagementDAOException + */ + List getOwnGroups(String username, int tenantId) throws GroupManagementDAOException; + + /** + * Get all device group ids which owned by user. + * + * @param username of the owner. + * @param tenantId of user's tenant. + * @return list of device group ids. + * @throws GroupManagementDAOException + */ + List getOwnGroupIds(String username, int tenantId) throws GroupManagementDAOException; + + /** + * Get count of device groups which owned by user. + * + * @param username of the owner. + * @param tenantId of user's tenant. + * @return count of device groups. + * @throws GroupManagementDAOException + */ + int getOwnGroupsCount(String username, int tenantId) throws GroupManagementDAOException; + } 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 5a8e089f8f..7a1fc37911 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 @@ -22,9 +22,9 @@ import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.GroupPaginationRequest; import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroup; import org.wso2.carbon.device.mgt.core.dao.GroupDAO; -import org.wso2.carbon.device.mgt.core.dao.util.DeviceManagementDAOUtil; import org.wso2.carbon.device.mgt.core.dao.GroupManagementDAOException; import org.wso2.carbon.device.mgt.core.dao.GroupManagementDAOFactory; +import org.wso2.carbon.device.mgt.core.dao.util.DeviceManagementDAOUtil; import org.wso2.carbon.device.mgt.core.dao.util.GroupManagementDAOUtil; import java.sql.Connection; @@ -32,7 +32,6 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; -import java.util.Date; import java.util.List; /** @@ -47,15 +46,12 @@ public class GroupDAOImpl implements GroupDAO { int groupId = -1; try { Connection conn = GroupManagementDAOFactory.getConnection(); - String sql = "INSERT INTO DM_GROUP(DESCRIPTION, GROUP_NAME, DATE_OF_CREATE, DATE_OF_LAST_UPDATE, " - + "OWNER, TENANT_ID) VALUES (?, ?, ?, ?, ?, ?)"; + String sql = "INSERT INTO DM_GROUP(DESCRIPTION, GROUP_NAME, OWNER, TENANT_ID) VALUES (?, ?, ?, ?)"; stmt = conn.prepareStatement(sql, new String[]{"ID"}); stmt.setString(1, deviceGroup.getDescription()); stmt.setString(2, deviceGroup.getName()); - stmt.setLong(3, new Date().getTime()); - stmt.setLong(4, new Date().getTime()); - stmt.setString(5, deviceGroup.getOwner()); - stmt.setInt(6, tenantId); + stmt.setString(3, deviceGroup.getOwner()); + stmt.setInt(4, tenantId); stmt.executeUpdate(); rs = stmt.getGeneratedKeys(); if (rs.next()) { @@ -76,15 +72,13 @@ public class GroupDAOImpl implements GroupDAO { PreparedStatement stmt = null; try { Connection conn = GroupManagementDAOFactory.getConnection(); - String sql = "UPDATE DM_GROUP SET DESCRIPTION = ?, GROUP_NAME = ?, DATE_OF_LAST_UPDATE = ?, OWNER = ? " - + "WHERE ID = ? AND TENANT_ID = ?"; + String sql = "UPDATE DM_GROUP SET DESCRIPTION = ?, GROUP_NAME = ?, OWNER = ? WHERE ID = ? AND TENANT_ID = ?"; stmt = conn.prepareStatement(sql); stmt.setString(1, deviceGroup.getDescription()); stmt.setString(2, deviceGroup.getName()); - stmt.setLong(3, deviceGroup.getDateOfLastUpdate()); - stmt.setString(4, deviceGroup.getOwner()); - stmt.setInt(5, groupId); - stmt.setInt(6, tenantId); + stmt.setString(3, deviceGroup.getOwner()); + stmt.setInt(4, groupId); + stmt.setInt(5, tenantId); stmt.executeUpdate(); } catch (SQLException e) { throw new GroupManagementDAOException("Error occurred while updating deviceGroup '" + @@ -100,7 +94,12 @@ public class GroupDAOImpl implements GroupDAO { PreparedStatement stmt = null; try { conn = GroupManagementDAOFactory.getConnection(); - String sql = "DELETE FROM DM_DEVICE_GROUP_MAP WHERE GROUP_ID = ? AND TENANT_ID = ?"; + String sql = "DELETE FROM DM_ROLE_GROUP_MAP WHERE GROUP_ID = ? AND TENANT_ID = ?"; + stmt = conn.prepareStatement(sql); + stmt.setInt(1, groupId); + stmt.setInt(2, tenantId); + stmt.executeUpdate(); + sql = "DELETE FROM DM_DEVICE_GROUP_MAP WHERE GROUP_ID = ? AND TENANT_ID = ?"; stmt = conn.prepareStatement(sql); stmt.setInt(1, groupId); stmt.setInt(2, tenantId); @@ -131,8 +130,7 @@ public class GroupDAOImpl implements GroupDAO { ResultSet resultSet = null; try { Connection conn = GroupManagementDAOFactory.getConnection(); - String sql = "SELECT ID, DESCRIPTION, GROUP_NAME, DATE_OF_CREATE, DATE_OF_LAST_UPDATE, OWNER " - + "FROM DM_GROUP WHERE ID = ? AND TENANT_ID = ?"; + String sql = "SELECT ID, DESCRIPTION, GROUP_NAME, OWNER FROM DM_GROUP WHERE ID = ? AND TENANT_ID = ?"; stmt = conn.prepareStatement(sql); stmt.setInt(1, groupId); stmt.setInt(2, tenantId); @@ -157,9 +155,9 @@ public class GroupDAOImpl implements GroupDAO { List deviceGroupBuilders = new ArrayList<>(); try { Connection conn = GroupManagementDAOFactory.getConnection(); - String sql = "SELECT G.ID, G.GROUP_NAME, G.DESCRIPTION, G.DATE_OF_CREATE, G.DATE_OF_LAST_UPDATE, \n" + - "G.OWNER FROM DM_GROUP G INNER JOIN DM_DEVICE_GROUP_MAP GM ON G.ID = GM.GROUP_ID " + - "WHERE GM.DEVICE_ID = ? AND GM.TENANT_ID = ?"; + String sql = "SELECT G.ID, G.GROUP_NAME, G.DESCRIPTION, G.OWNER FROM DM_GROUP G " + + "INNER JOIN DM_DEVICE_GROUP_MAP GM ON G.ID = GM.GROUP_ID " + + "WHERE GM.DEVICE_ID = ? AND GM.TENANT_ID = ?"; stmt = conn.prepareStatement(sql); stmt.setInt(1, deviceId); stmt.setInt(2, tenantId); @@ -190,8 +188,7 @@ public class GroupDAOImpl implements GroupDAO { try { Connection conn = GroupManagementDAOFactory.getConnection(); - String sql = "SELECT ID, DESCRIPTION, GROUP_NAME, DATE_OF_CREATE, DATE_OF_LAST_UPDATE, OWNER " - + "FROM DM_GROUP WHERE TENANT_ID = ?"; + String sql = "SELECT ID, DESCRIPTION, GROUP_NAME, OWNER FROM DM_GROUP WHERE TENANT_ID = ?"; if (groupName != null && !groupName.isEmpty()) { sql += " AND GROUP_NAME LIKE ?"; hasGroupName = true; @@ -230,6 +227,71 @@ public class GroupDAOImpl implements GroupDAO { return deviceGroupList; } + @Override + public List getGroups(GroupPaginationRequest request, List deviceGroupIds, + int tenantId) throws GroupManagementDAOException { + if (deviceGroupIds.size() == 0) { + return new ArrayList<>(); + } + PreparedStatement stmt = null; + ResultSet resultSet = null; + List deviceGroupList = null; + + String groupName = request.getGroupName(); + boolean hasGroupName = false; + String owner = request.getOwner(); + boolean hasOwner = false; + boolean hasLimit = request.getRowCount() != 0; + + try { + Connection conn = GroupManagementDAOFactory.getConnection(); + String sql = "SELECT ID, DESCRIPTION, GROUP_NAME, OWNER FROM DM_GROUP WHERE TENANT_ID = ?"; + if (groupName != null && !groupName.isEmpty()) { + sql += " AND GROUP_NAME LIKE ?"; + hasGroupName = true; + } + if (owner != null && !owner.isEmpty()) { + sql += " AND OWNER LIKE ?"; + hasOwner = true; + } + sql += " AND ID IN ("; + for (int i = 0; i < deviceGroupIds.size() - 1; i++) { + sql += "?,"; + } + sql += "?)"; + if (hasLimit) { + sql += " LIMIT ?, ?"; + } + + int paramIndex = 1; + stmt = conn.prepareStatement(sql); + stmt.setInt(paramIndex++, tenantId); + if (hasGroupName) { + stmt.setString(paramIndex++, groupName + "%"); + } + if (hasOwner) { + stmt.setString(paramIndex++, owner + "%"); + } + for (Integer deviceGroupId : deviceGroupIds) { + stmt.setInt(paramIndex++, deviceGroupId); + } + if (hasLimit) { + stmt.setInt(paramIndex++, request.getStartIndex()); + stmt.setInt(paramIndex, request.getRowCount()); + } + resultSet = stmt.executeQuery(); + deviceGroupList = new ArrayList<>(); + while (resultSet.next()) { + deviceGroupList.add(GroupManagementDAOUtil.loadGroup(resultSet)); + } + } catch (SQLException e) { + throw new GroupManagementDAOException("Error occurred while listing all groups in tenant: " + tenantId, e); + } finally { + GroupManagementDAOUtil.cleanupResources(stmt, resultSet); + } + return deviceGroupList; + } + @Override public List getGroups(int tenantId) throws GroupManagementDAOException { PreparedStatement stmt = null; @@ -237,8 +299,7 @@ public class GroupDAOImpl implements GroupDAO { List deviceGroupList = null; try { Connection conn = GroupManagementDAOFactory.getConnection(); - String sql = "SELECT ID, DESCRIPTION, GROUP_NAME, DATE_OF_CREATE, DATE_OF_LAST_UPDATE, OWNER " - + "FROM DM_GROUP WHERE TENANT_ID = ?"; + String sql = "SELECT ID, DESCRIPTION, GROUP_NAME, OWNER FROM DM_GROUP WHERE TENANT_ID = ?"; stmt = conn.prepareStatement(sql); stmt.setInt(1, tenantId); resultSet = stmt.executeQuery(); @@ -327,8 +388,7 @@ public class GroupDAOImpl implements GroupDAO { ResultSet resultSet = null; try { Connection conn = GroupManagementDAOFactory.getConnection(); - String sql = "SELECT ID, DESCRIPTION, GROUP_NAME, DATE_OF_CREATE, DATE_OF_LAST_UPDATE, OWNER " + - "FROM DM_GROUP WHERE GROUP_NAME = ? AND TENANT_ID = ?"; + String sql = "SELECT ID, DESCRIPTION, GROUP_NAME, OWNER FROM DM_GROUP WHERE GROUP_NAME = ? AND TENANT_ID = ?"; stmt = conn.prepareStatement(sql); stmt.setString(1, groupName); stmt.setInt(2, tenantId); @@ -356,7 +416,6 @@ public class GroupDAOImpl implements GroupDAO { stmt.setInt(2, groupId); stmt.setInt(3, tenantId); stmt.executeUpdate(); - stmt.getGeneratedKeys(); } catch (SQLException e) { throw new GroupManagementDAOException("Error occurred while adding device to Group.", e); } finally { @@ -376,7 +435,6 @@ public class GroupDAOImpl implements GroupDAO { stmt.setInt(2, groupId); stmt.setInt(3, tenantId); stmt.executeUpdate(); - stmt.getGeneratedKeys(); } catch (SQLException e) { throw new GroupManagementDAOException("Error occurred while removing device from Group.", e); } finally { @@ -428,7 +486,6 @@ public class GroupDAOImpl implements GroupDAO { } } - //TODO: Move this to device mgt @Override public List getDevices(int groupId, int startIndex, int rowCount, int tenantId) throws GroupManagementDAOException { @@ -470,4 +527,249 @@ public class GroupDAOImpl implements GroupDAO { return devices; } + @Override + public List getRoles(int groupId, int tenantId) throws GroupManagementDAOException { + PreparedStatement stmt = null; + ResultSet resultSet = null; + List userRoles; + try { + Connection conn = GroupManagementDAOFactory.getConnection(); + String sql = "SELECT ROLE FROM DM_ROLE_GROUP_MAP WHERE GROUP_ID = ? AND TENANT_ID = ?"; + stmt = conn.prepareStatement(sql); + stmt.setInt(1, groupId); + stmt.setInt(2, tenantId); + resultSet = stmt.executeQuery(); + userRoles = new ArrayList<>(); + while (resultSet.next()) { + userRoles.add(resultSet.getString("ROLE")); + } + } catch (SQLException e) { + throw new GroupManagementDAOException("Error occurred while listing all groups in tenant: " + tenantId, e); + } finally { + GroupManagementDAOUtil.cleanupResources(stmt, resultSet); + } + return userRoles; + } + + @Override + public void addRole(int groupId, String role, int tenantId) throws GroupManagementDAOException { + PreparedStatement stmt = null; + try { + Connection conn = GroupManagementDAOFactory.getConnection(); + String sql = "INSERT INTO DM_ROLE_GROUP_MAP(GROUP_ID, ROLE, TENANT_ID) VALUES (?, ?, ?)"; + stmt = conn.prepareStatement(sql); + stmt.setInt(1, groupId); + stmt.setString(2, role); + stmt.setInt(3, tenantId); + stmt.executeUpdate(); + } catch (SQLException e) { + throw new GroupManagementDAOException("Error occurred while adding new user role to Group.", e); + } finally { + GroupManagementDAOUtil.cleanupResources(stmt, null); + } + } + + @Override + public void removeRole(int groupId, String role, int tenantId) throws GroupManagementDAOException { + PreparedStatement stmt = null; + try { + Connection conn = GroupManagementDAOFactory.getConnection(); + String sql = "DELETE FROM DM_ROLE_GROUP_MAP WHERE GROUP_ID = ? AND ROLE = ? AND TENANT_ID = ?"; + stmt = conn.prepareStatement(sql); + stmt.setInt(1, groupId); + stmt.setString(2, role); + stmt.setInt(3, tenantId); + stmt.executeUpdate(); + } catch (SQLException e) { + throw new GroupManagementDAOException("Error occurred while removing device from Group.", e); + } finally { + GroupManagementDAOUtil.cleanupResources(stmt, null); + } + } + + @Override + public List getGroups(String[] roles, int tenantId) throws GroupManagementDAOException { + if (roles.length == 0) { + return new ArrayList<>(); + } + PreparedStatement stmt = null; + ResultSet resultSet = null; + List deviceGroupList = null; + try { + Connection conn = GroupManagementDAOFactory.getConnection(); + String sql = "SELECT ID, DESCRIPTION, GROUP_NAME, OWNER FROM DM_GROUP g, " + + "(SELECT GROUP_ID FROM DM_ROLE_GROUP_MAP WHERE ROLE IN ("; + + int index = 1; + while (index++ <= roles.length) { + sql += "?"; + } + sql += ")) gr WHERE g.ID = gr.GROUP_ID AND TENANT_ID = ? GROUP BY g.ID"; + + stmt = conn.prepareStatement(sql); + index = 1; + while (index++ <= roles.length) { + stmt.setString(index, roles[index++]); + } + stmt.setInt(index, tenantId); + resultSet = stmt.executeQuery(); + deviceGroupList = new ArrayList<>(); + while (resultSet.next()) { + deviceGroupList.add(GroupManagementDAOUtil.loadGroup(resultSet)); + } + } catch (SQLException e) { + throw new GroupManagementDAOException("Error occurred while listing all groups in tenant: " + tenantId, e); + } finally { + GroupManagementDAOUtil.cleanupResources(stmt, resultSet); + } + return deviceGroupList; + } + + @Override + public List getGroupIds(String[] roles, int tenantId) throws GroupManagementDAOException { + if (roles.length == 0) { + return new ArrayList<>(); + } + PreparedStatement stmt = null; + ResultSet resultSet = null; + List deviceGroupIdList = null; + try { + Connection conn = GroupManagementDAOFactory.getConnection(); + String sql = "SELECT ID FROM DM_GROUP g, (SELECT GROUP_ID FROM DM_ROLE_GROUP_MAP WHERE ROLE IN ("; + + for (int i = 0; i < roles.length - 1; i++) { + sql += "?,"; + } + sql += "?)) gr WHERE g.ID = gr.GROUP_ID AND TENANT_ID = ? GROUP BY g.ID"; + + stmt = conn.prepareStatement(sql); + int index = 1; + while (index++ <= roles.length) { + stmt.setString(index, roles[index++]); + } + stmt.setInt(index, tenantId); + resultSet = stmt.executeQuery(); + deviceGroupIdList = new ArrayList<>(); + while (resultSet.next()) { + deviceGroupIdList.add(resultSet.getInt("ID")); + } + } catch (SQLException e) { + throw new GroupManagementDAOException("Error occurred while listing all groups in tenant: " + tenantId, e); + } finally { + GroupManagementDAOUtil.cleanupResources(stmt, resultSet); + } + return deviceGroupIdList; + } + + @Override + public int getGroupsCount(String[] roles, int tenantId) throws GroupManagementDAOException { + if (roles.length == 0) { + return 0; + } + PreparedStatement stmt = null; + ResultSet resultSet = null; + try { + Connection conn = GroupManagementDAOFactory.getConnection(); + String sql = "SELECT COUNT(ID) AS GROUP_COUNT FROM DM_GROUP g, " + + "(SELECT GROUP_ID FROM DM_ROLE_GROUP_MAP WHERE ROLE IN ("; + + int index = 1; + while (index++ <= roles.length) { + sql += "?"; + } + sql += ")) gr WHERE g.ID = gr.GROUP_ID AND TENANT_ID = ? GROUP BY g.ID"; + + stmt = conn.prepareStatement(sql); + index = 1; + while (index++ <= roles.length) { + stmt.setString(index, roles[index++]); + } + stmt.setInt(index, tenantId); + resultSet = stmt.executeQuery(); + if (resultSet.next()) { + return resultSet.getInt("GROUP_COUNT"); + } else { + return 0; + } + } catch (SQLException e) { + throw new GroupManagementDAOException("Error occurred while getting permitted groups count.", e); + } finally { + GroupManagementDAOUtil.cleanupResources(stmt, resultSet); + } + } + + @Override + public List getOwnGroups(String username, int tenantId) throws GroupManagementDAOException { + PreparedStatement stmt = null; + ResultSet resultSet = null; + List deviceGroupList = null; + try { + Connection conn = GroupManagementDAOFactory.getConnection(); + String sql = "SELECT ID, DESCRIPTION, GROUP_NAME, OWNER FROM DM_GROUP WHERE OWNER = ? AND TENANT_ID = ?"; + stmt = conn.prepareStatement(sql); + stmt.setString(1, username); + stmt.setInt(2, tenantId); + resultSet = stmt.executeQuery(); + deviceGroupList = new ArrayList<>(); + while (resultSet.next()) { + deviceGroupList.add(GroupManagementDAOUtil.loadGroup(resultSet)); + } + } catch (SQLException e) { + throw new GroupManagementDAOException("Error occurred while getting own groups of user '" + + username + "'", e); + } finally { + GroupManagementDAOUtil.cleanupResources(stmt, resultSet); + } + return deviceGroupList; + } + + @Override + public List getOwnGroupIds(String username, int tenantId) throws GroupManagementDAOException { + PreparedStatement stmt = null; + ResultSet resultSet = null; + List deviceGroupIdList = null; + try { + Connection conn = GroupManagementDAOFactory.getConnection(); + String sql = "SELECT ID FROM DM_GROUP WHERE OWNER = ? AND TENANT_ID = ?"; + stmt = conn.prepareStatement(sql); + stmt.setString(1, username); + stmt.setInt(2, tenantId); + resultSet = stmt.executeQuery(); + deviceGroupIdList = new ArrayList<>(); + while (resultSet.next()) { + deviceGroupIdList.add(resultSet.getInt("ID")); + } + } catch (SQLException e) { + throw new GroupManagementDAOException("Error occurred while getting own groups of user '" + + username + "'", e); + } finally { + GroupManagementDAOUtil.cleanupResources(stmt, resultSet); + } + return deviceGroupIdList; + } + + @Override + public int getOwnGroupsCount(String username, int tenantId) throws GroupManagementDAOException { + PreparedStatement stmt = null; + ResultSet resultSet = null; + try { + Connection conn = GroupManagementDAOFactory.getConnection(); + String sql = "SELECT COUNT(ID) AS GROUP_COUNT FROM DM_GROUP WHERE OWNER = ? AND TENANT_ID = ?"; + stmt = conn.prepareStatement(sql); + stmt.setString(1, username); + stmt.setInt(2, tenantId); + resultSet = stmt.executeQuery(); + if (resultSet.next()) { + return resultSet.getInt("GROUP_COUNT"); + } else { + return 0; + } + } catch (SQLException e) { + throw new GroupManagementDAOException("Error occurred while getting own groups count of user '" + + username + "'", e); + } finally { + GroupManagementDAOUtil.cleanupResources(stmt, resultSet); + } + } + } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/util/GroupManagementDAOUtil.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/util/GroupManagementDAOUtil.java index a7b0fa0977..3923bf5de0 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/util/GroupManagementDAOUtil.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/util/GroupManagementDAOUtil.java @@ -84,8 +84,6 @@ public final class GroupManagementDAOUtil { group.setGroupId(resultSet.getInt("ID")); group.setDescription(resultSet.getString("DESCRIPTION")); group.setName(resultSet.getString("GROUP_NAME")); - group.setDateOfCreation(resultSet.getLong("DATE_OF_CREATE")); - group.setDateOfLastUpdate(resultSet.getLong("DATE_OF_LAST_UPDATE")); group.setOwner(resultSet.getString("OWNER")); return group; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderService.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderService.java index 4be6e298d8..2e1f4f3d24 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderService.java @@ -22,14 +22,11 @@ import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.DeviceNotFoundException; import org.wso2.carbon.device.mgt.common.GroupPaginationRequest; -import org.wso2.carbon.device.mgt.common.PaginationRequest; import org.wso2.carbon.device.mgt.common.PaginationResult; import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroup; import org.wso2.carbon.device.mgt.common.group.mgt.GroupAlreadyExistException; import org.wso2.carbon.device.mgt.common.group.mgt.GroupManagementException; -import org.wso2.carbon.device.mgt.common.group.mgt.GroupUser; import org.wso2.carbon.device.mgt.common.group.mgt.RoleDoesNotExistException; -import org.wso2.carbon.user.core.multiplecredentials.UserDoesNotExistException; import java.util.List; @@ -132,36 +129,12 @@ public interface GroupManagementProviderService { /** * Manage device group sharing with user with list of roles. * - * @param username of the user * @param groupId of the group * @param newRoles to be shared * @throws GroupManagementException UserDoesNotExistException */ - void manageGroupSharing(int groupId, String username, List newRoles) - throws GroupManagementException, UserDoesNotExistException, RoleDoesNotExistException; - - /** - * Add new sharing role for device group - * - * @param userName of the user - * @param groupId of the group - * @param roleName to add - * @param permissions to bind with role - * @return is role added - * @throws GroupManagementException - */ - boolean addGroupSharingRole(String userName, int groupId, String roleName, String[] permissions) - throws GroupManagementException; - - /** - * Remove existing sharing role for device group - * - * @param groupId of the group - * @param roleName to remove - * @return is role removed - * @throws GroupManagementException - */ - boolean removeGroupSharingRole(int groupId, String roleName) throws GroupManagementException; + void manageGroupSharing(int groupId, List newRoles) + throws GroupManagementException, RoleDoesNotExistException; /** * Get all sharing roles for device group @@ -172,25 +145,6 @@ public interface GroupManagementProviderService { */ List getRoles(int groupId) throws GroupManagementException; - /** - * Get specific device group sharing roles for user - * - * @param userName of the user - * @param groupId of the group - * @return list of roles - * @throws GroupManagementException UserDoesNotExistException - */ - List getRoles(String userName, int groupId) throws GroupManagementException, UserDoesNotExistException; - - /** - * Get device group users - * - * @param groupId of the group - * @return list of group users - * @throws GroupManagementException - */ - List getUsers(int groupId) throws GroupManagementException; - /** * Get all devices in device group as paginated result. * @@ -230,17 +184,6 @@ public interface GroupManagementProviderService { */ void removeDevice(int groupId, List deviceIdentifiers) throws GroupManagementException, DeviceNotFoundException; - - /** - * Get device group permissions of user. - * - * @param username of the user. - * @param groupId of the group - * @return array of permissions. - * @throws GroupManagementException UserDoesNotExistException - */ - String[] getPermissions(String username, int groupId) throws GroupManagementException, UserDoesNotExistException; - /** * Get device groups of user with permission. * @@ -252,10 +195,10 @@ public interface GroupManagementProviderService { List getGroups(String username, String permission) throws GroupManagementException; /** - * Get the group of device. + * Get groups which contains particular device. * - * @param deviceIdentifier - * @return + * @param deviceIdentifier of the device. + * @return groups contain the device. * @throws GroupManagementException */ List getGroups(DeviceIdentifier deviceIdentifier) throws GroupManagementException; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderServiceImpl.java index 575f19dcbe..d68863dc8f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderServiceImpl.java @@ -33,23 +33,18 @@ import org.wso2.carbon.device.mgt.common.TransactionManagementException; import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroup; import org.wso2.carbon.device.mgt.common.group.mgt.GroupAlreadyExistException; import org.wso2.carbon.device.mgt.common.group.mgt.GroupManagementException; -import org.wso2.carbon.device.mgt.common.group.mgt.GroupUser; import org.wso2.carbon.device.mgt.common.group.mgt.RoleDoesNotExistException; import org.wso2.carbon.device.mgt.core.dao.GroupDAO; import org.wso2.carbon.device.mgt.core.dao.GroupManagementDAOException; import org.wso2.carbon.device.mgt.core.dao.GroupManagementDAOFactory; import org.wso2.carbon.device.mgt.core.internal.DeviceManagementDataHolder; import org.wso2.carbon.device.mgt.core.util.DeviceManagerUtil; -import org.wso2.carbon.user.api.Permission; import org.wso2.carbon.user.api.UserRealm; import org.wso2.carbon.user.api.UserStoreException; import org.wso2.carbon.user.api.UserStoreManager; -import org.wso2.carbon.user.core.multiplecredentials.UserDoesNotExistException; -import org.wso2.carbon.user.core.util.UserCoreUtil; import java.sql.SQLException; import java.util.ArrayList; -import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -77,12 +72,11 @@ public class GroupManagementProviderServiceImpl implements GroupManagementProvid throw new GroupManagementException("DeviceGroup cannot be null.", new NullPointerException()); } int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); - int groupId = -1; try { GroupManagementDAOFactory.beginTransaction(); DeviceGroup existingGroup = this.groupDAO.getGroup(deviceGroup.getName(), tenantId); if (existingGroup == null) { - groupId = this.groupDAO.addGroup(deviceGroup, tenantId); + this.groupDAO.addGroup(deviceGroup, tenantId); GroupManagementDAOFactory.commitTransaction(); } else { throw new GroupAlreadyExistException("Group exist with name " + deviceGroup.getName()); @@ -97,7 +91,6 @@ public class GroupManagementProviderServiceImpl implements GroupManagementProvid GroupManagementDAOFactory.closeConnection(); } - addGroupSharingRole(deviceGroup.getOwner(), groupId, defaultRole, defaultPermissions); if (log.isDebugEnabled()) { log.debug("DeviceGroup added: " + deviceGroup.getName()); } @@ -117,7 +110,6 @@ public class GroupManagementProviderServiceImpl implements GroupManagementProvid GroupManagementDAOFactory.beginTransaction(); DeviceGroup existingGroup = this.groupDAO.getGroup(deviceGroup.getName(), tenantId); if (existingGroup == null || existingGroup.getGroupId() == groupId) { - deviceGroup.setDateOfLastUpdate(new Date().getTime()); this.groupDAO.updateGroup(deviceGroup, groupId, tenantId); GroupManagementDAOFactory.commitTransaction(); } else { @@ -139,18 +131,10 @@ public class GroupManagementProviderServiceImpl implements GroupManagementProvid */ @Override public boolean deleteGroup(int groupId) throws GroupManagementException { - String roleName; DeviceGroup deviceGroup = getGroup(groupId); if (deviceGroup == null) { return false; } - List groupRoles = getRoles(groupId); - for (String role : groupRoles) { - if (role != null) { - roleName = role.replace("Internal/group-" + deviceGroup.getGroupId() + "-", ""); - removeGroupSharingRole(deviceGroup.getGroupId(), roleName); - } - } try { GroupManagementDAOFactory.beginTransaction(); this.groupDAO.deleteGroup(groupId, CarbonContext.getThreadLocalCarbonContext().getTenantId()); @@ -208,14 +192,6 @@ public class GroupManagementProviderServiceImpl implements GroupManagementProvid @Override public PaginationResult getGroups(GroupPaginationRequest request) throws GroupManagementException { request = DeviceManagerUtil.validateGroupListPageSize(request); - List deviceGroups = getPlainDeviceGroups(request); - PaginationResult groupResult = new PaginationResult(); - groupResult.setData(deviceGroups); - groupResult.setRecordsTotal(getGroupCount(request)); - return groupResult; - } - - private List getPlainDeviceGroups(GroupPaginationRequest request) throws GroupManagementException { List deviceGroups = new ArrayList<>(); try { int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); @@ -228,7 +204,10 @@ public class GroupManagementProviderServiceImpl implements GroupManagementProvid } finally { GroupManagementDAOFactory.closeConnection(); } - return deviceGroups; + PaginationResult groupResult = new PaginationResult(); + groupResult.setData(deviceGroups); + groupResult.setRecordsTotal(getGroupCount(request)); + return groupResult; } @Override @@ -240,57 +219,70 @@ public class GroupManagementProviderServiceImpl implements GroupManagementProvid userStoreManager = DeviceManagementDataHolder.getInstance().getRealmService().getTenantUserRealm(tenantId) .getUserStoreManager(); String[] roleList = userStoreManager.getRoleListOfUser(username); - for (String role : roleList) { - if (role != null && role.contains("Internal/group-")) { - DeviceGroup deviceGroup = checkAndExtractNonExistingGroup(groups, role); - if (deviceGroup != null) { - groups.put(deviceGroup.getGroupId(), deviceGroup); - } - } + GroupManagementDAOFactory.openConnection(); + List deviceGroups = this.groupDAO.getOwnGroups(username, tenantId); + for (DeviceGroup deviceGroup : deviceGroups) { + groups.put(deviceGroup.getGroupId(), deviceGroup); + } + deviceGroups = this.groupDAO.getGroups(roleList, tenantId); + for (DeviceGroup deviceGroup : deviceGroups) { + groups.put(deviceGroup.getGroupId(), deviceGroup); } } catch (UserStoreException e) { throw new GroupManagementException("Error occurred while getting user store manager.", e); + } catch (SQLException e) { + throw new GroupManagementException("Error occurred while retrieving all groups accessible to user.", e); + } catch (GroupManagementDAOException e) { + throw new GroupManagementException(e); + } finally { + GroupManagementDAOFactory.closeConnection(); } return new ArrayList<>(groups.values()); } - public PaginationResult getGroups(String currentUser, GroupPaginationRequest request) throws GroupManagementException { - request = DeviceManagerUtil.validateGroupListPageSize(request); - int startIndex = request.getStartIndex(); - int count = request.getRowCount(); - int index = 0; - request.setRowCount(0); - List allMatchingGroups = this.getPlainDeviceGroups(request); - List deviceGroups = new ArrayList<>(); + private List getGroupIds(String username) throws GroupManagementException { + UserStoreManager userStoreManager; + List deviceGroupIds = new ArrayList<>(); try { int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); - UserStoreManager userStoreManager = DeviceManagementDataHolder.getInstance().getRealmService().getTenantUserRealm(tenantId) + userStoreManager = DeviceManagementDataHolder.getInstance().getRealmService().getTenantUserRealm(tenantId) .getUserStoreManager(); - String[] roleList = userStoreManager.getRoleListOfUser(currentUser); - List groupIds = new ArrayList<>(); - for (String role : roleList) { - if (role != null && role.contains("Internal/group-")) { - int groupId = Integer.parseInt(role.split("-")[1]); - if (!groupIds.contains(groupId)) { - groupIds.add(groupId); - } - } - } - for (DeviceGroup group : allMatchingGroups) { - int groupId = group.getGroupId(); - if (groupIds.contains(groupId)) { - if (startIndex <= index && index < count) { - deviceGroups.add(group); - } - index++; - } - } + String[] roleList = userStoreManager.getRoleListOfUser(username); + GroupManagementDAOFactory.openConnection(); + deviceGroupIds = this.groupDAO.getOwnGroupIds(username, tenantId); + deviceGroupIds.addAll(this.groupDAO.getGroupIds(roleList, tenantId)); } catch (UserStoreException e) { throw new GroupManagementException("Error occurred while getting user store manager.", e); + } catch (SQLException e) { + throw new GroupManagementException("Error occurred while retrieving all groups accessible to user.", e); + } catch (GroupManagementDAOException e) { + throw new GroupManagementException(e); + } finally { + GroupManagementDAOFactory.closeConnection(); + } + return deviceGroupIds; + } + + @Override + public PaginationResult getGroups(String currentUser, GroupPaginationRequest request) + throws GroupManagementException { + request = DeviceManagerUtil.validateGroupListPageSize(request); + List allDeviceGroupIdsOfUser = getGroupIds(currentUser); + List allMatchingGroups = new ArrayList<>(); + try { + int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); + GroupManagementDAOFactory.openConnection(); + allMatchingGroups = this.groupDAO.getGroups(request, allDeviceGroupIdsOfUser, tenantId); + } catch (GroupManagementDAOException e) { + throw new GroupManagementException("Error occurred while retrieving all groups in tenant", e); + } catch (SQLException e) { + throw new GroupManagementException("Error occurred while opening a connection to the data source.", e); + } finally { + GroupManagementDAOFactory.closeConnection(); } PaginationResult groupResult = new PaginationResult(); - groupResult.setData(deviceGroups); - groupResult.setRecordsTotal(index); + groupResult.setData(allMatchingGroups); + groupResult.setRecordsTotal(getGroupCount(currentUser)); return groupResult; } @@ -329,25 +321,24 @@ public class GroupManagementProviderServiceImpl implements GroupManagementProvid @Override public int getGroupCount(String username) throws GroupManagementException { UserStoreManager userStoreManager; - int count = 0; + int count; try { int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); userStoreManager = DeviceManagementDataHolder.getInstance().getRealmService().getTenantUserRealm(tenantId) .getUserStoreManager(); String[] roleList = userStoreManager.getRoleListOfUser(username); - List groupIds = new ArrayList<>(); - for (String role : roleList) { - if (role != null && role.contains("Internal/group-")) { - int groupId = Integer.parseInt(role.split("-")[1]); - if (!groupIds.contains(groupId)) { - groupIds.add(groupId); - count++; - } - } - } + GroupManagementDAOFactory.openConnection(); + count = groupDAO.getOwnGroupsCount(username, tenantId); + count += groupDAO.getGroupsCount(roleList, tenantId); return count; } catch (UserStoreException e) { throw new GroupManagementException("Error occurred while getting user store manager.", e); + } catch (GroupManagementDAOException e) { + throw new GroupManagementException("Error occurred while retrieving group count of user '" + username + "'", e); + } catch (SQLException e) { + throw new GroupManagementException("Error occurred while opening a connection to the data source.", e); + } finally { + GroupManagementDAOFactory.closeConnection(); } } @@ -355,103 +346,41 @@ public class GroupManagementProviderServiceImpl implements GroupManagementProvid * {@inheritDoc} */ @Override - @SuppressWarnings("Duplicates") - public void manageGroupSharing(int groupId, String username, List newRoles) - throws GroupManagementException, UserDoesNotExistException, RoleDoesNotExistException { + public void manageGroupSharing(int groupId, List newRoles) + throws GroupManagementException, RoleDoesNotExistException { int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); UserStoreManager userStoreManager; try { userStoreManager = DeviceManagementDataHolder.getInstance().getRealmService().getTenantUserRealm( tenantId).getUserStoreManager(); - if (!userStoreManager.isExistingUser(username)) { - throw new UserDoesNotExistException("User not exists with name " + username); - } - List currentGroupRoles = getRoles(groupId); - List currentUserRoles = getRoles(username, groupId); - List rolesToAdd = new ArrayList<>(); - List rolesToRemove = new ArrayList<>(); - String roleNamePrefix = "Internal/group-" + groupId + "-"; + List currentUserRoles = getRoles(groupId); + GroupManagementDAOFactory.beginTransaction(); for (String role : newRoles) { - if (currentGroupRoles.contains(role)) { - if (!currentUserRoles.contains(role)) { - rolesToAdd.add(roleNamePrefix + role); - } - } else { - throw new RoleDoesNotExistException("Role '" + role + "' is not exists in requested group."); + if (!userStoreManager.isExistingRole(role)) { + throw new RoleDoesNotExistException("Role '" + role + "' does not exists in the user store."); + } + // Removing role from current user roles of the group will return true if role exist. + // So we don't need to add it to the db again. + if (!currentUserRoles.remove(role)) { + // If group doesn't have the role, it is adding to the db. + groupDAO.addRole(groupId, role, tenantId); } } for (String role : currentUserRoles) { - if (currentGroupRoles.contains(role)) { - if (!newRoles.contains(role)) { - rolesToRemove.add(roleNamePrefix + role); - } - } else { - throw new RoleDoesNotExistException("Role '" + role + "' is not exists in requested group."); - } + // Removing old roles from db which are not available in the new roles list. + groupDAO.removeRole(groupId, role, tenantId); } - userStoreManager.updateRoleListOfUser(username, - rolesToRemove.toArray(new String[rolesToRemove.size()]), - rolesToAdd.toArray(new String[rolesToAdd.size()])); + GroupManagementDAOFactory.commitTransaction(); + } catch (GroupManagementDAOException e) { + GroupManagementDAOFactory.rollbackTransaction(); + throw new GroupManagementException(e); } catch (UserStoreException e) { - if (e instanceof UserDoesNotExistException) { - throw (UserDoesNotExistException) e; - } throw new GroupManagementException("User store error in updating sharing roles.", e); - } - } - - /** - * {@inheritDoc} - */ - @Override - public boolean addGroupSharingRole(String username, int groupId, String roleName, String[] permissions) - throws GroupManagementException { - if (groupId == -1) { - return false; - } - UserStoreManager userStoreManager; - String role; - String[] userNames = new String[1]; - try { - int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); - userStoreManager = DeviceManagementDataHolder.getInstance().getRealmService().getTenantUserRealm(tenantId) - .getUserStoreManager(); - role = "Internal/group-" + groupId + "-" + roleName; - userNames[0] = username; - Permission[] carbonPermissions = new Permission[permissions.length]; - for (int i = 0; i < permissions.length; i++) { - carbonPermissions[i] = new Permission(permissions[i], CarbonConstants.UI_PERMISSION_ACTION); - } - userStoreManager.addRole(role, userNames, carbonPermissions); - return true; - } catch (UserStoreException e) { - String errorMsg = "User store error in adding role to group id:" + groupId; - throw new GroupManagementException(errorMsg, e); - } - } - - /** - * {@inheritDoc} - */ - @Override - public boolean removeGroupSharingRole(int groupId, String roleName) throws GroupManagementException { - if (groupId == -1) { - return false; - } - UserStoreManager userStoreManager; - String role; - try { - int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); - userStoreManager = DeviceManagementDataHolder.getInstance().getRealmService().getTenantUserRealm(tenantId) - .getUserStoreManager(); - role = "Internal/group-" + groupId + "-" + roleName; - userStoreManager.deleteRole(role); - return true; - } catch (UserStoreException userStoreEx) { - String errorMsg = "User store error in adding role to group id:" + groupId; - log.error(errorMsg, userStoreEx); - throw new GroupManagementException(errorMsg, userStoreEx); + } catch (TransactionManagementException e) { + throw new GroupManagementException(e); + } finally { + GroupManagementDAOFactory.closeConnection(); } } @@ -460,92 +389,16 @@ public class GroupManagementProviderServiceImpl implements GroupManagementProvid */ @Override public List getRoles(int groupId) throws GroupManagementException { - UserStoreManager userStoreManager; - String[] roles; - List groupRoles; - try { - int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); - userStoreManager = DeviceManagementDataHolder.getInstance().getRealmService().getTenantUserRealm(tenantId) - .getUserStoreManager(); - roles = userStoreManager.getRoleNames(); - groupRoles = new ArrayList<>(); - for (String r : roles) { - if (r != null && r.contains("Internal/group-" + groupId + "-")) { - groupRoles.add(r.replace("Internal/group-" + groupId + "-", "")); - } - } - return groupRoles; - } catch (UserStoreException userStoreEx) { - String errorMsg = "User store error in adding role to group id:" + groupId; - log.error(errorMsg, userStoreEx); - throw new GroupManagementException(errorMsg, userStoreEx); - } - } - - /** - * {@inheritDoc} - */ - @Override - public List getRoles(String username, int groupId) - throws GroupManagementException, UserDoesNotExistException { - UserStoreManager userStoreManager; - List groupRoleList = new ArrayList<>(); try { int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); - userStoreManager = DeviceManagementDataHolder.getInstance().getRealmService().getTenantUserRealm(tenantId) - .getUserStoreManager(); - if (!userStoreManager.isExistingUser(username)) { - throw new UserDoesNotExistException("User not exists with name " + username); - } - String[] roleList = userStoreManager.getRoleListOfUser(username); - for (String role : roleList) { - if (role != null && role.contains("Internal/group-" + groupId)) { - String roleName = role.replace("Internal/group-" + groupId + "-", ""); - groupRoleList.add(roleName); - } - } - return groupRoleList; - } catch (UserStoreException e) { - if (e instanceof UserDoesNotExistException) { - throw (UserDoesNotExistException) e; - } - throw new GroupManagementException("Error occurred while getting user store manager.", e); - } - } - - /** - * {@inheritDoc} - */ - @Override - public List getUsers(int groupId) throws GroupManagementException { - UserStoreManager userStoreManager; - Map groupUserHashMap = new HashMap<>(); - try { - int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); - userStoreManager = DeviceManagementDataHolder.getInstance().getRealmService().getTenantUserRealm(tenantId) - .getUserStoreManager(); - List rolesForGroup = this.getRoles(groupId); - for (String role : rolesForGroup) { - String[] users = userStoreManager.getUserListOfRole("Internal/group-" + groupId + "-" + role); - for (String user : users) { - GroupUser groupUser; - if (groupUserHashMap.containsKey(user)) { - groupUser = groupUserHashMap.get(user); - groupUser.getGroupRoles().add(role); - } else { - groupUser = new GroupUser(); - groupUser.setUsername(user); - groupUser.setGroupRoles(new ArrayList()); - groupUser.getGroupRoles().add(role); - groupUserHashMap.put(user, groupUser); - } - } - } - return new ArrayList<>(groupUserHashMap.values()); - } catch (UserStoreException e) { - String errorMsg = "User store error in fetching user list for group id:" + groupId; - log.error(errorMsg, e); - throw new GroupManagementException(errorMsg, e); + GroupManagementDAOFactory.openConnection(); + return groupDAO.getRoles(groupId, tenantId); + } catch (GroupManagementDAOException e) { + throw new GroupManagementException("Error occurred while retrieving all groups in tenant", e); + } catch (SQLException e) { + throw new GroupManagementException("Error occurred while opening a connection to the data source.", e); + } finally { + GroupManagementDAOFactory.closeConnection(); } } @@ -653,58 +506,26 @@ public class GroupManagementProviderServiceImpl implements GroupManagementProvid * {@inheritDoc} */ @Override - public String[] getPermissions(String username, int groupId) - throws GroupManagementException, UserDoesNotExistException { + public List getGroups(String username, String permission) throws GroupManagementException { + List deviceGroups = getGroups(username); + Map permittedDeviceGroups = new HashMap<>(); UserRealm userRealm; - List roles = getRoles(username, groupId); int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); try { userRealm = DeviceManagementDataHolder.getInstance().getRealmService().getTenantUserRealm(tenantId); - List lstPermissions = new ArrayList<>(); - String[] resourceIds = userRealm.getAuthorizationManager().getAllowedUIResourcesForUser(username, "/"); - if (resourceIds != null) { - for (String resourceId : resourceIds) { - for (String roleName : roles) { - if (userRealm.getAuthorizationManager(). - isRoleAuthorized("Internal/group-" + groupId + "-" + roleName, resourceId, - CarbonConstants.UI_PERMISSION_ACTION)) { - lstPermissions.add(resourceId); - } + for (DeviceGroup deviceGroup : deviceGroups) { + List roles = getRoles(deviceGroup.getGroupId()); + for (String roleName : roles) { + if (userRealm.getAuthorizationManager(). + isRoleAuthorized(roleName, permission, CarbonConstants.UI_PERMISSION_ACTION)) { + permittedDeviceGroups.put(deviceGroup.getGroupId(), deviceGroup); } } } - String[] permissions = lstPermissions.toArray(new String[lstPermissions.size()]); - return UserCoreUtil.optimizePermissions(permissions); - } catch (UserStoreException e) { - throw new GroupManagementException("Error occurred while getting user realm.", e); - } - } - - /** - * {@inheritDoc} - */ - @Override - public List getGroups(String username, String permission) - throws GroupManagementException { - UserRealm userRealm; - int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); - Map groups = new HashMap<>(); - try { - userRealm = DeviceManagementDataHolder.getInstance().getRealmService().getTenantUserRealm(tenantId); - String[] roles = userRealm.getUserStoreManager().getRoleListOfUser(username); - for (String role : roles) { - if (role != null && role.contains("Internal/group-") && userRealm.getAuthorizationManager() - .isRoleAuthorized(role, permission, CarbonConstants.UI_PERMISSION_ACTION)) { - DeviceGroup group = checkAndExtractNonExistingGroup(groups, role); - if (group != null) { - groups.put(group.getGroupId(), group); - } - } - } - return new ArrayList<>(groups.values()); } catch (UserStoreException e) { throw new GroupManagementException("Error occurred while getting user realm.", e); } + return new ArrayList<>(permittedDeviceGroups.values()); } @Override @@ -725,26 +546,4 @@ public class GroupManagementProviderServiceImpl implements GroupManagementProvid GroupManagementDAOFactory.closeConnection(); } } - - /** - * This method returns group belongs to particular role, if it is not existed in groups map. - * - * @param groups existing groups map. - * @param role group related role which needs to evaluate. - * @return device group if it is not existing in the groups map. - * @throws GroupManagementException - */ - private DeviceGroup checkAndExtractNonExistingGroup(Map groups, String role) - throws GroupManagementException { - try { - int groupId = Integer.parseInt(role.split("-")[1]); - if (!groups.containsKey(groupId)) { - return getGroup(groupId); - } - } catch (NumberFormatException e) { - log.error("Unable to extract groupId from role " + role, e); - } - return null; - } - } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/common/TestDataHolder.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/common/TestDataHolder.java index 895deab36c..812e7c5cf8 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/common/TestDataHolder.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/common/TestDataHolder.java @@ -78,8 +78,6 @@ public class TestDataHolder { DeviceGroup deviceGroup = new DeviceGroup(); deviceGroup.setName("Test device group"); deviceGroup.setDescription("Test description"); - deviceGroup.setDateOfCreation(new Date().getTime()); - deviceGroup.setDateOfLastUpdate(new Date().getTime()); deviceGroup.setOwner(OWNER); return deviceGroup; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/dao/GroupPersistTests.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/dao/GroupPersistTests.java index 1747a2773b..a82e19d8d4 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/dao/GroupPersistTests.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/dao/GroupPersistTests.java @@ -31,7 +31,6 @@ import org.wso2.carbon.device.mgt.core.common.BaseDeviceManagementTest; import org.wso2.carbon.device.mgt.core.common.TestDataHolder; import java.sql.SQLException; -import java.util.Date; import java.util.List; public class GroupPersistTests extends BaseDeviceManagementTest { @@ -165,12 +164,10 @@ public class GroupPersistTests extends BaseDeviceManagementTest { @Test(dependsOnMethods = {"removeDeviceFromGroupTest"}) public void updateGroupTest() { - long time = new Date().getTime(); String name = "Test Updated"; String desc = "Desc updated"; DeviceGroup group = getGroupById(groupId); Assert.assertNotNull(group, "Group is null"); - group.setDateOfLastUpdate(time); group.setName(name); group.setDescription(desc); try { @@ -195,7 +192,6 @@ public class GroupPersistTests extends BaseDeviceManagementTest { Assert.assertNotNull(group, "Group is null"); Assert.assertEquals(group.getName(), name, "Group name"); Assert.assertEquals(group.getDescription(), desc, "Group description"); - Assert.assertEquals((long) group.getDateOfLastUpdate(), time, "Update time"); } @Test(dependsOnMethods = {"updateGroupTest"}) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/sql/h2.sql b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/sql/h2.sql index a93bc172f4..eb06e9adcb 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/sql/h2.sql +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/sql/h2.sql @@ -10,13 +10,21 @@ CREATE TABLE IF NOT EXISTS DM_GROUP ( ID INTEGER AUTO_INCREMENT NOT NULL, GROUP_NAME VARCHAR(100) DEFAULT NULL, DESCRIPTION TEXT DEFAULT NULL, - DATE_OF_CREATE BIGINT DEFAULT NULL, - DATE_OF_LAST_UPDATE BIGINT DEFAULT NULL, OWNER VARCHAR(45) DEFAULT NULL, TENANT_ID INTEGER DEFAULT 0, PRIMARY KEY (ID) ); +CREATE TABLE IF NOT EXISTS DM_ROLE_GROUP_MAP ( + ID INTEGER AUTO_INCREMENT NOT NULL, + GROUP_ID INTEGER DEFAULT NULL, + ROLE VARCHAR(45) DEFAULT NULL, + TENANT_ID INTEGER DEFAULT 0, + PRIMARY KEY (ID), + CONSTRAINT fk_DM_ROLE_GROUP_MAP_DM_GROUP2 FOREIGN KEY (GROUP_ID) + REFERENCES DM_GROUP (ID) ON DELETE NO ACTION ON UPDATE NO ACTION +); + CREATE TABLE IF NOT EXISTS DM_DEVICE_CERTIFICATE ( ID INTEGER auto_increment NOT NULL, SERIAL_NUMBER VARCHAR(500) DEFAULT NULL, diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/h2.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/h2.sql index 848ab0d37c..8a5195b4cd 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/h2.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/h2.sql @@ -10,13 +10,21 @@ CREATE TABLE IF NOT EXISTS DM_GROUP ( ID INTEGER AUTO_INCREMENT NOT NULL, GROUP_NAME VARCHAR(100) DEFAULT NULL, DESCRIPTION TEXT DEFAULT NULL, - DATE_OF_CREATE BIGINT DEFAULT NULL, - DATE_OF_LAST_UPDATE BIGINT DEFAULT NULL, OWNER VARCHAR(45) DEFAULT NULL, TENANT_ID INTEGER DEFAULT 0, PRIMARY KEY (ID) ); +CREATE TABLE IF NOT EXISTS DM_ROLE_GROUP_MAP ( + ID INTEGER AUTO_INCREMENT NOT NULL, + GROUP_ID INTEGER DEFAULT NULL, + ROLE VARCHAR(45) DEFAULT NULL, + TENANT_ID INTEGER DEFAULT 0, + PRIMARY KEY (ID), + CONSTRAINT fk_DM_ROLE_GROUP_MAP_DM_GROUP2 FOREIGN KEY (GROUP_ID) + REFERENCES DM_GROUP (ID) ON DELETE NO ACTION ON UPDATE NO ACTION +); + CREATE TABLE IF NOT EXISTS DM_DEVICE ( ID INTEGER auto_increment NOT NULL, DESCRIPTION TEXT DEFAULT NULL, diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql index 414cad3662..900eeefde1 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mssql.sql @@ -11,6 +11,33 @@ CREATE TABLE DM_DEVICE_TYPE ( IF NOT EXISTS (SELECT * FROM SYS.INDEXES WHERE NAME = 'IDX_DEVICE_TYPE' AND OBJECT_ID = OBJECT_ID('DM_DEVICE_TYPE')) CREATE INDEX IDX_DEVICE_TYPE ON DM_DEVICE_TYPE (NAME); +IF NOT EXISTS(SELECT * + FROM SYS.OBJECTS + WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[DM_GROUP]') AND TYPE IN (N'U')) + CREATE TABLE DM_GROUP ( + ID INTEGER IDENTITY (1, 1) NOT NULL, + GROUP_NAME VARCHAR(100) DEFAULT NULL, + DESCRIPTION VARCHAR(MAX) DEFAULT NULL, + OWNER VARCHAR(45) DEFAULT NULL, + TENANT_ID INTEGER DEFAULT 0, + PRIMARY KEY (ID) + ); + +IF NOT EXISTS(SELECT * + FROM SYS.OBJECTS + WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[DM_ROLE_GROUP_MAP]') AND TYPE IN (N'U')) + CREATE TABLE DM_ROLE_GROUP_MAP ( + ID INTEGER IDENTITY (1, 1) NOT NULL, + GROUP_ID INTEGER DEFAULT NULL, + ROLE VARCHAR(45) DEFAULT NULL, + TENANT_ID INTEGER DEFAULT 0, + PRIMARY KEY (ID), + CONSTRAINT FK_DM_ROLE_GROUP_MAP_DM_GROUP2 FOREIGN KEY (GROUP_ID) + REFERENCES DM_GROUP (ID) + ON DELETE NO ACTION + ON UPDATE NO ACTION + ); + IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[DM_DEVICE]') AND TYPE IN (N'U')) CREATE TABLE DM_DEVICE ( ID INTEGER IDENTITY(1,1) NOT NULL, @@ -25,6 +52,25 @@ CREATE TABLE DM_DEVICE ( REFERENCES DM_DEVICE_TYPE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION ); +IF NOT EXISTS(SELECT * + FROM SYS.OBJECTS + WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[DM_DEVICE_GROUP_MAP]') AND TYPE IN (N'U')) + CREATE TABLE DM_DEVICE_GROUP_MAP ( + ID INTEGER IDENTITY (1, 1) NOT NULL, + DEVICE_ID INTEGER DEFAULT NULL, + GROUP_ID INTEGER DEFAULT NULL, + TENANT_ID INTEGER DEFAULT 0, + PRIMARY KEY (ID), + CONSTRAINT FK_DM_DEVICE_GROUP_MAP_DM_DEVICE2 FOREIGN KEY (DEVICE_ID) + REFERENCES DM_DEVICE (ID) + ON DELETE NO ACTION + ON UPDATE NO ACTION, + CONSTRAINT FK_DM_DEVICE_GROUP_MAP_DM_GROUP2 FOREIGN KEY (GROUP_ID) + REFERENCES DM_GROUP (ID) + ON DELETE NO ACTION + ON UPDATE NO ACTION + ); + IF NOT EXISTS (SELECT * FROM SYS.INDEXES WHERE NAME = 'IDX_DM_DEVICE' AND OBJECT_ID = OBJECT_ID('DM_DEVICE')) CREATE INDEX IDX_DM_DEVICE ON DM_DEVICE(TENANT_ID, DEVICE_TYPE_ID); diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql index 75a416018c..e5c79b2f39 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/mysql.sql @@ -8,6 +8,29 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_TYPE ( CREATE INDEX IDX_DEVICE_TYPE ON DM_DEVICE_TYPE (NAME); +CREATE TABLE IF NOT EXISTS DM_GROUP ( + ID INTEGER AUTO_INCREMENT NOT NULL, + GROUP_NAME VARCHAR(100) DEFAULT NULL, + DESCRIPTION TEXT DEFAULT NULL, + OWNER VARCHAR(45) DEFAULT NULL, + TENANT_ID INTEGER DEFAULT 0, + PRIMARY KEY (ID) +) + ENGINE = InnoDB; + +CREATE TABLE IF NOT EXISTS DM_ROLE_GROUP_MAP ( + ID INTEGER AUTO_INCREMENT NOT NULL, + GROUP_ID INTEGER DEFAULT NULL, + ROLE VARCHAR(45) DEFAULT NULL, + TENANT_ID INTEGER DEFAULT 0, + PRIMARY KEY (ID), + CONSTRAINT DM_ROLE_GROUP_MAP_DM_GROUP2 FOREIGN KEY (GROUP_ID) + REFERENCES DM_GROUP (ID) + ON DELETE NO ACTION + ON UPDATE NO ACTION +) + ENGINE = InnoDB; + CREATE TABLE IF NOT EXISTS DM_DEVICE ( ID INTEGER AUTO_INCREMENT NOT NULL, DESCRIPTION TEXT DEFAULT NULL, @@ -23,6 +46,23 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE ( CREATE INDEX IDX_DM_DEVICE ON DM_DEVICE(TENANT_ID, DEVICE_TYPE_ID); +CREATE TABLE IF NOT EXISTS DM_DEVICE_GROUP_MAP ( + ID INTEGER AUTO_INCREMENT NOT NULL, + DEVICE_ID INTEGER DEFAULT NULL, + GROUP_ID INTEGER DEFAULT NULL, + TENANT_ID INTEGER DEFAULT 0, + PRIMARY KEY (ID), + CONSTRAINT fk_DM_DEVICE_GROUP_MAP_DM_DEVICE2 FOREIGN KEY (DEVICE_ID) + REFERENCES DM_DEVICE (ID) + ON DELETE NO ACTION + ON UPDATE NO ACTION, + CONSTRAINT fk_DM_DEVICE_GROUP_MAP_DM_GROUP2 FOREIGN KEY (GROUP_ID) + REFERENCES DM_GROUP (ID) + ON DELETE NO ACTION + ON UPDATE NO ACTION +) + ENGINE = InnoDB; + CREATE TABLE IF NOT EXISTS DM_OPERATION ( ID INTEGER AUTO_INCREMENT NOT NULL, TYPE VARCHAR(20) NOT NULL, diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql index 9f5013c47c..c29c6bcb53 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/oracle.sql @@ -25,8 +25,6 @@ CREATE TABLE DM_GROUP ( ID NUMBER(10) NOT NULL, DESCRIPTION CLOB DEFAULT NULL, GROUP_NAME VARCHAR2(100) DEFAULT NULL, - DATE_OF_CREATE TIMESTAMP(0) DEFAULT NULL, - DATE_OF_LAST_UPDATE TIMESTAMP(0) DEFAULT NULL, OWNER VARCHAR2(45) DEFAULT NULL, TENANT_ID NUMBER(10) DEFAULT 0, CONSTRAINT PK_DM_GROUP PRIMARY KEY (ID) @@ -46,6 +44,32 @@ WHEN (NEW.ID IS NULL) END; / +CREATE TABLE DM_ROLE_GROUP_MAP ( + ID NUMBER(10) NOT NULL, + GROUP_ID NUMBER(10) DEFAULT NULL, + ROLE VARCHAR2(45) DEFAULT NULL, + TENANT_ID NUMBER(10) DEFAULT 0, + CONSTRAINT PK_DM_GROUP PRIMARY KEY (ID), + CONSTRAINT fk_DM_ROLE_GROUP_MAP_GROUP2 FOREIGN KEY (GROUP_ID) + REFERENCES DM_GROUP (ID) +) +/ +-- Generate ID using sequence and trigger +CREATE SEQUENCE DM_ROLE_GROUP_MAP_seq START WITH 1 INCREMENT BY 1 NOCACHE +/ +CREATE OR REPLACE TRIGGER DM_ROLE_GROUP_MAP_seq_tr +BEFORE INSERT +ON DM_ROLE_GROUP_MAP +REFERENCING NEW AS NEW +FOR EACH ROW +WHEN (NEW.ID IS NULL) + BEGIN + SELECT DM_ROLE_GROUP_MAP_seq.NEXTVAL + INTO :NEW.ID + FROM DUAL; + END; +/ + CREATE TABLE DM_DEVICE ( ID NUMBER(10) NOT NULL, DESCRIPTION CLOB DEFAULT NULL, diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/postgresql.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/postgresql.sql index 54489b8157..a5ea7af042 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/postgresql.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/postgresql.sql @@ -8,6 +8,24 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_TYPE ( CREATE INDEX IDX_DEVICE_TYPE ON DM_DEVICE_TYPE (NAME); +CREATE TABLE IF NOT EXISTS DM_GROUP ( + ID BIGSERIAL NOT NULL PRIMARY KEY, + DESCRIPTION TEXT DEFAULT NULL, + NAME VARCHAR(100) DEFAULT NULL, + OWNER VARCHAR(45) DEFAULT NULL, + TENANT_ID INTEGER DEFAULT 0 +); + +CREATE TABLE IF NOT EXISTS DM_ROLE_GROUP_MAP ( + ID BIGSERIAL NOT NULL PRIMARY KEY, + GROUP_ID INTEGER DEFAULT NULL, + ROLE VARCHAR(45) DEFAULT NULL, + TENANT_ID INTEGER DEFAULT 0, + PRIMARY KEY (ID), + CONSTRAINT fk_DM_ROLE_GROUP_MAP_DM_GROUP2 FOREIGN KEY (GROUP_ID) + REFERENCES DM_GROUP (ID) ON DELETE NO ACTION ON UPDATE NO ACTION +); + CREATE TABLE IF NOT EXISTS DM_DEVICE ( ID BIGSERIAL NOT NULL PRIMARY KEY, DESCRIPTION TEXT DEFAULT NULL, @@ -22,6 +40,18 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE ( CREATE INDEX IDX_DM_DEVICE ON DM_DEVICE(TENANT_ID, DEVICE_TYPE_ID); +CREATE TABLE IF NOT EXISTS DM_DEVICE_GROUP_MAP ( + ID BIGSERIAL NOT NULL PRIMARY KEY, + DEVICE_ID INTEGER DEFAULT NULL, + GROUP_ID INTEGER DEFAULT NULL, + TENANT_ID INTEGER DEFAULT 0, + PRIMARY KEY (ID), + CONSTRAINT fk_DM_DEVICE_GROUP_MAP_DM_DEVICE2 FOREIGN KEY (DEVICE_ID) + REFERENCES DM_DEVICE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION, + CONSTRAINT fk_DM_DEVICE_GROUP_MAP_DM_GROUP2 FOREIGN KEY (GROUP_ID) + REFERENCES DM_GROUP (ID) ON DELETE NO ACTION ON UPDATE NO ACTION +); + CREATE TABLE IF NOT EXISTS DM_OPERATION ( ID BIGSERIAL NOT NULL PRIMARY KEY, TYPE VARCHAR(50) NOT NULL, From a2db592d69fafa45ec29ad98f175faea548c2c6d Mon Sep 17 00:00:00 2001 From: charitha Date: Wed, 23 Nov 2016 14:06:24 +0530 Subject: [PATCH 06/17] Updated group management APIs and service --- .../mgt/jaxrs/beans/DeviceGroupShare.java | 58 ------------------- .../mgt/jaxrs/beans/DeviceGroupUsersList.java | 54 ----------------- .../service/api/GroupManagementService.java | 19 +++--- .../impl/GroupManagementServiceImpl.java | 5 +- .../DeviceManagementProviderServiceImpl.java | 35 ++++++++--- .../GroupManagementProviderService.java | 10 ---- .../GroupManagementProviderServiceImpl.java | 30 ---------- 7 files changed, 40 insertions(+), 171 deletions(-) delete mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/DeviceGroupShare.java delete mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/DeviceGroupUsersList.java diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/DeviceGroupShare.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/DeviceGroupShare.java deleted file mode 100644 index af436c80f8..0000000000 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/DeviceGroupShare.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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. - * - */ -package org.wso2.carbon.device.mgt.jaxrs.beans; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -import java.io.Serializable; -import java.util.List; - - -/** - * This class holds Device Group user name and assigned roles of user for particular group. Exposed to external access. - */ -@ApiModel(value = "DeviceGroupShare", description = "This class carries roles assigned to a user of a managed device group.") -public class DeviceGroupShare implements Serializable { - - private static final long serialVersionUID = 1998141711L; - - @ApiModelProperty(name = "username", value = "Username of the user.", required = true) - private String username; - - @ApiModelProperty(name = "roles", value = "List of roles assigned to user from the group.") - private List groupRoles; - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public List getGroupRoles() { - return groupRoles; - } - - public void setGroupRoles(List groupRoles) { - this.groupRoles = groupRoles; - } -} - diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/DeviceGroupUsersList.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/DeviceGroupUsersList.java deleted file mode 100644 index 40823d002f..0000000000 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/DeviceGroupUsersList.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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. - * - */ -package org.wso2.carbon.device.mgt.jaxrs.beans; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; -import org.wso2.carbon.device.mgt.common.group.mgt.GroupUser; - -import java.util.ArrayList; -import java.util.List; - -public class DeviceGroupUsersList extends BasePaginatedResult { - - @ApiModelProperty(value = "List of device group users returned") - @JsonProperty("users") - private List users = new ArrayList<>(); - - public List getList() { - return users; - } - - public void setList(List users) { - this.users = users; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{\n"); - - sb.append(" count: ").append(getCount()).append(",\n"); - sb.append(" users: [").append(users).append("\n"); - sb.append("]}\n"); - return sb.toString(); - } - -} - diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GroupManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GroupManagementService.java index 64e56d1254..a982a3c3d5 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GroupManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GroupManagementService.java @@ -36,10 +36,9 @@ import org.apache.axis2.transport.http.HTTPConstants; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroup; import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceGroupList; -import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceGroupShare; -import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceGroupUsersList; import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceList; import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse; +import org.wso2.carbon.device.mgt.jaxrs.beans.RoleList; import javax.validation.Valid; import javax.ws.rs.Consumes; @@ -70,12 +69,14 @@ import java.util.List; } ), tags = { - @Tag(name = "device_management", description = "") + @Tag(name = "device_management", description = "Device group related REST-API. " + + "This can be used to manipulated device group related " + + "details.") } ) @Path("/groups") -@Api(value = "Device Group Management", description = "This API carries all device group management related operations " + - "such as get all the available groups, etc.") +@Api(value = "Device Group Management", description = "This API carries all device group management related " + + "operations such as get all the available groups, etc.") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public interface GroupManagementService { @@ -482,10 +483,10 @@ public interface GroupManagementService { required = true) @PathParam("groupId") int groupId, @ApiParam( - name = "deviceGroupShare", - value = "User name and the assigned roles for the share.", + name = "userRoles", + value = "User roles to share group with.", required = true) - @Valid DeviceGroupShare deviceGroupShare); + @Valid List userRoles); @Path("/id/{groupId}/roles") @GET @@ -505,7 +506,7 @@ public interface GroupManagementService { ) @ApiResponses(value = { @ApiResponse(code = 200, message = "OK. \n Successfully fetched the users.", - response = DeviceGroupUsersList.class, + response = RoleList.class, responseHeaders = { @ResponseHeader( name = "Content-Type", diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GroupManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GroupManagementServiceImpl.java index 89d8f8cf55..4d7f4319fa 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GroupManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GroupManagementServiceImpl.java @@ -34,7 +34,6 @@ import org.wso2.carbon.device.mgt.common.group.mgt.GroupManagementException; import org.wso2.carbon.device.mgt.common.group.mgt.RoleDoesNotExistException; import org.wso2.carbon.device.mgt.core.service.GroupManagementProviderService; import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceGroupList; -import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceGroupShare; import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceList; import org.wso2.carbon.device.mgt.jaxrs.beans.RoleList; import org.wso2.carbon.device.mgt.jaxrs.service.api.GroupManagementService; @@ -164,10 +163,10 @@ public class GroupManagementServiceImpl implements GroupManagementService { } @Override - public Response manageGroupSharing(int groupId, DeviceGroupShare deviceGroupShare) { + public Response manageGroupSharing(int groupId, List userRoles) { try { DeviceMgtAPIUtils.getGroupManagementProviderService() - .manageGroupSharing(groupId, deviceGroupShare.getGroupRoles()); + .manageGroupSharing(groupId, userRoles); return Response.status(Response.Status.OK).build(); } catch (GroupManagementException e) { String msg = "Error occurred while managing group share."; 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 eeac1846d4..4053c641e3 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 @@ -21,7 +21,18 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.CarbonConstants; import org.wso2.carbon.context.CarbonContext; -import org.wso2.carbon.device.mgt.common.*; +import org.wso2.carbon.device.mgt.common.Device; +import org.wso2.carbon.device.mgt.common.DeviceIdentifier; +import org.wso2.carbon.device.mgt.common.DeviceManagementException; +import org.wso2.carbon.device.mgt.common.DeviceManager; +import org.wso2.carbon.device.mgt.common.DeviceNotFoundException; +import org.wso2.carbon.device.mgt.common.DeviceTypeIdentifier; +import org.wso2.carbon.device.mgt.common.EnrolmentInfo; +import org.wso2.carbon.device.mgt.common.FeatureManager; +import org.wso2.carbon.device.mgt.common.InvalidDeviceException; +import org.wso2.carbon.device.mgt.common.PaginationRequest; +import org.wso2.carbon.device.mgt.common.PaginationResult; +import org.wso2.carbon.device.mgt.common.TransactionManagementException; import org.wso2.carbon.device.mgt.common.app.mgt.Application; import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration; import org.wso2.carbon.device.mgt.common.device.details.DeviceInfo; @@ -37,8 +48,12 @@ import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; import org.wso2.carbon.device.mgt.core.DeviceManagementPluginRepository; -import org.wso2.carbon.device.mgt.core.config.identity.IdentityConfigurations; -import org.wso2.carbon.device.mgt.core.dao.*; +import org.wso2.carbon.device.mgt.core.dao.ApplicationDAO; +import org.wso2.carbon.device.mgt.core.dao.DeviceDAO; +import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOException; +import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory; +import org.wso2.carbon.device.mgt.core.dao.DeviceTypeDAO; +import org.wso2.carbon.device.mgt.core.dao.EnrollmentDAO; import org.wso2.carbon.device.mgt.core.device.details.mgt.dao.DeviceDetailsDAO; import org.wso2.carbon.device.mgt.core.device.details.mgt.dao.DeviceDetailsMgtDAOException; import org.wso2.carbon.device.mgt.core.dto.DeviceType; @@ -53,7 +68,13 @@ import org.wso2.carbon.email.sender.core.TypedValue; import org.wso2.carbon.user.api.UserStoreException; import java.sql.SQLException; -import java.util.*; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; public class DeviceManagementProviderServiceImpl implements DeviceManagementProviderService, PluginInitializationListener { @@ -1855,7 +1876,9 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv try { DeviceGroup defaultGroup = createDefaultGroup(groupManagementProviderService, ownership.toString()); if (defaultGroup != null) { - groupManagementProviderService.addDevice(defaultGroup.getGroupId(), deviceIdentifier); + List deviceIdentifiers = new ArrayList<>(); + deviceIdentifiers.add(deviceIdentifier); + groupManagementProviderService.addDevices(defaultGroup.getGroupId(), deviceIdentifiers); } } catch (DeviceNotFoundException e) { throw new DeviceManagementException("Unable to find the device with the id: '" + deviceIdentifier.getId(), @@ -1880,8 +1903,6 @@ 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.setDateOfCreation(new Date().getTime()); - defaultGroup.setDateOfLastUpdate(new Date().getTime()); 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.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderService.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderService.java index b80a35fbc3..875cc859e5 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderService.java @@ -27,7 +27,6 @@ import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroup; import org.wso2.carbon.device.mgt.common.group.mgt.GroupAlreadyExistException; import org.wso2.carbon.device.mgt.common.group.mgt.GroupManagementException; import org.wso2.carbon.device.mgt.common.group.mgt.RoleDoesNotExistException; -import org.wso2.carbon.user.core.multiplecredentials.UserDoesNotExistException; import java.util.List; @@ -175,15 +174,6 @@ public interface GroupManagementProviderService { */ int getDeviceCount(int groupId) throws GroupManagementException; - /** - * @param groupId of the group. - * @param deviceIdentifier of the device to add. - * @throws DeviceNotFoundException If device does not exist. - * @throws GroupManagementException If unable to add device to the group. - */ - void addDevice(int groupId, DeviceIdentifier deviceIdentifier) - throws DeviceNotFoundException, GroupManagementException; - /** * Add device to device group. * diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderServiceImpl.java index 65df695517..94b480978e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/GroupManagementProviderServiceImpl.java @@ -459,36 +459,6 @@ public class GroupManagementProviderServiceImpl implements GroupManagementProvid } } - /** - * {@inheritDoc} - */ - @Override - public void addDevice(int groupId, DeviceIdentifier deviceIdentifier) - throws DeviceNotFoundException, GroupManagementException { - Device device; - try { - int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); - GroupManagementDAOFactory.beginTransaction(); - device = DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().getDevice(deviceIdentifier); - if (device == null) { - throw new DeviceNotFoundException("Device not found for id '" + deviceIdentifier.getId() + "'"); - } - if (!this.groupDAO.isDeviceMappedToGroup(groupId, device.getId(), tenantId)) { - this.groupDAO.addDevice(groupId, device.getId(), tenantId); - } - GroupManagementDAOFactory.commitTransaction(); - } catch (DeviceManagementException e) { - throw new GroupManagementException("Error occurred while retrieving device.", e); - } catch (GroupManagementDAOException e) { - GroupManagementDAOFactory.rollbackTransaction(); - throw new GroupManagementException("Error occurred while adding device to group.", e); - } catch (TransactionManagementException e) { - throw new GroupManagementException("Error occurred while initiating transaction.", e); - } finally { - GroupManagementDAOFactory.closeConnection(); - } - } - /** * {@inheritDoc} */ From 5525c42eae9b754e5826d976fa580d2184d54c12 Mon Sep 17 00:00:00 2001 From: Imesh Chandrasiri Date: Wed, 23 Nov 2016 16:43:16 +0530 Subject: [PATCH 07/17] Removed Unneccsary title and added padding --- .../devicemgt/app/layouts/cdmf.layout.default.hbs | 12 +++++++----- .../cdmf.unit.ui.theme/public/css/custom-desktop.css | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/layouts/cdmf.layout.default.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/layouts/cdmf.layout.default.hbs index 0e6d17780d..cf5837c383 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/layouts/cdmf.layout.default.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/layouts/cdmf.layout.default.hbs @@ -50,15 +50,17 @@ under the License. --}} {{defineZone "header"}} - - {{defineZone "sidePanes"}}
- {{defineZone "contentTitle"}} + + + + {{!defineZone "contentTitle"}} +
{{defineZone "content"}} 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 34872f31a2..90ed8a2d2f 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 @@ -4615,7 +4615,7 @@ a.wr-side-panel-toggle-btn.selected { } .wr-hidden-operations-content .panel-body { - padding: 0px 20px 20px; + padding: 5px 20px 20px; background: #ffffff; } .wr-hidden-operations-content .panel-body hr{ From 54211bc3ccd80ce462c3c927f6f199831ab37a05 Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Thu, 24 Nov 2016 09:58:42 +0530 Subject: [PATCH 08/17] Fixing minor issues on GroupDAO --- .../mgt/core/dao/impl/GroupDAOImpl.java | 103 ++++++++++-------- 1 file changed, 55 insertions(+), 48 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 7a1fc37911..17810adf96 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 @@ -60,7 +60,7 @@ public class GroupDAOImpl implements GroupDAO { return groupId; } catch (SQLException e) { throw new GroupManagementDAOException("Error occurred while adding deviceGroup '" + - deviceGroup.getName() + "'", e); + deviceGroup.getName() + "'", e); } finally { GroupManagementDAOUtil.cleanupResources(stmt, null); } @@ -72,7 +72,8 @@ public class GroupDAOImpl implements GroupDAO { PreparedStatement stmt = null; try { Connection conn = GroupManagementDAOFactory.getConnection(); - String sql = "UPDATE DM_GROUP SET DESCRIPTION = ?, GROUP_NAME = ?, OWNER = ? WHERE ID = ? AND TENANT_ID = ?"; + String sql = + "UPDATE DM_GROUP SET DESCRIPTION = ?, GROUP_NAME = ?, OWNER = ? WHERE ID = ? AND TENANT_ID = ?"; stmt = conn.prepareStatement(sql); stmt.setString(1, deviceGroup.getDescription()); stmt.setString(2, deviceGroup.getName()); @@ -82,7 +83,7 @@ public class GroupDAOImpl implements GroupDAO { stmt.executeUpdate(); } catch (SQLException e) { throw new GroupManagementDAOException("Error occurred while updating deviceGroup '" + - deviceGroup.getName() + "'", e); + deviceGroup.getName() + "'", e); } finally { GroupManagementDAOUtil.cleanupResources(stmt, null); } @@ -142,7 +143,7 @@ public class GroupDAOImpl implements GroupDAO { } } catch (SQLException e) { throw new GroupManagementDAOException("Error occurred while obtaining information of Device Group '" + - groupId + "'", e); + groupId + "'", e); } finally { GroupManagementDAOUtil.cleanupResources(stmt, resultSet); } @@ -156,14 +157,14 @@ public class GroupDAOImpl implements GroupDAO { try { Connection conn = GroupManagementDAOFactory.getConnection(); String sql = "SELECT G.ID, G.GROUP_NAME, G.DESCRIPTION, G.OWNER FROM DM_GROUP G " + - "INNER JOIN DM_DEVICE_GROUP_MAP GM ON G.ID = GM.GROUP_ID " + - "WHERE GM.DEVICE_ID = ? AND GM.TENANT_ID = ?"; + "INNER JOIN DM_DEVICE_GROUP_MAP GM ON G.ID = GM.GROUP_ID " + + "WHERE GM.DEVICE_ID = ? AND GM.TENANT_ID = ?"; stmt = conn.prepareStatement(sql); stmt.setInt(1, deviceId); stmt.setInt(2, tenantId); resultSet = stmt.executeQuery(); while (resultSet.next()) { - deviceGroupBuilders.add(GroupManagementDAOUtil.loadGroup(resultSet)); + deviceGroupBuilders.add(GroupManagementDAOUtil.loadGroup(resultSet)); } } catch (SQLException e) { throw new GroupManagementDAOException("Error occurred while obtaining information of Device Groups ", e); @@ -205,7 +206,7 @@ public class GroupDAOImpl implements GroupDAO { stmt = conn.prepareStatement(sql); stmt.setInt(paramIndex++, tenantId); if (hasGroupName) { - stmt.setString(paramIndex++, groupName + "%"); + stmt.setString(paramIndex++, groupName + "%"); } if (hasOwner) { stmt.setString(paramIndex++, owner + "%"); @@ -230,7 +231,8 @@ public class GroupDAOImpl implements GroupDAO { @Override public List getGroups(GroupPaginationRequest request, List deviceGroupIds, int tenantId) throws GroupManagementDAOException { - if (deviceGroupIds.size() == 0) { + int deviceGroupIdsCount = deviceGroupIds.size(); + if (deviceGroupIdsCount == 0) { return new ArrayList<>(); } PreparedStatement stmt = null; @@ -255,10 +257,10 @@ public class GroupDAOImpl implements GroupDAO { hasOwner = true; } sql += " AND ID IN ("; - for (int i = 0; i < deviceGroupIds.size() - 1; i++) { - sql += "?,"; + for (int i = 0; i < deviceGroupIdsCount; i++) { + sql += (deviceGroupIdsCount - 1 != i) ? "?," : "?"; } - sql += "?)"; + sql += ")"; if (hasLimit) { sql += " LIMIT ?, ?"; } @@ -388,7 +390,8 @@ public class GroupDAOImpl implements GroupDAO { ResultSet resultSet = null; try { Connection conn = GroupManagementDAOFactory.getConnection(); - String sql = "SELECT ID, DESCRIPTION, GROUP_NAME, OWNER FROM DM_GROUP WHERE GROUP_NAME = ? AND TENANT_ID = ?"; + String sql = + "SELECT ID, DESCRIPTION, GROUP_NAME, OWNER FROM DM_GROUP WHERE GROUP_NAME = ? AND TENANT_ID = ?"; stmt = conn.prepareStatement(sql); stmt.setString(1, groupName); stmt.setInt(2, tenantId); @@ -469,7 +472,8 @@ public class GroupDAOImpl implements GroupDAO { ResultSet resultSet = null; try { Connection conn = GroupManagementDAOFactory.getConnection(); - String sql = "SELECT COUNT(ID) AS DEVICE_COUNT FROM DM_DEVICE_GROUP_MAP WHERE GROUP_ID = ? AND TENANT_ID = ?"; + String sql = + "SELECT COUNT(ID) AS DEVICE_COUNT FROM DM_DEVICE_GROUP_MAP WHERE GROUP_ID = ? AND TENANT_ID = ?"; stmt = conn.prepareStatement(sql); stmt.setInt(1, groupId); stmt.setInt(2, tenantId); @@ -496,13 +500,15 @@ public class GroupDAOImpl implements GroupDAO { try { conn = GroupManagementDAOFactory.getConnection(); String sql = "SELECT d1.DEVICE_ID, d1.DESCRIPTION, d1.NAME AS DEVICE_NAME, d1.DEVICE_TYPE, " + - "d1.DEVICE_IDENTIFICATION, e.OWNER, e.OWNERSHIP, e.STATUS, e.DATE_OF_LAST_UPDATE, " + - "e.DATE_OF_ENROLMENT, e.ID AS ENROLMENT_ID FROM DM_ENROLMENT e, " + - "(SELECT gd.DEVICE_ID, gd.DESCRIPTION, gd.NAME, gd.DEVICE_IDENTIFICATION, t.NAME AS DEVICE_TYPE FROM " + - "(SELECT d.ID AS DEVICE_ID, d.DESCRIPTION, d.NAME, d.DEVICE_IDENTIFICATION, d.DEVICE_TYPE_ID FROM DM_DEVICE d, (" + - "SELECT dgm.DEVICE_ID FROM DM_DEVICE_GROUP_MAP dgm WHERE dgm.GROUP_ID = ?) dgm1 " + - "WHERE d.ID = dgm1.DEVICE_ID AND d.TENANT_ID = ?) gd, DM_DEVICE_TYPE t " + - "WHERE gd.DEVICE_TYPE_ID = t.ID) d1 WHERE d1.DEVICE_ID = e.DEVICE_ID AND TENANT_ID = ? LIMIT ? , ?"; + "d1.DEVICE_IDENTIFICATION, e.OWNER, e.OWNERSHIP, e.STATUS, e.DATE_OF_LAST_UPDATE, " + + "e.DATE_OF_ENROLMENT, e.ID AS ENROLMENT_ID FROM DM_ENROLMENT e, " + + "(SELECT gd.DEVICE_ID, gd.DESCRIPTION, gd.NAME, gd.DEVICE_IDENTIFICATION, t.NAME AS DEVICE_TYPE " + + "FROM " + + "(SELECT d.ID AS DEVICE_ID, d.DESCRIPTION, d.NAME, d.DEVICE_IDENTIFICATION, d.DEVICE_TYPE_ID FROM" + + " DM_DEVICE d, (" + + "SELECT dgm.DEVICE_ID FROM DM_DEVICE_GROUP_MAP dgm WHERE dgm.GROUP_ID = ?) dgm1 " + + "WHERE d.ID = dgm1.DEVICE_ID AND d.TENANT_ID = ?) gd, DM_DEVICE_TYPE t " + + "WHERE gd.DEVICE_TYPE_ID = t.ID) d1 WHERE d1.DEVICE_ID = e.DEVICE_ID AND TENANT_ID = ? LIMIT ? , ?"; stmt = conn.prepareStatement(sql); stmt.setInt(1, groupId); @@ -520,7 +526,7 @@ public class GroupDAOImpl implements GroupDAO { } } catch (SQLException e) { throw new GroupManagementDAOException("Error occurred while retrieving information of all " + - "registered devices", e); + "registered devices", e); } finally { DeviceManagementDAOUtil.cleanupResources(stmt, rs); } @@ -589,7 +595,8 @@ public class GroupDAOImpl implements GroupDAO { @Override public List getGroups(String[] roles, int tenantId) throws GroupManagementDAOException { - if (roles.length == 0) { + int rolesCount = roles.length; + if (rolesCount == 0) { return new ArrayList<>(); } PreparedStatement stmt = null; @@ -598,18 +605,18 @@ public class GroupDAOImpl implements GroupDAO { try { Connection conn = GroupManagementDAOFactory.getConnection(); String sql = "SELECT ID, DESCRIPTION, GROUP_NAME, OWNER FROM DM_GROUP g, " + - "(SELECT GROUP_ID FROM DM_ROLE_GROUP_MAP WHERE ROLE IN ("; + "(SELECT GROUP_ID FROM DM_ROLE_GROUP_MAP WHERE ROLE IN ("; - int index = 1; - while (index++ <= roles.length) { - sql += "?"; + int index = 0; + while (index++ < rolesCount) { + sql += (rolesCount - 1 != index) ? "?," : "?"; } sql += ")) gr WHERE g.ID = gr.GROUP_ID AND TENANT_ID = ? GROUP BY g.ID"; stmt = conn.prepareStatement(sql); - index = 1; - while (index++ <= roles.length) { - stmt.setString(index, roles[index++]); + index = 0; + while (index++ < rolesCount) { + stmt.setString(index, roles[index - 1]); } stmt.setInt(index, tenantId); resultSet = stmt.executeQuery(); @@ -637,15 +644,16 @@ public class GroupDAOImpl implements GroupDAO { Connection conn = GroupManagementDAOFactory.getConnection(); String sql = "SELECT ID FROM DM_GROUP g, (SELECT GROUP_ID FROM DM_ROLE_GROUP_MAP WHERE ROLE IN ("; - for (int i = 0; i < roles.length - 1; i++) { - sql += "?,"; + int rolesCount = roles.length; + for (int i = 0; i < rolesCount; i++) { + sql += (rolesCount - 1 != i) ? "?," : "?"; } - sql += "?)) gr WHERE g.ID = gr.GROUP_ID AND TENANT_ID = ? GROUP BY g.ID"; + sql += ")) gr WHERE g.ID = gr.GROUP_ID AND TENANT_ID = ? GROUP BY g.ID"; stmt = conn.prepareStatement(sql); - int index = 1; - while (index++ <= roles.length) { - stmt.setString(index, roles[index++]); + int index = 0; + while (index++ < rolesCount) { + stmt.setString(index, roles[index - 1]); } stmt.setInt(index, tenantId); resultSet = stmt.executeQuery(); @@ -663,7 +671,8 @@ public class GroupDAOImpl implements GroupDAO { @Override public int getGroupsCount(String[] roles, int tenantId) throws GroupManagementDAOException { - if (roles.length == 0) { + int rolesCount = roles.length; + if (rolesCount == 0) { return 0; } PreparedStatement stmt = null; @@ -671,18 +680,16 @@ public class GroupDAOImpl implements GroupDAO { try { Connection conn = GroupManagementDAOFactory.getConnection(); String sql = "SELECT COUNT(ID) AS GROUP_COUNT FROM DM_GROUP g, " + - "(SELECT GROUP_ID FROM DM_ROLE_GROUP_MAP WHERE ROLE IN ("; - - int index = 1; - while (index++ <= roles.length) { - sql += "?"; + "(SELECT GROUP_ID FROM DM_ROLE_GROUP_MAP WHERE ROLE IN ("; + for (int i = 0; i < rolesCount; i++) { + sql += (rolesCount - 1 != i) ? "?," : "?"; } sql += ")) gr WHERE g.ID = gr.GROUP_ID AND TENANT_ID = ? GROUP BY g.ID"; stmt = conn.prepareStatement(sql); - index = 1; - while (index++ <= roles.length) { - stmt.setString(index, roles[index++]); + int index = 0; + while (index++ < rolesCount) { + stmt.setString(index, roles[index - 1]); } stmt.setInt(index, tenantId); resultSet = stmt.executeQuery(); @@ -716,7 +723,7 @@ public class GroupDAOImpl implements GroupDAO { } } catch (SQLException e) { throw new GroupManagementDAOException("Error occurred while getting own groups of user '" - + username + "'", e); + + username + "'", e); } finally { GroupManagementDAOUtil.cleanupResources(stmt, resultSet); } @@ -741,7 +748,7 @@ public class GroupDAOImpl implements GroupDAO { } } catch (SQLException e) { throw new GroupManagementDAOException("Error occurred while getting own groups of user '" - + username + "'", e); + + username + "'", e); } finally { GroupManagementDAOUtil.cleanupResources(stmt, resultSet); } @@ -766,7 +773,7 @@ public class GroupDAOImpl implements GroupDAO { } } catch (SQLException e) { throw new GroupManagementDAOException("Error occurred while getting own groups count of user '" - + username + "'", e); + + username + "'", e); } finally { GroupManagementDAOUtil.cleanupResources(stmt, resultSet); } From ca5d96df67df3c95a769fbf5441a7b6fb2c6135f Mon Sep 17 00:00:00 2001 From: charitha Date: Thu, 24 Nov 2016 13:29:25 +0530 Subject: [PATCH 09/17] Add test cases to verify DAO functionality --- .../mgt/core/dao/impl/GroupDAOImpl.java | 6 +- .../mgt/core/dao/GroupPersistTests.java | 84 ++++++++++++++++++- 2 files changed, 83 insertions(+), 7 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 17810adf96..52dba3579a 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 @@ -608,10 +608,10 @@ public class GroupDAOImpl implements GroupDAO { "(SELECT GROUP_ID FROM DM_ROLE_GROUP_MAP WHERE ROLE IN ("; int index = 0; - while (index++ < rolesCount) { - sql += (rolesCount - 1 != index) ? "?," : "?"; + while (index++ < rolesCount - 1) { + sql += "?,"; } - sql += ")) gr WHERE g.ID = gr.GROUP_ID AND TENANT_ID = ? GROUP BY g.ID"; + sql += "?)) gr WHERE g.ID = gr.GROUP_ID AND TENANT_ID = ? GROUP BY g.ID"; stmt = conn.prepareStatement(sql); index = 0; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/dao/GroupPersistTests.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/dao/GroupPersistTests.java index a82e19d8d4..1115faeab1 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/dao/GroupPersistTests.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/dao/GroupPersistTests.java @@ -31,6 +31,7 @@ import org.wso2.carbon.device.mgt.core.common.BaseDeviceManagementTest; import org.wso2.carbon.device.mgt.core.common.TestDataHolder; import java.sql.SQLException; +import java.util.ArrayList; import java.util.List; public class GroupPersistTests extends BaseDeviceManagementTest { @@ -47,7 +48,7 @@ public class GroupPersistTests extends BaseDeviceManagementTest { } @Test - public void testAddGroupTest() { + public void addGroupTest() { DeviceGroup deviceGroup = TestDataHolder.generateDummyGroupData(); try { GroupManagementDAOFactory.beginTransaction(); @@ -72,7 +73,7 @@ public class GroupPersistTests extends BaseDeviceManagementTest { log.debug("Group name: " + group.getName()); } - @Test(dependsOnMethods = {"testAddGroupTest"}) + @Test(dependsOnMethods = {"addGroupTest"}) public void getGroupTest() { try { GroupManagementDAOFactory.openConnection(); @@ -96,7 +97,82 @@ public class GroupPersistTests extends BaseDeviceManagementTest { } } - @Test(dependsOnMethods = {"testAddGroupTest"}) + @Test(dependsOnMethods = {"addGroupTest"}) + public void shareGroupTest() { + try { + GroupManagementDAOFactory.beginTransaction(); + List addedRoles = new ArrayList<>(); + for (int i = 0; i < 3; i++) { + String role = "role-" + i; + groupDAO.addRole(groupId, role, TestDataHolder.SUPER_TENANT_ID); + addedRoles.add(role); + } + GroupManagementDAOFactory.commitTransaction(); + List roles = groupDAO.getRoles(groupId, TestDataHolder.SUPER_TENANT_ID); + Assert.assertEquals(roles, addedRoles, "Added roles are not equal to returned roles."); + log.debug("Group shared with roles."); + } catch (GroupManagementDAOException e) { + String msg = "Error occurred while find group by name."; + log.error(msg, e); + Assert.fail(msg, e); + } catch (TransactionManagementException e) { + String msg = "Error occurred while opening a connection to the data source."; + log.error(msg, e); + Assert.fail(msg, e); + } finally { + GroupManagementDAOFactory.closeConnection(); + } + } + + @Test(dependsOnMethods = {"shareGroupTest"}) + public void getShareGroupTest() { + try { + GroupManagementDAOFactory.openConnection(); + List roles = groupDAO.getRoles(groupId, TestDataHolder.SUPER_TENANT_ID); + roles.remove(0); + List deviceGroups = groupDAO.getGroups(roles.toArray(new String[roles.size()]), TestDataHolder.SUPER_TENANT_ID); + Assert.assertEquals(deviceGroups.size(), 1, "Unexpected number of device groups found with role."); + Assert.assertEquals(deviceGroups.get(0).getGroupId(), groupId, "Unexpected groupId found with role."); + log.debug("Group found for given roles."); + } catch (GroupManagementDAOException e) { + String msg = "Error occurred while getting groups shared with roles."; + log.error(msg, e); + Assert.fail(msg, e); + } catch (SQLException e) { + String msg = "Error occurred while opening a connection to the data source."; + log.error(msg, e); + Assert.fail(msg, e); + } finally { + GroupManagementDAOFactory.closeConnection(); + } + } + + @Test(dependsOnMethods = {"getShareGroupTest"}) + public void unshareGroupTest() { + try { + GroupManagementDAOFactory.beginTransaction(); + List rolesToRemove = groupDAO.getRoles(groupId, TestDataHolder.SUPER_TENANT_ID); + for (String role : rolesToRemove) { + groupDAO.removeRole(groupId, role, TestDataHolder.SUPER_TENANT_ID); + } + GroupManagementDAOFactory.commitTransaction(); + List roles = groupDAO.getRoles(groupId, TestDataHolder.SUPER_TENANT_ID); + Assert.assertNotEquals(roles, rolesToRemove, "Roles not removed."); + log.debug("Group unshared with given roles."); + } catch (GroupManagementDAOException e) { + String msg = "Error occurred while find group by name."; + log.error(msg, e); + Assert.fail(msg, e); + } catch (TransactionManagementException e) { + String msg = "Error occurred while opening a connection to the data source."; + log.error(msg, e); + Assert.fail(msg, e); + } finally { + GroupManagementDAOFactory.closeConnection(); + } + } + + @Test(dependsOnMethods = {"addGroupTest"}) public void addDeviceToGroupTest() { Device initialTestDevice = TestDataHolder.initialTestDevice; DeviceGroup deviceGroup = getGroupById(groupId); @@ -162,7 +238,7 @@ public class GroupPersistTests extends BaseDeviceManagementTest { } } - @Test(dependsOnMethods = {"removeDeviceFromGroupTest"}) + @Test(dependsOnMethods = {"removeDeviceFromGroupTest", "unshareGroupTest"}) public void updateGroupTest() { String name = "Test Updated"; String desc = "Desc updated"; From 3fe18ba4bb7ce5f3931b1abb170901fa1532768e Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Fri, 25 Nov 2016 08:17:39 +0530 Subject: [PATCH 10/17] Refactoring group sharing modal --- .../app/pages/cdmf.page.groups/groups.hbs | 136 +++++----- .../app/pages/cdmf.page.groups/groups.js | 4 + .../cdmf.page.groups/public/js/listing.js | 247 +++++++----------- 3 files changed, 169 insertions(+), 218 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.hbs index 5bc33e4377..ad4c096949 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.hbs @@ -80,7 +80,7 @@ -
- -
- - -
@@ -201,25 +171,10 @@

Enter Group Sharing Role Name

- -

- Role Permissions +

- - - {{#each groupPermissions}} - - - - - {{/each}} - -
{{this}} - - - -
+ +
+
+
+
+

New Role was successfully created.

+
+ Do you need to Add / Remove users to the chosen roles? + +
@@ -256,7 +247,8 @@ Yes - + Cancel
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.js index 0c04f9bb2d..f432193231 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.js @@ -23,6 +23,10 @@ function onRequest(context) { var groupPermissions = require("/app/pages/cdmf.page.groups/public/group-permissions.json"); var currentUser = session.get(constants.USER_SESSION_KEY); var page = {}; + var rolesResult = userModule.getRoles(); + if (rolesResult.status == "success") { + page.userRoles = rolesResult.content; + } if (currentUser) { page.permissions = userModule.getUIPermissions(); page.permissions.list = stringify(page.permissions); 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 1770cd26c4..1548ff4c71 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 @@ -110,12 +110,12 @@ function loadGroups() { var objects = []; $(data.deviceGroups).each(function (index) { objects.push({ - 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 - }) + 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 + }) }); var json = { "recordsTotal": data.count, @@ -154,34 +154,50 @@ function loadGroups() { class: 'text-right content-fill text-left-on-grid-view no-wrap', render: function (id, type, row, meta) { var html; - if ($.hasPermission("VIEW_GROUP_DEVICES")){ - html = '' + - '' + - ''; - - html += '' + - '' + - ''; + if ($.hasPermission("VIEW_GROUP_DEVICES")) { + html = '' + + '' + + + ''; + + html += '' + + '' + + + ''; } else { html = ''; } - if($.hasPermission("SHARE_GROUP")) { - html += ''; } else { html += ''; } - if($.hasPermission("UPDATE_GROUP")) { - html += '' + + if ($.hasPermission("UPDATE_GROUP")) { + html += + '' + ''; } else { html += ''; } if ($.hasPermission("REMOVE_GROUP")) { - html += '' + + html += + '' + + ''; } else { html += ''; @@ -336,7 +352,7 @@ function hidePopup() { $(modalPopupContent).html(""); $(modalPopupContent).removeClass("operation-data"); $(modalPopup).modal('hide'); - $('body').removeClass('modal-open').css('padding-right','0px'); + $('body').removeClass('modal-open').css('padding-right', '0px'); $('.modal-backdrop').remove(); } @@ -352,33 +368,37 @@ function attachEvents() { $("a.share-group-link").click(function () { var groupId = $(this).data("group-id"); var groupOwner = $(this).data("group-owner"); + $(modalPopupContent).html($('#share-group-w1-modal-content').html()); - $("a#share-group-next-link").show(); showPopup(); - $("a#share-group-next-link").click(function () { - var successCallback = function (data) { - if(data === 'true') { - getAllRoles(groupId, selectedUser); - } else { - var errorMsgWrapper = "#notification-error-msg"; - var errorMsg = "#notification-error-msg span"; - $(errorMsg).text("User does not exist."); - $(errorMsgWrapper).removeClass("hidden"); + + markAlreadySavedUsersRoles(groupId); + var shareGroupNextLink = $("a#share-group-next-link"); + shareGroupNextLink.click(function () { + var roles = []; + $('.modal .roleCheckBoxes').each( + function () { + if ($(this).is(':checked')) { + roles.push($(this).data('role-name')); + } } - } - var selectedUser = $('#share-user-selector').val(); - if (selectedUser == $("#group-listing").data("current-user")) { - $("#user-names").html("Please specify a user other than current user."); - $("a#share-group-next-link").hide(); - } else { - invokerUtil.get("/api/device-mgt/v1.0/users/checkUser?username=" + selectedUser, - successCallback, function (message) { - displayErrors(message); - }); - } + ); + updateGroupShare(groupId, roles); }); - $("a#share-group-w1-cancel-link").click(function () { - hidePopup(); + + var shareGroupNewRoleFromSelectionLink = $("a#share-group-new-role-from-selection"); + shareGroupNewRoleFromSelectionLink.click(function () { + var roles = []; + $('.modal .roleCheckBoxes').each( + function () { + if ($(this).is(':checked')) { + roles.push($(this).data('role-name')); + } + } + ); + addNewRole(roles); + // $(modalPopupContent).html($('#share-group-w3-modal-content').html()); + // createNewRole(roles); }); }); @@ -408,8 +428,8 @@ function attachEvents() { }; invokerUtil.delete("/api/device-mgt/v1.0/groups/id/" + groupId, - successCallback, function (message) { - displayErrors(message); + successCallback, function (message) { + displayErrors(message); }); }); @@ -453,8 +473,8 @@ function attachEvents() { }; invokerUtil.put("/api/device-mgt/v1.0/groups/id/" + groupId, group, - successCallback, function (message) { - displayErrors(message); + successCallback, function (message) { + displayErrors(message); }); }); @@ -464,16 +484,22 @@ function attachEvents() { }); } -function getAllRoles(groupId, selectedUser) { - $(modalPopupContent).html($('#share-group-w2-modal-content').html()); - $("a#share-group-yes-link").hide(); +function markAlreadySavedUsersRoles(groupId) { var successCallback = function (data, textStatus, xhr) { data = JSON.parse(data); if (xhr.status == 200) { if (data.roles.length > 0) { - generateRoleMap(groupId, selectedUser, data.roles); + for (var i = 0; i < data.roles.length; i++) { + $('.roleCheckBoxes').each( + function () { + if (data.roles[i] == $(this).data('role-name')) { + $(this).attr('checked', true); + } + } + ); + } } else { - $('#user-roles').html("There is no any roles for this group."); + return; } } else { displayErrors(xhr); @@ -481,98 +507,17 @@ function getAllRoles(groupId, selectedUser) { }; invokerUtil.get("/api/device-mgt/v1.0/groups/id/" + groupId + "/roles", - successCallback, function (message) { - displayErrors(message); - }); - - $("a#share-group-w2-cancel-link").click(function () { - hidePopup(); - }); -} - -function generateRoleMap(groupId, selectedUser, allRoles) { - var successCallback = function (data, textStatus, xhr) { - data = JSON.parse(data); - if (xhr.status == 200) { - var userRoles = []; - if(data != "EMPTY") { - userRoles = data.roles; - } - var str = $('#user-roles').html(); - - for (var i = 0; i < allRoles.length; i++) { - var isChecked = ''; - for (var j = 0; j < userRoles.length; j++) { - if (allRoles[i] == userRoles[j]) { - isChecked = 'checked'; - break; - } - } - str += '

'; - } - - $('#user-roles').html(str); - $("a#share-group-yes-link").show(); - $("a#share-group-yes-link").show(); - $("a#share-group-yes-link").click(function () { - var roles = []; - for (var i = 0; i < allRoles.length; i++) { - if ($('#user-role-' + allRoles[i]).is(':checked')) { - roles.push(allRoles[i]); - } - } - updateGroupShare(groupId, selectedUser, roles); - }); - $("a#share-group-w2-add-new-role-link").click(function () { - addNewRole(groupId, selectedUser, allRoles); - }); - } else { - displayErrors(xhr); - } - }; - - invokerUtil.get("/api/device-mgt/v1.0/groups/id/" + groupId + "/roles?userName=" + selectedUser, - successCallback, function (message) { + successCallback, function (message) { displayErrors(message); }); - - $("a#share-group-w2-cancel-link").click(function () { - hidePopup(); - }); } -function addNewRole(groupId, selectedUser, allRoles) { +function addNewRole(roles) { $(modalPopupContent).html($('#share-group-w3-modal-content').html()); - function getPermissions() { - var PERMISSION_PREFIX = '/permission/admin/'; - var permissions = []; - $('#permission-table-container').find('tr').each(function () { - var row = $(this).closest('tr'); - var permission = $(row).find('td:nth-child(1)').text(); - var check = $(row).find('td:nth-child(2) a').data('value'); - if(check === 'checked') { - permission = PERMISSION_PREFIX + permission; - permissions.push(permission); - } - }); - return permissions; - }; $("a#share-group-w3-yes-link").click(function () { - var successCallback = function (data, status, jqXHR) { - if(status == "success") { - getAllRoles(groupId, selectedUser); - } - } var roleName = $('#group-sharing-role-name').val(); - var users = []; - if(roleName) { - var groupRoleInfo = {"roleName": roleName, "permissions": getPermissions(), "users": users}; - var currentUser = $("#group-listing").data("current-user"); - invokerUtil.post("/api/device-mgt/v1.0/groups/id/" + groupId + "/roles/create?userName=" + currentUser, - groupRoleInfo, successCallback, function (message) { - displayErrors(message); - }); + if (roleName) { + createNewCombinedRole(roleName, roles); } else { var errorMsgWrapper = "#notification-error-msg"; var errorMsg = "#notification-error-msg span"; @@ -588,7 +533,7 @@ function addNewRole(groupId, selectedUser, allRoles) { function togglePermissionAction(element) { $(element).data('value', 'checked'); var icon = $(element).find("i")[1]; - if($(icon).hasClass('fw-minus')) { + if ($(icon).hasClass('fw-minus')) { $(icon).removeClass('fw-minus'); $(icon).addClass('fw-add'); $(element).data('value', 'unchecked'); @@ -599,7 +544,7 @@ function togglePermissionAction(element) { } } -function updateGroupShare(groupId, selectedUser, roles) { +function updateGroupShare(groupId, roles) { var successCallback = function (data) { $(modalPopupContent).html($('#share-group-200-content').html()); setTimeout(function () { @@ -608,11 +553,21 @@ function updateGroupShare(groupId, selectedUser, roles) { }, 2000); }; - var deviceGroupShare = {"username": selectedUser, "groupRoles": roles }; invokerUtil.post("/api/device-mgt/v1.0/groups/id/" + groupId + "/share", - deviceGroupShare, successCallback, function (message) { - displayErrors(message); - }); + roles, successCallback, function (message) { + displayErrors(message); + }); +} + +function createNewCombinedRole(roleName, roleList) { + var successCallback = function (data, status, jqXHR, isLast) { + $(modalPopupContent).html($('#create-combined-role-200-content').html()); + showPopup(); + }; + invokerUtil.post("/api/device-mgt/v1.0/roles/create-combined-role/" + roleName, roleList, + successCallback, function (message) { + displayErrors(message); + }); } function displayErrors(jqXHR) { From aaade2363ca5f0ba238ac25de78344c34c2cd33d Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Fri, 25 Nov 2016 08:18:10 +0530 Subject: [PATCH 11/17] Adding new api to create combined roles --- .../service/api/RoleManagementService.java | 64 ++++++++ .../impl/RoleManagementServiceImpl.java | 142 ++++++++++++++++-- 2 files changed, 190 insertions(+), 16 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RoleManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RoleManagementService.java index cc2fef4ff2..cc894b9c0b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RoleManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RoleManagementService.java @@ -356,6 +356,70 @@ public interface RoleManagementService { value = "The properties required to add a new role.", required = true) RoleInfo role); + @POST + @Path("/create-combined-role/{roleName}") + @ApiOperation( + consumes = MediaType.APPLICATION_JSON, + produces = MediaType.APPLICATION_JSON, + httpMethod = "POST", + value = "Adding a combined Role", + notes = "WSO2 EMM supports role-based access control (RBAC) and role management. Add a new combined role to WSO2 EMM using this REST API.", + tags = "Role Management", + authorizations = { + @Authorization( + value="permission", + scopes = { @AuthorizationScope(scope = "/device-mgt/roles/manage", + description = "Manage Roles") } + ) + } + ) + @ApiResponses(value = { + @ApiResponse( + code = 201, + message = "Created. \n Successfully created the role.", + responseHeaders = { + @ResponseHeader( + name = "Content-Location", + description = "The URL to the newly added role."), + @ResponseHeader( + name = "Content-Type", + description = "The content type of the body"), + @ResponseHeader( + name = "ETag", + description = "Entity Tag of the response resource.\n" + + "Used by caches, or in conditional requests."), + @ResponseHeader( + name = "Last-Modified", + description = "Date and time the resource has been modified the last time.\n" + + "Used by caches, or in conditional requests.")}), + @ApiResponse( + code = 303, + message = "See Other. \n The source can be retrieved from the URL specified in the location header.", + responseHeaders = { + @ResponseHeader( + name = "Content-Location", + description = "The Source URL of the document.")}), + @ApiResponse( + code = 400, + message = "Bad Request. \n Invalid request or validation error.", + response = ErrorResponse.class), + @ApiResponse( + code = 415, + message = "Unsupported media type. \n The format of the requested entity was not supported.", + response = ErrorResponse.class), + @ApiResponse( + code = 500, + message = "Internal Server Error. \n Server error occurred while adding a new role.", + response = ErrorResponse.class) + }) + Response addCombinedRole( + @ApiParam( + name = "roles", + value = "List of roles names required to add a new combined role.", + required = true) List roles, + @PathParam("roleName") String roleName, + @QueryParam("user-store") String userStoreName); + @PUT @Path("/{roleName}") @ApiOperation( diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/RoleManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/RoleManagementServiceImpl.java index 29db06c3d0..35ccabfab3 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/RoleManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/RoleManagementServiceImpl.java @@ -30,13 +30,26 @@ import org.wso2.carbon.device.mgt.jaxrs.service.impl.util.FilteringUtil; import org.wso2.carbon.device.mgt.jaxrs.service.impl.util.RequestValidationUtil; import org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils; import org.wso2.carbon.device.mgt.jaxrs.util.SetReferenceTransformer; -import org.wso2.carbon.user.api.*; +import org.wso2.carbon.user.api.AuthorizationManager; +import org.wso2.carbon.user.api.Permission; +import org.wso2.carbon.user.api.UserRealm; +import org.wso2.carbon.user.api.UserStoreException; +import org.wso2.carbon.user.api.UserStoreManager; import org.wso2.carbon.user.core.common.AbstractUserStoreManager; import org.wso2.carbon.user.mgt.UserRealmProxy; import org.wso2.carbon.user.mgt.common.UIPermissionNode; import org.wso2.carbon.user.mgt.common.UserAdminException; -import javax.ws.rs.*; +import javax.ws.rs.Consumes; +import javax.ws.rs.DELETE; +import javax.ws.rs.GET; +import javax.ws.rs.HeaderParam; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import java.io.UnsupportedEncodingException; @@ -45,7 +58,9 @@ import java.net.URISyntaxException; import java.net.URLEncoder; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashSet; import java.util.List; +import java.util.Set; import static org.wso2.carbon.device.mgt.jaxrs.util.Constants.PRIMARY_USER_STORE; @@ -69,7 +84,7 @@ public class RoleManagementServiceImpl implements RoleManagementService { RoleList targetRoles = new RoleList(); //if user store is null set it to primary - if(userStore == null || "".equals(userStore)){ + if (userStore == null || "".equals(userStore)) { userStore = PRIMARY_USER_STORE; } @@ -94,7 +109,8 @@ public class RoleManagementServiceImpl implements RoleManagementService { @Path("/{roleName}/permissions") @Override public Response getPermissionsOfRole(@PathParam("roleName") String roleName, - @QueryParam("user-store") String userStoreName, @HeaderParam("If-Modified-Since") String ifModifiedSince) { + @QueryParam("user-store") String userStoreName, + @HeaderParam("If-Modified-Since") String ifModifiedSince) { if (userStoreName != null && !userStoreName.isEmpty()) { roleName = userStoreName + "/" + roleName; } @@ -166,7 +182,7 @@ public class RoleManagementServiceImpl implements RoleManagementService { @Path("/{roleName}") @Override public Response getRole(@PathParam("roleName") String roleName, @QueryParam("user-store") String userStoreName, - @HeaderParam("If-Modified-Since") String ifModifiedSince) { + @HeaderParam("If-Modified-Since") String ifModifiedSince) { if (log.isDebugEnabled()) { log.debug("Getting the list of user roles"); } @@ -181,7 +197,7 @@ public class RoleManagementServiceImpl implements RoleManagementService { if (!userStoreManager.isExistingRole(roleName)) { return Response.status(404).entity( new ErrorResponse.ErrorResponseBuilder().setMessage("No role exists with the name '" + - roleName + "'").build()).build(); + roleName + "'").build()).build(); } roleInfo.setRoleName(roleName); roleInfo.setUsers(userStoreManager.getUserListOfRole(roleName)); @@ -235,7 +251,7 @@ public class RoleManagementServiceImpl implements RoleManagementService { //TODO fix what's returned in the entity return Response.created(new URI(API_BASE_PATH + "/" + URLEncoder.encode(roleInfo.getRoleName(), "UTF-8"))). entity("Role '" + roleInfo.getRoleName() + "' has " + "successfully been" - + " added").build(); + + " added").build(); } catch (UserStoreException e) { String msg = "Error occurred while adding role '" + roleInfo.getRoleName() + "'"; log.error(msg, e); @@ -255,11 +271,76 @@ public class RoleManagementServiceImpl implements RoleManagementService { } } + @POST + @Path("/create-combined-role/{roleName}") + @Override + public Response addCombinedRole(List roles, @PathParam("roleName") String roleName, + @QueryParam("user-store") String userStoreName) { + if (userStoreName != null && !userStoreName.isEmpty()) { + roleName = userStoreName + "/" + roleName; + } + if (roles.size() < 2) { + return Response.status(400).entity( + new ErrorResponse.ErrorResponseBuilder().setMessage("Combining Roles requires at least two roles.") + .build() + ).build(); + } + for (String role : roles) { + RequestValidationUtil.validateRoleName(role); + } + try { + UserStoreManager userStoreManager = DeviceMgtAPIUtils.getUserStoreManager(); + if (log.isDebugEnabled()) { + log.debug("Persisting the role in the underlying user store"); + } + + HashSet permsSet = new HashSet<>(); + try { + for (String role : roles) { + mergePermissions(new UIPermissionNode[]{getRolePermissions(role)}, permsSet); + } + } catch (IllegalArgumentException e) { + return Response.status(404).entity( + new ErrorResponse.ErrorResponseBuilder().setMessage(e.getMessage()).build() + ).build(); + } + + Permission[] permissions = permsSet.toArray(new Permission[permsSet.size()]); + userStoreManager.addRole(roleName, new String[0], permissions); + + //TODO fix what's returned in the entity + return Response.created(new URI(API_BASE_PATH + "/" + URLEncoder.encode(roleName, "UTF-8"))). + entity("Role '" + roleName + "' has " + "successfully been" + + " added").build(); + } catch (UserAdminException e) { + String msg = "Error occurred while retrieving the permissions of role '" + roleName + "'"; + log.error(msg, e); + return Response.serverError().entity( + new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build(); + } catch (UserStoreException e) { + String msg = "Error occurred while adding role '" + roleName + "'"; + log.error(msg, e); + return Response.serverError().entity( + new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build(); + } catch (URISyntaxException e) { + String msg = "Error occurred while composing the URI at which the information of the newly created role " + + "can be retrieved"; + log.error(msg, e); + return Response.serverError().entity( + new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build(); + } catch (UnsupportedEncodingException e) { + String msg = "Error occurred while encoding role name"; + log.error(msg, e); + return Response.serverError().entity( + new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build(); + } + } + @PUT @Path("/{roleName}") @Override public Response updateRole(@PathParam("roleName") String roleName, RoleInfo roleInfo, - @QueryParam("user-store") String userStoreName) { + @QueryParam("user-store") String userStoreName) { if (userStoreName != null && !userStoreName.isEmpty()) { roleName = userStoreName + "/" + roleName; } @@ -271,7 +352,7 @@ public class RoleManagementServiceImpl implements RoleManagementService { if (!userStoreManager.isExistingRole(roleName)) { return Response.status(404).entity( new ErrorResponse.ErrorResponseBuilder().setMessage("No role exists with the name '" + - roleName + "'").build()).build(); + roleName + "'").build()).build(); } final AuthorizationManager authorizationManager = userRealm.getAuthorizationManager(); @@ -287,7 +368,7 @@ public class RoleManagementServiceImpl implements RoleManagementService { if (roleInfo.getUsers() != null) { SetReferenceTransformer transformer = new SetReferenceTransformer<>(); transformer.transform(Arrays.asList(userStoreManager.getUserListOfRole(newRoleName)), - Arrays.asList(roleInfo.getUsers())); + Arrays.asList(roleInfo.getUsers())); final String[] usersToAdd = transformer.getObjectsToAdd().toArray(new String[transformer .getObjectsToAdd().size()]); final String[] usersToDelete = transformer.getObjectsToRemove().toArray(new String[transformer @@ -307,7 +388,7 @@ public class RoleManagementServiceImpl implements RoleManagementService { } //TODO: Need to send the updated role information in the entity back to the client return Response.status(Response.Status.OK).entity("Role '" + roleInfo.getRoleName() + "' has " + - "successfully been updated").build(); + "successfully been updated").build(); } catch (UserStoreException e) { String msg = "Error occurred while updating role '" + roleName + "'"; log.error(msg, e); @@ -330,7 +411,7 @@ public class RoleManagementServiceImpl implements RoleManagementService { if (!userStoreManager.isExistingRole(roleName)) { return Response.status(404).entity( new ErrorResponse.ErrorResponseBuilder().setMessage("No role exists with the name '" + - roleName + "'").build()).build(); + roleName + "'").build()).build(); } final AuthorizationManager authorizationManager = userRealm.getAuthorizationManager(); @@ -354,7 +435,7 @@ public class RoleManagementServiceImpl implements RoleManagementService { @Path("/{roleName}/users") @Override public Response updateUsersOfRole(@PathParam("roleName") String roleName, - @QueryParam("user-store") String userStoreName, List users) { + @QueryParam("user-store") String userStoreName, List users) { if (userStoreName != null && !userStoreName.isEmpty()) { roleName = userStoreName + "/" + roleName; } @@ -367,7 +448,7 @@ public class RoleManagementServiceImpl implements RoleManagementService { } SetReferenceTransformer transformer = new SetReferenceTransformer<>(); transformer.transform(Arrays.asList(userStoreManager.getUserListOfRole(roleName)), - users); + users); final String[] usersToAdd = transformer.getObjectsToAdd().toArray(new String[transformer .getObjectsToAdd().size()]); final String[] usersToDelete = transformer.getObjectsToRemove().toArray(new String[transformer @@ -376,7 +457,8 @@ public class RoleManagementServiceImpl implements RoleManagementService { userStoreManager.updateUserListOfRole(roleName, usersToDelete, usersToAdd); return Response.status(Response.Status.OK).entity("Role '" + roleName + "' has " + - "successfully been updated with the user list").build(); + "successfully been updated with the user list") + .build(); } catch (UserStoreException e) { String msg = "Error occurred while updating the users of the role '" + roleName + "'"; log.error(msg, e); @@ -400,7 +482,8 @@ public class RoleManagementServiceImpl implements RoleManagementService { // removing all internal roles, roles created for Service-providers and application related roles. List filteredRoles = new ArrayList<>(); for (String role : roles) { - if (!(role.startsWith("Internal/") || role.startsWith("Authentication/") || role.startsWith("Application/"))) { + if (!(role.startsWith("Internal/") || role.startsWith("Authentication/") || role.startsWith( + "Application/"))) { if (!filterRolesByName) { filteredRoles.add(role); } else { @@ -413,4 +496,31 @@ public class RoleManagementServiceImpl implements RoleManagementService { return filteredRoles; } + private Set mergePermissions(UIPermissionNode[] permissionNodes, Set permissions) + throws UserStoreException, UserAdminException { + for (UIPermissionNode permissionNode : permissionNodes) { + if (permissionNode.getNodeList().length > 0) { + mergePermissions(permissionNode.getNodeList(), permissions); + } + if (permissionNode.isSelected()) { + permissions.add(new Permission(permissionNode.getResourcePath(), CarbonConstants.UI_PERMISSION_ACTION)); + } + } + return permissions; + } + + private UIPermissionNode getRolePermissions(String roleName) throws UserStoreException, UserAdminException { + final UserRealm userRealm = DeviceMgtAPIUtils.getUserRealm(); + if (!userRealm.getUserStoreManager().isExistingRole(roleName)) { + throw new IllegalArgumentException("No role exists with the name '" + roleName + "'"); + } + + final UIPermissionNode rolePermissions = this.getUIPermissionNode(roleName, userRealm); + if (rolePermissions == null) { + if (log.isDebugEnabled()) { + log.debug("No permissions found for the role '" + roleName + "'"); + } + } + return rolePermissions; + } } From 05453e737928db6d7ccebefcdddcb0738468fdbd Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Fri, 25 Nov 2016 10:35:45 +0530 Subject: [PATCH 12/17] Removed 'role' suffix from roles listing page --- .../app/pages/cdmf.page.roles/public/js/role-listing.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/public/js/role-listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/public/js/role-listing.js index 0bf58e868f..de38fad9a6 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/public/js/role-listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/public/js/role-listing.js @@ -131,7 +131,7 @@ function loadRoles() { class: "fade-edge", data: "name", render: function (name, type, row, meta) { - return '

' + name + 'role

'; + return '

' + name + '

'; } }, { From 03f965adf62a7cbb6c5215af44f52da613990470 Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Fri, 25 Nov 2016 11:18:17 +0530 Subject: [PATCH 13/17] Decrease group listing page loading time with lazy roles listing --- .../app/pages/cdmf.page.groups/groups.hbs | 13 +------ .../app/pages/cdmf.page.groups/groups.js | 4 -- .../cdmf.page.groups/public/js/listing.js | 37 ++++++++++++++++++- 3 files changed, 37 insertions(+), 17 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.hbs index ad4c096949..d77f18dc7a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.hbs @@ -117,18 +117,7 @@

Select user roles to manage group sharing

-
-
- {{#each userRoles}} -
- -
- {{/each}} +

diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.js index f432193231..0c04f9bb2d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.js @@ -23,10 +23,6 @@ function onRequest(context) { var groupPermissions = require("/app/pages/cdmf.page.groups/public/group-permissions.json"); var currentUser = session.get(constants.USER_SESSION_KEY); var page = {}; - var rolesResult = userModule.getRoles(); - if (rolesResult.status == "success") { - page.userRoles = rolesResult.content; - } if (currentUser) { page.permissions = userModule.getUIPermissions(); page.permissions.list = stringify(page.permissions); 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 1548ff4c71..04f044e11a 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 @@ -372,7 +372,7 @@ function attachEvents() { $(modalPopupContent).html($('#share-group-w1-modal-content').html()); showPopup(); - markAlreadySavedUsersRoles(groupId); + listAllRoles(groupId); var shareGroupNextLink = $("a#share-group-next-link"); shareGroupNextLink.click(function () { var roles = []; @@ -512,6 +512,41 @@ function markAlreadySavedUsersRoles(groupId) { }); } +function listAllRoles(groupId) { + var successCallback = function (data, textStatus, xhr) { + data = JSON.parse(data); + if (xhr.status == 200) { + if (data.roles.length > 0) { + var html = "
"; + for (var i = 0; i < data.roles.length; i++) { + html += '
'; + $('.roleCheckBoxes').each( + function () { + if (data.roles[i] == $(this).data('role-name')) { + $(this).attr('checked', true); + } + } + ); + } + $("#rolesListing").html(html); + markAlreadySavedUsersRoles(groupId); + } else { + $("#rolesListing").html("No roles available"); + } + } else { + displayErrors(xhr); + } + }; + + invokerUtil.get("/api/device-mgt/v1.0/roles?offset=0&limit=100&user-store=all", + successCallback, function (message) { + displayErrors(message); + }); +} + function addNewRole(roles) { $(modalPopupContent).html($('#share-group-w3-modal-content').html()); $("a#share-group-w3-yes-link").click(function () { From 54bb91d4289e7efa93f37efe8e09498b0a6f68be Mon Sep 17 00:00:00 2001 From: Imesh Chandrasiri Date: Fri, 25 Nov 2016 11:19:14 +0530 Subject: [PATCH 14/17] IoT Build UI Fixes --- .../app/units/cdmf.unit.policy.view/view.hbs | 106 +++++++++--------- .../public/css/custom-desktop.css | 4 +- 2 files changed, 54 insertions(+), 56 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.view/view.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.view/view.hbs index ea2b91a78c..a650c9e151 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.view/view.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.view/view.hbs @@ -13,61 +13,59 @@
-
-
- Policy Overview -
- {{#defineZone "policy-detail-properties"}} - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Platform
Ownership
Action upon non-compliance
Status
Assigned Users
Assigned Roles
- {{/defineZone}} -
Description -
-
-
-
-
-
- Profile Information +
+ Policy Overview +
+ {{#defineZone "policy-detail-properties"}} + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform
Ownership
Action upon non-compliance
Status
Assigned Users
Assigned Roles
+ {{/defineZone}} +
Description +
+
+
+
+
+
+ Profile Information +
+
+ -
- -
-
-
- - Loading platform features . . . -
-
-
+
+
+
+ + Loading platform features . . . +
+
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 90ed8a2d2f..1a89379d3f 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 @@ -3522,7 +3522,7 @@ a.btn-operations { font-size: 13px; color: #fff; background: #11375B; - padding: 10px 24px; + padding: 5px 20px; display: inline-block; margin-right: 2px; text-decoration: none; @@ -4615,7 +4615,7 @@ a.wr-side-panel-toggle-btn.selected { } .wr-hidden-operations-content .panel-body { - padding: 5px 20px 20px; + padding: 0px 20px 20px; background: #ffffff; } .wr-hidden-operations-content .panel-body hr{ From 4789aafd28d9bc899f957eb874ceead155666a01 Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Fri, 25 Nov 2016 12:28:48 +0530 Subject: [PATCH 15/17] Minor ui changes to the group listing --- .../devicemgt/app/pages/cdmf.page.groups/groups.hbs | 2 +- .../devicemgt/app/pages/cdmf.page.groups/public/js/listing.js | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.hbs index d77f18dc7a..2c32a1227a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/groups.hbs @@ -133,7 +133,7 @@ {{/if}} - Next + Share
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 04f044e11a..439861e956 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 @@ -582,10 +582,6 @@ function togglePermissionAction(element) { function updateGroupShare(groupId, roles) { var successCallback = function (data) { $(modalPopupContent).html($('#share-group-200-content').html()); - setTimeout(function () { - hidePopup(); - location.reload(false); - }, 2000); }; invokerUtil.post("/api/device-mgt/v1.0/groups/id/" + groupId + "/share", From ae2e283f1411670c4d44edb13098d32463a9e2f1 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 25 Nov 2016 07:43:34 +0000 Subject: [PATCH 16/17] [maven-release-plugin] prepare release v2.0.1 --- .../org.wso2.carbon.apimgt.annotations/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../org.wso2.carbon.apimgt.application.extension/pom.xml | 4 ++-- .../org.wso2.carbon.apimgt.webapp.publisher/pom.xml | 4 ++-- components/apimgt-extensions/pom.xml | 4 ++-- .../org.wso2.carbon.certificate.mgt.api/pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.core/pom.xml | 4 ++-- components/certificate-mgt/pom.xml | 4 ++-- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- components/device-mgt-extensions/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml | 2 +- .../pom.xml | 2 +- .../device-mgt/org.wso2.carbon.device.mgt.api/pom.xml | 2 +- .../device-mgt/org.wso2.carbon.device.mgt.common/pom.xml | 2 +- .../device-mgt/org.wso2.carbon.device.mgt.core/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.extensions/pom.xml | 2 +- components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.url.printer/pom.xml | 2 +- components/device-mgt/pom.xml | 2 +- .../email-sender/org.wso2.carbon.email.sender.core/pom.xml | 2 +- components/email-sender/pom.xml | 2 +- .../dynamic-client-web-proxy/pom.xml | 4 ++-- .../dynamic-client-registration/dynamic-client-web/pom.xml | 4 ++-- .../org.wso2.carbon.dynamic.client.registration/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../identity-extensions/dynamic-client-registration/pom.xml | 4 ++-- .../org.wso2.carbon.device.mgt.oauth.extensions/pom.xml | 4 ++-- .../pom.xml | 2 +- .../org.wso2.carbon.identity.jwt.client.extension/pom.xml | 2 +- components/identity-extensions/pom.xml | 2 +- .../org.wso2.carbon.complex.policy.decision.point/pom.xml | 4 ++-- .../org.wso2.carbon.policy.information.point/pom.xml | 4 ++-- .../policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml | 4 ++-- .../policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml | 4 ++-- .../org.wso2.carbon.simple.policy.decision.point/pom.xml | 4 ++-- components/policy-mgt/pom.xml | 4 ++-- .../org.wso2.carbon.webapp.authenticator.framework/pom.xml | 4 ++-- components/webapp-authenticator-framework/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml | 4 ++-- features/apimgt-extensions/pom.xml | 4 ++-- .../org.wso2.carbon.certificate.mgt.api.feature/pom.xml | 2 +- .../pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.server.feature/pom.xml | 4 ++-- features/certificate-mgt/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- features/device-mgt-extensions/pom.xml | 2 +- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../org.wso2.carbon.device.mgt.api.feature/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.extensions.feature/pom.xml | 4 ++-- .../device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.server.feature/pom.xml | 4 ++-- .../org.wso2.carbon.device.mgt.ui.feature/pom.xml | 2 +- features/device-mgt/pom.xml | 2 +- .../pom.xml | 4 ++-- features/dynamic-client-registration/pom.xml | 4 ++-- .../org.wso2.carbon.email.sender.feature/pom.xml | 4 ++-- features/email-sender/pom.xml | 4 ++-- .../pom.xml | 4 ++-- features/jwt-client/pom.xml | 4 ++-- .../pom.xml | 4 ++-- features/oauth-extensions/pom.xml | 4 ++-- .../org.wso2.carbon.policy.mgt.server.feature/pom.xml | 4 ++-- features/policy-mgt/pom.xml | 4 ++-- .../pom.xml | 4 ++-- features/webapp-authenticator-framework/pom.xml | 4 ++-- pom.xml | 6 +++--- 75 files changed, 123 insertions(+), 123 deletions(-) diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml index d9808c2ba6..cd35691e66 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml @@ -22,13 +22,13 @@ apimgt-extensions org.wso2.carbon.devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.apimgt.annotations - 2.0.1-SNAPSHOT + 2.0.1 bundle WSO2 Carbon - API Management Annotations WSO2 Carbon - API Management Custom Annotation Module diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml index fa78abe077..a15891ecc5 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml @@ -21,12 +21,12 @@ apimgt-extensions org.wso2.carbon.devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 - 2.0.1-SNAPSHOT + 2.0.1 org.wso2.carbon.apimgt.application.extension.api war WSO2 Carbon - API Application Management API diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml index 27ed943fb5..10be43c071 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml @@ -22,12 +22,12 @@ apimgt-extensions org.wso2.carbon.devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 - 2.0.1-SNAPSHOT + 2.0.1 org.wso2.carbon.apimgt.application.extension bundle WSO2 Carbon - API Application Management diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml index 7e2fe80ee0..95aa4fe063 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml @@ -22,13 +22,13 @@ apimgt-extensions org.wso2.carbon.devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.apimgt.webapp.publisher - 2.0.1-SNAPSHOT + 2.0.1 bundle WSO2 Carbon - API Management Webapp Publisher WSO2 Carbon - API Management Webapp Publisher diff --git a/components/apimgt-extensions/pom.xml b/components/apimgt-extensions/pom.xml index 88f24464a0..ff2708a113 100644 --- a/components/apimgt-extensions/pom.xml +++ b/components/apimgt-extensions/pom.xml @@ -22,13 +22,13 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../../pom.xml 4.0.0 apimgt-extensions - 2.0.1-SNAPSHOT + 2.0.1 pom WSO2 Carbon - API Management Extensions Component http://wso2.org diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml index 6e47a927e1..e643f90c5c 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml @@ -22,7 +22,7 @@ certificate-mgt org.wso2.carbon.devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml index 58f6270b47..ae34b0952c 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml @@ -22,7 +22,7 @@ certificate-mgt org.wso2.carbon.devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml index 47f1880d32..c21d48ae57 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml @@ -21,13 +21,13 @@ org.wso2.carbon.devicemgt certificate-mgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.certificate.mgt.core - 2.0.1-SNAPSHOT + 2.0.1 bundle WSO2 Carbon - Certificate Management Core WSO2 Carbon - Certificate Management Core diff --git a/components/certificate-mgt/pom.xml b/components/certificate-mgt/pom.xml index 052b4dc55b..6397c32444 100644 --- a/components/certificate-mgt/pom.xml +++ b/components/certificate-mgt/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt certificate-mgt - 2.0.1-SNAPSHOT + 2.0.1 pom WSO2 Carbon - Certificate Management Component http://wso2.org diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml index 9c830e083c..0dc09863dc 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm/pom.xml index 370a58d83a..6749176996 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml index 7f2670a29e..aacec06877 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml index a3ade1cd13..e7d02ee860 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml diff --git a/components/device-mgt-extensions/pom.xml b/components/device-mgt-extensions/pom.xml index 5cbae04fca..eed3f4c809 100644 --- a/components/device-mgt-extensions/pom.xml +++ b/components/device-mgt-extensions/pom.xml @@ -22,7 +22,7 @@ carbon-devicemgt org.wso2.carbon.devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml index 93048c62d2..f8340af01c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml @@ -3,7 +3,7 @@ org.wso2.carbon.devicemgt device-mgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml index 7f3d9171c8..7fd32c8e55 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml index b4000440d9..22151f9f1b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml @@ -22,7 +22,7 @@ device-mgt org.wso2.carbon.devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml index 6f4c7d3297..5e00554987 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml @@ -21,7 +21,7 @@ device-mgt org.wso2.carbon.devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml index f59b7f9fc2..a0669c4f45 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml index b45913a105..90a23282d7 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml @@ -22,7 +22,7 @@ device-mgt org.wso2.carbon.devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml index 120df7a66d..77b0615c90 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml @@ -22,7 +22,7 @@ device-mgt org.wso2.carbon.devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml index 8e22805e52..7075236056 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml @@ -23,7 +23,7 @@ device-mgt org.wso2.carbon.devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml diff --git a/components/device-mgt/pom.xml b/components/device-mgt/pom.xml index 846cc572f4..400e03e908 100644 --- a/components/device-mgt/pom.xml +++ b/components/device-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../../pom.xml diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml b/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml index 0d19ca91d8..7d541f88ef 100644 --- a/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml +++ b/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt email-sender - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml diff --git a/components/email-sender/pom.xml b/components/email-sender/pom.xml index 9732a68dbb..811ed0c170 100644 --- a/components/email-sender/pom.xml +++ b/components/email-sender/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../../pom.xml 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..45b03e89ce 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 @@ -21,14 +21,14 @@ dynamic-client-registration org.wso2.carbon.devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.mdm dynamic-client-web-proxy - 2.0.1-SNAPSHOT + 2.0.1 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..0391aa8480 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 @@ -21,14 +21,14 @@ dynamic-client-registration org.wso2.carbon.devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.mdm dynamic-client-web - 2.0.1-SNAPSHOT + 2.0.1 WSO2 Carbon - Dynamic Client Registration Web Service WSO2 Carbon - Dynamic Client Registration Web war diff --git a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/pom.xml b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/pom.xml index ce1c9e65ef..dbbe631413 100644 --- a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/pom.xml +++ b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/pom.xml @@ -21,13 +21,13 @@ dynamic-client-registration org.wso2.carbon.devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.dynamic.client.registration - 2.0.1-SNAPSHOT + 2.0.1 bundle WSO2 Carbon - Dynamic client registration service WSO2 Carbon - Dynamic Client Registration Service diff --git a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.web.app.registration/pom.xml b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.web.app.registration/pom.xml index f062b22108..a77fc413b9 100644 --- a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.web.app.registration/pom.xml +++ b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.web.app.registration/pom.xml @@ -21,13 +21,13 @@ dynamic-client-registration org.wso2.carbon.devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.dynamic.client.web.app.registration - 2.0.1-SNAPSHOT + 2.0.1 bundle WSO2 Carbon - Dynamic client web app registration WSO2 Carbon - Dynamic Client Web-app Registration Service diff --git a/components/identity-extensions/dynamic-client-registration/pom.xml b/components/identity-extensions/dynamic-client-registration/pom.xml index 606acc811a..8de7e83c66 100644 --- a/components/identity-extensions/dynamic-client-registration/pom.xml +++ b/components/identity-extensions/dynamic-client-registration/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt identity-extensions - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.devicemgt dynamic-client-registration - 2.0.1-SNAPSHOT + 2.0.1 pom WSO2 Carbon - Dynamic client registration http://wso2.org diff --git a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml index 813dd65d98..9bddaa5e53 100644 --- a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml +++ b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml @@ -22,13 +22,13 @@ org.wso2.carbon.devicemgt identity-extensions - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.oauth.extensions - 2.0.1-SNAPSHOT + 2.0.1 bundle WSO2 Carbon - OAuth Extensions http://wso2.org diff --git a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml index 7b2bb3a7d7..8572db8d59 100644 --- a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml +++ b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml @@ -21,7 +21,7 @@ identity-extensions org.wso2.carbon.devicemgt - 2.0.1-SNAPSHOT + 2.0.1 4.0.0 diff --git a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml index 2c44f2e89d..4df2318ccb 100644 --- a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml +++ b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt identity-extensions - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml diff --git a/components/identity-extensions/pom.xml b/components/identity-extensions/pom.xml index 6dda4a5e34..8ad90db63d 100644 --- a/components/identity-extensions/pom.xml +++ b/components/identity-extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../../pom.xml diff --git a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml index 8ef858d70a..9f07742296 100644 --- a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt policy-mgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.complex.policy.decision.point - 2.0.1-SNAPSHOT + 2.0.1 bundle WSO2 Carbon - Policy Decision Point WSO2 Carbon - Policy Decision Point diff --git a/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml index 89abfcb3d8..1e08c6e7ec 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml @@ -3,7 +3,7 @@ org.wso2.carbon.devicemgt policy-mgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml @@ -11,7 +11,7 @@ 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.information.point - 2.0.1-SNAPSHOT + 2.0.1 bundle WSO2 Carbon - Policy Information Point WSO2 Carbon - Policy Information Point diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml index 9b0bfaca54..bbecd35b89 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt policy-mgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.mgt.common - 2.0.1-SNAPSHOT + 2.0.1 bundle WSO2 Carbon - Policy Management Common WSO2 Carbon - Policy Management Common diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml index b2db067693..9800270991 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt policy-mgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.mgt.core - 2.0.1-SNAPSHOT + 2.0.1 bundle WSO2 Carbon - Policy Management Core WSO2 Carbon - Policy Management Core diff --git a/components/policy-mgt/org.wso2.carbon.simple.policy.decision.point/pom.xml b/components/policy-mgt/org.wso2.carbon.simple.policy.decision.point/pom.xml index 5ac0c32f8b..5b00c0706a 100644 --- a/components/policy-mgt/org.wso2.carbon.simple.policy.decision.point/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.simple.policy.decision.point/pom.xml @@ -3,14 +3,14 @@ org.wso2.carbon.devicemgt policy-mgt - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.simple.policy.decision.point - 2.0.1-SNAPSHOT + 2.0.1 bundle WSO2 Carbon - Simple Policy Decision Point WSO2 Carbon - Simple Policy Decision Point diff --git a/components/policy-mgt/pom.xml b/components/policy-mgt/pom.xml index 0add2b3bb7..79fe1f2b82 100644 --- a/components/policy-mgt/pom.xml +++ b/components/policy-mgt/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../../pom.xml 4.0.0 policy-mgt - 2.0.1-SNAPSHOT + 2.0.1 pom WSO2 Carbon - Policy Management Component http://wso2.org diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml index fd8c448c18..54a8a75973 100644 --- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml +++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml @@ -21,14 +21,14 @@ org.wso2.carbon.devicemgt webapp-authenticator-framework - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.webapp.authenticator.framework - 2.0.1-SNAPSHOT + 2.0.1 bundle WSO2 Carbon - Web Application Authenticator Framework Bundle WSO2 Carbon - Web Application Authenticator Framework Bundle diff --git a/components/webapp-authenticator-framework/pom.xml b/components/webapp-authenticator-framework/pom.xml index 190e9e7752..f7e8bd4edd 100644 --- a/components/webapp-authenticator-framework/pom.xml +++ b/components/webapp-authenticator-framework/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt webapp-authenticator-framework - 2.0.1-SNAPSHOT + 2.0.1 pom WSO2 Carbon - Webapp Authenticator Framework http://wso2.org diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml index 51d6db7153..c0f961b027 100644 --- a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml +++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml @@ -21,14 +21,14 @@ org.wso2.carbon.devicemgt apimgt-extensions-feature - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.apimgt.application.extension.feature pom - 2.0.1-SNAPSHOT + 2.0.1 WSO2 Carbon - API Management Application Extension Feature http://wso2.org This feature contains an implementation of a api application registration, which takes care of subscription diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml index 1b3205ddea..935bddd03a 100644 --- a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml +++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml @@ -21,14 +21,14 @@ org.wso2.carbon.devicemgt apimgt-extensions-feature - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.apimgt.webapp.publisher.feature pom - 2.0.1-SNAPSHOT + 2.0.1 WSO2 Carbon - API Management Webapp Publisher Feature http://wso2.org This feature contains an implementation of a Tomcat lifecycle listener, which takes care of publishing diff --git a/features/apimgt-extensions/pom.xml b/features/apimgt-extensions/pom.xml index 5bbfc04229..96a902a236 100644 --- a/features/apimgt-extensions/pom.xml +++ b/features/apimgt-extensions/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt apimgt-extensions-feature - 2.0.1-SNAPSHOT + 2.0.1 pom WSO2 Carbon - API Management Extensions Feature http://wso2.org diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml index d5dcf6bdd6..6dbd27e1ea 100644 --- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml +++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt certificate-mgt-feature - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml index 46010dc908..cc9df5f6c4 100644 --- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml +++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt certificate-mgt-feature - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml index 22c76abf57..c527ef46db 100644 --- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml +++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt certificate-mgt-feature - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.certificate.mgt.server.feature pom - 2.0.1-SNAPSHOT + 2.0.1 WSO2 Carbon - Certificate Management Server Feature http://wso2.org This feature contains the core bundles required for back-end Certificate Management functionality diff --git a/features/certificate-mgt/pom.xml b/features/certificate-mgt/pom.xml index 7baa3e92c5..9fc33ab247 100644 --- a/features/certificate-mgt/pom.xml +++ b/features/certificate-mgt/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt certificate-mgt-feature - 2.0.1-SNAPSHOT + 2.0.1 pom WSO2 Carbon - Certificate Management Feature http://wso2.org diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml index ec10eab144..47eebc1f9f 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature pom - 2.0.1-SNAPSHOT + 2.0.1 WSO2 Carbon - Device Type Deployer Feature http://wso2.org WSO2 Carbon - Device Type Deployer Feature diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature/pom.xml index 6a4ac21508..ccf30efdef 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature pom - 2.0.1-SNAPSHOT + 2.0.1 WSO2 Carbon - GCM Based Push Notification Provider Feature http://wso2.org WSO2 Carbon - MQTT Based Push Notification Provider Feature diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml index 78a12fa2a2..e8d606765b 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature pom - 2.0.1-SNAPSHOT + 2.0.1 WSO2 Carbon - MQTT Based Push Notification Provider Feature http://wso2.org WSO2 Carbon - MQTT Based Push Notification Provider Feature diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml index 35403e1b62..b5c315ca3c 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature pom - 2.0.1-SNAPSHOT + 2.0.1 WSO2 Carbon - XMPP Based Push Notification Provider Feature http://wso2.org WSO2 Carbon - XMPP Based Push Notification Provider Feature diff --git a/features/device-mgt-extensions/pom.xml b/features/device-mgt-extensions/pom.xml index 8b820ad2d5..18280e151c 100644 --- a/features/device-mgt-extensions/pom.xml +++ b/features/device-mgt-extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../../pom.xml diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml index 775d91f7c4..3f6ec5fbd1 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml @@ -3,13 +3,13 @@ org.wso2.carbon.devicemgt device-mgt-feature - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.analytics.dashboard.feature - 2.0.1-SNAPSHOT + 2.0.1 pom WSO2 Carbon - Device Management Dashboard Analytics Feature WSO2 Carbon - Device Management Dashboard Analytics Feature diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml index bc20c2d774..1bd9710c0a 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-feature - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.analytics.data.publisher.feature pom - 2.0.1-SNAPSHOT + 2.0.1 WSO2 Carbon - Device Management Server Feature http://wso2.org This feature contains bundles related to device analytics data publisher diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml index 3866ec32d2..ff52905449 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-feature - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml index a2286e739d..43a76769fa 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml @@ -4,14 +4,14 @@ org.wso2.carbon.devicemgt device-mgt-feature - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.feature pom - 2.0.1-SNAPSHOT + 2.0.1 WSO2 Carbon - Device Management Extensions Feature http://wso2.org This feature contains common extensions used by key device management functionalities diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml index 1530d3be2f..1030135729 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-feature - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml index 54929c5e73..686e230d84 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-feature - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.server.feature pom - 2.0.1-SNAPSHOT + 2.0.1 WSO2 Carbon - Device Management Server Feature http://wso2.org This feature contains the core bundles required for Back-end Device Management functionality diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml index c42e4f37c6..de0172289e 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-feature - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml diff --git a/features/device-mgt/pom.xml b/features/device-mgt/pom.xml index 21784b451f..a7826241a3 100644 --- a/features/device-mgt/pom.xml +++ b/features/device-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../../pom.xml 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..ecb5a2301b 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 @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt dynamic-client-registration-feature - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.dynamic.client.registration.server.feature pom - 2.0.1-SNAPSHOT + 2.0.1 WSO2 Carbon - Dynamic Client Registration Server Feature http://wso2.org This feature contains dynamic client registration features diff --git a/features/dynamic-client-registration/pom.xml b/features/dynamic-client-registration/pom.xml index 658ea0941e..dda770e7ad 100644 --- a/features/dynamic-client-registration/pom.xml +++ b/features/dynamic-client-registration/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt dynamic-client-registration-feature - 2.0.1-SNAPSHOT + 2.0.1 pom WSO2 Carbon - Dynamic Client Registration Feature http://wso2.org diff --git a/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml b/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml index cf47e3f749..5f59cab73c 100644 --- a/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml +++ b/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt email-sender-feature - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.email.sender.feature pom - 2.0.1-SNAPSHOT + 2.0.1 WSO2 Carbon - Email Sender Feature http://wso2.org This feature contains the core bundles required for email sender related functionality diff --git a/features/email-sender/pom.xml b/features/email-sender/pom.xml index 404d4ee661..36525d5c52 100644 --- a/features/email-sender/pom.xml +++ b/features/email-sender/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt email-sender-feature - 2.0.1-SNAPSHOT + 2.0.1 pom WSO2 Carbon - Email Sender Feature http://wso2.org diff --git a/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml b/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml index 2cc48821f1..3b5e43fb14 100644 --- a/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml +++ b/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt jwt-client-feature - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.identity.jwt.client.extension.feature pom - 2.0.1-SNAPSHOT + 2.0.1 WSO2 Carbon - JWT Client Feature http://wso2.org This feature contains jwt client implementation from which we can get a access token using the jwt diff --git a/features/jwt-client/pom.xml b/features/jwt-client/pom.xml index 425924b9e6..0bb87caa33 100644 --- a/features/jwt-client/pom.xml +++ b/features/jwt-client/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../../pom.xml 4.0.0 jwt-client-feature - 2.0.1-SNAPSHOT + 2.0.1 pom WSO2 Carbon - Dynamic Client Registration Feature http://wso2.org diff --git a/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml b/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml index 43a08dee80..7a27a99aa9 100644 --- a/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml +++ b/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt oauth-extensions-feature - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.oauth.extensions.feature pom - 2.0.1-SNAPSHOT + 2.0.1 WSO2 Carbon - Device Mgt OAuth Extensions Feature http://wso2.org This feature contains devicemgt related OAuth extensions diff --git a/features/oauth-extensions/pom.xml b/features/oauth-extensions/pom.xml index f0a6a6fe56..05693e6763 100644 --- a/features/oauth-extensions/pom.xml +++ b/features/oauth-extensions/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt oauth-extensions-feature - 2.0.1-SNAPSHOT + 2.0.1 pom WSO2 Carbon - Device Management OAuth Extensions Feature http://wso2.org diff --git a/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml b/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml index 875fba0963..6277af7568 100644 --- a/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml +++ b/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt policy-mgt-feature - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.policy.mgt.server.feature pom - 2.0.1-SNAPSHOT + 2.0.1 WSO2 Carbon - Policy Management Server Feature http://wso2.org This feature contains the core bundles required for Back-end Device Management functionality diff --git a/features/policy-mgt/pom.xml b/features/policy-mgt/pom.xml index 65f08f2b42..110abd87fa 100644 --- a/features/policy-mgt/pom.xml +++ b/features/policy-mgt/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt policy-mgt-feature - 2.0.1-SNAPSHOT + 2.0.1 pom WSO2 Carbon - Policy Management Feature http://wso2.org diff --git a/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml index 4bc0a14554..78e0078ac3 100644 --- a/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml +++ b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt webapp-authenticator-framework-feature - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml 4.0.0 org.wso2.carbon.webapp.authenticator.framework.server.feature pom - 2.0.1-SNAPSHOT + 2.0.1 WSO2 Carbon - Webapp Authenticator Framework Server Feature http://wso2.org This feature contains the core bundles required for Back-end Device Management functionality diff --git a/features/webapp-authenticator-framework/pom.xml b/features/webapp-authenticator-framework/pom.xml index afd8242370..80e9de347f 100644 --- a/features/webapp-authenticator-framework/pom.xml +++ b/features/webapp-authenticator-framework/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1-SNAPSHOT + 2.0.1 ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt webapp-authenticator-framework-feature - 2.0.1-SNAPSHOT + 2.0.1 pom WSO2 Carbon - Webapp Authenticator Framework Feature http://wso2.org diff --git a/pom.xml b/pom.xml index 7f0b6e4112..72f1db5438 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt pom - 2.0.1-SNAPSHOT + 2.0.1 WSO2 Carbon - Device Management - Parent http://wso2.org WSO2 Connected Device Manager Components @@ -1547,7 +1547,7 @@ https://github.com/wso2/carbon-device-mgt.git scm:git:https://github.com/wso2/carbon-device-mgt.git scm:git:https://github.com/wso2/carbon-device-mgt.git - HEAD + v2.0.1 @@ -1823,7 +1823,7 @@ 1.2.11.wso2v10 - 2.0.1-SNAPSHOT + 2.0.1 4.4.8 From 8431b30ddcf9a1169550f41965d755d65dcee8ad Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Fri, 25 Nov 2016 08:06:30 +0000 Subject: [PATCH 17/17] [maven-release-plugin] prepare for next development iteration --- .../org.wso2.carbon.apimgt.annotations/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../org.wso2.carbon.apimgt.application.extension/pom.xml | 4 ++-- .../org.wso2.carbon.apimgt.webapp.publisher/pom.xml | 4 ++-- components/apimgt-extensions/pom.xml | 4 ++-- .../org.wso2.carbon.certificate.mgt.api/pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.core/pom.xml | 4 ++-- components/certificate-mgt/pom.xml | 4 ++-- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- components/device-mgt-extensions/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml | 2 +- .../pom.xml | 2 +- .../device-mgt/org.wso2.carbon.device.mgt.api/pom.xml | 2 +- .../device-mgt/org.wso2.carbon.device.mgt.common/pom.xml | 2 +- .../device-mgt/org.wso2.carbon.device.mgt.core/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.extensions/pom.xml | 2 +- components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.url.printer/pom.xml | 2 +- components/device-mgt/pom.xml | 2 +- .../email-sender/org.wso2.carbon.email.sender.core/pom.xml | 2 +- components/email-sender/pom.xml | 2 +- .../dynamic-client-web-proxy/pom.xml | 4 ++-- .../dynamic-client-registration/dynamic-client-web/pom.xml | 4 ++-- .../org.wso2.carbon.dynamic.client.registration/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../identity-extensions/dynamic-client-registration/pom.xml | 4 ++-- .../org.wso2.carbon.device.mgt.oauth.extensions/pom.xml | 4 ++-- .../pom.xml | 2 +- .../org.wso2.carbon.identity.jwt.client.extension/pom.xml | 2 +- components/identity-extensions/pom.xml | 2 +- .../org.wso2.carbon.complex.policy.decision.point/pom.xml | 4 ++-- .../org.wso2.carbon.policy.information.point/pom.xml | 4 ++-- .../policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml | 4 ++-- .../policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml | 4 ++-- .../org.wso2.carbon.simple.policy.decision.point/pom.xml | 4 ++-- components/policy-mgt/pom.xml | 4 ++-- .../org.wso2.carbon.webapp.authenticator.framework/pom.xml | 4 ++-- components/webapp-authenticator-framework/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml | 4 ++-- features/apimgt-extensions/pom.xml | 4 ++-- .../org.wso2.carbon.certificate.mgt.api.feature/pom.xml | 2 +- .../pom.xml | 2 +- .../org.wso2.carbon.certificate.mgt.server.feature/pom.xml | 4 ++-- features/certificate-mgt/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- features/device-mgt-extensions/pom.xml | 2 +- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../org.wso2.carbon.device.mgt.api.feature/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.extensions.feature/pom.xml | 4 ++-- .../device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml | 2 +- .../org.wso2.carbon.device.mgt.server.feature/pom.xml | 4 ++-- .../org.wso2.carbon.device.mgt.ui.feature/pom.xml | 2 +- features/device-mgt/pom.xml | 2 +- .../pom.xml | 4 ++-- features/dynamic-client-registration/pom.xml | 4 ++-- .../org.wso2.carbon.email.sender.feature/pom.xml | 4 ++-- features/email-sender/pom.xml | 4 ++-- .../pom.xml | 4 ++-- features/jwt-client/pom.xml | 4 ++-- .../pom.xml | 4 ++-- features/oauth-extensions/pom.xml | 4 ++-- .../org.wso2.carbon.policy.mgt.server.feature/pom.xml | 4 ++-- features/policy-mgt/pom.xml | 4 ++-- .../pom.xml | 4 ++-- features/webapp-authenticator-framework/pom.xml | 4 ++-- pom.xml | 6 +++--- 75 files changed, 123 insertions(+), 123 deletions(-) diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml index cd35691e66..ea216af1dd 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml @@ -22,13 +22,13 @@ apimgt-extensions org.wso2.carbon.devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.annotations - 2.0.1 + 2.0.2-SNAPSHOT bundle WSO2 Carbon - API Management Annotations WSO2 Carbon - API Management Custom Annotation Module diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml index a15891ecc5..c99a029ff3 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml @@ -21,12 +21,12 @@ apimgt-extensions org.wso2.carbon.devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 - 2.0.1 + 2.0.2-SNAPSHOT org.wso2.carbon.apimgt.application.extension.api war WSO2 Carbon - API Application Management API diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml index 10be43c071..ed99e95ab6 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml @@ -22,12 +22,12 @@ apimgt-extensions org.wso2.carbon.devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 - 2.0.1 + 2.0.2-SNAPSHOT org.wso2.carbon.apimgt.application.extension bundle WSO2 Carbon - API Application Management diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml index 95aa4fe063..dd139b8ff9 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml @@ -22,13 +22,13 @@ apimgt-extensions org.wso2.carbon.devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.webapp.publisher - 2.0.1 + 2.0.2-SNAPSHOT bundle WSO2 Carbon - API Management Webapp Publisher WSO2 Carbon - API Management Webapp Publisher diff --git a/components/apimgt-extensions/pom.xml b/components/apimgt-extensions/pom.xml index ff2708a113..7e6e61c2e4 100644 --- a/components/apimgt-extensions/pom.xml +++ b/components/apimgt-extensions/pom.xml @@ -22,13 +22,13 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../../pom.xml 4.0.0 apimgt-extensions - 2.0.1 + 2.0.2-SNAPSHOT pom WSO2 Carbon - API Management Extensions Component http://wso2.org diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml index e643f90c5c..ab955c1382 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml @@ -22,7 +22,7 @@ certificate-mgt org.wso2.carbon.devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml index ae34b0952c..33f1bb6ecc 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml @@ -22,7 +22,7 @@ certificate-mgt org.wso2.carbon.devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml index c21d48ae57..09edacd71c 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml @@ -21,13 +21,13 @@ org.wso2.carbon.devicemgt certificate-mgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.certificate.mgt.core - 2.0.1 + 2.0.2-SNAPSHOT bundle WSO2 Carbon - Certificate Management Core WSO2 Carbon - Certificate Management Core diff --git a/components/certificate-mgt/pom.xml b/components/certificate-mgt/pom.xml index 6397c32444..258059c8d6 100644 --- a/components/certificate-mgt/pom.xml +++ b/components/certificate-mgt/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt certificate-mgt - 2.0.1 + 2.0.2-SNAPSHOT pom WSO2 Carbon - Certificate Management Component http://wso2.org diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml index 0dc09863dc..bf340f57c3 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm/pom.xml index 6749176996..0dfaa553c2 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml index aacec06877..6ddeff397d 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml index e7d02ee860..b43c12277e 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml @@ -22,7 +22,7 @@ device-mgt-extensions org.wso2.carbon.devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt-extensions/pom.xml b/components/device-mgt-extensions/pom.xml index eed3f4c809..83fa0ab8d1 100644 --- a/components/device-mgt-extensions/pom.xml +++ b/components/device-mgt-extensions/pom.xml @@ -22,7 +22,7 @@ carbon-devicemgt org.wso2.carbon.devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml index f8340af01c..3898a2163f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml @@ -3,7 +3,7 @@ org.wso2.carbon.devicemgt device-mgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml index 7fd32c8e55..29be44a708 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml index 22151f9f1b..47dd5c89f3 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml @@ -22,7 +22,7 @@ device-mgt org.wso2.carbon.devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml index 5e00554987..b907e8224f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml @@ -21,7 +21,7 @@ device-mgt org.wso2.carbon.devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml index a0669c4f45..18544988a8 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml index 90a23282d7..76313396dd 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml @@ -22,7 +22,7 @@ device-mgt org.wso2.carbon.devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml index 77b0615c90..b7548107cd 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml @@ -22,7 +22,7 @@ device-mgt org.wso2.carbon.devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml index 7075236056..312d73e81e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml @@ -23,7 +23,7 @@ device-mgt org.wso2.carbon.devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml diff --git a/components/device-mgt/pom.xml b/components/device-mgt/pom.xml index 400e03e908..a13f54a6a4 100644 --- a/components/device-mgt/pom.xml +++ b/components/device-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../../pom.xml diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml b/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml index 7d541f88ef..213bccbf47 100644 --- a/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml +++ b/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt email-sender - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml diff --git a/components/email-sender/pom.xml b/components/email-sender/pom.xml index 811ed0c170..252cad312d 100644 --- a/components/email-sender/pom.xml +++ b/components/email-sender/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../../pom.xml 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 45b03e89ce..35aca557d3 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 @@ -21,14 +21,14 @@ dynamic-client-registration org.wso2.carbon.devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.mdm dynamic-client-web-proxy - 2.0.1 + 2.0.2-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 0391aa8480..b98d9980e0 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 @@ -21,14 +21,14 @@ dynamic-client-registration org.wso2.carbon.devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.mdm dynamic-client-web - 2.0.1 + 2.0.2-SNAPSHOT WSO2 Carbon - Dynamic Client Registration Web Service WSO2 Carbon - Dynamic Client Registration Web war diff --git a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/pom.xml b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/pom.xml index dbbe631413..1b91ff0e73 100644 --- a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/pom.xml +++ b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/pom.xml @@ -21,13 +21,13 @@ dynamic-client-registration org.wso2.carbon.devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.dynamic.client.registration - 2.0.1 + 2.0.2-SNAPSHOT bundle WSO2 Carbon - Dynamic client registration service WSO2 Carbon - Dynamic Client Registration Service diff --git a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.web.app.registration/pom.xml b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.web.app.registration/pom.xml index a77fc413b9..7fbc327874 100644 --- a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.web.app.registration/pom.xml +++ b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.web.app.registration/pom.xml @@ -21,13 +21,13 @@ dynamic-client-registration org.wso2.carbon.devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.dynamic.client.web.app.registration - 2.0.1 + 2.0.2-SNAPSHOT bundle WSO2 Carbon - Dynamic client web app registration WSO2 Carbon - Dynamic Client Web-app Registration Service diff --git a/components/identity-extensions/dynamic-client-registration/pom.xml b/components/identity-extensions/dynamic-client-registration/pom.xml index 8de7e83c66..93cc74b745 100644 --- a/components/identity-extensions/dynamic-client-registration/pom.xml +++ b/components/identity-extensions/dynamic-client-registration/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt identity-extensions - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt dynamic-client-registration - 2.0.1 + 2.0.2-SNAPSHOT pom WSO2 Carbon - Dynamic client registration http://wso2.org diff --git a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml index 9bddaa5e53..640c8f6469 100644 --- a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml +++ b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml @@ -22,13 +22,13 @@ org.wso2.carbon.devicemgt identity-extensions - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.oauth.extensions - 2.0.1 + 2.0.2-SNAPSHOT bundle WSO2 Carbon - OAuth Extensions http://wso2.org diff --git a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml index 8572db8d59..7c70b736b7 100644 --- a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml +++ b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml @@ -21,7 +21,7 @@ identity-extensions org.wso2.carbon.devicemgt - 2.0.1 + 2.0.2-SNAPSHOT 4.0.0 diff --git a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml index 4df2318ccb..3a2ddfd639 100644 --- a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml +++ b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt identity-extensions - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml diff --git a/components/identity-extensions/pom.xml b/components/identity-extensions/pom.xml index 8ad90db63d..aa91c56a42 100644 --- a/components/identity-extensions/pom.xml +++ b/components/identity-extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../../pom.xml diff --git a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml index 9f07742296..f98f7323f6 100644 --- a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt policy-mgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.complex.policy.decision.point - 2.0.1 + 2.0.2-SNAPSHOT bundle WSO2 Carbon - Policy Decision Point WSO2 Carbon - Policy Decision Point diff --git a/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml index 1e08c6e7ec..9e0b447424 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml @@ -3,7 +3,7 @@ org.wso2.carbon.devicemgt policy-mgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml @@ -11,7 +11,7 @@ 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.information.point - 2.0.1 + 2.0.2-SNAPSHOT bundle WSO2 Carbon - Policy Information Point WSO2 Carbon - Policy Information Point diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml index bbecd35b89..d077eec7bf 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt policy-mgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.mgt.common - 2.0.1 + 2.0.2-SNAPSHOT bundle WSO2 Carbon - Policy Management Common WSO2 Carbon - Policy Management Common diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml index 9800270991..365722d4be 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt policy-mgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.policy.mgt.core - 2.0.1 + 2.0.2-SNAPSHOT bundle WSO2 Carbon - Policy Management Core WSO2 Carbon - Policy Management Core diff --git a/components/policy-mgt/org.wso2.carbon.simple.policy.decision.point/pom.xml b/components/policy-mgt/org.wso2.carbon.simple.policy.decision.point/pom.xml index 5b00c0706a..736f80b186 100644 --- a/components/policy-mgt/org.wso2.carbon.simple.policy.decision.point/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.simple.policy.decision.point/pom.xml @@ -3,14 +3,14 @@ org.wso2.carbon.devicemgt policy-mgt - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.simple.policy.decision.point - 2.0.1 + 2.0.2-SNAPSHOT bundle WSO2 Carbon - Simple Policy Decision Point WSO2 Carbon - Simple Policy Decision Point diff --git a/components/policy-mgt/pom.xml b/components/policy-mgt/pom.xml index 79fe1f2b82..1acc417ab3 100644 --- a/components/policy-mgt/pom.xml +++ b/components/policy-mgt/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../../pom.xml 4.0.0 policy-mgt - 2.0.1 + 2.0.2-SNAPSHOT pom WSO2 Carbon - Policy Management Component http://wso2.org diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml index 54a8a75973..b98c3bff6a 100644 --- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml +++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml @@ -21,14 +21,14 @@ org.wso2.carbon.devicemgt webapp-authenticator-framework - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.devicemgt org.wso2.carbon.webapp.authenticator.framework - 2.0.1 + 2.0.2-SNAPSHOT bundle WSO2 Carbon - Web Application Authenticator Framework Bundle WSO2 Carbon - Web Application Authenticator Framework Bundle diff --git a/components/webapp-authenticator-framework/pom.xml b/components/webapp-authenticator-framework/pom.xml index f7e8bd4edd..9965efcdd6 100644 --- a/components/webapp-authenticator-framework/pom.xml +++ b/components/webapp-authenticator-framework/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt webapp-authenticator-framework - 2.0.1 + 2.0.2-SNAPSHOT pom WSO2 Carbon - Webapp Authenticator Framework http://wso2.org diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml index c0f961b027..ed3ec102e3 100644 --- a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml +++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml @@ -21,14 +21,14 @@ org.wso2.carbon.devicemgt apimgt-extensions-feature - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.application.extension.feature pom - 2.0.1 + 2.0.2-SNAPSHOT WSO2 Carbon - API Management Application Extension Feature http://wso2.org This feature contains an implementation of a api application registration, which takes care of subscription diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml index 935bddd03a..419a7ff405 100644 --- a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml +++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml @@ -21,14 +21,14 @@ org.wso2.carbon.devicemgt apimgt-extensions-feature - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.apimgt.webapp.publisher.feature pom - 2.0.1 + 2.0.2-SNAPSHOT WSO2 Carbon - API Management Webapp Publisher Feature http://wso2.org This feature contains an implementation of a Tomcat lifecycle listener, which takes care of publishing diff --git a/features/apimgt-extensions/pom.xml b/features/apimgt-extensions/pom.xml index 96a902a236..4913f799f3 100644 --- a/features/apimgt-extensions/pom.xml +++ b/features/apimgt-extensions/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt apimgt-extensions-feature - 2.0.1 + 2.0.2-SNAPSHOT pom WSO2 Carbon - API Management Extensions Feature http://wso2.org diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml index 6dbd27e1ea..4f9ad3f756 100644 --- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml +++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt certificate-mgt-feature - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml index cc9df5f6c4..9a9ae397fc 100644 --- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml +++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt certificate-mgt-feature - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml index c527ef46db..2441cd3a95 100644 --- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml +++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt certificate-mgt-feature - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.certificate.mgt.server.feature pom - 2.0.1 + 2.0.2-SNAPSHOT WSO2 Carbon - Certificate Management Server Feature http://wso2.org This feature contains the core bundles required for back-end Certificate Management functionality diff --git a/features/certificate-mgt/pom.xml b/features/certificate-mgt/pom.xml index 9fc33ab247..73b0ff2212 100644 --- a/features/certificate-mgt/pom.xml +++ b/features/certificate-mgt/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt certificate-mgt-feature - 2.0.1 + 2.0.2-SNAPSHOT pom WSO2 Carbon - Certificate Management Feature http://wso2.org diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml index 47eebc1f9f..40a3ea31a0 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature pom - 2.0.1 + 2.0.2-SNAPSHOT WSO2 Carbon - Device Type Deployer Feature http://wso2.org WSO2 Carbon - Device Type Deployer Feature diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature/pom.xml index ccf30efdef..f41d0028b2 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.feature pom - 2.0.1 + 2.0.2-SNAPSHOT WSO2 Carbon - GCM Based Push Notification Provider Feature http://wso2.org WSO2 Carbon - MQTT Based Push Notification Provider Feature diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml index e8d606765b..bf65373baf 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature pom - 2.0.1 + 2.0.2-SNAPSHOT WSO2 Carbon - MQTT Based Push Notification Provider Feature http://wso2.org WSO2 Carbon - MQTT Based Push Notification Provider Feature diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml index b5c315ca3c..34847bfafe 100644 --- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml +++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-extensions-feature - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature pom - 2.0.1 + 2.0.2-SNAPSHOT WSO2 Carbon - XMPP Based Push Notification Provider Feature http://wso2.org WSO2 Carbon - XMPP Based Push Notification Provider Feature diff --git a/features/device-mgt-extensions/pom.xml b/features/device-mgt-extensions/pom.xml index 18280e151c..c23499534f 100644 --- a/features/device-mgt-extensions/pom.xml +++ b/features/device-mgt-extensions/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../../pom.xml diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml index 3f6ec5fbd1..c4729a2291 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard.feature/pom.xml @@ -3,13 +3,13 @@ org.wso2.carbon.devicemgt device-mgt-feature - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.analytics.dashboard.feature - 2.0.1 + 2.0.2-SNAPSHOT pom WSO2 Carbon - Device Management Dashboard Analytics Feature WSO2 Carbon - Device Management Dashboard Analytics Feature diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml index 1bd9710c0a..9694859a9a 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-feature - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.analytics.data.publisher.feature pom - 2.0.1 + 2.0.2-SNAPSHOT WSO2 Carbon - Device Management Server Feature http://wso2.org This feature contains bundles related to device analytics data publisher diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml index ff52905449..4326523ddf 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-feature - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml index 43a76769fa..b13045ea7d 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml @@ -4,14 +4,14 @@ org.wso2.carbon.devicemgt device-mgt-feature - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.extensions.feature pom - 2.0.1 + 2.0.2-SNAPSHOT WSO2 Carbon - Device Management Extensions Feature http://wso2.org This feature contains common extensions used by key device management functionalities diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml index 1030135729..7f61faeb42 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-feature - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml index 686e230d84..8b8b16c27b 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt device-mgt-feature - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.server.feature pom - 2.0.1 + 2.0.2-SNAPSHOT WSO2 Carbon - Device Management Server Feature http://wso2.org This feature contains the core bundles required for Back-end Device Management functionality diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml index de0172289e..d9bdfbaaf6 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt device-mgt-feature - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml diff --git a/features/device-mgt/pom.xml b/features/device-mgt/pom.xml index a7826241a3..ef0a27c9ca 100644 --- a/features/device-mgt/pom.xml +++ b/features/device-mgt/pom.xml @@ -22,7 +22,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../../pom.xml 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 ecb5a2301b..6f578d3cc9 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 @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt dynamic-client-registration-feature - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.dynamic.client.registration.server.feature pom - 2.0.1 + 2.0.2-SNAPSHOT WSO2 Carbon - Dynamic Client Registration Server Feature http://wso2.org This feature contains dynamic client registration features diff --git a/features/dynamic-client-registration/pom.xml b/features/dynamic-client-registration/pom.xml index dda770e7ad..1b37ffa7b6 100644 --- a/features/dynamic-client-registration/pom.xml +++ b/features/dynamic-client-registration/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt dynamic-client-registration-feature - 2.0.1 + 2.0.2-SNAPSHOT pom WSO2 Carbon - Dynamic Client Registration Feature http://wso2.org diff --git a/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml b/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml index 5f59cab73c..8f671d41a2 100644 --- a/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml +++ b/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt email-sender-feature - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.email.sender.feature pom - 2.0.1 + 2.0.2-SNAPSHOT WSO2 Carbon - Email Sender Feature http://wso2.org This feature contains the core bundles required for email sender related functionality diff --git a/features/email-sender/pom.xml b/features/email-sender/pom.xml index 36525d5c52..0fb098770d 100644 --- a/features/email-sender/pom.xml +++ b/features/email-sender/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt email-sender-feature - 2.0.1 + 2.0.2-SNAPSHOT pom WSO2 Carbon - Email Sender Feature http://wso2.org diff --git a/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml b/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml index 3b5e43fb14..5950c8d150 100644 --- a/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml +++ b/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt jwt-client-feature - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.identity.jwt.client.extension.feature pom - 2.0.1 + 2.0.2-SNAPSHOT WSO2 Carbon - JWT Client Feature http://wso2.org This feature contains jwt client implementation from which we can get a access token using the jwt diff --git a/features/jwt-client/pom.xml b/features/jwt-client/pom.xml index 0bb87caa33..1dacaa2a66 100644 --- a/features/jwt-client/pom.xml +++ b/features/jwt-client/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../../pom.xml 4.0.0 jwt-client-feature - 2.0.1 + 2.0.2-SNAPSHOT pom WSO2 Carbon - Dynamic Client Registration Feature http://wso2.org diff --git a/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml b/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml index 7a27a99aa9..8503da9c08 100644 --- a/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml +++ b/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt oauth-extensions-feature - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.device.mgt.oauth.extensions.feature pom - 2.0.1 + 2.0.2-SNAPSHOT WSO2 Carbon - Device Mgt OAuth Extensions Feature http://wso2.org This feature contains devicemgt related OAuth extensions diff --git a/features/oauth-extensions/pom.xml b/features/oauth-extensions/pom.xml index 05693e6763..40e2485362 100644 --- a/features/oauth-extensions/pom.xml +++ b/features/oauth-extensions/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt oauth-extensions-feature - 2.0.1 + 2.0.2-SNAPSHOT pom WSO2 Carbon - Device Management OAuth Extensions Feature http://wso2.org diff --git a/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml b/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml index 6277af7568..000ff44d89 100644 --- a/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml +++ b/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt policy-mgt-feature - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.policy.mgt.server.feature pom - 2.0.1 + 2.0.2-SNAPSHOT WSO2 Carbon - Policy Management Server Feature http://wso2.org This feature contains the core bundles required for Back-end Device Management functionality diff --git a/features/policy-mgt/pom.xml b/features/policy-mgt/pom.xml index 110abd87fa..f739effc81 100644 --- a/features/policy-mgt/pom.xml +++ b/features/policy-mgt/pom.xml @@ -23,14 +23,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt policy-mgt-feature - 2.0.1 + 2.0.2-SNAPSHOT pom WSO2 Carbon - Policy Management Feature http://wso2.org diff --git a/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml index 78e0078ac3..fa007d4910 100644 --- a/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml +++ b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt webapp-authenticator-framework-feature - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml 4.0.0 org.wso2.carbon.webapp.authenticator.framework.server.feature pom - 2.0.1 + 2.0.2-SNAPSHOT WSO2 Carbon - Webapp Authenticator Framework Server Feature http://wso2.org This feature contains the core bundles required for Back-end Device Management functionality diff --git a/features/webapp-authenticator-framework/pom.xml b/features/webapp-authenticator-framework/pom.xml index 80e9de347f..038460d6c9 100644 --- a/features/webapp-authenticator-framework/pom.xml +++ b/features/webapp-authenticator-framework/pom.xml @@ -22,14 +22,14 @@ org.wso2.carbon.devicemgt carbon-devicemgt - 2.0.1 + 2.0.2-SNAPSHOT ../../pom.xml 4.0.0 org.wso2.carbon.devicemgt webapp-authenticator-framework-feature - 2.0.1 + 2.0.2-SNAPSHOT pom WSO2 Carbon - Webapp Authenticator Framework Feature http://wso2.org diff --git a/pom.xml b/pom.xml index 72f1db5438..9478f11751 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.wso2.carbon.devicemgt carbon-devicemgt pom - 2.0.1 + 2.0.2-SNAPSHOT WSO2 Carbon - Device Management - Parent http://wso2.org WSO2 Connected Device Manager Components @@ -1547,7 +1547,7 @@ https://github.com/wso2/carbon-device-mgt.git scm:git:https://github.com/wso2/carbon-device-mgt.git scm:git:https://github.com/wso2/carbon-device-mgt.git - v2.0.1 + HEAD @@ -1823,7 +1823,7 @@ 1.2.11.wso2v10 - 2.0.1 + 2.0.2-SNAPSHOT 4.4.8