Package org.apache.geronimo.web25.deployment.merge

Examples of org.apache.geronimo.web25.deployment.merge.ElementSource


        if (isServletLoadOnStartupConfiguredInWebXML(servletName, mergeContext)) {
            return;
        }
        if (srcServlet.getLoadOnStartup() != null) {
            BigInteger srcLoadOnStartupValue = (BigInteger) srcServlet.getLoadOnStartup();
            MergeItem existedLoadOnStartup = (MergeItem) mergeContext.getAttribute(createServletLoadOnStartupKey(servletName));
            if (existedLoadOnStartup == null) {
                targetServlet.setLoadOnStartup(srcLoadOnStartupValue);
                mergeContext.setAttribute(createServletLoadOnStartupKey(servletName), new MergeItem(srcLoadOnStartupValue, mergeContext.getCurrentJarUrl(), ElementSource.WEB_XML));
            } else if (!existedLoadOnStartup.getValue().equals(srcLoadOnStartupValue)) {
                throw new DeploymentException(WebDeploymentMessageUtils.createDuplicateValueMessage("servlet " + servletName, "load-on-startup", existedLoadOnStartup.getValue().toString(),
                        existedLoadOnStartup.getBelongedURL(), srcLoadOnStartupValue.toString(), mergeContext.getCurrentJarUrl()));
            }
        }
    }
View Full Code Here


                    if (!absoluteOrderingConfigured) {
                        throw new DeploymentException("Mutiple web-fragments with the same name [" + webFragmentName + "] are found in " + jarURL + " and "
                                + webFragmentEntryMap.get(webFragmentName).getJarURL() + ", you might make the name unique or use absolute ordering in web.xml");
                    }
                } else {
                    webFragmentEntryMap.put(webFragmentName, new WebFragmentEntry(webFragmentName, webFragmentName, webFragment, jarURL));
                }
                usedWebFragmentNames.add(webFragmentName);
            } else {
                unnamedWebFragmentMap.put(jarURL, webFragment);
            }
            //Add names configurations in before/after, so that we would not add an existing name for those unamed web fragment by sudden.
            if (webFragment.getOrdering() != null) {
                Ordering order = webFragment.getOrdering();
                if (order.getBefore() != null) {
                    usedWebFragmentNames.addAll(order.getBefore().getName());
                }
                if (order.getAfter() != null) {
                    usedWebFragmentNames.addAll(order.getAfter().getName());
                }
            }
        }
        //Generate names for all the web fragments which are not explicitly configured
        String tempNamePrefix = "geronimo-deployment";
        int nameSubfix = 0;
        for (String webFragmentURL : unnamedWebFragmentMap.keySet()) {
            WebFragment webFragment = unnamedWebFragmentMap.get(webFragmentURL);
            String tempWebFragmentName = tempNamePrefix + nameSubfix++;
            while (usedWebFragmentNames.contains(tempWebFragmentName)) {
                tempWebFragmentName = tempNamePrefix + nameSubfix++;
            }
            webFragmentEntryMap.put(tempWebFragmentName, new WebFragmentEntry(tempWebFragmentName, null, webFragment, webFragmentURL));
        }
        //Order the web fragments required (<name> element is specified)
        if (absoluteOrderingConfigured) {
            return absoluteOrderWebFragments(earContext, module, bundle, webApp, webFragmentEntryMap);
        } else {
View Full Code Here

                    if (!absoluteOrderingConfigured) {
                        throw new DeploymentException("Mutiple web-fragments with the same name [" + webFragmentName + "] are found in " + jarURL + " and "
                                + webFragmentEntryMap.get(webFragmentName).getJarURL() + ", you might make the name unique or use absolute ordering in web.xml");
                    }
                } else {
                    webFragmentEntryMap.put(webFragmentName, new WebFragmentEntry(webFragmentName, webFragmentName, webFragment, jarURL));
                }
                usedWebFragmentNames.add(webFragmentName);
            } else {
                unnamedWebFragmentMap.put(jarURL, webFragment);
            }
            //Add names configurations in before/after, so that we would not add an existing name for those unamed web fragment by sudden.
            if (webFragment.getOrdering() != null) {
                Ordering order = webFragment.getOrdering();
                if (order.getBefore() != null) {
                    usedWebFragmentNames.addAll(order.getBefore().getName());
                }
                if (order.getAfter() != null) {
                    usedWebFragmentNames.addAll(order.getAfter().getName());
                }
            }
        }
        //Generate names for all the web fragments which are not explicitly configured
        String tempNamePrefix = "geronimo-deployment";
        int nameSubfix = 0;
        for (String webFragmentURL : unnamedWebFragmentMap.keySet()) {
            WebFragment webFragment = unnamedWebFragmentMap.get(webFragmentURL);
            String tempWebFragmentName = tempNamePrefix + nameSubfix++;
            while (usedWebFragmentNames.contains(tempWebFragmentName)) {
                tempWebFragmentName = tempNamePrefix + nameSubfix++;
            }
            webFragmentEntryMap.put(tempWebFragmentName, new WebFragmentEntry(tempWebFragmentName, null, webFragment, webFragmentURL));
        }
        //Order the web fragments required (<name> element is specified)
        if (absoluteOrderingConfigured) {
            return absoluteOrderWebFragments(earContext, module, bundle, webApp, webFragmentEntryMap);
        } else {
View Full Code Here

            throws DeploymentException {
        Map<String, WebFragmentOrderEntry> webFragmentOrderEntryMap = new LinkedHashMap<String, WebFragmentOrderEntry>();
        //Step 1 : Create WebFragmentOrderEntry for sorting web fragments easily
        boolean relativeSortRequired = false;
        for (String webFragmentName : webFragmentEntryMap.keySet()) {
            WebFragmentEntry webFragmentEntry = webFragmentEntryMap.get(webFragmentName);
            if (!relativeSortRequired) {
                relativeSortRequired = webFragmentEntry.getWebFragment().getOrderingArray().length > 0;
            }
            webFragmentOrderEntryMap.put(webFragmentName, WebFragmentOrderEntry.create(webFragmentEntry));
        }
        //If none of the web-fragment.xml defines the order element, the order of jar files are unknown
        if (!relativeSortRequired) {
View Full Code Here

                    if (!absoluteOrderingConfigured) {
                        throw new DeploymentException("Mutiple web-fragments with the same name [" + webFragmentName + "] are found in " + jarURL + " and "
                                + webFragmentEntryMap.get(webFragmentName).getJarURL() + ", you might make the name unique or use absolute ordering in web.xml");
                    }
                } else {
                    webFragmentEntryMap.put(webFragmentName, new WebFragmentEntry(webFragmentName, webFragmentName, webFragment, jarURL));
                }
                usedWebFragmentNames.add(webFragmentName);
            } else {
                unnamedWebFragmentMap.put(jarURL, webFragment);
            }
            //Add names configurations in before/after, so that we would not add an existing name for those unamed web fragment by sudden.
            if (webFragment.getOrderingArray().length > 0) {
                OrderingType order = webFragment.getOrderingArray()[0];
                if (order.getBefore() != null) {
                    for (JavaIdentifierType name : order.getBefore().getNameArray()) {
                        usedWebFragmentNames.add(name.getStringValue());
                    }
                }
                if (order.getAfter() != null) {
                    for (JavaIdentifierType name : order.getAfter().getNameArray()) {
                        usedWebFragmentNames.add(name.getStringValue());
                    }
                }
            }
        }
        //Generate names for all the web fragments which are not explicitly configured
        String tempNamePrefix = "geronimo-deployment";
        int nameSubfix = 0;
        for (String webFragmentURL : unnamedWebFragmentMap.keySet()) {
            WebFragmentType webFragment = unnamedWebFragmentMap.get(webFragmentURL);
            String tempWebFragmentName = tempNamePrefix + nameSubfix++;
            while (usedWebFragmentNames.contains(tempWebFragmentName)) {
                tempWebFragmentName = tempNamePrefix + nameSubfix++;
            }
            webFragmentEntryMap.put(tempWebFragmentName, new WebFragmentEntry(tempNamePrefix, null, webFragment, webFragmentURL));
        }
        //Order the web fragments required (<name> element is specified)
        if (absoluteOrderingConfigured) {
            return absoluteOrderWebFragments(earContext, module, bundle, webApp, webFragmentEntryMap);
        } else {
View Full Code Here

                securityHolder.setSecurity(true);

                webModuleData.setAttribute("securityHolder", securityHolder);
                //local jaspic configuration
                if (tomcatWebApp.isSetAuthentication()) {
                    AuthenticationWrapper authType = new TomcatAuthenticationWrapper(tomcatWebApp.getAuthentication());
                    configureLocalJaspicProvider(authType, contextPath, module, webModuleData);
                }

            }
View Full Code Here

                securityHolder.setSecurity(true);

                webModuleData.setAttribute("securityHolder", securityHolder);
                //local jaspic configuration
                if (tomcatWebApp.isSetAuthentication()) {
                    AuthenticationWrapper authType = new TomcatAuthenticationWrapper(tomcatWebApp.getAuthentication());
                    configureLocalJaspicProvider(authType, contextPath, module, webModuleData);
                }
            }

            //Save Deployment Attributes
View Full Code Here

                securityHolder.setSecurity(true);

                webModuleData.setAttribute("securityHolder", securityHolder);
                //local jaspic configuration
                if (tomcatWebApp.isSetAuthentication()) {
                    AuthenticationWrapper authType = new TomcatAuthenticationWrapper(tomcatWebApp.getAuthentication());
                    configureLocalJaspicProvider(authType, contextPath, module, webModuleData);
                }
            }

            //Save Deployment Attributes
View Full Code Here

                securityHolder.setSecurity(true);

                webModuleData.setAttribute("securityHolder", securityHolder);
                //local jaspic configuration
                if (tomcatWebApp.isSetAuthentication()) {
                    AuthenticationWrapper authType = new TomcatAuthenticationWrapper(tomcatWebApp.getAuthentication());
                    configureLocalJaspicProvider(authType, contextPath, module, webModuleData);
                }
            }

            //Save Deployment Attributes
View Full Code Here

        XmlBeansUtil.validateDD(xmlObject);
        return (WebAppDocument) xmlObject;
    }

    protected ComponentPermissions buildSpecSecurityConfig(WebAppType webApp) {
        SpecSecurityBuilder builder = new SpecSecurityBuilder();
        return builder.buildSpecSecurityConfig(webApp);
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.web25.deployment.merge.ElementSource

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.