Examples of UserPortalConfigService


Examples of org.exoplatform.portal.config.UserPortalConfigService

    }

    public void loadGroups() throws Exception {

        PortalRequestContext pContext = Util.getPortalRequestContext();
        UserPortalConfigService dataService = getApplicationComponent(UserPortalConfigService.class);
        UserACL userACL = getApplicationComponent(UserACL.class);
        OrganizationService orgService = getApplicationComponent(OrganizationService.class);
        final List<String> listGroup = new ArrayList<String>();

        // get all group that user has permission
        if (userACL.isUserInGroup(userACL.getAdminGroups()) && !userACL.getSuperUser().equals(pContext.getRemoteUser())) {
            Collection<?> temp = orgService.getGroupHandler().findGroupsOfUser(pContext.getRemoteUser());
            if (temp != null) {
                for (Object group : temp) {
                    Group m = (Group) group;
                    String groupId = m.getId().trim();
                    listGroup.add(groupId);
                }
            }
        } else {
            listGroup.addAll(dataService.getMakableNavigations(pContext.getRemoteUser(), false));
        }

        // Filter all groups having navigation
        NavigationService navigationService = getApplicationComponent(NavigationService.class);
        List<String> groupsHavingNavigation = new ArrayList<String>();
View Full Code Here

Examples of org.exoplatform.portal.config.UserPortalConfigService

            UIPageBrowser uiPageBrowser = event.getSource();
            String id = event.getRequestContext().getRequestParameter(OBJECTID);
            WebuiRequestContext ctx = event.getRequestContext();
            UIApplication uiApp = ctx.getUIApplication();
            UIPageSelector uiPageSelector = uiPageBrowser.getAncestorOfType(UIPageSelector.class);
            UserPortalConfigService service = uiPageBrowser.getApplicationComponent(UserPortalConfigService.class);
            UserACL userACL = uiPageBrowser.getApplicationComponent(UserACL.class);
            if (!userACL.hasPermission(service.getPageService().loadPage(PageKey.parse(id)))) {
                uiApp.addMessage(new ApplicationMessage("UIPageBrowser.msg.NoPermission", new String[] { id }));
            }
            uiPageSelector.setValue(id);
            // uiPageBrowser.feedDataWithQuery(null);
View Full Code Here

Examples of org.exoplatform.portal.config.UserPortalConfigService

                        new String[] { ownerId }));
            } else {
                // Create portal config of the group when it does not exist
                DataStorage dataService = uicomp.getApplicationComponent(DataStorage.class);
                if (dataService.getPortalConfig("group", ownerId) == null) {
                    UserPortalConfigService configService = uicomp.getApplicationComponent(UserPortalConfigService.class);
                    configService.createGroupSite(ownerId);
                }

                // create navigation for group
                SiteKey key = SiteKey.group(ownerId);
                NavigationContext existing = navigationService.loadNavigation(key);
View Full Code Here

Examples of org.exoplatform.portal.config.UserPortalConfigService

        if (selectedItemOption_ == null)
            return null;
        Object temp = selectedItemOption_.getValue();
        if (temp == null)
            return null;
        UserPortalConfigService configService = getApplicationComponent(UserPortalConfigService.class);
        return configService.createPageTemplate(temp.toString(), ownerType, ownerId);
    }
View Full Code Here

Examples of org.exoplatform.portal.config.UserPortalConfigService

                uiForm.invokeSetBindingBean(uiPortal);
                // uiPortal.refreshNavigation(localeConfigService.getLocaleConfig(uiPortal.getLocale()).getLocale()) ;
                if (uiPortalApp.getModeState() == UIPortalApplication.NORMAL_MODE) {
                    PortalConfig portalConfig = (PortalConfig) PortalDataMapper.buildModelObject(uiPortal);
                    dataService.save(portalConfig);
                    UserPortalConfigService service = uiForm.getApplicationComponent(UserPortalConfigService.class);
                    if (prContext.getPortalOwner().equals(uiForm.getPortalOwner())) {
                        prContext.setUserPortalConfig(service.getUserPortalConfig(uiForm.getPortalOwner(),
                                prContext.getRemoteUser(), PortalRequestContext.USER_PORTAL_CONTEXT));
                        uiPortalApp.reloadPortalProperties();
                    }

                    // We should use IPC to update some portlets in the future instead of
View Full Code Here

Examples of org.exoplatform.portal.config.UserPortalConfigService

                uiForm.invokeSetBindingBean(uiPortal);
                // uiPortal.refreshNavigation(localeConfigService.getLocaleConfig(uiPortal.getLocale()).getLocale()) ;
                if (uiPortalApp.getModeState() == UIPortalApplication.NORMAL_MODE) {
                    PortalConfig portalConfig = (PortalConfig) PortalDataMapper.buildModelObject(uiPortal);
                    dataService.save(portalConfig);
                    UserPortalConfigService service = uiForm.getApplicationComponent(UserPortalConfigService.class);
                    if (prContext.getPortalOwner().equals(uiForm.getPortalOwner())) {
                        prContext.setUserPortalConfig(service.getUserPortalConfig(uiForm.getPortalOwner(),
                                prContext.getRemoteUser(), PortalRequestContext.USER_PORTAL_CONTEXT));
                        uiPortalApp.reloadPortalProperties();
                    }

                    // We should use IPC to update some portlets in the future instead of
View Full Code Here

Examples of org.exoplatform.portal.config.UserPortalConfigService

                UIApplication uiApp = Util.getPortalRequestContext().getUIApplication();
                uiApp.addMessage(new ApplicationMessage("UIPortalForm.msg.sameName", null));
                return;
            }

            UserPortalConfigService service = uiForm.getApplicationComponent(UserPortalConfigService.class);
            service.createUserPortalConfig(SiteType.PORTAL.getName(), portalName, template);

            PortalConfig pconfig = dataService.getPortalConfig(portalName);
            uiForm.invokeSetBindingBean(pconfig);
            dataService.save(pconfig);
            UIPortalApplication uiPortalApp = event.getSource().getAncestorOfType(UIPortalApplication.class);
View Full Code Here

Examples of org.exoplatform.portal.config.UserPortalConfigService

            String portalName = null;
            String remoteUser = getRemoteUser();
            SiteType siteType = getSiteType();

            ExoContainer appContainer = getApplication().getApplicationServiceContainer();
            UserPortalConfigService service_ = (UserPortalConfigService) appContainer
                    .getComponentInstanceOfType(UserPortalConfigService.class);
            if (SiteType.PORTAL == siteType) {
                portalName = getSiteName();
            }

            HttpSession session = request_.getSession();
            if (portalName == null) {
                if (session != null) {
                    portalName = (String) session.getAttribute(LAST_PORTAL_NAME);
                }
            }

            if (portalName == null) {
                portalName = service_.getDefaultPortal();
            }
            try {
                userPortalConfig = service_.getUserPortalConfig(portalName, remoteUser,
                        PortalRequestContext.USER_PORTAL_CONTEXT);
                if (userPortalConfig != null) {
                    session.setAttribute(LAST_PORTAL_NAME, portalName);
                }
            } catch (Exception e) {
View Full Code Here

Examples of org.exoplatform.portal.config.UserPortalConfigService

            //
            UserNode node = uiportal.getSelectedUserNode();
            if (node != null) {
                ExoContainer container = getApplication().getApplicationServiceContainer();
                container.getComponentInstanceOfType(UserPortalConfigService.class);
                UserPortalConfigService configService = (UserPortalConfigService) container
                        .getComponentInstanceOfType(UserPortalConfigService.class);
                PageKey pageRef = node.getPageRef();
                PageContext page = configService.getPage(pageRef);

                //
                if (page != null) {
                    title = page.getState().getDisplayName();
                    String resolvedTitle = ExpressionUtil.getExpressionValue(this.getApplicationResourceBundle(), title);
View Full Code Here

Examples of org.exoplatform.portal.config.UserPortalConfigService

        setSelectedTab(uiPortalSetting.getId());

        setActions(new String[] { "Save", "Close" });

        UserPortalConfigService configService = this.getApplicationComponent(UserPortalConfigService.class);
        Set<String> portalTemplates = configService.getPortalTemplates();
        for (String tempName : portalTemplates) {
            SelectItemCategory category = new SelectItemCategory(tempName);
            PortalConfig config = configService.getPortalConfigFromTemplate(tempName);
            if (config != null) {
                SelectItemOption<String> option = new SelectItemOption<String>(config.getLabel(), tempName,
                        config.getDescription(), tempName);
                category.addSelectItemOption(option);
                uiTemplateInput.getItemCategories().add(category);
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.