Package org.rhq.core.domain.resource.group

Examples of org.rhq.core.domain.resource.group.ResourceGroup.removeRole()


                Role doomedRole = entityManager.find(Role.class, roleId);
                if (doomedRole == null) {
                    throw new IllegalArgumentException("Tried to remove role[" + roleId + "] from resourceGroup["
                        + groupId + "], but role was not found");
                }
                group.removeRole(doomedRole);
            }
        }

        return;
    }
View Full Code Here


        // create a copy of the collection in order to avoid ConcurrentModificationException
        // (as a consequence of iterating and modifying it at once).
        Set<Role> roles = new HashSet<Role>(group.getRoles());
        for (Role doomedRoleRelationship : roles) {
            group.removeRole(doomedRoleRelationship);
            entityManager.merge(doomedRoleRelationship);
        }

        // remove all resources in the group
        resourceGroupManager.removeAllResourcesFromGroup(subject, groupId);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.