0 Replies Latest reply on Jan 15, 2015 2:48 AM by poornima.abhi

    How can I Remove User with specific Membership from a Group

    poornima.abhi

      Hi All

      In my application I am using Gatein3.6. I was able to create a new Group and linked a user to that Group with

      a specific Membership, using Gatein API. I used the following code for this:

       

                  OrganizationService orgService = (OrganizationService)PortalContainer.getInstance().getComponentInstanceOfType(OrganizationService.class);

                  group = orgService.getGroupHandler().findGroupById(groupName);

                  user=orgService.getUserHandler().findUserByName(userName);

                  memberShipType=orgService.getMembershipTypeHandler().findMembershipType(membershipName);

                  orgService.getMembershipHandler().linkMembership(user, group, memberShipType, false);

                 

      Now I want to remove the user with specific Membership from that Group. Is there any method for doing this?

      Thanks in advance...

      Poornima