Package org.apache.pluto.portalImpl.om.portlet.impl

Examples of org.apache.pluto.portalImpl.om.portlet.impl.PortletApplicationDefinitionImpl


            InputSource source = new InputSource(new FileInputStream(portletXml));
            source.setSystemId(portletXml.toURL().toExternalForm());
           
            Unmarshaller unmarshaller = new Unmarshaller(this.mappingPortletXml);
      unmarshaller.setIgnoreExtraElements(true);
            PortletApplicationDefinitionImpl portletApp =
                (PortletApplicationDefinitionImpl)unmarshaller.unmarshal( source );

            WebApplicationDefinitionImpl webApp = null;

            if (webXml.exists())
            {
                org.w3c.dom.Document webDocument =
                XmlParser.parseWebXml(new FileInputStream(webXml));

                unmarshaller = new Unmarshaller(this.mappingWebXml);
        unmarshaller.setIgnoreExtraElements(true);
                webApp = (WebApplicationDefinitionImpl)unmarshaller.unmarshal(webDocument);

                Vector structure = new Vector();
                structure.add(portletApp);
                structure.add("/" + resolveURI(webModule));

                webApp.postLoad(structure);

                // refill structure with necessary information
                webApp.preBuild(structure);

                webApp.postBuild(structure);

                if (log.isDebugEnabled())
                {
                    log.debug(webApp.toString());
                }
            }
            else
            {
                if (log.isDebugEnabled())
                {
                    log.debug("no web.xml...");
                }
                Vector structure = new Vector();
                structure.add("/" + resolveURI(webModule));
                structure.add(null);
                structure.add(null);

                portletApp.postLoad(structure);
               
                portletApp.preBuild(structure);
               
                portletApp.postBuild(structure);
            }

            log.debug("Adding portletApp to registry[" + registry + "]:" + portletApp.toString());
            log.debug("Before:" + registry.size());
            registry.add( portletApp );
            log.debug("After:" + registry.size());

            if (log.isDebugEnabled())
            {
                if (webApp!=null)
                {
                    log.debug("Dumping content of web.xml...");
                    log.debug(webApp.toString());
                }
                log.debug("Dumping content of portlet.xml...");
                log.debug(portletApp.toString());
            }
        }
        else
        {
          log.debug("Could not find " + portletXml);
View Full Code Here

TOP

Related Classes of org.apache.pluto.portalImpl.om.portlet.impl.PortletApplicationDefinitionImpl

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.