Package org.exoplatform.portal.config

Examples of org.exoplatform.portal.config.UserPortalConfig


   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


               uiPortalApp.setShowedUIPortal(showedUIPortal);
              
               //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);
            }
            else
            {
               showedUIPortal = buildUIPortal(targetedNav, uiPortalApp, uiPortalApp.getUserPortalConfig());
               if(showedUIPortal == null)
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

      {
         editPortal = (UIPortal)uiEditWS.getUIComponent();
      }
      else
      {
         UserPortalConfig userConfig = service.getUserPortalConfig(getPortalOwner(), prContext.getRemoteUser());
         editPortal = this.createUIComponent(UIPortal.class, null, null);
         PortalDataMapper.toUIPortal(editPortal, userConfig);
      }

      invokeGetBindingBean(editPortal);
View Full Code Here

         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

        SiteKey siteKey = SiteKey.portal(requestSiteName);
        String uri = requestPath;

        // Resolve the user node if node path is indicated
        if (!requestPath.equals("")) {
            UserPortalConfig cfg = userPortalService.getUserPortalConfig(requestSiteName, context.getRequest().getRemoteUser(),
                    userPortalContext);
            if (cfg != null) {
                UserPortal userPortal = cfg.getUserPortal();
                UserNodeFilterConfig.Builder builder = UserNodeFilterConfig.builder().withAuthMode(
                        UserNodeFilterConfig.AUTH_READ);
                UserNode userNode = userPortal.resolvePath(builder.build(), requestPath);

                if (userNode != null) {
View Full Code Here

        }
        return url;
    }

    public UserPortal getUserPortal() {
        UserPortalConfig upc = getUserPortalConfig();
        if (upc != null) {
            return upc.getUserPortal();
        } else {
            return null;
        }
    }
View Full Code Here

    public SiteKey getSiteKey() {
        return siteKey;
    }

    public String getPortalOwner() {
        UserPortalConfig userPortalConfig = getUserPortalConfig();
        if (userPortalConfig != null) {
            return userPortalConfig.getPortalName();
        } else {
            return null;
        }
    }
View Full Code Here

            if (PortalConfig.PORTAL_TYPE.equals(ownerType)) {
                String[] accessPermissions = {};
                String editPermission = "";
                String portalIdSelected = uiForm.portalIdSelectBox.getValue();
                UserPortalConfigService service = uiForm.getApplicationComponent(UserPortalConfigService.class);
                UserPortalConfig userConfig = service.getUserPortalConfig(portalIdSelected, Util.getPortalRequestContext()
                        .getRemoteUser());
                if (userConfig != null) {
                    PortalConfig config = userConfig.getPortalConfig();
                    accessPermissions = config.getAccessPermissions();
                    editPermission = config.getEditPermission();
                    uiForm.findFirstComponentOfType(UIListPermissionSelector.class).setValue(accessPermissions);
                    uiForm.findFirstComponentOfType(UIPermissionSelector.class).setValue(editPermission);
                }
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.