class UserAssignedGroupsExplorer extends UserAssignedEntitiesExplorer<Group> implements IsWidget,
                                                                                               org.uberfire.ext.security.management.client.editor.user.UserAssignedGroupsExplorer {

    @Override
    protected void removeEntity(String name) {
        // Remove the group from the local cache.
        Iterator<Group> groups = this.entities.iterator();
        while (groups.hasNext()) {
            final Group g = groups.next();
            if (g.getName().equals(name)) {
                groups.remove();
            }
        }

        // Reload view.
        doShow();

        // Fire the event for any others components listening.
        removeUserGroupEventEvent.fire(new OnRemoveUserGroupEvent(UserAssignedGroupsExplorer.this,
                                                                  name));
    }

    @Inject public  UserAssignedGroupsExplorer(final ClientUserSystemManager userSystemManager,
                                      final ConfirmBox confirmBox,
                                      final GroupsList groupList,
                                      final AssignedEntitiesExplorer view,
                                      final Event<OnRemoveUserGroupEvent> removeUserGroupEventEvent);

}