Package org.exoplatform.portal.config

Examples of org.exoplatform.portal.config.UserPortalConfig


         String portalName = event.getRequestContext().getRequestParameter(OBJECTID);
         UserPortalConfigService service = uicomp.getApplicationComponent(UserPortalConfigService.class);
         PortalRequestContext prContext = Util.getPortalRequestContext();
         UIPortalApplication portalApp = (UIPortalApplication)prContext.getUIApplication();

         UserPortalConfig userConfig = service.getUserPortalConfig(portalName, prContext.getRemoteUser());

         if (userConfig == null)
         {
            portalApp.addMessage(new ApplicationMessage("UISiteManagement.msg.portal-not-exist",
               new String[]{portalName}));
            return;
         }
         PortalConfig portalConfig = userConfig.getPortalConfig();

         UserACL userACL = portalApp.getApplicationComponent(UserACL.class);
         if (!userACL.hasEditPermission(portalConfig))
         {
            portalApp.addMessage(new ApplicationMessage("UISiteManagement.msg.Invalid-editPermission",
View Full Code Here


         UIApplication uiApplication = context.getUIApplication();
        
         //Minh Hoang TO: User could edit navigation if he/she has edit permissions on PortalConfig. That is not
         //at all logical and should be modified after release 3.1 GA
         UserPortalConfigService configService = uicomp.getApplicationComponent(UserPortalConfigService.class);
         UserPortalConfig userPortalConfig = configService.getUserPortalConfig(portalName, context.getRemoteUser());
         if(userPortalConfig == null)
         {
            uiApplication.addMessage(new ApplicationMessage("UISiteManagement.msg.portal-not-exist",
               new String[]{portalName}));
            return;
         }
        
         UserACL userACL = uicomp.getApplicationComponent(UserACL.class);
         if (!userACL.hasEditPermission(userPortalConfig.getPortalConfig()))
         {
            uiApplication.addMessage(new ApplicationMessage("UISiteManagement.msg.Invalid-editPermission", null));;
            return;
         }
        
View Full Code Here

            uiPortalApp.addMessage(new ApplicationMessage("UISiteManagement.msg.delete-default-portal",
               new String[]{defaultPortalName}, ApplicationMessage.WARNING));
            return;
         }

         UserPortalConfig config = service.getUserPortalConfig(portalName, prContext.getRemoteUser());
         if (config != null && config.getPortalConfig().isModifiable())
         {
            service.removeUserPortalConfig(portalName);
         }
         else if (config != null)
         {
            uiPortalApp.addMessage(new ApplicationMessage("UISiteManagement.msg.Invalid-deletePermission",
               new String[]{config.getPortalConfig().getName()}));;
            return;
         }
         else
         {
            if (uicomp.stillKeptInPageList(portalName))
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

                    uiPortalApp.setCurrentSite(showedUIPortal);

                    DataStorage storageService = uiPortalApp.getApplicationComponent(DataStorage.class);
                    PortalConfig associatedPortalConfig = storageService.getPortalConfig(targetNav.getKey().getTypeName(),
                            targetNav.getKey().getName());
                    UserPortalConfig userPortalConfig = pcontext.getUserPortalConfig();

                    // Update layout-related data on UserPortalConfig
                    userPortalConfig.setPortalConfig(associatedPortalConfig);
                } else {
                    showedUIPortal = buildUIPortal(targetNav.getKey(), uiPortalApp, pcontext.getUserPortalConfig());
                    if (showedUIPortal == null) {
                        return;
                    }
View Full Code Here

            if (portalConfig == null) {
                log.debug("About to create user site for user " + userName);
                configService.createUserSite(userName);
            }

            UserPortalConfig userPortalConfig = context.getUserPortalConfig();
            UserPortal userPortal = userPortalConfig.getUserPortal();
            SiteKey siteKey = context.getSiteKey();
            UserNavigation nav = userPortal.getNavigation(siteKey);

            try {
                UserNode rootNode = userPortal.getNode(nav, Scope.CHILDREN, UserNodeFilterConfig.builder().build(), null);
View Full Code Here

        prContext.refreshResourceBundle();
    }

    private void rebuildUIPortal(UIPortalApplication uiPortalApp, UIPortal uiPortal, DataStorage storage) throws Exception {
        PortalConfig portalConfig = storage.getPortalConfig(uiPortal.getSiteType().getName(), uiPortal.getName());
        UserPortalConfig userPortalConfig = Util.getPortalRequestContext().getUserPortalConfig();
        userPortalConfig.setPortalConfig(portalConfig);
        uiPortal.getChildren().clear();
        PortalDataMapper.toUIPortal(uiPortal, userPortalConfig.getPortalConfig());

        uiPortalApp.putCachedUIPortal(uiPortal);

    }
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

                setCurrentSite(tmp);
                if (SiteType.PORTAL.equals(siteKey.getType())) {
                    PortalRequestContext pcontext = Util.getPortalRequestContext();
                    if (pcontext != null) {
                        UserPortalConfig userPortalConfig = pcontext.getUserPortalConfig();
                        userPortalConfig.setPortalConfig(portalConfig);
                    }
                }
            }
        }
    }
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.