Package org.apache.jetspeed.om.page

Examples of org.apache.jetspeed.om.page.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


        if (fragment != null)
        {               
            if (!layout.equals(fragment.getName()))
            {
                fragment.setName(layout);
                ContentFragment contentFragment = new ContentFragmentImpl(fragment, new HashMap());                   
                PortletWindow window = windowAccess.getPortletWindow(contentFragment);
                if (window != null)
                {
                    entityAccess.updatePortletEntity(window.getPortletEntity(), contentFragment);
                    entityAccess.storePortletEntity(window.getPortletEntity());
                    windowAccess.createPortletWindow(window.getPortletEntity(), contentFragment.getId());
                    count++;
                    if ( isBlank(sizes) )
                    {
                        fragment.setLayoutSizes(null);
                    }
View Full Code Here

        if (fragment != null)
        {               
            if (!layout.equals(fragment.getName()))
            {
                fragment.setName(layout);
                ContentFragment contentFragment = new ContentFragmentImpl(fragment, new HashMap());                   
                PortletWindow window = windowAccess.getPortletWindow(contentFragment);
                if (window != null)
                {
                    entityAccess.updatePortletEntity(window.getPortletEntity(), contentFragment);
                    entityAccess.storePortletEntity(window.getPortletEntity());
                    windowAccess.createPortletWindow(window.getPortletEntity(), contentFragment.getId());
                    count++;
                    if ( isBlank(sizes) )
                    {
                        fragment.setLayoutSizes(null);
                    }
View Full Code Here

    }

    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

        PortletAggregatorFragmentImpl fragment = new PortletAggregatorFragmentImpl(
                entityId);
        fragment.setType(Fragment.PORTLET);
        fragment.setName(portletId);
        ContentFragment contentFragment = new ContentFragmentImpl(fragment,
                new HashMap());
        //renderer.renderNow(contentFragment, context);
        renderer.render(contentFragment, context);
        return contentFragment.getRenderedContent();
    }
View Full Code Here

                if (null == actionWindow.getPortletEntity())
                {
                    try
                    {
                        Fragment fragment = request.getPage().getFragmentById(actionWindow.getId().toString());
                        ContentFragment contentFragment = new ContentFragmentImpl(fragment, new HashMap());
                        actionWindow = this.windowAccessor.getPortletWindow(contentFragment);
                    }
                    catch (Exception e)
                    {
                        log.error("Failed to refresh action window.", e);
View Full Code Here

        if (fragment != null)
        {               
            if (!layout.equals(fragment.getName()))
            {
                fragment.setName(layout);
                ContentFragment contentFragment = new ContentFragmentImpl(fragment, new HashMap());                   
                PortletWindow window = windowAccess.getPortletWindow(contentFragment);
                if (window != null)
                {
                    entityAccess.updatePortletEntity(window.getPortletEntity(), contentFragment);
                    entityAccess.storePortletEntity(window.getPortletEntity());
                    windowAccess.createPortletWindow(window.getPortletEntity(), contentFragment.getId());
                    count++;
                    if ( isBlank(sizes) )
                    {
                        fragment.setLayoutSizes(null);
                    }
View Full Code Here

        PortletAggregatorFragmentImpl fragment = new PortletAggregatorFragmentImpl(
                entityId);
        fragment.setType(Fragment.PORTLET);
        fragment.setName(portletId);
        ContentFragment contentFragment = new ContentFragmentImpl(fragment, new HashMap(), true);
        renderer.renderNow(contentFragment, context);
        return contentFragment.getRenderedContent();
    }
View Full Code Here

            }
            fragment = new PortletAggregatorFragmentImpl(entity);       
            fragment.setType(Fragment.PORTLET);
            fragment.setName(name);
        }
        ContentFragment contentFragment = new ContentFragmentImpl(fragment, new HashMap());
        renderer.renderNow(contentFragment, context);
        context.getResponse().getWriter().write(contentFragment.getRenderedContent());
        PortletContent content = contentFragment.getPortletContent();
        if (content.getExpiration() == 0)
        {
            contentFragment.getPortletContent().release();
        }       
    }
View Full Code Here

        if (fragment != null)
        {               
            if (!layout.equals(fragment.getName()))
            {
                fragment.setName(layout);
                ContentFragment contentFragment = new ContentFragmentImpl(fragment, new HashMap());                   
                PortletWindow window = windowAccess.getPortletWindow(contentFragment);
                if (window != null)
                {
                    entityAccess.updatePortletEntity(window.getPortletEntity(), contentFragment);
                    entityAccess.storePortletEntity(window.getPortletEntity());
                    windowAccess.createPortletWindow(window.getPortletEntity(), contentFragment.getId());
                    count++;
                    if ( isBlank(sizes) )
                    {
                        fragment.setLayoutSizes(null);
                    }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.page.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.