Package org.exoplatform.services.organization

Examples of org.exoplatform.services.organization.OrganizationService


      if (userACL.isUserInGroup(userACL.getAdminGroups()))
      {
         return true;
      }

      OrganizationService orgService = this.getApplicationComponent(OrganizationService.class);
      try
      {
         Collection<?> groups = orgService.getGroupHandler().findGroupByMembership(remoteUser, userACL.getMakableMT());
         if (groups != null && groups.size() > 0)
         {
            return true;
         }
         else
View Full Code Here


   public void testWorkspace() throws Exception
   {
      PortalContainer container = PortalContainer.getInstance();
      HibernateService hibernate = (HibernateService)container.getComponentInstanceOfType(HibernateService.class);
      assertNotNull(hibernate);
      OrganizationService organization = (OrganizationService)container.getComponentInstanceOfType(OrganizationService.class);
      assertNotNull(organization);
   }
View Full Code Here

   }

   public void testBasicOperation() throws Exception
   {
      PortalContainer container = PortalContainer.getInstance();
      OrganizationService organization = (OrganizationService)container.getComponentInstanceOfType(OrganizationService.class);
      assertNotNull(organization);

      begin();
      User test = new UserImpl("testUser");
      organization.getUserHandler().createUser(test, false);

      test = organization.getUserHandler().findUserByName("toto");
      assertNull(test);
      test = organization.getUserHandler().findUserByName("testUser");
      assertNotNull(test);
      end();
   }
View Full Code Here

     if (user != null)
     {
       ExoContainer exoContainer = app.getApplicationServiceContainer();
       if (exoContainer != null)
       {
         OrganizationService organizationService = (OrganizationService) exoContainer
         .getComponentInstanceOfType(OrganizationService.class);
         userProfile = organizationService.getUserProfileHandler().findUserProfileByName(user);
       }

     }
    
     currentUserProfile.set(userProfile);
View Full Code Here

      {
         pageList = EmptySerializablePageList.get();
      }
      else
      {
         OrganizationService service = getApplicationComponent(OrganizationService.class);
         MembershipHandler handler = service.getMembershipHandler();
         List<?> memberships = (List<?>)handler.findMembershipsByGroup(group);
         pageList = new FindMembershipByGroupPageList(group.getId(), 10);
      }
      UIGridUser uiGrid = getChild(UIGridUser.class);
      pageList.setPageSize(5);
View Full Code Here

      {
         UIUserInGroup uiUserInGroup = event.getSource();
         String id = event.getRequestContext().getRequestParameter(OBJECTID);
         UIPageIterator pageIterator = uiUserInGroup.getChild(UIGridUser.class).getUIPageIterator();
         int currentPage = pageIterator.getCurrentPage();
         OrganizationService service = uiUserInGroup.getApplicationComponent(OrganizationService.class);
         MembershipHandler handler = service.getMembershipHandler();
         handler.removeMembership(id, true);
         uiUserInGroup.refresh();
         while (currentPage > pageIterator.getAvailablePage())
            currentPage--;
         pageIterator.setCurrentPage(currentPage);
View Full Code Here

   {
      public void execute(Event<UIUserInGroup> event) throws Exception
      {
         UIUserInGroup uiUserInGroup = event.getSource();
         String id = event.getRequestContext().getRequestParameter(OBJECTID);
         OrganizationService service = uiUserInGroup.getApplicationComponent(OrganizationService.class);
         MembershipHandler handler = service.getMembershipHandler();
         UIPopupWindow uiPopup = uiUserInGroup.getChild(UIPopupWindow.class);
         UIGroupEditMembershipForm uiEditMemberShip =
            uiUserInGroup.createUIComponent(UIGroupEditMembershipForm.class, null, null);
         uiEditMemberShip.setValue(handler.findMembership(id), uiUserInGroup.getSelectedGroup());
         uiPopup.setUIComponent(uiEditMemberShip);
View Full Code Here

         return null;
      }

      private MembershipUser toMembershipUser(Membership membership) throws Exception
      {
         OrganizationService service = getApplicationComponent(OrganizationService.class);
         String userName = membership.getUserName();
         UserHandler handler = service.getUserHandler();
         User user = handler.findUserByName(userName);
         if (user == null)
            return null;
         return new MembershipUser(user, membership.getMembershipType(), membership.getId());
      }
View Full Code Here

      {
         // Invalidate the captcha image
         PortalRequestContext prContext = Util.getPortalRequestContext();
         UIRegisterForm registerForm = event.getSource();
         OrganizationService orgService = registerForm.getApplicationComponent(OrganizationService.class);
         UserHandler userHandler = orgService.getUserHandler();
         WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
         UIRegisterInputSet registerInput = registerForm.getChild(UIRegisterInputSet.class);

         if (registerInput.save(userHandler, context))
         {
View Full Code Here

      @Override
      public void execute(Event<UIRegisterForm> event) throws Exception
      {
         UIRegisterForm registerForm = event.getSource();
         OrganizationService orgService = registerForm.getApplicationComponent(OrganizationService.class);
         UIRegisterInputSet registerInput = registerForm.getChild(UIRegisterInputSet.class);
         UIFormStringInput userNameInput = registerInput.getUIStringInput(UIRegisterInputSet.USER_NAME);
         MandatoryValidator validator = new MandatoryValidator();
         try
         {
View Full Code Here

TOP

Related Classes of org.exoplatform.services.organization.OrganizationService

Copyright © 2018 www.massapicom. 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.