Package org.exoplatform.services.organization

Examples of org.exoplatform.services.organization.GroupHandler.findGroupById()


   }

   public void testGroupLayout() throws Exception
   {
      GroupHandler groupHandler = org.getGroupHandler();
      Group group = groupHandler.findGroupById("groupTest");
      assertNull(group);

      group = groupHandler.createGroupInstance();
      group.setGroupName("groupTest");
      group.setLabel("group label");
View Full Code Here


      group.setGroupName("groupTest");
      group.setLabel("group label");

      groupHandler.addChild(null, group, true);

      group = groupHandler.findGroupById("/groupTest");
      assertNotNull(group);

      PortalConfig pConfig = storage.getPortalConfig(PortalConfig.GROUP_TYPE, "/groupTest");
      assertNotNull("the Group's PortalConfig is not null", pConfig);
      assertTrue(pConfig.getPortalLayout().getChildren() == null || pConfig.getPortalLayout().getChildren().size() == 4);
View Full Code Here

       * handler is shared between the tests and can cause other tests
       * to fail.
       * TODO: make the tests fully independent
       */
      groupHandler.removeGroup(group, false);
      group = groupHandler.findGroupById("/groupTest");
      assertNull(group);
   }

   public void testUserLayout() throws Exception
   {
View Full Code Here

        MembershipTypeHandler mtHandler = service.getMembershipTypeHandler();
        User user = service.getUserHandler().findUserByName(user_);
        for (Membership membership : membership_) {
            if (user == null)
                user = service.getUserHandler().findUserByName(membership.getUserName());
            Group group = groupHandler.findGroupById(membership.getGroupId());
            MembershipType mt = mtHandler.findMembershipType(membership.getMembershipType());
            if (service.getMembershipHandler() != null) {
                service.getMembershipHandler().linkMembership(user, group, mt, broadcast);
            }
        }
View Full Code Here

            if (currentGroupId != null) {
                groupName = currentGroupId + groupName;
            }

            Group newGroup = groupHandler.findGroupById(groupName);
            if (newGroup != null) {
                Object[] args = { groupName };
                UIApplication uiApp = event.getRequestContext().getUIApplication();
                uiApp.addMessage(new ApplicationMessage("UIGroupForm.msg.group-exist", args));
                return;
View Full Code Here

            if (currentGroupId == null) {
                groupHandler.addChild(null, newGroup, true);
                // uiGroupExplorer.changeGroup(groupName) ;
                changeGroupId = groupName;
            } else {
                Group parrentGroup = groupHandler.findGroupById(currentGroupId);
                groupHandler.addChild(parrentGroup, newGroup, true);
                // uiGroupExplorer.changeGroup(currentGroupId) ;
                changeGroupId = currentGroupId;
            }
View Full Code Here

         if (currentGroupId != null)
         {
            groupName = currentGroupId + groupName;
         }

         Group newGroup = groupHandler.findGroupById(groupName);
         if (newGroup != null)
         {
            Object[] args = {groupName};
            UIApplication uiApp = event.getRequestContext().getUIApplication();
            uiApp.addMessage(new ApplicationMessage("UIGroupForm.msg.group-exist", args));
View Full Code Here

            //uiGroupExplorer.changeGroup(groupName) ;
            changeGroupId = groupName;
         }
         else
         {
            Group parrentGroup = groupHandler.findGroupById(currentGroupId);
            groupHandler.addChild(parrentGroup, newGroup, true);
            //uiGroupExplorer.changeGroup(currentGroupId) ;
            changeGroupId = currentGroupId;
         }
View Full Code Here

      if (LOG.isDebugEnabled())
         LOG.debug("+++++++++++FIND USER BY GROUP_ID " + groupId);

      MembershipHandler membershipHandler = orgService.getMembershipHandler();
      GroupHandler groupHandler = orgService.getGroupHandler();
      Group group = groupHandler.findGroupById(groupId);
      if (group == null)
      {
         return new LazyListImpl();
      }
View Full Code Here

   {
      LOG.info("Create User Profile: " + event.getData().getUserName());
      UserProfile profile = service_.getUserProfileHandler().createUserProfileInstance(event.getData().getUserName());
      service_.getUserProfileHandler().saveUserProfile(profile, true);
      GroupHandler groupHandler = service_.getGroupHandler();
      Group g = groupHandler.findGroupById("/user");
      MembershipTypeHandler membershipTypeHandler = service_.getMembershipTypeHandler();
      MembershipType memberType = membershipTypeHandler.findMembershipType("member");

      if (g == null)
      {
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.