Package org.exoplatform.web.url.navigation

Examples of org.exoplatform.web.url.navigation.NodeURL


        this.siteKey = new SiteKey(SiteType.valueOf(requestSiteType.toUpperCase()), requestSiteName);
        this.nodePath_ = requestPath;
        this.requestLocale = requestLocale;

        //
        NodeURL url = createURL(NodeURL.TYPE);
        url.setResource(new NavigationResource(siteKey, ""));
        portalURI = url.toString();

        //
        urlBuilder = new PortalURLBuilder(this, createURL(ComponentURL.TYPE));
    }
View Full Code Here


    }

    private void logout(WebuiRequestContext context) throws Exception {
        LogoutControl.wantLogout();
        PortalRequestContext prContext = (PortalRequestContext) context;
        NodeURL createURL = prContext.createURL(NodeURL.TYPE);
        createURL.setResource(new NavigationResource(SiteType.PORTAL, prContext.getPortalOwner(), null));
        prContext.sendRedirect(createURL.toString());
    }
View Full Code Here

        if (!isAjax) {
            if (isAjaxInLastRequest) {
                isAjaxInLastRequest = false;
                if (requestNavData.equals(lastNonAjaxRequestNavData) && !requestNavData.equals(lastRequestNavData)) {
                    NodeURL nodeURL = pcontext.createURL(NodeURL.TYPE).setNode(getCurrentSite().getSelectedUserNode());
                    pcontext.sendRedirect(nodeURL.toString());
                    return;
                }
            }
            lastNonAjaxRequestNavData = requestNavData;
        }
View Full Code Here

        return urlTemplate.toString();
    }

    public String getBaseURL() throws UnsupportedEncodingException {
        PortalRequestContext pcontext = Util.getPortalRequestContext();
        NodeURL nodeURL = pcontext.createURL(NodeURL.TYPE,
                new NavigationResource(pcontext.getSiteKey(), pcontext.getNodePath()));
        if (URLWriter.isUrlEncoded()) {
            nodeURL.setMimeType(MimeType.XHTML);
        } else {
            nodeURL.setMimeType(MimeType.PLAIN);
        }
        return nodeURL.toString();
    }
View Full Code Here

                }
                nextNode = selectedNode;
            }

            PortalRequestContext prContext = Util.getPortalRequestContext();
            NodeURL nodeURL = prContext.createURL(NodeURL.TYPE).setNode(nextNode);
            context.sendRedirect(nodeURL.toString());
        }
View Full Code Here

                    node = createdNode;
                }
            }

            PortalRequestContext prContext = Util.getPortalRequestContext();
            NodeURL nodeURL = prContext.createURL(NodeURL.TYPE).setNode(node);
            context.sendRedirect(nodeURL.toString());
        }
View Full Code Here

                if (renamedNode != null) {
                    node = renamedNode;
                }
            }
            PortalRequestContext prContext = Util.getPortalRequestContext();
            NodeURL nodeURL = prContext.createURL(NodeURL.TYPE).setNode(node);
            context.sendRedirect(nodeURL.toString());
        }
View Full Code Here

        rsURL.setResourceID(node.getURI());
        json.put("getNodeURL", rsURL.toString());

        if (node.getPageRef() != null) {
            NavigationResource resource = new NavigationResource(node);
            NodeURL url = Util.getPortalRequestContext().createURL(NodeURL.TYPE, resource);
            url.setAjax(isUseAjax());
            json.put("actionLink", url.toString());
        }

        JSONArray childs = new JSONArray();
        for (UserNode child : node.getChildren()) {
            childs.put(toJSON(child, res));
View Full Code Here

        rsURL.setResourceID(nodeId);
        json.put("getNodeURL", rsURL.toString());

        if (node.getPageRef() != null) {
            NavigationResource resource = new NavigationResource(node);
            NodeURL url = Util.getPortalRequestContext().createURL(NodeURL.TYPE, resource);
            url.setAjax(isUseAjax());
            json.put("actionLink", url.toString());
        }

        JSONArray childs = new JSONArray();
        for (TreeNode child : tnode.getChildren()) {
            childs.put(toJSON(child, res));
View Full Code Here

        RedirectCookieService redirectCookieService = (RedirectCookieService) container
                .getComponentInstanceOfType(RedirectCookieService.class);

        // Determine the URL for the site so we can use this for the cookie path
        PortalURLContext urlContext = new PortalURLContext(context, SiteKey.portal(origin.getName()));
        NodeURL url = urlFactory.newURL(NodeURL.TYPE, urlContext);
        String path = url.setResource(new NavigationResource(SiteType.PORTAL, origin.getName(), "")).toString();
        // We have to check for the '/' at the end of the path since the portal could be accessed under /portal/classic or
        // /portal/classic/
        // Removing the tailing slash means both urls will see the cookie.
        if (path.endsWith("/")) {
            path = path.substring(0, path.length() - 1);
        }

        Cookie redirectCookie = redirectCookieService.createCookie(origin.getName(), redirect, path);
        response.addCookie(redirectCookie);

        // In order to make sure we don't create an infinite redirect loop, we should update the cookie for the redirect site to
        // specify that site is the prefered site and no redirect should be performed
        if (redirect.getType() != RedirectType.NOREDIRECT && redirect.getRedirect() != null) {
            // Determine the URL for the redirect site so we can use this for the cookie path
            String redirectPath = url.setResource(new NavigationResource(SiteType.PORTAL, redirect.getRedirect(), ""))
                    .toString();
            // We have to check for the '/' at the end of the path since the portal could be accessed under /portal/classic or
            // /portal/classic/
            // Removing the tailing slash means both urls will see the cookie.
            if (redirectPath.endsWith("/")) {
View Full Code Here

TOP

Related Classes of org.exoplatform.web.url.navigation.NodeURL

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.