Package net.sf.jportlet.portlet

Examples of net.sf.jportlet.portlet.PortletConfig


    {
        String        name;
        String        value;
        PortletLog    log = getLog(  );
        boolean       debug = log.isDebugEnabled(  );
        PortletConfig portletConfig = getPortletConfig(  );

        /* URL */
        name  = prefix + ".url";
        value = portletConfig.getInitParameter( name );
        if ( debug )
        {
            log.debug( name + "=" + value );
        }

        if ( value != null )
        {
            return new URL( value ).openStream(  );
        }
        else
        {
            /* Path */
            name  = prefix + ".path";
            value = portletConfig.getInitParameter( name );
            if ( debug )
            {
                log.debug( name + "=" + value );
            }

            if ( value != null )
            {
                return portletConfig.getPortletContext(  ).getResourceAsStream( value, request.getClient(  ), request.getLocale(  ) );
            }
        }

        return null;
    }
View Full Code Here

TOP

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

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.