Package org.apache.jetspeed.om.page

Examples of org.apache.jetspeed.om.page.ContentPage


     *
     * @return Unique Portlet Entity ID
     */
    public void build( RequestContext context ) throws JetspeedException, IOException
    {
        ContentPage page = context.getPage();
        if (null == page)
        {
            throw new JetspeedException("Failed to find PSML Pin ContentPageAggregator.build");
        }

        ContentFragment root = page.getRootContentFragment();

        if (root == null)
        {
            throw new JetspeedException("No root ContentFragment found in ContentPage");
        }

        String layoutDecorator = root.getDecorator();
        if (layoutDecorator == null)
        {
            layoutDecorator = page.getDefaultDecorator(root.getType());
        }

        contentServer.prepareContentPaths(context, page);

        ///////////////////////////////////////////////////////////////////////////////////////////////
View Full Code Here


     *
     * @return Unique Portlet Entity ID
     */
    public void build(RequestContext request) throws JetspeedException
    {
        ContentPage page = request.getPage();
        if (null == page)
        {
            throw new JetspeedException("Failed to find PSML Pin BasicAggregator.build");
        }

        ContentFragment root = page.getRootContentFragment();
        render(portletContainer, root, request);
       
        for (Iterator fit = root.getFragments().iterator(); fit.hasNext();)
        {
            ContentFragment fragment = (ContentFragment)fit.next();
View Full Code Here

     *
     * @return Unique Portlet Entity ID
     */
    public void build( RequestContext context ) throws JetspeedException, IOException
    {
        ContentPage page = context.getPage();
        if (null == page)
        {
            throw new JetspeedException("Failed to find PSML Pin ContentPageAggregator.build");
        }

        ContentFragment root = page.getRootContentFragment();

        if (root == null)
        {
            throw new JetspeedException("No root ContentFragment found in ContentPage");
        }

        String layoutDecorator = root.getDecorator();
        if (layoutDecorator == null)
        {
            layoutDecorator = page.getDefaultDecorator(root.getType());
        }

        String defaultPortletDecorator = page.getDefaultDecorator(ContentFragment.PORTLET);

        ///////////////////////////////////////////////////////////////////////////////////////////////
        //TODO: Remove hard coding of locations and use CM + TL
        //      DST: Im going to encapsulate this into a class, which can be accessed
        // by
View Full Code Here

            {
                throw new Exception("fragment id not provided");
            }
            resultMap.put(FRAGMENTID, fragmentId);
           
            ContentPage page = requestContext.getPage();           
            ContentFragment fragment = page.getContentFragmentById(fragmentId);
           
            if ( fragment == null )
            {
              throw new Exception( "fragment specified by id cannot be found" );
            }
            String requestedState = getActionParameter(requestContext, WINDOW_STATE);
            String requestedMode = getActionParameter(requestContext, PORTLET_MODE);   
            if ( "layout".equals( fragment.getType() ) )
            {
              if ( ! fragment.getId().equals( page.getRootFragment().getId() ) )
              {
                throw new Exception( "for layout fragments, change action applies to only to the root layout fragment (i.e. it does not apply to nested layout fragments)" );
              }
              PageActionAccess pageActionAccess = (PageActionAccess)requestContext.getAttribute( PortalReservedParameters.PAGE_EDIT_ACCESS_ATTRIBUTE );
              if ( pageActionAccess == null )
View Full Code Here

    /**
     * Builds the portlet set defined in the context into a portlet tree.
     */
    public void build( RequestContext context ) throws JetspeedException, IOException
    {
        ContentPage page = context.getPage();
       
        if (null == page)
        {
            throw new JetspeedException("Failed to find PSML Pin ContentPageAggregator.build");
        }
       
        ContentFragment root = page.getRootContentFragment();
       
        if (root == null)
        {
            throw new JetspeedException("No root ContentFragment found in ContentPage");
        }
View Full Code Here

     *
     * @return Unique Portlet Entity ID
     */
    public void build( RequestContext context ) throws JetspeedException, IOException
    {
        ContentPage page = context.getPage();
        if ( null == page )
        {
            throw new JetspeedException( "Failed to find PSML Pin ContentPageAggregator.build" );
        }

        ContentFragment root = page.getRootContentFragment();

        if ( root == null )
        {
            throw new JetspeedException( "No root ContentFragment found in ContentPage" );
        }
View Full Code Here

                    {
                        PortletWindowSessionNavigationalStates sessionStates = (PortletWindowSessionNavigationalStates)session.getAttribute(NavigationalState.NAVSTATE_SESSION_KEY);
                        if ( sessionStates != null )
                        {
                            sessionStates.removeFromCache(context, clearCacheWindowId, cache);
                            ContentPage page = context.getPage();
                            sessionStates.removeFromCache(context, page.getId(), decorationCache);                       
                        }
                    }
                }
            }
            else
View Full Code Here

        int configModeIndex = actionTemplates.indexOf(CONFIG_MODE_TEMPLATE);
        if (configModeIndex != -1)
        {
            try
            {
                ContentPage page = rc.getPage();
                page.checkAccess(JetspeedActions.CONFIG);
            }
            catch (SecurityException e)
            {
                actionTemplates.remove(configModeIndex);
            }
        }
       
        int editDefaultsModeIndex = actionTemplates.indexOf(EDIT_DEFAULTS_MODE_TEMPLATE);
        if (editDefaultsModeIndex != -1)
        {
            try
            {
                ContentPage page = rc.getPage();
                page.checkAccess(JetspeedActions.EDIT_DEFAULTS);
            }
            catch (SecurityException e)
            {
                actionTemplates.remove(editDefaultsModeIndex);
            }
View Full Code Here

    }

    protected void clearPortletCacheForPage(RequestContext request, PortletWindow actionWindow)
    throws JetspeedException
    {
        ContentPage page = request.getPage();
        if (null == page)
        {
            throw new JetspeedException("Failed to find PSML Pin ContentPageAggregator.build");
        }
        ContentFragment root = page.getRootContentFragment();
        if (root == null)
        {
            throw new JetspeedException("No root ContentFragment found in ContentPage");
        }
        if (!isNonStandardAction(actionWindow))
        {
            notifyFragments(root, request, page);
           
            // if the fragment is rendered from a decorator template, the target cache would not be cleared by the above notification.
            // so, let's clear target cache of action window directly again.
            String fragmentId = actionWindow.getWindowId();
            if (page.getFragmentById(fragmentId) == null)
            {
                clearTargetCache(fragmentId, request);
            }
        }
        else
        {
            ContentFragment fragment = page.getContentFragmentById(actionWindow.getWindowId());
           
            if (fragment != null)
            {
                clearTargetCache(fragment, request);
            }
View Full Code Here

    {
        try
        {
            String pathSave = this.getPath();          
            this.setPath(nonProfiledPath);
            ContentPage realPage = this.getPage();
            this.setPage(null);               
            Map locators = null;
            ProfileLocator locator = profiler.getProfile(this, ProfileLocator.PAGE_LOCATOR);
            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

TOP

Related Classes of org.apache.jetspeed.om.page.ContentPage

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.