Package org.apache.jetspeed.aggregator

Examples of org.apache.jetspeed.aggregator.PortletContent


        if(overridenContent.get() != null)
        {
            return ((StringBuffer) overridenContent.get()).toString();
        }
       
        PortletContent content = (PortletContent) portletContent.get();
        if (content != null)
        {
            synchronized (content)
            {
                if (content.isComplete())
                {
                    return content.getContent();
                }
                else
                {
                    try
                    {
                        log.debug("Waiting on content for Fragment " + getId());
                        content.wait();
                        return content.getContent();
                    }
                    catch (InterruptedException e)
                    {
                        return e.getMessage();
                    }
View Full Code Here


        request.setAttribute(PortalReservedParameters.FRAGMENT_ATTRIBUTE, fragment);
        request.setAttribute(PortalReservedParameters.CONTENT_DISPATCHER_ATTRIBUTE, dispatcher);
        request.setAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE, request);       
        request.setAttribute(PortalReservedParameters.FRAGMENT_ATTRIBUTE, fragment);
       
        PortletContent portletContent = dispatcher.getPortletContent(fragment);
        fragment.setPortletContent(portletContent);
        return new RenderingJob(container, portletContent, fragment, request, response, requestContext, portletWindow);

    }
View Full Code Here

        ContentCacheKey cacheKey = portletContentCache.createCacheKey(requestContext, fragment.getId());       
        CacheElement cachedElement = portletContentCache.get(cacheKey);
       
        if (cachedElement != null)
        {
            PortletContent portletContent = (PortletContent) cachedElement.getContent();
           
            PortletMode portletMode = portletContent.getPortletMode();
            WindowState windowState = portletContent.getWindowState();
           
            if (portletWindow.getPortletMode().equals(portletMode) && portletWindow.getWindowState().equals(windowState))
            {
                fragment.setPortletContent(portletContent);
                return true;
View Full Code Here

                                              RequestContext requestContext, boolean isParallel,
                                              PortletDefinition portletDefinition,
                                              long timeoutMetadata)
    {
        int expirationCache = getExpirationCache(portletDefinition);
        PortletContent portletContent= createPortletContent(requestContext, portletWindow, expirationCache);

        RenderingJob rJob = null;
              
        portletWindow.getFragment().setPortletContent(portletContent);
       
View Full Code Here

        context.getPortalURL().getNavigationalState().registerPortletContentCachedForPublicRenderParameters(context, content);
    }   
   
    public void notifyContentComplete(RequestContext context, PortletWindow window)
    {
        PortletContent content = window.getFragment().getPortletContent();
        if (content.getExpiration() != 0)
        {
            addToCache(context, content);
        }
    }
View Full Code Here

    {
        try
        {
            for (RenderingJob job : renderingJobs)
            {
                PortletContent portletContent = job.getPortletContent();
               
                synchronized (portletContent)
                {
                    if (!portletContent.isComplete())
                    {
                        portletContent.wait();
                    }
                }
            }
        }
        catch (Exception e)
View Full Code Here

                    PortletWindow window = job.getWindow();
                    PortletWindowID windowId = (null != window ? window.getId() : null);
                    log.warn("Portlet Rendering job to be interrupted by timeout (" + job.getTimeout() + "ms): " + windowId.getStringId());
                }

                PortletContent content = job.getPortletContent();
               
                synchronized (content)
                {
                    if (!content.isComplete())
                    {
                        worker.interrupt();
                        content.wait();
                    }
                }
               
            } catch (Exception e)
            {
View Full Code Here

    {
        ContentCacheKey cacheKey = portletContentCache.createCacheKey(requestContext, fragment.getId());       
        CacheElement cachedElement = portletContentCache.get(cacheKey);
        if (cachedElement != null)
        {
            PortletContent portletContent = (PortletContent)cachedElement.getContent();           
            fragment.setPortletContent(portletContent);
            ContentDispatcherCtrl dispatcher = new ContentDispatcherImpl(portletContent);
            HttpServletRequest servletRequest = requestContext.getRequestForWindow(portletWindow);

            this.addTitleService.setDynamicTitle(portletWindow, servletRequest, dispatcher.getPortletContent(fragment).getTitle());
View Full Code Here

    }
   
    public ContentDispatcherCtrl createDispatcher(RequestContext request, ContentFragment fragment, int expirationCache)
    {
        ContentCacheKey cacheKey = portletContentCache.createCacheKey(request, fragment.getId());               
        PortletContent content = new PortletContentImpl(this, cacheKey, expirationCache);
        ContentDispatcherCtrl dispatcher = new ContentDispatcherImpl(content);
        return dispatcher;
    }
View Full Code Here

        try
        {
            while (iter.hasNext())
            {
                RenderingJob job = (RenderingJob) iter.next();
                PortletContent portletContent = job.getPortletContent();
               
                if (!portletContent.isComplete())
                {
                    synchronized (portletContent)
                    {
                        portletContent.wait();
                    }
                }
            }
        }
        catch (Exception e)
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.aggregator.PortletContent

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.