Examples of PortletApplicationDefinitionImpl


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

            // modified by YCLI: START :: to ignore extra elements and attributes
            unmarshaller.setIgnoreExtraElements(true);
            unmarshaller.setIgnoreExtraAttributes(true);
            // modified by YCLI: END

            PortletApplicationDefinitionImpl portletApp =
                (PortletApplicationDefinitionImpl) unmarshaller.unmarshal(
                    portletDocument);

            // refill structure with necessary information
            Vector structure = new Vector();
            structure.add(webModule);
            structure.add(null);
            structure.add(null);
            portletApp.preBuild(structure);

            if (debug) {
                System.out.println(portletApp);
            }

            // now generate web part

            WebApplicationDefinitionImpl webApp = null;

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

                Unmarshaller unmarshallerWeb = new Unmarshaller(mappingWebXml);

                // modified by YCLI: START :: to ignore extra elements and attributes
                unmarshallerWeb.setIgnoreExtraElements(true);
                unmarshallerWeb.setIgnoreExtraAttributes(true);
                // modified by YCLI: END

                webApp =
                    (WebApplicationDefinitionImpl) unmarshallerWeb.unmarshal(
                        webDocument);
            } else {
                webApp = new WebApplicationDefinitionImpl();
                DisplayNameImpl dispName = new DisplayNameImpl();
                dispName.setDisplayName(webModule);
                dispName.setLocale(Locale.ENGLISH);
                DisplayNameSetImpl dispSet = new DisplayNameSetImpl();
                dispSet.add(dispName);
                webApp.setDisplayNames(dispSet);
                DescriptionImpl desc = new DescriptionImpl();
                desc.setDescription("Automated generated Application Wrapper");
                desc.setLocale(Locale.ENGLISH);
                DescriptionSetImpl descSet = new DescriptionSetImpl();
                descSet.add(desc);
                webApp.setDescriptions(descSet);
            }

            org.apache.pluto.om.ControllerFactory controllerFactory =
                new org.apache.pluto.portalImpl.om.ControllerFactoryImpl();

            ServletDefinitionListCtrl servletDefinitionSetCtrl =
                (ServletDefinitionListCtrl) controllerFactory.get(
                    webApp.getServletDefinitionList());
            Collection servletMappings = webApp.getServletMappings();

            Iterator portlets =
                portletApp.getPortletDefinitionList().iterator();
            while (portlets.hasNext()) {

                PortletDefinition portlet = (PortletDefinition) portlets.next();

                // check if already exists
View Full Code Here

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

            // modified by YCLI: START :: to ignore extra elements and attributes
            unmarshaller.setIgnoreExtraElements(true);
            unmarshaller.setIgnoreExtraAttributes(true);
            // modified by YCLI: END

            PortletApplicationDefinitionImpl portletApp =
                (PortletApplicationDefinitionImpl) unmarshaller.unmarshal(
                    portletDocument);

            // refill structure with necessary information
            Vector structure = new Vector();
            structure.add(webModule);
            structure.add(null);
            structure.add(null);
            portletApp.preBuild(structure);

            if (debug) {
                System.out.println(portletApp);
            }

            // now generate web part

            WebApplicationDefinitionImpl webApp = null;

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

                Unmarshaller unmarshallerWeb = new Unmarshaller(mappingWebXml);

                // modified by YCLI: START :: to ignore extra elements and attributes
                unmarshallerWeb.setIgnoreExtraElements(true);
                unmarshallerWeb.setIgnoreExtraAttributes(true);
                // modified by YCLI: END

                webApp =
                    (WebApplicationDefinitionImpl) unmarshallerWeb.unmarshal(
                        webDocument);
            } else {
                webApp = new WebApplicationDefinitionImpl();
                DisplayNameImpl dispName = new DisplayNameImpl();
                dispName.setDisplayName(webModule);
                dispName.setLocale(Locale.ENGLISH);
                DisplayNameSetImpl dispSet = new DisplayNameSetImpl();
                dispSet.add(dispName);
                webApp.setDisplayNames(dispSet);
                DescriptionImpl desc = new DescriptionImpl();
                desc.setDescription("Automated generated Application Wrapper");
                desc.setLocale(Locale.ENGLISH);
                DescriptionSetImpl descSet = new DescriptionSetImpl();
                descSet.add(desc);
                webApp.setDescriptions(descSet);
            }

            org.apache.pluto.om.ControllerFactory controllerFactory =
                new org.apache.pluto.portalImpl.om.ControllerFactoryImpl();

            ServletDefinitionListCtrl servletDefinitionSetCtrl =
                (ServletDefinitionListCtrl) controllerFactory.get(
                    webApp.getServletDefinitionList());
            Collection servletMappings = webApp.getServletMappings();

            Iterator portlets =
                portletApp.getPortletDefinitionList().iterator();
            while (portlets.hasNext()) {

                PortletDefinition portlet = (PortletDefinition) portlets.next();

                // check if already exists
View Full Code Here

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);
            }

            registry.add( portletApp );

            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());
            }
        }

    }
View Full Code Here

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

            // modified by YCLI: START :: to ignore extra elements and attributes
            unmarshaller.setIgnoreExtraElements(true);
            unmarshaller.setIgnoreExtraAttributes(true);
            // modified by YCLI: END

            PortletApplicationDefinitionImpl portletApp =
                (PortletApplicationDefinitionImpl) unmarshaller.unmarshal(
                    portletDocument);

            // refill structure with necessary information
            Vector structure = new Vector();
            structure.add(webModule);
            structure.add(null);
            structure.add(null);
            portletApp.preBuild(structure);

            if (debug) {
                System.out.println(portletApp);
            }

            // now generate web part

            WebApplicationDefinitionImpl webApp = null;

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

                Unmarshaller unmarshallerWeb = new Unmarshaller(mappingWebXml);

                // modified by YCLI: START :: to ignore extra elements and attributes
                unmarshallerWeb.setIgnoreExtraElements(true);
                unmarshallerWeb.setIgnoreExtraAttributes(true);
                // modified by YCLI: END

                webApp =
                    (WebApplicationDefinitionImpl) unmarshallerWeb.unmarshal(
                        webDocument);
            } else {
                webApp = new WebApplicationDefinitionImpl();
                DisplayNameImpl dispName = new DisplayNameImpl();
                dispName.setDisplayName(webModule);
                dispName.setLocale(Locale.ENGLISH);
                DisplayNameSetImpl dispSet = new DisplayNameSetImpl();
                dispSet.add(dispName);
                webApp.setDisplayNames(dispSet);
                DescriptionImpl desc = new DescriptionImpl();
                desc.setDescription("Automated generated Application Wrapper");
                desc.setLocale(Locale.ENGLISH);
                DescriptionSetImpl descSet = new DescriptionSetImpl();
                descSet.add(desc);
                webApp.setDescriptions(descSet);
            }

            org.apache.pluto.om.ControllerFactory controllerFactory =
                new org.apache.pluto.portalImpl.om.ControllerFactoryImpl();

            ServletDefinitionListCtrl servletDefinitionSetCtrl =
                (ServletDefinitionListCtrl) controllerFactory.get(
                    webApp.getServletDefinitionList());
            Collection servletMappings = webApp.getServletMappings();

            Iterator portlets =
                portletApp.getPortletDefinitionList().iterator();
            while (portlets.hasNext()) {

                PortletDefinition portlet = (PortletDefinition) portlets.next();

                // check if already exists
View Full Code Here

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

            unmarshaller.setEntityResolver(new EntityResolver(Constants.RES_PORTLET_DTDS, Constants.RES_PORTLET_DTD_NAMES));
        } catch (MappingException e) {
            throw (UnavailableException) new UnavailableException("Unable to construct unmarshaller for portlet.xml").initCause(e);
        }
        unmarshaller.setIgnoreExtraElements(true);
        PortletApplicationDefinitionImpl portletApp;
        try {
            portletApp = (PortletApplicationDefinitionImpl) unmarshaller.unmarshal(source);
        } catch (MarshalException e) {
            throw (UnavailableException) new UnavailableException("Unable to unmarshal portlet.xml from context " + appContext.getServletContextName()).initCause(e);
        } catch (ValidationException e) {
View Full Code Here

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

            unmarshaller.setEntityResolver(new EntityResolver(Constants.RES_PORTLET_DTDS, Constants.RES_PORTLET_DTD_NAMES));
        } catch (MappingException e) {
            throw (UnavailableException) new UnavailableException("Unable to construct unmarshaller for portlet.xml").initCause(e);
        }
        unmarshaller.setIgnoreExtraElements(true);
        PortletApplicationDefinitionImpl portletApp;
        try {
            portletApp = (PortletApplicationDefinitionImpl) unmarshaller.unmarshal(source);
        } catch (MarshalException e) {
            throw (UnavailableException) new UnavailableException("Unable to unmarshal portlet.xml from context " + appContext.getServletContextName()).initCause(e);
        } catch (ValidationException e) {
View Full Code Here

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);
            }

            registry.add( portletApp );

            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());
            }
        }

    }
View Full Code Here

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

            unmarshaller.setEntityResolver(new EntityResolver(Constants.RES_PORTLET_DTDS, Constants.RES_PORTLET_DTD_NAMES));
        } catch (MappingException e) {
            throw (UnavailableException) new UnavailableException("Unable to construct unmarshaller for portlet.xml at context " + contextName).initCause(e);
        }
        unmarshaller.setIgnoreExtraElements(true);
        PortletApplicationDefinitionImpl portletApp;
        try {
            portletApp = (PortletApplicationDefinitionImpl) unmarshaller.unmarshal(source);
        } catch (MarshalException e) {
            throw (UnavailableException) new UnavailableException("Unable to unmarshal portlet.xml from context " + contextName).initCause(e);
        } catch (ValidationException e) {
View Full Code Here

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

            // modified by YCLI: START :: to ignore extra elements and attributes
            unmarshaller.setIgnoreExtraElements(true);
            unmarshaller.setIgnoreExtraAttributes(true);
            // modified by YCLI: END

            PortletApplicationDefinitionImpl portletApp =
                (PortletApplicationDefinitionImpl) unmarshaller.unmarshal(
                    portletDocument);

            // refill structure with necessary information
            Vector structure = new Vector();
            structure.add(webModule);
            structure.add(null);
            structure.add(null);
            portletApp.preBuild(structure);

            if (debug) {
                System.out.println(portletApp);
            }

            // now generate web part

            WebApplicationDefinitionImpl webApp = null;

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

                Unmarshaller unmarshallerWeb = new Unmarshaller(mappingWebXml);

                // modified by YCLI: START :: to ignore extra elements and attributes
                unmarshallerWeb.setIgnoreExtraElements(true);
                unmarshallerWeb.setIgnoreExtraAttributes(true);
                // modified by YCLI: END

                webApp =
                    (WebApplicationDefinitionImpl) unmarshallerWeb.unmarshal(
                        webDocument);
            } else {
                webApp = new WebApplicationDefinitionImpl();
                DisplayNameImpl dispName = new DisplayNameImpl();
                dispName.setDisplayName(webModule);
                dispName.setLocale(Locale.ENGLISH);
                DisplayNameSetImpl dispSet = new DisplayNameSetImpl();
                dispSet.add(dispName);
                webApp.setDisplayNames(dispSet);
                DescriptionImpl desc = new DescriptionImpl();
                desc.setDescription("Automated generated Application Wrapper");
                desc.setLocale(Locale.ENGLISH);
                DescriptionSetImpl descSet = new DescriptionSetImpl();
                descSet.add(desc);
                webApp.setDescriptions(descSet);
            }

            org.apache.pluto.om.ControllerFactory controllerFactory =
                new org.apache.pluto.portalImpl.om.ControllerFactoryImpl();

            ServletDefinitionListCtrl servletDefinitionSetCtrl =
                (ServletDefinitionListCtrl) controllerFactory.get(
                    webApp.getServletDefinitionList());
            Collection servletMappings = webApp.getServletMappings();

            Iterator portlets =
                portletApp.getPortletDefinitionList().iterator();
            while (portlets.hasNext()) {

                PortletDefinition portlet = (PortletDefinition) portlets.next();

                // check if already exists
View Full Code Here

Examples of org.jasig.portal.container.om.portlet.PortletApplicationDefinitionImpl

    private String contextName = null;
    private Document doc = null; // Might want to consider SAX instead of DOM parsing
    private PortletApplicationDefinitionImpl portletApplicationDefinition = null;
   
    public PortletApplicationUnmarshaller() {
        portletApplicationDefinition = new PortletApplicationDefinitionImpl();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.