Package net.sf.jportlet.portlet.descriptor

Examples of net.sf.jportlet.portlet.descriptor.ApplicationDescriptor


    {
        String                         path = "net/sf/jportlet/descriptor/test/portlet.xml";
        InputStream                    in = getClass(  ).getClassLoader(  ).getResourceAsStream( path );

        ApplicationDescriptorLoaderXml loader = new ApplicationDescriptorLoaderXml(  );
        ApplicationDescriptor          app = loader.load( in );

        assertNotNull( "app", app );
        assertEquals( "app.name", "Portlet Application", app.getName(  ) );
        assertEquals( "app.contextParameter[param1]", "value1", app.getContextParameter( "param1" ) );

        PortletDescriptor portlet = app.getPortletDescriptor( "portlet1" );
        assertNotNull( "portlet1 not found", portlet );
        assertEquals( "portlet.name", "portlet1", portlet.getName(  ) );
        assertEquals( "portlet.portletClass", PortletAdapter.class, portlet.getPortletClass(  ) );
        assertEquals( "portlet.actionListenerClass", ApplicationDescriptorLoaderTest.class, portlet.getActionListenerClass(  ) );
        assertEquals( "portlet.messageListenerClass", ApplicationDescriptorLoaderTest.class, portlet.getMessageListenerClass(  ) );
View Full Code Here

TOP

Related Classes of net.sf.jportlet.portlet.descriptor.ApplicationDescriptor

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.