Package net.sf.jportlet.portlet

Examples of net.sf.jportlet.portlet.PortletException


        /* Initializing the ServiceFactory */
        in = ctx.getResourceAsStream( SERVICE_DD );

        if ( in == null )
        {
            throw new PortletException( "Resource not found: " + SERVICE_DD );
        }

        _serviceFactory = new PortletServiceFactoryImpl( this );
        _serviceFactory.init( in, servletConfig );

        /* Initialize the portlets */
        in = ctx.getResourceAsStream( PORTLET_DD );

        if ( in == null )
        {
            throw new PortletException( "Resource not found: " + PORTLET_DD );
        }

        _descriptor = new ApplicationDescriptorLoaderXml(  ).load( in );

        Iterator it = _descriptor.getPortletDescriptors(  ).iterator(  );
View Full Code Here


            /* XSL */
            xslstream = openXslInputStream( request );
            if ( xslstream == null )
            {
                throw new PortletException( "No XSL" );
            }

            StreamSource xsl = new StreamSource( xslstream );

            /* XML */
            xmlstream = openXmlInputStream( request );
            if ( xslstream == null )
            {
                throw new PortletException( "No XML" );
            }

            StreamSource xml = new StreamSource( xmlstream );

            /* Transform */
            StreamResult output = new StreamResult( response.getWriter(  ) );
            Transformer  transformer = factory.newTransformer( xsl );
            Map          params = getXslParameters( request, response );
            if ( params != null )
            {
                Iterator it = params.keySet(  ).iterator(  );
                while ( it.hasNext(  ) )
                {
                    String key = ( String ) it.next(  );
                    transformer.setParameter( key, params.get( key ) );
                }
            }

            transformer.transform( xml, output );
        }
        catch ( TransformerConfigurationException t )
        {
            throw new PortletException( t );
        }
        catch ( TransformerException t )
        {
            throw new PortletException( t );
        }
        finally
        {
            if ( xmlstream != null )
            {
View Full Code Here

            {
                doForgotPassword( event, request );
            }
            else
            {
                throw new PortletException( "Unknown command: " + action + "/" + command );
            }
        }
        else if ( ActionEvent.ACTION_EDIT.equals( action ) )
        {
            if ( "save".equals( command ) )
            {
                doSave( event, request, "true".equals( request.getParameter( "register" ) ) );
            }
            else if ( "cancel".equals( command ) )
            {
                doCancel( event, request, "true".equals( request.getParameter( "register" ) ) );
            }
            else if ( "send_email".equals( command ) )
            {
                doSendEmail( event, request );
            }
            else
            {
                throw new PortletException( "Unknown command: " + action + "/" + command );
            }
        }
        else
        {
            throw new PortletException( "Unknown action: " + action );
        }
    }
View Full Code Here

        {
            ctx.getLog(  ).warn( email + " not found", u );
        }
        catch ( Exception e )
        {
            throw new PortletException( e );
        }
        doSignin(event, request);
    }
View Full Code Here

        {
            ValidationHelper.addError( "error_duplicate_email", event );
        }
        catch ( Exception e )
        {
            throw new PortletException( "Unexpected error", e );
        }

        /* Handle Errors */
        UserImpl user = new UserImpl( userId, password, email, firstname, lastname, locale );
        request.setAttribute( "user", user );
View Full Code Here

            }

            in = getClass(  ).getClassLoader(  ).getResourceAsStream( path );
            if ( in == null )
            {
                throw new PortletException( "Markup not supported: " + markup );
            }
        }

        return in;
    }
View Full Code Here

        super.init( portletConfig );

        String url = portletConfig.getInitParameter( CONFIG_URL );
        if ( url == null )
        {
            throw new PortletException( "Missing parameter: " + CONFIG_URL );
        }

        try
        {
            _url = new URL( url );
        }
        catch ( MalformedURLException m )
        {
            throw new PortletException( "Bad URL: " + url, m );
        }
    }
View Full Code Here

            }

            in = getClass(  ).getClassLoader(  ).getResourceAsStream( path );
            if ( in == null )
            {
              throw new PortletException( "Markup not supported: " + markup );
            }
        }
        return in;
    }
View Full Code Here

TOP

Related Classes of net.sf.jportlet.portlet.PortletException

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.