Examples of AdminConfiguration


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

        String pageName = request.getParameter("pageName");
        if (pageName != null) {
          debugWithName("Retrieved page name from request: " + pageName);
        } else {
          debugWithName("Creating page name...");
          AdminConfiguration adminConfig = (AdminConfiguration)
                getServletContext()
                .getAttribute(AttributeKeys.DRIVER_ADMIN_CONFIG);
            if (adminConfig == null) {
                throw new ServletException("Invalid configuration: "
                    + "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);
            debugWithName("Created TCK Page: " + pageName);
        }

        // The other possibility would be to redirect to the actual portal.
        //   I'm not sure which is better at this point.
View Full Code Here

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

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


        LOG.debug(" [2a] Loading Optional AdminConfiguration. . .");
        AdminConfiguration adminConfiguration = (AdminConfiguration)
                springContext.getBean("AdminConfiguration");

        if (adminConfiguration != null) {
            LOG.debug(" [2b] Registering Optional AdminConfiguration");
            servletContext.setAttribute(ADMIN_CONFIG_KEY, adminConfiguration);
View Full Code Here

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

     * Destroyes the portal admin config and removes it from servlet context.
     *
     * @param servletContext the servlet context.
     */
    private void destroyAdminConfiguration(ServletContext servletContext) {
        AdminConfiguration adminConfig = (AdminConfiguration)
                servletContext.getAttribute(ADMIN_CONFIG_KEY);
        if (adminConfig != null) {
            try {
                adminConfig.destroy();
                if (LOG.isInfoEnabled()) {
                    LOG.info("Pluto Portal Admin Config destroyed.");
                }
            } catch (DriverConfigurationException ex) {
                LOG.error("Unable to destroy portal admin config: "
View Full Code Here

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

        String pageName = request.getParameter("pageName");
        if (pageName != null) {
          debugWithName("Retrieved page name from request: " + pageName);
        } else {
          debugWithName("Creating page name...");
          AdminConfiguration adminConfig = (AdminConfiguration)
                getServletContext()
                .getAttribute(AttributeKeys.DRIVER_ADMIN_CONFIG);
            if (adminConfig == null) {
                throw new ServletException("Invalid configuration: "
                    + "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);
            debugWithName("Created TCK Page: " + pageName);
        }

        // The other possibility would be to redirect to the actual portal.
        //   I'm not sure which is better at this point.
View Full Code Here

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

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


        LOG.debug(" [2a] Loading Optional AdminConfiguration. . .");
        AdminConfiguration adminConfiguration = (AdminConfiguration)
                springContext.getBean("AdminConfiguration");

        if (adminConfiguration != null) {
            LOG.debug(" [2b] Registering Optional AdminConfiguration");
            servletContext.setAttribute(ADMIN_CONFIG_KEY, adminConfiguration);
View Full Code Here

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

     * Destroyes the portal admin config and removes it from servlet context.
     *
     * @param servletContext the servlet context.
     */
    private void destroyAdminConfiguration(ServletContext servletContext) {
        AdminConfiguration adminConfig = (AdminConfiguration)
                servletContext.getAttribute(ADMIN_CONFIG_KEY);
        if (adminConfig != null) {
            try {
                adminConfig.destroy();
                if (LOG.isInfoEnabled()) {
                    LOG.info("Pluto Portal Admin Config destroyed.");
                }
            } catch (DriverConfigurationException ex) {
                LOG.error("Unable to destroy portal admin config: "
View Full Code Here

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

            res.getWriter().println(sb.toString());
        }
    }

    private void doPublish(String context) throws DriverAdministrationException {
        AdminConfiguration adminConfig = (AdminConfiguration)getServletContext()
            .getAttribute(AttributeKeys.DRIVER_ADMIN_CONFIG);

        PortletRegistryAdminService admin = adminConfig.getPortletRegistryAdminService();

        admin.addPortletApplication(context);
    }
View Full Code Here

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

        servletContext.setAttribute(DRIVER_CONFIG_KEY, driverConfiguration);


        LOG.debug(" [2a] Loading Optional AdminConfiguration. . .");
        serviceReference = bundleContext.getServiceReference(AdminConfiguration.class.getName());
        AdminConfiguration adminConfiguration = (AdminConfiguration) bundleContext.getService(serviceReference);

        if (adminConfiguration != null) {
            LOG.debug(" [2b] Registering Optional AdminConfiguration");
            servletContext.setAttribute(ADMIN_CONFIG_KEY, adminConfiguration);
        } else {
View Full Code Here

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

     * Destroyes the portal admin config and removes it from servlet context.
     *
     * @param servletContext the servlet context.
     */
    private void destroyAdminConfiguration(ServletContext servletContext) {
        AdminConfiguration adminConfig = (AdminConfiguration)
                servletContext.getAttribute(ADMIN_CONFIG_KEY);
        if (adminConfig != null) {
//            try {
//                adminConfig.destroy();
//                if (LOG.isInfoEnabled()) {
View Full Code Here

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

        String pageName = request.getParameter("pageName");
        if (pageName != null) {
          debugWithName("Retrieved page name from request: " + pageName);
        } else {
          debugWithName("Creating page name...");
          AdminConfiguration adminConfig = (AdminConfiguration)
                getServletContext()
                .getAttribute(AttributeKeys.DRIVER_ADMIN_CONFIG);
            if (adminConfig == null) {
                throw new ServletException("Invalid configuration: "
                    + "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);
            debugWithName("Created TCK Page: " + pageName);
        }

        // The other possibility would be to redirect to the actual portal.
        //   I'm not sure which is better at this point.
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.