/** * Deletes the group. * * @param groupEntity * @throws IdentityProvisioningException */ private void deleteGroup(ProvisioningEntity groupEntity) throws IdentityProvisioningException { String groupName = null; try { List<String> groupNames = getGroupNames(groupEntity.getAttributes()); if (CollectionUtils.isNotEmpty(groupNames)) { groupName = groupNames.get(0); } Group group = new Group(); group.setDisplayName(groupName); ProvisioningClient scimProvsioningClient = new ProvisioningClient(scimProvider, group, null); scimProvsioningClient.provisionDeleteGroup(); } catch (Exception e) { throw new IdentityProvisioningException("Error while deleting group : " + groupName, e); } }
/** * Get group with only meta attributes. * * @param groupName * @return * @throws CharonException * @throws IdentitySCIMException * @throws org.wso2.carbon.user.core.UserStoreException */ private Group getGroupOnlyWithMetaAttributes(String groupName) throws CharonException, IdentitySCIMException, org.wso2.carbon.user.core.UserStoreException, BadRequestException { //get other group attributes and set. Group group = new Group(); group.setDisplayName(groupName); SCIMGroupHandler groupHandler = new SCIMGroupHandler(carbonUM.getTenantId()); return groupHandler.getGroupWithAttributes(group, groupName); }
group.setDisplayName(groupName); List<String> userList = getUserNames(groupEntity.getAttributes()); setGroupMembers(group, userList);
/** * Creates the group. * * @param groupEntity * @return * @throws IdentityProvisioningException */ private String createGroup(ProvisioningEntity groupEntity) throws IdentityProvisioningException { String groupName = null; try { List<String> groupNames = getGroupNames(groupEntity.getAttributes()); if (CollectionUtils.isNotEmpty(groupNames)) { groupName = groupNames.get(0); } Group group = new Group(); group.setDisplayName(groupName); List<String> userList = getUserNames(groupEntity.getAttributes()); setGroupMembers(group, userList); ProvisioningClient scimProvsioningClient = new ProvisioningClient(scimProvider, group, null); scimProvsioningClient.provisionCreateGroup(); } catch (Exception e) { throw new IdentityProvisioningException("Error while adding group : " + groupName, e); } return null; }
userStoreDomainFromSP + "Hence group updating fail"); oldGroup.setDisplayName(IdentityUtil.addDomainToName(UserCoreUtil.removeDomainFromName(oldGroup.getDisplayName()), IdentityUtil.extractDomainFromName(oldGroup.getDisplayName()))); newGroup.setDisplayName(IdentityUtil.addDomainToName(UserCoreUtil.removeDomainFromName(newGroup.getDisplayName()), IdentityUtil.extractDomainFromName(newGroup.getDisplayName()))); .equals(primaryDomain))) { String userStoreDomain = IdentityUtil.extractDomainFromName(oldGroup.getDisplayName()); newGroup.setDisplayName(IdentityUtil.addDomainToName(newGroup.getDisplayName(), userStoreDomain)); newGroup.setDisplayName(SCIMCommonUtils.getGroupNameWithDomain(newGroup.getDisplayName())); oldGroup.setDisplayName(SCIMCommonUtils.getGroupNameWithDomain(oldGroup.getDisplayName()));
"enabled for user store " + domainName); group.setDisplayName(roleNameWithDomain);
group.setDisplayName(groupName); String[] userNames = carbonUM.getUserListOfRole(groupName);
group.setDisplayName(SCIMCommonUtils.removeDomainFromName(group.getDisplayName()));