Examples of DriverConfiguration


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");

        driverConfiguration.init(servletContext);

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

View Full Code Here

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

        WebApplicationContext springContext = (WebApplicationContext)
                servletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);

        // Retrieve the driver configuration from servlet context.
        DriverConfiguration driverConfig = (DriverConfiguration)
                servletContext.getAttribute(DRIVER_CONFIG_KEY);

        try {
            LOG.info("Initializing Portlet Container. . .");
          
            // Create portlet container.
            LOG.debug(" [1] Creating portlet container...");
            PortletContainerFactory factory =
                    PortletContainerFactory.getInstance();
            PortletContainer container = factory.createContainer(
                driverConfig.getContainerName(), (PortalDriverServices)springContext.getBean("PortalDriverServices")
            );

            // Initialize portlet container.
            LOG.debug(" [2] Initializing portlet container...");
            container.init();
View Full Code Here

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

     * Destroyes the portal driver config and removes it from servlet context.
     *
     * @param servletContext the servlet context.
     */
    private void destroyDriverConfiguration(ServletContext servletContext) {
        DriverConfiguration driverConfig = (DriverConfiguration)
                servletContext.getAttribute(DRIVER_CONFIG_KEY);
        if (driverConfig != null) {
            try {
                driverConfig.destroy();
                if (LOG.isInfoEnabled()) {
                    LOG.info("Pluto Portal Driver Config destroyed.");
                }
            } catch (DriverConfigurationException ex) {
                LOG.error("Unable to destroy portal driver config: "
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

        // 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 (isWindowStateAllowed(driverConfig, state)) {
            // Retrieve the portal environment.
            PortalRequestContext portalEnv = PortalRequestContext.getContext(
View Full Code Here

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
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.