Package org.apache.pluto.om.window

Examples of org.apache.pluto.om.window.PortletWindow


                                  servletResponse,
                                  getServletConfig());

        PortalURL currentURL = env.getRequestedPortalURL();
        PortalControlParameter control = new PortalControlParameter(currentURL);
        PortletWindow actionWindow = control.getPortletWindowOfAction();
        if (actionWindow!=null)
        {
            try {
                PortletContainerFactory.
                    getPortletContainer().
View Full Code Here


        // if not, create one
        final Map objectModel = ContextHelper.getObjectModel(this.context);

        PortletURLProviderImpl event = (PortletURLProviderImpl) objectModel.get("portlet-event");
        if ( event != null ) {
            PortletWindow actionWindow = event.getPortletWindow();
            try {
                final ServletRequestImpl req = (ServletRequestImpl) objectModel.get("portlet-request");
                final ServletResponseImpl res= (ServletResponseImpl)objectModel.get("portlet-response");
                this.portletContainer.processPortletAction(actionWindow, req.getRequest(actionWindow), res);
View Full Code Here

        PortletApplicationEntity pae = registry.getPortletApplicationEntityList().get(ObjectIDImpl.createFromString("cocoon"));
        PortletEntity portletEntity = ((PortletEntityListImpl)pae.getPortletEntityList()).add(pae, portletEntityId, coplet, registry);
       
        if ( portletEntity.getPortletDefinition() != null ) {
            // create the window
            PortletWindow portletWindow = new PortletWindowImpl(portletEntityId);               
            ((PortletWindowCtrl)portletWindow).setId(coplet.getId());
            ((PortletWindowCtrl)portletWindow).setPortletEntity(portletEntity);
            PortletWindowList windowList = portletEntity.getPortletWindowList();       
            ((PortletWindowListCtrl)windowList).add(portletWindow);   
            coplet.setTemporaryAttribute("window", portletWindow);
View Full Code Here

            final String portlet = (String)super.getConfiguration(coplet, "portlet");
            if ( portlet == null ) {
                throw new SAXException("Portlet configuration is missing.");
            }
            // get the window
            final PortletWindow window = (PortletWindow)coplet.getTemporaryAttribute("window");
            if ( window == null ) {
                throw new SAXException("Portlet couldn't be loaded: " + portlet);
            }
            final Map objectModel = ContextHelper.getObjectModel(this.context);
            final ServletRequestImpl  req = (ServletRequestImpl) objectModel.get("portlet-request");
View Full Code Here

    public void logout(CopletInstanceData coplet) {
        super.logout(coplet);
        if ( this.portletContainer == null ) {
            return;
        }
        PortletWindow window = (PortletWindow)coplet.getTemporaryAttribute("window");
        if ( window != null ) {
            coplet.removeTemporaryAttribute("window");
            PortletDefinitionRegistry registry = (PortletDefinitionRegistry) environment.getContainerService(PortletDefinitionRegistry.class);
       
            PortletApplicationEntity pae = registry.getPortletApplicationEntityList().get(ObjectIDImpl.createFromString("cocoon"));
            ((PortletEntityListImpl)pae.getPortletEntityList()).remove(window.getPortletEntity());
        }
    }
View Full Code Here

        final CopletInstanceData copletInstanceData = ((CopletLayout)layout).getCopletInstanceData();

        if ( config.rootTag ) {
            XMLUtils.startElement(contenthandler, config.tagName);
        }
        final PortletWindow window = (PortletWindow)copletInstanceData.getTemporaryAttribute("window");
        if ( window == null ) {
            // no portlet window, so use a default behaviour
            XMLUtils.createElement(contenthandler, "title", copletInstanceData.getTitle());
        } else {
            if ( ((PortletWindowImpl)window).getLayout() == null ) {
                ((PortletWindowImpl)window).setLayout((CopletLayout)layout);
            }
           
            String title = (String) copletInstanceData.getTemporaryAttribute("dynamic-title");
            if ( title == null ) {
                final PortletDefinition def = window.getPortletEntity().getPortletDefinition();
                try {
                    title = def.getDisplayName(def.getLanguageSet().getDefaultLocale()).getDisplayName();
                } catch (Exception ignore)  {
                    title = copletInstanceData.getTitle();
                }
View Full Code Here

        windowListMock.expects(new InvokeCountMatcher(4)).method("add").withAnyArguments().will(
                new ListAppendStub(windows));
       

        PortletWindow window = windowAccess.getPortletWindow(f1);
        assertNotNull(window);
        assertEquals("frag1", window.getId().toString());

        // Make sure the portlet entity's window list got updated
        assertEquals(1, windows.size());

        PortletWindow windowInList = (PortletWindow) windows.get(0);

        // The window in the entities list should be the same as the one
        // returned by getPortletWindow(f1)
        assertEquals(windowInList, window);
View Full Code Here

        ///////////////////////////////////////////////////////////////////////////////////////////////
        ContentDispatcher dispatcher = renderer.getDispatcher(context, (strategy == STRATEGY_PARALLEL));
        // handle maximized state
        NavigationalState nav = context.getPortalURL().getNavigationalState();
        PortletWindow window = nav.getMaximizedWindow();
        if (null != window)
        {
            renderMaximizedWindow(context, page, root, window);
        }
        else
View Full Code Here

    }

    public PortletWindow createPortletWindow(PortletEntity entity, String windowId)
    {
        PortletWindow found = getWindowFromCache(windowId);
        if (found != null)
        {
            return found;
        }
       
View Full Code Here

        return window;       
    }

    public PortletWindow createPortletWindow(String windowId)
    {
        PortletWindow found = getWindowFromCache(windowId);
        if (found != null)
        {
            return found;
        }       
        PortletWindowImpl window = new PortletWindowImpl(windowId);
View Full Code Here

TOP

Related Classes of org.apache.pluto.om.window.PortletWindow

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.