Package org.jboss.shrinkwrap.descriptor.api.portletapp20

Examples of org.jboss.shrinkwrap.descriptor.api.portletapp20.PortletDescriptor


     */
    @Override
    public void process(Archive<?> applicationArchive, TestClass testClass) {
        for (Field field : testClass.getJavaClass().getDeclaredFields()) {
            if (field.isAnnotationPresent(PortalURL.class)) {
                PortletDescriptor portletXml;
                try {
                    portletXml = Descriptors.importAs(PortletDescriptor.class).fromStream(
                            applicationArchive.get("WEB-INF/portlet.xml").getAsset().openStream());

                    if (null != portletXml) {
                        PortletArchiveMetadata metadata = new PortletArchiveMetadata();
                        List<PortletType<PortletDescriptor>> portlets = portletXml.getAllPortlet();
                        for (PortletType<PortletDescriptor> portlet : portlets) {
                            metadata.addPortletName(portlet.getPortletName());
                        }
                        portletMetadata.set(metadata);
                    }
View Full Code Here

TOP

Related Classes of org.jboss.shrinkwrap.descriptor.api.portletapp20.PortletDescriptor

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.