Package org.exoplatform.portal.mop

Examples of org.exoplatform.portal.mop.SiteKey


        protected void fireChangeNode(WebuiRequestContext prContext, UIPortalApplication uiPortalApp, UIPortal uiPortal) throws Exception {
            UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);

            UserNode currentNode = uiPortal.getSelectedUserNode();
            SiteKey siteKey = currentNode.getNavigation().getKey();
            PageNodeEvent<UIPortalApplication> pnevent = new PageNodeEvent<UIPortalApplication>(uiPortalApp,
                    PageNodeEvent.CHANGE_NODE, siteKey, currentNode.getURI());
            uiPortalApp.broadcast(pnevent, Event.Phase.PROCESS);

View Full Code Here


         *
         * int colonIndex = pathInfo.indexOf("/", 1); if (colonIndex < 0) { colonIndex = pathInfo.length(); } portalOwner_ =
         * pathInfo.substring(1, colonIndex); nodePath_ = pathInfo.substring(colonIndex, pathInfo.length());
         */
        //
        this.siteKey = new SiteKey(SiteType.valueOf(requestSiteType.toUpperCase()), requestSiteName);
        this.nodePath_ = requestPath;
        this.requestLocale = requestLocale;

        //
        NodeURL url = createURL(NodeURL.TYPE);
View Full Code Here

                RequestLifeCycle.begin(ExoContainerContext.getCurrentContainer());
            }

            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);
                if (rootNode.getChildren().size() < 1) {
                    // TODO: Retrieve tab name from request
                    Page page = configService.createPageTemplate(PAGE_TEMPLATE, siteKey.getTypeName(), siteKey.getName());
                    page.setName(DEFAULT_TAB_NAME);
                    page.setTitle(DEFAULT_TAB_NAME);

                    //
                    PageState pageState = PageUtils.toPageState(page);
View Full Code Here

        page.setOwnerId(ownerId);
        page.setName(getUIStringInput("name").getValue());

        // Check if the page exists
        PageService pageService = getApplicationComponent(PageService.class);
        PageKey pageKey = new SiteKey(ownerType, ownerId).page(page.getName());

        if (pageService.loadPage(pageKey) == null) {
            // Set defaults only on new pages
            UserPortalConfigService configService = getApplicationComponent(UserPortalConfigService.class);
            configService.setDefaultPermissions(page);
View Full Code Here

                uiPortalApp.setModeState(UIPortalApplication.NORMAL_MODE);
                uiWorkingWS.setRenderedChild(UIPortalApplication.UI_VIEWING_WS_ID);
                Util.getPortalRequestContext().ignoreAJAXUpdateOnPortlets(true);

                UserNode currentNode = uiPortal.getSelectedUserNode();
                SiteKey siteKey = currentNode.getNavigation().getKey();
                PageNodeEvent<UIPortalApplication> pnevent = new PageNodeEvent<UIPortalApplication>(uiPortalApp,
                        PageNodeEvent.CHANGE_NODE, siteKey, currentNode.getURI());
                uiPortalApp.broadcast(pnevent, Event.Phase.PROCESS);

                Util.updatePortalMode();
View Full Code Here

        @Override
        public boolean authorizeEditPage(UIPortal currentPortal, UIPortalApplication portalApp) {
            // check edit permission for page
            UserACL userACL = currentPortal.getApplicationComponent(UserACL.class);
            UIPage uiPage = currentPortal.findFirstComponentOfType(UIPage.class);
            SiteKey siteKey = uiPage.getSiteKey();
            if (userACL.hasEditPermissionOnPage(siteKey.getTypeName(), siteKey.getName(), uiPage.getEditPermission())) {
                return true;
            } else {
                portalApp.addMessage(
                        new ApplicationMessage("UIPortalManagement.msg.Invalid-EditPage-Permission", null));
                return false;
View Full Code Here

     */
    public UIPortal getCachedUIPortal(String ownerType, String ownerId) {
        if (ownerType == null || ownerId == null) {
            return null;
        }
        return this.all_UIPortals.get(new SiteKey(ownerType, ownerId));
    }
View Full Code Here

     * Associates the specified UIPortal to a cache map with specified key which bases on OwnerType and OwnerId
     *
     * @param uiPortal
     */
    public void putCachedUIPortal(UIPortal uiPortal) {
        SiteKey siteKey = uiPortal.getSiteKey();

        if (siteKey != null) {
            this.all_UIPortals.put(siteKey, uiPortal);
        }
    }
View Full Code Here

     */
    public void removeCachedUIPortal(String ownerType, String ownerId) {
        if (ownerType == null || ownerId == null) {
            return;
        }
        this.all_UIPortals.remove(new SiteKey(ownerType, ownerId));
    }
View Full Code Here

        DataStorage storage = this.getApplicationComponent(DataStorage.class);
        all_UIPortals.clear();

        UIPortal uiPortal = getCurrentSite();
        if (uiPortal != null) {
            SiteKey siteKey = uiPortal.getSiteKey();

            UIPortal tmp = null;
            PortalConfig portalConfig = storage.getPortalConfig(siteKey.getTypeName(), siteKey.getName());
            if (portalConfig != null) {
                tmp = this.createUIComponent(UIPortal.class, null, null);
                PortalDataMapper.toUIPortal(tmp, portalConfig);
                this.putCachedUIPortal(tmp);
                tmp.setNavPath(uiPortal.getNavPath());
                tmp.refreshUIPage();

                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.mop.SiteKey

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.