Package org.apache.pluto.container

Examples of org.apache.pluto.container.PortletWindow


      Collection<PortletWindowConfig> portlets = getAllPortlets(driverConfig);

      // iterate all portlets in the portal
      for (PortletWindowConfig config : portlets) {
        PortletWindow window = new PortletWindowImpl(container, config, portalURL);
        if (portletNames != null) {
          for (String portlet : portletNames) {
            if (portlet.equals(config.getId())) {
/* PLUTO-569: multi-threaded (event) request processing isn't thread save with the Pluto Portal Driver handling of request attributes
   as they all are stored/managed within the single underlying HttpServletRequest.
View Full Code Here


        // Retrieve the portlet container from servlet context.
        PortletContainer container = (PortletContainer)
                servletContext.getAttribute(AttributeKeys.PORTLET_CONTAINER);
       
        // Create the portlet window to render.
        PortletWindow window = new PortletWindowImpl(container, windowConfig, portalURL);
       
        // Check if someone else is maximized. If yes, don't show content.
        Map windowStates = portalURL.getWindowStates();
        for (Iterator it = windowStates.keySet().iterator(); it.hasNext(); ) {
            String windowId = (String) it.next();
            WindowState windowState = (WindowState) windowStates.get(windowId);
            if (WindowState.MAXIMIZED.equals(windowState)
                && !window.getId().getStringId().equals(windowId)) {
                return SKIP_BODY;
            }
        }
       
        // Create portal servlet response to wrap the original
View Full Code Here

        // Retrieve the portlet container from servlet context.
        PortletContainer container = (PortletContainer)
                servletContext.getAttribute(AttributeKeys.PORTLET_CONTAINER);
       
        // Create the portlet window to render.
        PortletWindow window = new PortletWindowImpl(container, windowConfig, requestedPortalUrl);
   
    PortletMode currentMode = requestedPortalUrl.getPortletMode(window.getId().getStringId());

        //start the markup
        StringBuffer tag = new StringBuffer();
//        String strCurrentMode = currentMode.toString();       
//        tag.append("Current mode: " + currentMode.toString());
View Full Code Here

        DriverPortletConfig portletConfig = portletConfigs.get(portletName);
        requestContext.init(portletConfig, getServletContext(), request, response);
        responseContext.init(request, response);

        PortletWindow window = requestContext.getPortletWindow();

        PortletInvocationEvent event = new PortletInvocationEvent(portletRequest, window, methodId.intValue());

        notify(event, true, null);
View Full Code Here

        // Retrieve the portlet container from servlet context.
        PortletContainer container = (PortletContainer) servletContext.getAttribute(AttributeKeys.PORTLET_CONTAINER);

        // Create the portlet window to render.
        PortletWindow window = new PortletWindowImpl(container, windowConfig, portalURL);

        // Check if someone else is maximized. If yes, don't show content.
        Map windowStates = portalURL.getWindowStates();
        for (Iterator it = windowStates.keySet().iterator(); it.hasNext();) {
            String windowId = (String) it.next();
            WindowState windowState = (WindowState) windowStates.get(windowId);
            if (WindowState.MAXIMIZED.equals(windowState)
                    && !window.getId().getStringId().equals(windowId)) {
                return "";
            }
        }

        // Create portal servlet request and response to wrap the original
View Full Code Here

        // Retrieve the current portal URL.
        PortalRequestContext portalEnv = PortalRequestContext.getContext(jahiaContextRequest);
        PortalURL portalURL = portalEnv.getRequestedPortalURL();
       
        // Create the portlet window to render.
        PortletWindow window = new PortletWindowImpl(null,windowConfig, portalURL);

        return window;
    }
View Full Code Here

      Collection<PortletWindowConfig> portlets = getAllPortlets(driverConfig);

      // iterate all portlets in the portal
      for (PortletWindowConfig config : portlets) {
        PortletWindow window = new PortletWindowImpl(container, config, portalURL);
        if (portletNames != null) {
          for (String portlet : portletNames) {
            if (portlet.equals(config.getId())) {

              // the thread now is a new one, with possible
View Full Code Here

        }
  }

  public void setEvent(String name, Serializable value)
  {
      PortletWindow window = getPortletWindow();
        String defaultNamespace;
        defaultNamespace = window.getPortletDefinition().getApplication().getDefaultNamespace();
        QName qname = new QName(defaultNamespace, name);
        setEvent(qname, value);
  }
View Full Code Here

        // Retrieve the portlet container from servlet context.
        PortletContainer container = (PortletContainer)
                servletContext.getAttribute(AttributeKeys.PORTLET_CONTAINER);
       
        // Create the portlet window to render.
        PortletWindow window = null;
       
       
        try
        {
          // If this fails it means that the portlet will be not available.
          // Render Tag will take care of it.
          window = new PortletWindowImpl(container, windowConfig, requestedPortalUrl);
        }
        catch(RuntimeException ex)
        {
            if (LOG.isDebugEnabled()) {
                  LOG.debug("The portlet " + windowConfig.getPortletName() + " is not available. Is already deployed?");
              }
        }
   
        //start the markup
        StringBuffer tag = new StringBuffer();
    
        // Do not render if we don't have a window.
        if(window!=null)
        {
          PortletMode currentMode = requestedPortalUrl.getPortletMode(window.getId().getStringId());


          //        String strCurrentMode = currentMode.toString();       
          //        tag.append("Current mode: " + currentMode.toString());
          tag.append("<form action=\"\" name=\"modeSelectionForm\" style=\"display:inline\"><select onchange=\"self.location=this.options[this.selectedIndex].value\">");
View Full Code Here

        // Retrieve the portlet container from servlet context.
        PortletContainer container = (PortletContainer)
                servletContext.getAttribute(AttributeKeys.PORTLET_CONTAINER);
       
        // Create the portlet window to render.
        PortletWindow window = null;


        try {
          window = new PortletWindowImpl(container, windowConfig, portalURL);
        } catch(RuntimeException e) // FIXME: Prose a change to anything else, handle it.
        {
          if (LOG.isDebugEnabled()) {
              LOG.debug("The portlet " + windowConfig.getPortletName() + " is not available. Is already deployed?");
          }
        }

      // Create portal servlet response to wrap the original
      // HTTP servlet response.
      PortalServletResponse portalResponse = new PortalServletResponse(
                (HttpServletResponse) pageContext.getResponse());
     
     
        if(window!=null)
        {
          // Check if someone else is maximized. If yes, don't show content.
          Map windowStates = portalURL.getWindowStates();
          for (Iterator it = windowStates.keySet().iterator(); it.hasNext(); ) {
            String windowId = (String) it.next();
            WindowState windowState = (WindowState) windowStates.get(windowId);
            if (WindowState.MAXIMIZED.equals(windowState)
                && !window.getId().getStringId().equals(windowId)) {
              return SKIP_BODY;
            }
          }

       
View Full Code Here

TOP

Related Classes of org.apache.pluto.container.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.