Examples of DriverConfiguration


Examples of org.apache.pluto.driver.config.DriverConfiguration

        // Evaluate portlet ID attribute.
        evaluatePortletId();
       
        // Retrieve the portlet window config for the evaluated portlet ID.
        ServletContext servletContext = pageContext.getServletContext();
        DriverConfiguration driverConfig = (DriverConfiguration)
                servletContext.getAttribute(AttributeKeys.DRIVER_CONFIG);

        if (isPortletModeAllowed(driverConfig, portletMode)) {
            // Retrieve the portal environment.
            PortalRequestContext portalEnv = PortalRequestContext.getContext(
View Full Code Here

Examples of org.apache.pluto.driver.config.DriverConfiguration

            LOG.error(msg, ex);
            throw ex;
        }

        LOG.debug(" [1a] Loading DriverConfiguration. . . ");
        DriverConfiguration driverConfiguration = (DriverConfiguration)
                springContext.getBean("DriverConfiguration");

        LOG.debug(" [1b] Registering DriverConfiguration. . .");
        servletContext.setAttribute(DRIVER_CONFIG_KEY, driverConfiguration);
View Full Code Here

Examples of org.apache.pluto.driver.config.DriverConfiguration

     *
     * @param servletContext the servlet context.
     */
    private void destroyDriverConfiguration(ServletContext servletContext)
    {
        DriverConfiguration driverConfig = (DriverConfiguration)
                servletContext.getAttribute(DRIVER_CONFIG_KEY);
        if (driverConfig != null)
        {
            servletContext.removeAttribute(DRIVER_CONFIG_KEY);
        }
View Full Code Here

Examples of org.apache.pluto.driver.config.DriverConfiguration

        //TODO: add page URI input to form
        String uri = request.getParameter("pageURI");
        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

Examples of org.apache.pluto.driver.config.DriverConfiguration

     * @param request The action request.
     * @throws IOException If a problem occurs accessing the config file.
     */
    public void doRemovePage(ActionRequest request) throws IOException {
        String page = request.getParameter("page");
        DriverConfiguration driverConfig = (DriverConfiguration) getPortletContext()
      .getAttribute(AttributeKeys.DRIVER_CONFIG);
        //make sure we are not deleting the default page
    String defaultPage = getDefaultPage();
      if (page.equalsIgnoreCase(defaultPage)) {
      LOG.warn("Trying to delete the default page. Page deletion will be ignored.");
      //TODO: send message back to UI
        return;
      }
        //make sure we are not deleting the Pluto Admin page
    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

Examples of org.apache.pluto.driver.config.DriverConfiguration

        PageConfig config = getPageConfig(page);
        config.removePortlet(portletId);
    }

    private PageConfig getPageConfig(String page) {
        DriverConfiguration driverConfig = (DriverConfiguration) getPortletContext()
            .getAttribute(AttributeKeys.DRIVER_CONFIG);

        PageConfig config = driverConfig.getPageConfig(page);
        return config;
    }
View Full Code Here

Examples of org.apache.pluto.driver.config.DriverConfiguration

      }
        return incPage;
    }

    public Collection getAvailablePages() {
        DriverConfiguration configuration =
            (DriverConfiguration) getPortletContext().getAttribute(AttributeKeys.DRIVER_CONFIG);

        ArrayList list = new ArrayList();
        Iterator it = configuration.getPages().iterator();
        while (it.hasNext()) {
            PageConfig config = (PageConfig) it.next();
            ArrayList portlets = new ArrayList();
            Iterator pids = config.getPortletIds().iterator();
            while (pids.hasNext()) {
View Full Code Here

Examples of org.apache.pluto.driver.config.DriverConfiguration

     * @throws IOException
     */
    private void persistPages() throws IOException {
      //TODO: Null checks??? Substitute empty string or throw an Exception
      final String NL = System.getProperty("line.separator");
        DriverConfiguration driverConfig = (DriverConfiguration) getPortletContext()
          .getAttribute(AttributeKeys.DRIVER_CONFIG);
      StringBuffer renderConfig = new StringBuffer();
      //start with render-config element
      renderConfig.append(" ");//indent
      renderConfig.append(RENDER_CONFIG_SEARCH_TOKEN);
      renderConfig.append(getDefaultPage());
      renderConfig.append("\">");
      renderConfig.append(NL);
      Collection pages = getAvailablePages();
      //iterate through pages
      for (Iterator iter = pages.iterator(); iter.hasNext();) {
      Page page = (Page) iter.next();
          PageConfig config = driverConfig.getPageConfig(page.getName());
          renderConfig.append("    <page name=\"");
          String pageName = config.getName();
          renderConfig.append(pageName);
          renderConfig.append("\" uri=\"");
          String uri = config.getUri();
View Full Code Here

Examples of org.apache.pluto.driver.config.DriverConfiguration

     * Returns the requested portal URL.
     * @return the requested portal URL.
     */
    public synchronized PortalURL getRequestedPortalURL() {
        if(requestedPortalURL == null) {
            DriverConfiguration config = (DriverConfiguration)
                servletContext.getAttribute(AttributeKeys.DRIVER_CONFIG);
            if (config != null) {
              PortalURLParser parser = config.getPortalUrlParser();
              requestedPortalURL = parser.parse(request);
            } else {
              String msg = "Driver configuration not found while parsing portal URL!";
              LOG.error(msg);
              throw new IllegalStateException(msg);
View Full Code Here

Examples of org.apache.pluto.driver.config.DriverConfiguration

    public void processEvents(PortletContainer container, PortletWindow portletWindow, HttpServletRequest request,
                              HttpServletResponse response, List<Event> events)
    {
        ServletContext containerServletContext = PortalRequestContext.getContext(request).getServletContext();
        DriverConfiguration driverConfig = (DriverConfiguration) containerServletContext
                .getAttribute(AttributeKeys.DRIVER_CONFIG);

        PortalURL portalURL = PortalURLParserImpl.getParser().parse(request);

//      Map<String, PortletWindowThread> portletWindowThreads = new HashMap<String, PortletWindowThread>();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.