Examples of DriverAdministrationException


Examples of org.apache.pluto.driver.services.portal.admin.DriverAdministrationException

            if (portletAppServletContext == null) {
                final String msg = "Unable to locate servlet context: " + contextPath                   
                    + ": ensure that crossContext support is enabled "
                    + "and the portlet application has been deployed.";
                LOG.error(msg);
                throw new DriverAdministrationException(msg);
            }
           
            PortletContainer container = (PortletContainer)servletContext
                .getAttribute(AttributeKeys.PORTLET_CONTAINER);
            PortletAppDD portletAppDD = container.getPortletApplicationDescriptor(contextPath);
           
            if (portletAppDD == null) {
                final String msg = "Unable to retrieve portlet application descriptor from "
                    + contextPath + ": ensure that the portlet application "
                    + "has been deployed.";
                LOG.error(msg);
              throw new DriverAdministrationException(msg);
            }
            for (Iterator it = portletAppDD.getPortlets().iterator();
                it.hasNext(); ) {
                PortletDD portletDD = (PortletDD) it.next();
                PortletWindowConfig portletWindowConfig = new PortletWindowConfig();
                portletWindowConfig.setContextPath(contextPath);
                portletWindowConfig.setPortletName(portletDD.getPortletName());
                portletAppConfig.addPortlet(portletWindowConfig);
            }
            config.addPortletApp(portletAppConfig);
           
        } catch (PortletContainerException ex) {
            final String msg = "Unable to add portlet application from " + contextPath;
            LOG.error(msg);
            throw new DriverAdministrationException(msg, ex);
        }
    }
View Full Code Here

Examples of org.apache.pluto.driver.services.portal.admin.DriverAdministrationException

                new PortletApplicationConfig();
            portletAppConfig.setContextPath(contextPath);

            ServletContext portletAppServletContext = servletContext.getContext(contextPath);
            if (portletAppServletContext == null) {
                throw new DriverAdministrationException(
                    "Unable to locate servlet context: " + contextPath
                    + ": ensure that crossContext support is enabled "
                    + "and the portlet application has been deployed.");
            }

            PortletAppDD portletAppDD = getPortletDescriptor(
                portletAppServletContext);
            if (portletAppDD == null) {
              throw new DriverAdministrationException(
                  "Unable to retrieve portlet application descriptor from "
                  + contextPath + ": ensure that the portlet application "
                  + "has been deployed.");
            }
            for (Iterator it = portletAppDD.getPortlets().iterator();
                it.hasNext(); ) {
                PortletDD portletDD = (PortletDD) it.next();
                PortletWindowConfig portletWindowConfig = new PortletWindowConfig();
                portletWindowConfig.setContextPath(contextPath);
                portletWindowConfig.setPortletName(portletDD.getPortletName());
                portletAppConfig.addPortlet(portletWindowConfig);
            }
            config.addPortletApp(portletAppConfig);
           
        } catch (PortletContainerException ex) {
            throw new DriverAdministrationException(
                "Unable to add portlet application from " + contextPath, ex);
        }
    }
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.