Package org.jasig.portal.url

Examples of org.jasig.portal.url.IPortalRequestInfo


            RenderPart renderPart, long executionTime, boolean cached) {

        final IPortletWindowId portletWindowId = portletWindow.getPortletWindowId();

        //Determine if the portlet was targeted
        final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(httpServletRequest);
        final boolean targeted = portletWindowId.equals(portalRequestInfo.getTargetedPortletWindowId());

        renderPart.publishRenderExecutionEvent(this.portalEventFactory,
                this,
                httpServletRequest,
                portletWindowId,
View Full Code Here


        this.portletWindowRegistry = portletWindowRegistry;
    }

    @Override
    public boolean processParameters(HttpServletRequest request, HttpServletResponse response) {
        final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(request);
       
        final IUserInstance userInstance = this.userInstanceManager.getUserInstance(request);
       
        final IUserPreferencesManager preferencesManager = userInstance.getPreferencesManager();
        final IUserLayoutManager userLayoutManager = preferencesManager.getUserLayoutManager();

       
        final String tabId = portalRequestInfo.getTargetedLayoutNodeId();
        if (tabId != null) {
            this.stylesheetUserPreferencesService.setStylesheetParameter(request, PreferencesScope.STRUCTURE, "focusedTabID", tabId);
        }

        final UrlState urlState = portalRequestInfo.getUrlState();
        switch (urlState) {
            case DETACHED:
                this.stylesheetUserPreferencesService.setStylesheetParameter(request, PreferencesScope.STRUCTURE, "detached", Boolean.TRUE.toString());
            case MAX: {
                final IPortletRequestInfo portletRequestInfo = portalRequestInfo.getTargetedPortletRequestInfo();
               
                if (portletRequestInfo != null) {
                    final IPortletWindowId targetWindowId = portletRequestInfo.getPortletWindowId();
                    final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(request, targetWindowId);
                    final IPortletEntity portletEntity = portletWindow.getPortletEntity();
View Full Code Here

    protected String serializePageData(HttpServletRequest request, long startTime) {
        final Map<String, Object> pageData = new HashMap<String, Object>();
        pageData.put("executionTimeNano", System.nanoTime() - startTime);
       
        final IPortalRequestInfo portalRequestInfo = urlSyntaxProvider.getPortalRequestInfo(request);
        pageData.put("urlState", portalRequestInfo.getUrlState());
       
        final String targetedLayoutNodeId = portalRequestInfo.getTargetedLayoutNodeId();
        if (targetedLayoutNodeId != null) {
            final AggregatedTabMapping mappedTabForLayoutId = aggregatedTabLookupDao.getMappedTabForLayoutId(targetedLayoutNodeId);
            pageData.put("tab", mappedTabForLayoutId);
        }
       
View Full Code Here

    /* (non-Javadoc)
     * @see org.jasig.portal.url.processing.IRequestParameterProcessor#processParameters(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     */
    @Override
    public boolean processParameters(HttpServletRequest request, HttpServletResponse response) {
        final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(request);
       
        final IPortletWindowId targetedPortletWindowId = portalRequestInfo.getTargetedPortletWindowId();
       
        for (final IPortletRequestInfo portletRequestInfo : portalRequestInfo.getPortletRequestInfoMap().values()) {
            final IPortletWindowId portletWindowId = portletRequestInfo.getPortletWindowId();
            final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(request, targetedPortletWindowId);
           
            final UrlType urlType = portalRequestInfo.getUrlType();
            switch (urlType) {
                case RENDER: {
                    final Map<String, List<String>> portletParameters = portletRequestInfo.getPortletParameters();
                    portletWindow.setRenderParameters(ParameterMap.convertListMap(portletParameters));
                   
                    //fall through, render uses state/mode info
                }
                case ACTION: {
                    final WindowState windowState = portletRequestInfo.getWindowState();
                    if (windowState != null) {
                        portletWindow.setWindowState(windowState);
                    }
                   
                    final PortletMode portletMode = portletRequestInfo.getPortletMode();
                    if (portletMode != null) {
                        portletWindow.setPortletMode(portletMode);
                    }
                   
                    break;
                }
            }
           
            //Override the window state of the targeted portlet window based on the url state
            if (portletWindowId.equals(targetedPortletWindowId)) {
                final UrlState urlState = portalRequestInfo.getUrlState();
                switch (urlState) {
                    case MAX: {
                        portletWindow.setWindowState(WindowState.MAXIMIZED);
                        break;
                    }
View Full Code Here

            writer.flush();
            res.flushBuffer();
        }
       
        final long executionTime = System.nanoTime() - startTime;
        final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(req);
        this.portalEventFactory.publishPortalRenderEvent(req, this, req.getPathInfo(), executionTime, portalRequestInfo);
    }
View Full Code Here

        final XMLEventReader eventReader = pipelineEventReader.getEventReader();
       
        final IStylesheetDescriptor stylesheetDescriptor = stylesheetAttributeSource.getStylesheetDescriptor(request);
       
        final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(request);
       
        final XMLEventReader filteredEventReader;
        if (portalRequestInfo.getTargetedPortletWindowId() == null) {
            final IStylesheetParameterDescriptor defaultWindowStateParam = stylesheetDescriptor.getStylesheetParameterDescriptor("dashboardForcedWindowState");
            if (defaultWindowStateParam != null) {
                //Set all window states to the specified default
                final WindowState windowState = PortletUtils.getWindowState(defaultWindowStateParam.getDefaultValue());
                filteredEventReader = new SinglePortletWindowStateSettingXMLEventReader(request, eventReader, windowState);
View Full Code Here

    private IUrlSyntaxProvider urlSyntaxProvider;

    @Override
    public boolean apply(final HttpServletRequest request) {

        final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(request);

        if (null == portalRequestInfo) {
            logger.warn("Portal request info was not available for this request, " +
                    "so assuming that it does not represent focus on one portlet.");
            // False when portalRequestInfo is null because unknown portal state is not
            // focused-on-one-portlet portal state.
            return false;
        }

        final UrlState urlState = portalRequestInfo.getUrlState();

        // true when there is a portal request and that request is not for a portal in NORMAL state
        // i.e. portal is in some other state, like Maximized or Exclusive or Detached.
        // false otherwise.
        final boolean doesRequestFocusOnOnePortlet = (! (UrlState.NORMAL.equals(urlState)));
View Full Code Here

            logger.warn("portletWindowRegistry returned null for {}, returning default cacheControl and no cached portlet data", portletWindowId);
            return new CacheState<CachedPortletData<PortletRenderResult>, PortletRenderResult>();
        }
       
        //Generate the public render-header cache key
        final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(request);
        final Locale locale = RequestContextUtils.getLocale(request);
        final PublicPortletCacheKey publicCacheKey = PublicPortletCacheKey.createPublicPortletRenderHeaderCacheKey(portletWindow, portalRequestInfo, locale);
       
        return this.<CachedPortletData<PortletRenderResult>, PortletRenderResult> getPortletState(request,
                portletWindow,
View Full Code Here

            logger.warn("portletWindowRegistry returned null for {}, returning default cacheControl and no cached portlet data", portletWindowId);
            return new CacheState<CachedPortletData<PortletRenderResult>, PortletRenderResult>();
        }
       
        //Generate the public render cache key
        final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(request);
        final Locale locale = RequestContextUtils.getLocale(request);
        final PublicPortletCacheKey publicCacheKey = PublicPortletCacheKey.createPublicPortletRenderCacheKey(portletWindow, portalRequestInfo, locale);
       
        return this.<CachedPortletData<PortletRenderResult>, PortletRenderResult> getPortletState(request,
                portletWindow,
View Full Code Here

            logger.warn("portletWindowRegistry returned null for {}, returning default cacheControl and no cached portlet data", portletWindowId);
            return new CacheState<CachedPortletResourceData<Long>, Long>();
        }
       
        //Generate the public resource cache key
        final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(request);
        final Locale locale = RequestContextUtils.getLocale(request);
        final PublicPortletCacheKey publicCacheKey = PublicPortletCacheKey.createPublicPortletResourceCacheKey(portletWindow, portalRequestInfo, locale);
       
        return this.<CachedPortletResourceData<Long>, Long> getPortletState(request,
                portletWindow,
View Full Code Here

TOP

Related Classes of org.jasig.portal.url.IPortalRequestInfo

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.