Package org.exoplatform.portal.config

Examples of org.exoplatform.portal.config.UserPortalConfig


         DataStorage dataService = uiForm.getApplicationComponent(DataStorage.class);
         UserPortalConfigService service = uiForm.getApplicationComponent(UserPortalConfigService.class);
         PortalRequestContext prContext = Util.getPortalRequestContext();

         UserPortalConfig userConfig = service.getUserPortalConfig(uiForm.getPortalOwner(), prContext.getRemoteUser());
         if (userConfig != null)
         {
            UIPortal uiPortal = uiForm.createUIComponent(UIPortal.class, null, null);
            PortalDataMapper.toUIPortal(uiPortal, userConfig);
View Full Code Here


            return;
         }

         UserPortalConfigService service = uiForm.getApplicationComponent(UserPortalConfigService.class);
         service.createUserPortalConfig(PortalConfig.PORTAL_TYPE, portalName, template);
         UserPortalConfig userPortalConfig = service.getUserPortalConfig(portalName, pcontext.getRemoteUser());
         PortalConfig pconfig = userPortalConfig.getPortalConfig();
         uiForm.invokeSetBindingBean(pconfig);
         PageNavigation navigation = dataService.getPageNavigation(PortalConfig.PORTAL_TYPE, portalName);
         dataService.save(pconfig);
         dataService.save(navigation);
         UIPortalApplication uiPortalApp = event.getSource().getAncestorOfType(UIPortalApplication.class);
View Full Code Here

      // Looks like some necessary hacking
      if (context instanceof PortalRequestContext)
      {
         PortalRequestContext portalRC = (PortalRequestContext)context;
         UserPortalConfig config = getUserPortalConfig(portalRC);
         if (config == null)
         {
            HttpServletResponse response = portalRC.getResponse();
            response.sendRedirect(portalRC.getRequest().getContextPath() + "/portal-unavailable.jsp");
            portalRC.setResponseComplete(true);
View Full Code Here

      PortalRequestContext pcontext = Util.getPortalRequestContext();
      UserPortalConfigService configService = getApplicationComponent(UserPortalConfigService.class);
      List<SelectItemOption<String>> ownerTypes = new ArrayList<SelectItemOption<String>>();
      ownerTypes.add(new SelectItemOption<String>(PortalConfig.USER_TYPE));

      UserPortalConfig userPortalConfig =
         configService.getUserPortalConfig(pcontext.getPortalOwner(), pcontext.getRemoteUser());
      ExoContainer container = ExoContainerContext.getCurrentContainer();
      UserACL acl = (UserACL)container.getComponentInstanceOfType(UserACL.class);
      if (acl.hasEditPermission(userPortalConfig.getPortalConfig()))
      {
         ownerTypes.add(new SelectItemOption<String>(PortalConfig.PORTAL_TYPE));
      }
      ownerIdInput = new UIFormStringInput(OWNER_ID, OWNER_ID, null);
      ownerIdInput.setEditable(false).setValue(pcontext.getRemoteUser());
View Full Code Here

         UIPortalApplication uiApp = Util.getUIPortalApplication();

         UIPortal uiPortal = uiApp.getShowedUIPortal();

         UserPortalConfigService service = uiApp.getApplicationComponent(UserPortalConfigService.class);
         UserPortalConfig userConfig =
            service.getUserPortalConfig(uiPortal.getName(), event.getRequestContext().getRemoteUser());
         if (userConfig == null)
            userConfig = uiApp.getUserPortalConfig();
        
         PortalConfig portalConfig = userConfig.getPortalConfig();

         UserACL userACL = uiPortal.getApplicationComponent(UserACL.class);
         if (!userACL.hasEditPermission(portalConfig))
         {
            uiApp.addMessage(new ApplicationMessage("UIPortalManagement.msg.Invalid-EditLayout-Permission",
View Full Code Here

               uiPortalApp.setShowedUIPortal(cachedUIPortal);
              
               //Temporary solution to fix edit inline error while switching between navigations
               DataStorage storageService = uiPortalApp.getApplicationComponent(DataStorage.class);
               PortalConfig associatedPortalConfig = storageService.getPortalConfig(newNavType, newNavId);
               UserPortalConfig userPortalConfig = uiPortalApp.getUserPortalConfig();
              
               //Update layout-related data on UserPortalConfig
               userPortalConfig.setPortal(associatedPortalConfig);

               //Update selected navigation on UserPortalConfig, that is mandatory as at the moment the PortalConfig
               //does not hold any navigation data.
               userPortalConfig.updateSelectedNavigation(newNavType, newNavId);
              
               cachedUIPortal.refreshUIPage();
               return;
            }
            else
View Full Code Here

            return;
         }
        
         if(PortalConfig.PORTAL_TYPE.equals(navigation.getOwnerType()))
         {
            UserPortalConfig portalConfig = portalConfigService.getUserPortalConfig(navigation.getOwnerId(), prContext.getRemoteUser());
            if(portalConfig != null)
            {
               dataService.save(navigation);
            }
            else
View Full Code Here

   private List<PageNavigation> getExistedNavigation(String portalName, String ownerType) throws Exception
   {
      PortalRequestContext prContext = Util.getPortalRequestContext();
      UserPortalConfigService configService = getApplicationComponent(UserPortalConfigService.class);
      UserPortalConfig config = configService.getUserPortalConfig(portalName, prContext.getRemoteUser());
      List<PageNavigation> navis = config.getNavigations();
      if (ownerType != null)
      {
         Iterator<PageNavigation> itr = navis.iterator();
         while (itr.hasNext())
         {
View Full Code Here

TOP

Related Classes of org.exoplatform.portal.config.UserPortalConfig

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.