Package org.exoplatform.portal.url

Examples of org.exoplatform.portal.url.PortalURLContext


    }

    @Override
    public boolean execute(ControllerContext context) throws Exception {
        String defaultPortal = configService.getDefaultPortal();
        PortalURLContext urlContext = new PortalURLContext(context, SiteKey.portal(defaultPortal));
        NodeURL url = urlFactory.newURL(NodeURL.TYPE, urlContext);
        String s = url.setResource(new NavigationResource(SiteType.PORTAL, defaultPortal, "")).toString();
        HttpServletResponse resp = context.getResponse();
        resp.sendRedirect(resp.encodeRedirectURL(s));
        return true;
View Full Code Here


        urlBuilder = new PortalURLBuilder(this, createURL(ComponentURL.TYPE));
    }

    @Override
    public <R, U extends PortalURL<R, U>> U newURL(ResourceType<R, U> resourceType, URLFactory urlFactory) {
        PortalURLContext urlContext = new PortalURLContext(controllerContext, siteKey);
        U url = urlFactory.newURL(resourceType, urlContext);
        if (url != null) {
            url.setAjax(false);
            url.setLocale(requestLocale);
        }
View Full Code Here

                }
            }
        }

        //
        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);
View Full Code Here

        urlBuilder = new PortalURLBuilder(this, createURL(ComponentURL.TYPE));
    }

    @Override
    public <R, U extends PortalURL<R, U>> U newURL(ResourceType<R, U> resourceType, URLFactory urlFactory) {
        PortalURLContext urlContext = new PortalURLContext(controllerContext, siteKey);
        U url = urlFactory.newURL(resourceType, urlContext);
        if (url != null) {
            url.setAjax(false);
            url.setLocale(requestLocale);
        }
View Full Code Here

                }
            }
        }

        //
        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);
View Full Code Here

        urlBuilder = new PortalURLBuilder(this, createURL(ComponentURL.TYPE));
    }

    @Override
    public <R, U extends PortalURL<R, U>> U newURL(ResourceType<R, U> resourceType, URLFactory urlFactory) {
        PortalURLContext urlContext = new PortalURLContext(controllerContext, siteKey);
        U url = urlFactory.newURL(resourceType, urlContext);
        if (url != null) {
            url.setAjax(false);
            url.setLocale(requestLocale);
        }
View Full Code Here

                }
            }
        }

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

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

        if (URLWriter.isUrlEncoded()) {
View Full Code Here

        urlBuilder = new PortalURLBuilder(this, createURL(ComponentURL.TYPE));
    }

    @Override
    public <R, U extends PortalURL<R, U>> U newURL(ResourceType<R, U> resourceType, URLFactory urlFactory) {
        PortalURLContext urlContext = new PortalURLContext(controllerContext, siteKey);
        U url = urlFactory.newURL(resourceType, urlContext);
        if (url != null) {
            url.setAjax(false);
            url.setLocale(requestLocale);
        }
View Full Code Here

        ExoContainer container = ExoContainerContext.getCurrentContainer();
        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.
View Full Code Here

                setRedirect(origin, redirect, context.getRequest(), context.getResponse(), context);

                // create the new redirect url
                SiteKey siteKey = new SiteKey(SiteType.PORTAL, redirect.getRedirect());
                PortalURLContext urlContext = new PortalURLContext(context, siteKey);
                NodeURL url = urlFactory.newURL(NodeURL.TYPE, urlContext);

                if (redirectLocation.startsWith("/")) {
                    redirectLocation = redirectLocation.substring(1);
                }
View Full Code Here

TOP

Related Classes of org.exoplatform.portal.url.PortalURLContext

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.