Package org.apache.pluto.driver.services.portal

Examples of org.apache.pluto.driver.services.portal.PageConfig


                    + "an AdminConfiguration must be specified "
                    + "to run the TCK.");
            }

            pageName = (new DecimalFormat("TCK00000")).format(pageCounter++);
            PageConfig pageConfig = new PageConfig();
            pageConfig.setName(pageName);
            pageConfig.setUri(DEFAULT_PAGE_URI);
            for (int i = 0; i < portletNames.length; i++) {
              debugWithName("Processing portlet name: " + portletNames[i]);
                int index = portletNames[i].indexOf("/");
                String contextPath = "/" + portletNames[i].substring(0, index);
                String portletName = portletNames[i].substring(index + 1);
                pageConfig.addPortlet(contextPath, portletName);
                adminConfig.getPortletRegistryAdminService()
                    .addPortletApplication(contextPath);
            }

            adminConfig.getRenderConfigAdminService().addPage(pageConfig);
View Full Code Here


        // Otherwise (actionWindowConfig == null), handle the render request.
        else {
          if (LOG.isDebugEnabled()) {
            LOG.debug("Processing render request.");
          }
            PageConfig pageConfig = getPageConfig(portalURL);
            if (pageConfig == null)
            {
                // TODO Shouldn't we throw an exception here?
                LOG.error("PageConfig for render path [" + portalURL.getRenderPath() + "] could not be found.");
            }

            request.setAttribute(AttributeKeys.CURRENT_PAGE, pageConfig);
            String uri = (pageConfig.getUri() != null)
                ? pageConfig.getUri() : DEFAULT_PAGE_URI;
            if (LOG.isDebugEnabled()) {
              LOG.debug("Dispatching to: " + uri);
            }
            RequestDispatcher dispatcher = request.getRequestDispatcher(uri);
            dispatcher.forward(request, response);
View Full Code Here

        // Otherwise (actionWindowConfig == null), handle the render request.
        else {
          if (LOG.isDebugEnabled()) {
            LOG.debug("Processing render request.");
          }
            PageConfig pageConfig = getPageConfig(portalURL);
            if (pageConfig == null)
            {
                // TODO Shouldn't we throw an exception here?
                LOG.error("PageConfig for render path [" + portalURL.getRenderPath() + "] could not be found.");
            }

            request.setAttribute(AttributeKeys.CURRENT_PAGE, pageConfig);
            String uri = (pageConfig.getUri() != null)
                ? pageConfig.getUri() : DEFAULT_PAGE_URI;
            if (LOG.isDebugEnabled()) {
              LOG.debug("Dispatching to: " + uri);
            }
            RequestDispatcher dispatcher = request.getRequestDispatcher(uri);
            dispatcher.forward(request, response);
View Full Code Here

    Collection<PortletWindowConfig> portlets = new ArrayList<PortletWindowConfig>();
        Collection pages = driverConfig.getPages();
        if (pages != null){
            Iterator iPages = pages.iterator();
            while(iPages.hasNext()){
                PageConfig pageConfig = (PageConfig) iPages.next();
                Collection portletIDs = pageConfig.getPortletIds();
                if (portletIDs != null){
                    Iterator iPortletIDs = portletIDs.iterator();
                    while(iPortletIDs.hasNext()){
                        portlets.add(PortletWindowConfig.fromId(iPortletIDs.next().toString()));
                    }
View Full Code Here

                    + "an AdminConfiguration must be specified "
                    + "to run the TCK.");
            }
           
            pageName = (new DecimalFormat("TCK00000")).format(pageCounter++);
            PageConfig pageConfig = new PageConfig();
            pageConfig.setName(pageName);
            pageConfig.setUri(DEFAULT_PAGE_URI);
            for (int i = 0; i < portletNames.length; i++) {
              debugWithName("Processing portlet name: " + portletNames[i]);
                int index = portletNames[i].indexOf("/");
                String contextPath = "/" + portletNames[i].substring(0, index);
                String portletName = portletNames[i].substring(index + 1);
                pageConfig.addPortlet(contextPath, portletName);
//                adminConfig.getPortletRegistryAdminService()
//                    .addPortletApplication(contextPath);
            }

            adminConfig.getRenderConfigAdminService().addPage(pageConfig);
View Full Code Here

        // Otherwise (actionWindowConfig == null), handle the render request.
        else {
          if (LOG.isDebugEnabled()) {
            LOG.debug("Processing render request.");
          }
            PageConfig pageConfig = portalURL.getPageConfig(servletContext);
            if (pageConfig == null)
            {
              String renderPath = (portalURL == null ? "" : portalURL.getRenderPath());
                String msg = "PageConfig for render path [" + renderPath + "] could not be found.";
                LOG.error(msg);
                throw new ServletException(msg);
            }
           
            request.setAttribute(AttributeKeys.CURRENT_PAGE, pageConfig);
            String uri = (pageConfig.getUri() != null)
                ? pageConfig.getUri() : DEFAULT_PAGE_URI;
            if (LOG.isDebugEnabled()) {
              LOG.debug("Dispatching to: " + uri);
            }
            RequestDispatcher dispatcher = request.getRequestDispatcher(uri);
            dispatcher.forward(request, response);
View Full Code Here

        String contextPath = applicationName;
        if (contextPath.length() > 0)
        {
            contextPath = "/" + contextPath;
        }
        PageConfig config = getPageConfig(page);
        config.addPortlet(contextPath, portletName);

    }
View Full Code Here

        if (uri == null) {
          uri = PortalDriverServlet.DEFAULT_PAGE_URI;
        }
        DriverConfiguration driverConfig = (DriverConfiguration) getPortletContext()
        .getAttribute(AttributeKeys.DRIVER_CONFIG);
        PageConfig pageConfig = new PageConfig();
        pageConfig.setName(page);
        pageConfig.setUri(uri);

        RenderConfigService renderConfig = driverConfig.getRenderConfigService();
        renderConfig.addPage(pageConfig);
    }
View Full Code Here

    if (page.equalsIgnoreCase("Pluto Admin")) {
      LOG.warn("Trying to delete the Pluto Admin page. Page deletion will be ignored.");
      return;
    }

    PageConfig pageConfig = getPageConfig(page);
        RenderConfigService renderConfig = driverConfig.getRenderConfigService();
        renderConfig.removePage(pageConfig);
    }
View Full Code Here

        String page = request.getParameter("page");
        String portletId = request.getParameter("placedPortlets");

        LOG.info("Request: Remove [portletId=" + portletId + "] from page '" + page + "'");

        PageConfig config = getPageConfig(page);
        config.removePortlet(portletId);
    }
View Full Code Here

TOP

Related Classes of org.apache.pluto.driver.services.portal.PageConfig

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.