Package org.exoplatform.portal.mop.user

Examples of org.exoplatform.portal.mop.user.UserNavigation


            UIPageTemplateOptions uiPageTemplateOptions = uiWizard.findFirstComponentOfType(UIPageTemplateOptions.class);
            UIWizardPageSetInfo uiPageInfo = uiWizard.getChild(UIWizardPageSetInfo.class);

            UIPageNodeSelector uiNodeSelector = uiPageInfo.getChild(UIPageNodeSelector.class);
            UserNavigation pageNavi = uiNodeSelector.getNavigation();
            String ownerType = pageNavi.getKey().getTypeName();
            String ownerId = pageNavi.getKey().getName();

            UIFormStringInput pageName = uiPageInfo.getUIStringInput(UIWizardPageSetInfo.PAGE_NAME);
            Page page = uiPageTemplateOptions.createPageFromSelectedOption(ownerType, ownerId);
            page.setName("page" + page.hashCode());
            String pageId = ownerType + "::" + ownerId + "::" + page.getName();

            // check page is exist
            PageService pageService = uiWizard.getApplicationComponent(PageService.class);
            if (pageService.loadPage(PageKey.parse(pageId)) != null) {
                uiPortalApp.addMessage(new ApplicationMessage("UIPageCreationWizard.msg.NameNotSame", null));
                uiWizard.viewStep(FIRST_STEP);
                uiWizard.updateWizardComponent();
            }
            page.setModifiable(true);

            // Set default permissions on the page
            setDefaultPermission(page, pageNavi.getKey());

            if (page.getTitle() == null || page.getTitle().trim().length() == 0) {
                page.setTitle(pageName.getValue());
            }
View Full Code Here


            UIPopupWindow uiManagementPopup = uiNodeSelector.getAncestorOfType(UIPopupWindow.class);
            UIPageNodeForm uiNodeForm = uiApp.createUIComponent(UIPageNodeForm.class, null, null);
            uiManagementPopup.setUIComponent(uiNodeForm);

            UserNavigation edittedNav = uiNodeSelector.getEdittedNavigation();
            uiNodeForm.setContextPageNavigation(edittedNav);
            uiNodeForm.setValues(node);
            uiNodeForm.setSelectedParent(node.getParent());
            uiManagementPopup.setWindowSize(800, 500);
            event.getRequestContext().addUIComponentToUpdateByAjax(uiManagementPopup.getParent());
View Full Code Here

            UIPageNodeForm uiNodeForm = uiManagementPopup.createUIComponent(UIPageNodeForm.class, null, null);
            uiNodeForm.setValues(null);
            uiManagementPopup.setUIComponent(uiNodeForm);

            uiNodeForm.setSelectedParent(node);
            UserNavigation edittedNavigation = uiNodeSelector.getEdittedNavigation();
            uiNodeForm.setContextPageNavigation(edittedNavigation);
            uiManagementPopup.setWindowSize(800, 500);
            event.getRequestContext().addUIComponentToUpdateByAjax(uiManagementPopup.getParent());
        }
View Full Code Here

            public List<UserNavigation> next() {
                if (hasNext()) {
                    List<UserNavigation> list = new ArrayList<UserNavigation>(pageSize);
                    for (int i = currentIndex; i < currentIndex + pageSize; i++) {
                        if (i < groupNav.size()) {
                            UserNavigation u = groupNav.get(i);
                            list.add(u);
                        } else {
                            break;
                        }
                    }
View Full Code Here

                uiApplication
                        .addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.Invalid-editPermission", null));
                return;
            }

            UserNavigation navigation = userPortal.getNavigation(siteKey);
            if (navigation == null) {
                uiApplication.addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.navigation-not-exist", null));
                UIWorkingWorkspace uiWorkingWS = Util.getUIPortalApplication().getChild(UIWorkingWorkspace.class);
                uiWorkingWS.updatePortletsByName("UserToolbarGroupPortlet");
                return;
View Full Code Here

            uicomp.naviManager = naviManager;

            naviManager.setSiteKey(SiteKey.portal(portalName));

            UserPortal userPortal = userPortalConfig.getUserPortal();
            UserNavigation edittedNavigation = userPortal.getNavigation(SiteKey.portal(portalName));

            UINavigationNodeSelector selector = naviManager.getChild(UINavigationNodeSelector.class);
            selector.setScope(uicomp.getScope());
            selector.setEdittedNavigation(edittedNavigation);
            selector.setUserPortal(userPortal);
View Full Code Here

        return portalName;
    }

    @Override
    protected UserNode getNodeFromResourceID(String resourceId) throws Exception {
        UserNavigation currNav = getNavigation(SiteKey.portal(getCurrentPortal()));
        if (currNav == null)
            return null;

        UserPortal userPortal = getUserPortal();
        UserNode node = userPortal.resolvePath(currNav, toolbarFilterConfig, resourceId);
View Full Code Here

            super.processRender(app, context);
        }
    }

    private boolean hasEditPermissionOnNavigation() throws Exception {
        UserNavigation selectedNavigation = getSelectedNavigation();
        if (selectedNavigation == null) {
            return false;
        }
        return selectedNavigation.isModifiable();
    }
View Full Code Here

        return node.getURI();
    }

    @Override
    protected UserNode getNodeFromResourceID(String resourceId) throws Exception {
        UserNavigation currNav = getCurrentUserNavigation();
        if (currNav == null)
            return null;

        UserPortal userPortal = getUserPortal();
        UserNode node = userPortal.resolvePath(currNav, toolbarFilterConfig, resourceId);
View Full Code Here

            throw new IllegalArgumentException("resourceId " + resourceId + " is invalid");
        }
        String groupId = parsedId[0];
        String nodeURI = parsedId[1];

        UserNavigation grpNav = getNavigation(SiteKey.group(groupId));
        if (grpNav == null)
            return null;

        UserNode node = getUserPortal().resolvePath(grpNav, toolbarFilterConfig, nodeURI);
        if (node != null && node.getURI().equals(nodeURI)) {
View Full Code Here

TOP

Related Classes of org.exoplatform.portal.mop.user.UserNavigation

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.