Package org.apache.pluto.om.window

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


  }
 
  public void removePortletWindowByPortletEntityId(String portletEntityId)
  {
      assert portletEntityId != null;
    PortletWindow portletWindow = getPortletWindowByEntityId(portletEntityId);
    if(portletWindow != null)
    {
        portletEntityIdToEntityid.remove(portletEntityId);
            removeQuiet(portletWindow.getId().toString());
    }
  }
View Full Code Here


    Iterator keys = ehcache.getKeys().iterator();
    Set windows = new HashSet();
    while(keys.hasNext())
    {
      String key = (String) keys.next();
      PortletWindow window = getPortletWindow(key);
      if(window != null)
      {
        windows.add(window);
      }     
    }
View Full Code Here

    }

    public void removePortletWindow(String windowId)
    {
        PortletWindow window = (PortletWindow) windows.get(windowId);
        if(window != null)
        {
            windows.remove(windowId);
            portletEntityToWindow.remove(window.getPortletEntity().getId().toString());
        }

    }
View Full Code Here

    }

    public void removePortletWindowByPortletEntityId(String portletEntityId)
    {
        PortletWindow window = getPortletWindowByEntityId(portletEntityId);
        if(window != null)
        {  
            removePortletWindow(window.getId().toString());
        }

    }
View Full Code Here

        request.setRequestURI("/jetspeed/portal/stuff");

        portalURL.setRequest(request);
        portalURL.setCharacterEncoding("UTF-8");

        PortletWindow window = new PortletWindowImpl("111");

        HashMap parameters = new HashMap();
        parameters.put("test",new String[]{"one","two","three"});

        String portletURL = portalURL.createPortletURL(window,parameters,PortletMode.EDIT,WindowState.MAXIMIZED,true,false);
View Full Code Here

    protected void doTestUrl(PortalURL portalURL, HttpServletRequest request)
    {            
      portalURL.setRequest(request);
      portalURL.setCharacterEncoding("UTF-8");
     
      PortletWindow window = new PortletWindowImpl("111");
      NavigationalState nav = portalURL.getNavigationalState();

      // Check that they come out correctly
      assertTrue("window mode is not set", nav.getMode(window).equals(PortletMode.EDIT));
      assertTrue("window state is not set", nav.getState(window).equals(WindowState.MAXIMIZED));
      PortletWindow target = nav.getPortletWindowOfAction();
      assertNotNull("target window is null", target);
      assertEquals("target window should equal window 111", target.getId(), "111");

      PortletWindow maximizedWindow = nav.getMaximizedWindow();
      assertNotNull("maximized window is null", maximizedWindow);
      assertEquals("maximized window should equal window 111", maximizedWindow.getId(), "111");

      Iterator iter = nav.getParameterNames(target);
      assertTrue("There should be one parameter",iter.hasNext());
      while ( iter.hasNext() ) {
          assertEquals("parameter name should equals \"test\"", (String)iter.next(), "test");
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

        WorkerMonitor monitor = new WorkerMonitorImpl(1, 2, 1, 1);
       
        List jobs = new ArrayList(JOB_COUNT);
        for (int ix = 0; ix < JOB_COUNT; ix++)
        {
            PortletWindow window = new PortletWindowImpl("w" + String.valueOf(ix));      
            jobs.add(new MockRenderJob("Job-" + (ix + 1), 4000, window));
        }
        assertNotNull("monitor is null", monitor);
        monitor.start();
        for (int ix = 0; ix < JOB_COUNT; ix++)
View Full Code Here

        {               
            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

        {
            throw new JetspeedException("No root ContentFragment found in ContentPage");
        }
        // 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

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.