Examples of OrganizationService


Examples of com.github.api.v2.services.OrganizationService

   * @throws Exception
   *             the exception
   */
  public static void main(String[] args) throws Exception {
    GitHubServiceFactory factory = GitHubServiceFactory.newInstance();
    OrganizationService service = factory.createOrganizationService();
    Organization organization = service.getOrganization("github");
    printResult(organization);
    List<User> publicMembers = service.getPublicMembers("github");
    for (User user : publicMembers) {
      printResult(user);
    }
    List<Repository> publicRepositories = service.getPublicRepositories("github");
    for (Repository repository : publicRepositories) {
      printResult(repository);     
    }
  }
View Full Code Here

Examples of org.as.jtrello.organizations.OrganizationService

   */
  public JTrelloClient(String authKey, String secretKey, String authToken) {
    Config config = Config.getInstance(authKey, secretKey, authToken);
     
    this.members     = new MemberService(config);
    this.organizations   = new OrganizationService(config);
    this.boards     = new BoardService(config);
    this.lists      = new ListService(config);
    this.cards      = new CardService(config);
    this.checklists    = new ChecklistService(config);
    this.notifications  = new NotificationService(config);
View Full Code Here

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

Examples of org.exoplatform.services.organization.OrganizationService

   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

Examples of org.exoplatform.services.organization.OrganizationService

   }

   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

Examples of org.exoplatform.services.organization.OrganizationService

     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

Examples of org.exoplatform.services.organization.OrganizationService

      {
         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

Examples of org.exoplatform.services.organization.OrganizationService

      {
         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

Examples of org.exoplatform.services.organization.OrganizationService

   {
      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

Examples of org.exoplatform.services.organization.OrganizationService

         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
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.