Package org.exoplatform.container

Examples of org.exoplatform.container.ExoContainer


      try
      {
         callbackHandler.handle(callbacks);
         String password = new String(((PasswordCallback)callbacks[1]).getPassword());

         ExoContainer container = getContainer();
         Object o =
            ((TransientTokenService)container.getComponentInstanceOfType(TransientTokenService.class)).validateToken(
               password, true);
         if (o == null)
            o =
               ((CookieTokenService)container.getComponentInstanceOfType(CookieTokenService.class)).validateToken(
                  password, false);
         //

         // For clustered config check credentials stored and propagated in session. This won't work in tomcat because
         // of lack of JACC PolicyContext so the code must be a bit defensive
View Full Code Here


   public void importExoGadgets() throws Exception
   {
      ContentRegistry registry = getContentRegistry();

      //
      ExoContainer container = ExoContainerContext.getCurrentContainer();
      GadgetRegistryService gadgetService = (GadgetRegistryService)container.getComponentInstanceOfType(GadgetRegistryService.class);
      List<Gadget> eXoGadgets = gadgetService.getAllGadgets();

      //
      if (eXoGadgets != null)
      {
View Full Code Here

      //
      log.info("About to import portlets in application registry");

      //
      ExoContainer manager = ExoContainerContext.getCurrentContainer();
      PortletInvoker portletInvoker = (PortletInvoker)manager.getComponentInstance(PortletInvoker.class);
      Set<org.gatein.pc.api.Portlet> portlets = portletInvoker.getPortlets();

      //
      portlet:
      for (org.gatein.pc.api.Portlet portlet : portlets)
View Full Code Here

         //
         PageNode node = uiportal.getSelectedNode();
         if (node != null)
         {
            ExoContainer container = getApplication().getApplicationServiceContainer();
            container.getComponentInstanceOfType(UserPortalConfigService.class);
            UserPortalConfigService configService = (UserPortalConfigService)container.getComponentInstanceOfType(UserPortalConfigService.class);
            Page page = configService.getPage(node.getPageReference(), getRemoteUser());

            //
            if (page != null)
            {
View Full Code Here

   }

   @SuppressWarnings("unused")
   public void onStartRequest(Application app, WebuiRequestContext rcontext) throws Exception
   {
      ExoContainer pcontainer = ExoContainerContext.getCurrentContainer();
      SessionContainer.setInstance(((SessionManagerContainer)pcontainer).getSessionManager().getSessionContainer(
         rcontext.getSessionId()));
   }
View Full Code Here

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

     }
View Full Code Here

   }

   @Override
   protected ListAccess<Membership> create(String state) throws Exception
   {
      ExoContainer container = PortalContainer.getInstance();
      OrganizationService service = (OrganizationService)container.getComponentInstance(OrganizationService.class);
      MembershipHandler handler = service.getMembershipHandler();
      Group group = service.getGroupHandler().findGroupById(state);
      List<Membership> memberships = (List<Membership>)handler.findMembershipsByGroup(group);
      return new ListAccessImpl<Membership>(Membership.class, memberships);
   }
View Full Code Here

      super(state, pageSize);
   }

   protected ListAccess<User> create(Query state) throws Exception
   {
      ExoContainer container = PortalContainer.getInstance();
      OrganizationService service = (OrganizationService)container.getComponentInstance(OrganizationService.class);
      PageList<User> pageList = service.getUserHandler().findUsers(state);
      return Safe.unwrap(pageList);
   }
View Full Code Here

      return Collections.emptyList();
   }

   private List<Application> createApplicationsFromPortlets(boolean remote) throws PortletInvokerException
   {
      ExoContainer manager = ExoContainerContext.getCurrentContainer();

      FederatingPortletInvoker portletInvoker =
         (FederatingPortletInvoker)manager.getComponentInstance(PortletInvoker.class);
      Set<Portlet> portlets = remote ? portletInvoker.getRemotePortlets() : portletInvoker.getLocalPortlets();
      List<Application> applications = new ArrayList<Application>(portlets.size());
      for (Portlet portlet : portlets)
      {
         PortletInfo info = portlet.getInfo();
View Full Code Here

   }

   @Override
   protected ListAccess<UIMembershipType> connect() throws Exception
   {
      ExoContainer container = PortalContainer.getInstance();
      OrganizationService service = (OrganizationService)container.getComponentInstance(OrganizationService.class);
      List<MembershipType> memberships = (List<MembershipType>)service.getMembershipTypeHandler().findMembershipTypes();
     
      return new ListAccessImpl<UIMembershipType>(UIMembershipType.class, convertMembershipTypes(memberships));
   }
View Full Code Here

TOP

Related Classes of org.exoplatform.container.ExoContainer

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.