Package org.apache.jetspeed.portalsite

Examples of org.apache.jetspeed.portalsite.PortalSiteSessionContext


            locators.put(ProfileLocator.PAGE_LOCATOR, profiler.getProfile(request, ProfileLocator.PAGE_LOCATOR));
        }

        // get new portal site request context from portal site
        // component using the profile locators for new user request
        PortalSiteSessionContext sessionContext = portalSite.newSessionContext();
        return sessionContext.newRequestContext(locators, user.getName());
    }   
View Full Code Here


                // during the session so the session view of the site can
                // be cached unless locators do change; if the context
                // is invalid, (perhaps because the session was persisted
                // and is now being reloaded in a new server), it must be
                // replaced with a newly created session context
                PortalSiteSessionContext sessionContext = (PortalSiteSessionContext)request.getSessionAttribute(PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY);
                String pipeline = request.getPipeline().getName();
                if ((sessionContext == null) || !sessionContext.isValid() || !pipeline.equals(sessionContext.getPipeline()))
                {                   
                    sessionContext = portalSite.newSessionContext();
                    sessionContext.setPipeline(pipeline);
                    request.setSessionAttribute(PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY, sessionContext);
                }

                // construct and save a new portalsite request context
                // using session context, locators map, fallback, and
                // folder page histories; the request context uses the
                // locators to initialize or resets the session context if
                // locators have changed for this request; the request
                // context also acts as a short term request cache for the
                // selected page and built menus; however, creating the
                // request context here does not select the page or build
                // menus: that is done when the request context is
                // accessed subsequently
                PortalSiteRequestContext requestContext = sessionContext.newRequestContext(locators, requestFallback, useHistory);
                request.setAttribute(PORTAL_SITE_REQUEST_CONTEXT_ATTR_KEY, requestContext);

                // additionally save request context under legacy key
                // to support existing decorator access
                request.setAttribute(PROFILED_PAGE_CONTEXT_ATTR_KEY, requestContext);
View Full Code Here

            if ( locator != null )
            {
                locators = new HashMap();
                locators.put(ProfileLocator.PAGE_LOCATOR, locator);
            }              
            PortalSiteSessionContext sessionContext = (PortalSiteSessionContext)getSessionAttribute(ProfilerValveImpl.PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY);
            String userPrincipal = ((getUserPrincipal() != null) ? getUserPrincipal().getName() : null);
            PortalSiteRequestContext requestContext = sessionContext.newRequestContext(locators, userPrincipal, true, true);
            ContentPage cpage = new ContentPageImpl(requestContext.getManagedPage());
            //System.out.println("page is " + cpage.getPath());
            this.setPage(realPage);           
            this.setPath(pathSave);
            return cpage;
View Full Code Here

            locators.put(ProfileLocator.PAGE_LOCATOR, profiler.getProfile(request, ProfileLocator.PAGE_LOCATOR));
        }

        // get new portal site request context from portal site
        // component using the profile locators for new user request
        PortalSiteSessionContext sessionContext = portalSite.newSessionContext();
        return sessionContext.newRequestContext(locators, userName);
    }   
View Full Code Here

                // during the session so the session view of the site can
                // be cached unless locators do change; if the context
                // is invalid, (perhaps because the session was persisted
                // and is now being reloaded in a new server), it must be
                // replaced with a newly created session context
                PortalSiteSessionContext sessionContext = (PortalSiteSessionContext)request.getSessionAttribute(PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY);
                String pipeline = request.getPipeline().getName();
                if ((sessionContext == null) || !sessionContext.isValid())
                {
                    sessionContext = portalSite.newSessionContext();
                    sessionContext.setPipeline(pipeline);
                    request.setSessionAttribute(PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY, sessionContext);
                }

                // construct and save a new portalsite request context
                // using session context, locators map, fallback, and
                // folder page histories; the request context uses the
                // locators to initialize or resets the session context if
                // locators have changed for this request; the request
                // context also acts as a short term request cache for the
                // selected page and built menus; however, creating the
                // request context here does not select the page or build
                // menus: that is done when the request context is
                // accessed subsequently
                PortalSiteRequestContext requestContext = sessionContext.newRequestContext(locators, principal.getName(), requestFallback, useHistory);
                request.setAttribute(PORTAL_SITE_REQUEST_CONTEXT_ATTR_KEY, requestContext);

                // additionally save request context under legacy key
                // to support existing decorator access
                request.setAttribute(PROFILED_PAGE_CONTEXT_ATTR_KEY, requestContext);
View Full Code Here

                // during the session so the session view of the site can
                // be cached unless locators do change; if the context
                // is invalid, (perhaps because the session was persisted
                // and is now being reloaded in a new server), it must be
                // replaced with a newly created session context
                PortalSiteSessionContext sessionContext = (PortalSiteSessionContext)request.getSessionAttribute(PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY);
                if ((sessionContext == null) || !sessionContext.isValid())
                {
                    sessionContext = portalSite.newSessionContext();
                    request.setSessionAttribute(PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY, sessionContext);
                }

                // construct and save a new portalsite request context
                // using session context, locators map, fallback, and
                // folder page histories; the request context uses the
                // locators to initialize or resets the session context if
                // locators have changed for this request; the request
                // context also acts as a short term request cache for the
                // selected page and built menus; however, creating the
                // request context here does not select the page or build
                // menus: that is done when the request context is
                // accessed subsequently
                PortalSiteRequestContext requestContext = sessionContext.newRequestContext(locators, requestFallback, useHistory);
                request.setAttribute(PORTAL_SITE_REQUEST_CONTEXT_ATTR_KEY, requestContext);

                // additionally save request context under legacy key
                // to support existing decorator access
                request.setAttribute(PROFILED_PAGE_CONTEXT_ATTR_KEY, requestContext);
View Full Code Here

            if ( locator != null )
            {
                locators = new HashMap();
                locators.put(ProfileLocator.PAGE_LOCATOR, locator);
            }              
            PortalSiteSessionContext sessionContext = (PortalSiteSessionContext)getSessionAttribute(ProfilerValveImpl.PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY);
            PortalSiteRequestContext requestContext = sessionContext.newRequestContext(locators, true, true);
            ContentPage cpage = new ContentPageImpl(requestContext.getManagedPage());
            //System.out.println("page is " + cpage.getPath());
            this.setPage(realPage);           
            this.setPath(pathSave);
            return cpage;
View Full Code Here

            if ( locator != null )
            {
                locators = new HashMap();
                locators.put(ProfileLocator.PAGE_LOCATOR, locator);
            }              
            PortalSiteSessionContext sessionContext = (PortalSiteSessionContext)getSessionAttribute(ProfilerValveImpl.PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY);
            PortalSiteRequestContext requestContext = sessionContext.newRequestContext(locators, true, true);
            ContentPage cpage = new ContentPageImpl(requestContext.getManagedPage());
            //System.out.println("page is " + cpage.getPath());
            this.setPage(realPage);           
            this.setPath(pathSave);
            return cpage;
View Full Code Here

                // during the session so the session view of the site can
                // be cached unless locators do change; if the context
                // is invalid, (perhaps because the session was persisted
                // and is now being reloaded in a new server), it must be
                // replaced with a newly created session context
                PortalSiteSessionContext sessionContext = (PortalSiteSessionContext)request.getSessionAttribute(PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY);
                String pipeline = request.getPipeline().getName();
                if ((sessionContext == null) || !sessionContext.isValid() || hasPipelineChanged(pipeline, sessionContext.getPipeline()))                    
                {                   
                    sessionContext = portalSite.newSessionContext();
                    sessionContext.setPipeline(pipeline);
                    request.setSessionAttribute(PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY, sessionContext);
                }

                // construct and save a new portalsite request context
                // using session context, locators map, fallback, and
                // folder page histories; the request context uses the
                // locators to initialize or resets the session context if
                // locators have changed for this request; the request
                // context also acts as a short term request cache for the
                // selected page and built menus; however, creating the
                // request context here does not select the page or build
                // menus: that is done when the request context is
                // accessed subsequently
                PortalSiteRequestContext requestContext = sessionContext.newRequestContext(locators, requestFallback, useHistory);
                request.setAttribute(PORTAL_SITE_REQUEST_CONTEXT_ATTR_KEY, requestContext);

                // additionally save request context under legacy key
                // to support existing decorator access
                request.setAttribute(PROFILED_PAGE_CONTEXT_ATTR_KEY, requestContext);
View Full Code Here

            // get profiled page using the profiler, page manager,
            // and portal site components
            if (locators != null)
            {
                // get or create portalsite session context
                PortalSiteSessionContext sessionContext = (PortalSiteSessionContext)request.getSessionAttribute(PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY);
                if (sessionContext == null)
                {
                    sessionContext = portalSite.newSessionContext();
                    request.setSessionAttribute(PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY, sessionContext);
                }

                // construct and save a new portalsite request context
                // using session context and locators map
                PortalSiteRequestContext requestContext = sessionContext.newRequestContext(locators);
                request.setAttribute(PORTAL_SITE_REQUEST_CONTEXT_ATTR_KEY, requestContext);

                // additionally save request context under legacy key
                // to support existing decorator access
                request.setAttribute(PROFILED_PAGE_CONTEXT_ATTR_KEY, requestContext);
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.portalsite.PortalSiteSessionContext

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.