Package org.apache.jetspeed.om.page.psml

Examples of org.apache.jetspeed.om.page.psml.ContentFragmentImpl


    }

    public void testWindowAccess() throws Exception
    {
        List windows = new ArrayList();
        ContentFragment f1 = new ContentFragmentImpl((Fragment) fragMock.proxy(), new HashMap());
        MutablePortletEntity entity = (MutablePortletEntity) entityMock.proxy();
        CompositeWindowList windowList = (CompositeWindowList) windowListMock.proxy();
        entityAccessMock.expects(new InvokeAtLeastOnceMatcher()).method("getPortletEntityForFragment")
                .withAnyArguments().will(new ReturnStub(entity));
        fragMock.expects(new InvokeAtLeastOnceMatcher()).method("getId").withNoArguments()
View Full Code Here


    /* (non-Javadoc)
     * @see org.apache.jetspeed.aggregator.Aggregator#build(org.apache.jetspeed.request.RequestContext)
     */
    public void build(RequestContext context) throws JetspeedException, IOException
    {
        ContentFragment fragment = new ContentFragmentImpl(new FragmentImpl(), new HashMap()); // TODO: fragment factory
        fragment.setType(Fragment.PORTLET);
        fragment.setName(context.getRequestParameter(PortalReservedParameters.PORTLET));
        String entity = context.getRequestParameter(PortalReservedParameters.PORTLET_ENTITY);
        if (entity == null)
        {
            entity = (String)context.getAttribute(PortalReservedParameters.PORTLET_ENTITY);         
        }
        fragment.setId(entity)
        
        String decorator = fragment.getDecorator();
        if( decorator == null)
        {
           // decorator = context.getPage().getDefaultDecorator(fragment.getType());
            log.debug("No sepecific decorator portlet so using page default: "+decorator);
        }
       

        ContentDispatcher dispatcher = renderer.getDispatcher(context, false);
        renderer.renderNow(fragment, context);
//       dispatcher.include(fragment);
        context.getResponse().getWriter().write(fragment.getRenderedContent());
       
    }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.page.psml.ContentFragmentImpl

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.