Package org.exoplatform.portal.mop

Examples of org.exoplatform.portal.mop.SiteKey


     * 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

            js.append("eXo.env.server.portalURLTemplate=\"");
            js.append(url).append("\";");

            pcontext.getJavascriptManager().require("SHARED/base").addScripts(js.toString());

            SiteKey siteKey = new SiteKey(pcontext.getSiteType(), pcontext.getSiteName());
            PageNodeEvent<UIPortalApplication> pnevent = new PageNodeEvent<UIPortalApplication>(this,
                    PageNodeEvent.CHANGE_NODE, siteKey, pcontext.getNodePath());
            broadcast(pnevent, Event.Phase.PROCESS);
        }
View Full Code Here

            String doLoginPath = request.getContextPath() + "/login" + "?initialURI=" + request.getRequestURI();
            response.sendRedirect(response.encodeRedirectURL(doLoginPath));
            return true;
        }

        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, request.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) {
                    siteKey = userNode.getNavigation().getKey();
                    uri = userNode.getURI();
                }
            }
        }

        //
        PortalURLContext urlContext = new PortalURLContext(context, siteKey);
        NodeURL url = urlFactory.newURL(NodeURL.TYPE, urlContext);

        url.setResource(new NavigationResource(siteKey.getType(), siteKey.getName(), uri));
        url.setMimeType(MimeType.PLAIN);

        Enumeration paraNames = request.getParameterNames();
        while (paraNames.hasMoreElements()) {
            String parameter = paraNames.nextElement().toString();
View Full Code Here

                // Close the registration popup
                UIMaskWorkspace.CloseActionListener closePopupListener = new UIMaskWorkspace.CloseActionListener();
                closePopupListener.execute((Event)event);

                // Redirect to finish login with new user
                SiteKey siteKey = portalRequestContext.getSiteKey();
                NodeURL urlToRedirect = portalRequestContext.createURL(NodeURL.TYPE);
                urlToRedirect.setResource(new NavigationResource(siteKey, portalRequestContext.getNodePath()));

                portalRequestContext.getJavascriptManager().addJavascript("window.location = '" + urlToRedirect.toString() + "';");
            }
View Full Code Here

    }

    public void perform() {

        //
        SiteKey key = new SiteKey(src.getOwnerType(), src.getOwnerId());

        //
        NavigationContext dst = service.loadNavigation(key);

        //
View Full Code Here

                    UserPortalConfigService configService = uicomp.getApplicationComponent(UserPortalConfigService.class);
                    configService.createGroupSite(ownerId);
                }

                // create navigation for group
                SiteKey key = SiteKey.group(ownerId);
                NavigationContext existing = navigationService.loadNavigation(key);
                if (existing == null) {
                    navigationService.saveNavigation(new NavigationContext(key, new NavigationState(0)));
                }
            }
View Full Code Here

    PageData(Page page) {
        Site site = page.getSite();

        //
        this.key = new SiteKey(Utils.siteType(site.getObjectType()), site.getName()).page(page.getName());
        this.id = page.getObjectId();
        this.state = new PageState(page);
    }
View Full Code Here

            cfg.setName(userName);
            storage_.create(cfg);
        }

        // Create a blank navigation if needed
        SiteKey key = SiteKey.user(userName);
        NavigationContext nav = navService.loadNavigation(key);
        if (nav == null) {
            nav = new NavigationContext(key, new NavigationState(5));
            navService.saveNavigation(nav);
        }
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.