Package org.apache.pluto

Examples of org.apache.pluto.PortletContainerException


     * @param servletContext  the servlet context of the portal webapp.
     */
    public void init(ServletContext servletContext)
    throws PortletContainerException {
      if (servletContext == null) {
        throw new PortletContainerException(
            "Unable to initialize portlet container [" + name + "]: "
            + "servlet context is null.");
      }
        this.servletContext = servletContext;
        this.initialized = true;
View Full Code Here


        PortletAppDD portletAppDD = null;
        try {
            InputStream in = servletContext.getResourceAsStream(PORTLET_XML);
            portletAppDD = portletDDService.read(in);
        } catch (IOException ex) {
            throw new PortletContainerException(EXCEPTIONS.getString(
                    "error.context.descriptor.load",
                    new String[] { servletContext.getServletContextName() }),
                    ex);
        }
        return portletAppDD;
View Full Code Here

     * @param servletContext  the servlet context of the portal webapp.
     */
    public void init(ServletContext servletContext)
    throws PortletContainerException {
      if (servletContext == null) {
        throw new PortletContainerException(
            "Unable to initialize portlet container [" + name + "]: "
            + "servlet context is null.");
      }
        this.servletContext = servletContext;
        this.initialized = true;
View Full Code Here

       
        // sanity check
        if (context == null || context.trim().equals("")) {
            final String msg = "Context was null or the empty string.";
            errorWithName(msg);
            throw new PortletContainerException(msg);
        }
       
        // obtain the context of the portlet
        ServletContext portletCtx = servletContext.getContext(context);
        if (portletCtx == null) {
            final String msg = "Unable to obtain the servlet context for " +
                "portlet context [" + context + "].  Ensure the portlet has " +
                "been deployed and that cross context support is enabled.";
            errorWithName(msg);
            throw new PortletContainerException(msg);
        }
       
        // obtain the portlet application descriptor for the portlet
        // context.
        PortletAppDD portletAppDD = PortletDescriptorRegistry
                                        .getRegistry()
                                        .getPortletAppDD(portletCtx);
       
        // we can't return null
        if (portletAppDD == null) {
            final String msg = "Obtained a null portlet application description for " +
                "portlet context [" + context + "]";
            errorWithName(msg);
            throw new PortletContainerException(msg);
        }
       
        return portletAppDD;       
    }
View Full Code Here

        }       
           
        try {           
            if (portletRegistry == null) {
                LOG.error("Optional Portlet Registry Service not found.");
                throw new PortletContainerException("Optional Portlet Registry Service not found.");
            }           
            PortletAppDD ctx = portletRegistry.getPortletApplicationDescriptor(applicationId);
            Iterator i = ctx.getPortlets().iterator();
            while(i.hasNext()) {
                PortletDD dd = (PortletDD)i.next();
View Full Code Here

        PortletAppDD portletAppDD = null;
        try {
            InputStream in = servletContext.getResourceAsStream(PORTLET_XML);
            portletAppDD = portletDDService.read(in);
        } catch (IOException ex) {
            throw new PortletContainerException(EXCEPTIONS.getString(
                    "error.context.descriptor.load",
                    new String[] { servletContext.getServletContextName() }),
                    ex);
        }
        return portletAppDD;
View Full Code Here

     * @param servletContext  the servlet context of the portal webapp.
     */
    public void init(ServletContext servletContext)
    throws PortletContainerException {
      if (servletContext == null) {
        throw new PortletContainerException(
            "Unable to initialize portlet container [" + name + "]: "
            + "servlet context is null.");
      }
        this.servletContext = servletContext;
        this.initialized = true;
View Full Code Here

       
        // sanity check
        if (context == null || context.trim().equals("")) {
            final String msg = "Context was null or the empty string.";
            errorWithName(msg);
            throw new PortletContainerException(msg);
        }
       
        // obtain the context of the portlet
        ServletContext portletCtx = PortletContextManager.getPortletContext(servletContext, context);
        if (portletCtx == null) {
            final String msg = "Unable to obtain the servlet context for " +
                "portlet context [" + context + "].  Ensure the portlet has " +
                "been deployed and that cross context support is enabled.";
            errorWithName(msg);
            throw new PortletContainerException(msg);
        }
       
        // obtain the portlet application descriptor for the portlet
        // context.
        PortletAppDD portletAppDD = PortletDescriptorRegistry
                                        .getRegistry()
                                        .getPortletAppDD(portletCtx);
       
        // we can't return null
        if (portletAppDD == null) {
            final String msg = "Obtained a null portlet application description for " +
                "portlet context [" + context + "]";
            errorWithName(msg);
            throw new PortletContainerException(msg);
        }
       
        return portletAppDD;       
    }
View Full Code Here

        if (ipc != null) {
            return ipc.getPortletApplicationDefinition();
        }
        String msg = "Unable to retrieve portlet application descriptor: '"+applicationId+"'";
        LOG.warn(msg);
        throw new PortletContainerException(msg);
    }
View Full Code Here

        }

        try {
            if (portletRegistry == null) {
                LOG.error("Optional Portlet Registry Service not found.");
                throw new PortletContainerException("Optional Portlet Registry Service not found.");
            }
            PortletAppDD ctx = portletRegistry.getPortletApplicationDescriptor(applicationId);
            Iterator i = ctx.getPortlets().iterator();
            while(i.hasNext()) {
                PortletDD dd = (PortletDD)i.next();
View Full Code Here

TOP

Related Classes of org.apache.pluto.PortletContainerException

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.