Package org.apache.geronimo.xbeans.javaee6

Examples of org.apache.geronimo.xbeans.javaee6.JndiNameType


                        //------------------------------------------------------------------------------
                        // <service-ref> required elements:
                        //------------------------------------------------------------------------------

                        // service-ref-name
                        JndiNameType serviceRefName = serviceRef.addNewServiceRefName();
                        serviceRefName.setStringValue(resourceName);
                        serviceRef.setServiceRefName(serviceRefName);

                        // service-ref-interface
                        FullyQualifiedClassType serviceRefInterfaceClass = serviceRef.addNewServiceInterface();
                        serviceRefInterfaceClass.setStringValue(resourceType);
View Full Code Here


            // ------------------------------------------------------------------------------
            // <service-ref> required elements:
            // ------------------------------------------------------------------------------

            // service-ref-name
            JndiNameType serviceRefName = serviceRef.addNewServiceRefName();
            serviceRefName.setStringValue(webServiceRefName);
            serviceRef.setServiceRefName(serviceRefName);

            // service-ref-interface
            if (!webServiceRefValue.equals(Object.class)) {
                FullyQualifiedClassType qualifiedClass = serviceRef.addNewServiceInterface();
View Full Code Here

            //------------------------------------------------------------------------------
            // <resource-env-ref> required elements:
            //------------------------------------------------------------------------------

            // resource-env-ref-name
            JndiNameType resourceEnvRefName = resourceEnvRef.addNewResourceEnvRefName();
            resourceEnvRefName.setStringValue(resourceName);
            resourceEnvRef.setResourceEnvRefName(resourceEnvRefName);

            if (!resourceType.equals("")) {
                // resource-env-ref-type
                FullyQualifiedClassType qualifiedClass = resourceEnvRef.addNewResourceEnvRefType();
View Full Code Here

            //------------------------------------------------------------------------------
            // <message-destination-ref> required elements:
            //------------------------------------------------------------------------------

            // message-destination-ref-name
            JndiNameType messageDestinationRefName = messageDestinationRef.addNewMessageDestinationRefName();
            messageDestinationRefName.setStringValue(resourceName);
            messageDestinationRef.setMessageDestinationRefName(messageDestinationRefName);

            if (!resourceType.equals("")) {
                // message-destination-ref-type
                MessageDestinationTypeType msgDestType = messageDestinationRef.addNewMessageDestinationType();
View Full Code Here

                configureConfigurationFactory(jettyWebApp, null, securityFactoryData);
                moduleContext.addGBean(securityFactoryData);
                configureLocalJaspicProvider(new JettyAuthenticationWrapper(authType), contextPath, module, securityFactoryData);
                //otherwise rely on pre-configured jaspi
            } else {
                LoginConfigType loginConfig = loginConfigArray.length == 1? loginConfigArray[0]: null;
                GBeanData securityFactoryData = new GBeanData(factoryName, JettySecurityHandlerFactory.class);
                configureConfigurationFactory(jettyWebApp, loginConfig, securityFactoryData);
                BuiltInAuthMethod auth = BuiltInAuthMethod.NONE;
                if (loginConfig != null) {
                    if (loginConfig.isSetAuthMethod()) {
                        String authMethod = loginConfig.getAuthMethod().getStringValue().trim();
                        auth = BuiltInAuthMethod.getValueOf(authMethod);

                        if (auth == BuiltInAuthMethod.BASIC) {
                            securityFactoryData.setAttribute("realmName", loginConfig.getRealmName().getStringValue().trim());
                        } else if (auth == BuiltInAuthMethod.DIGEST) {
                            securityFactoryData.setAttribute("realmName", loginConfig.getRealmName().getStringValue().trim());
                        } else if (auth == BuiltInAuthMethod.FORM) {
                            if (loginConfig.isSetFormLoginConfig()) {
                                FormLoginConfigType formLoginConfig = loginConfig.getFormLoginConfig();
                                securityFactoryData.setAttribute("loginPage", formLoginConfig.getFormLoginPage().getStringValue());
                                securityFactoryData.setAttribute("errorPage", formLoginConfig.getFormErrorPage().getStringValue());
                            }
                        } else if (auth == BuiltInAuthMethod.CLIENTCERT) {
                            //nothing to do
                        } else {
                            throw new DeploymentException("unrecognized auth method, use jaspi to configure: " + authMethod);
                        }

                    } else {
                        throw new DeploymentException("No auth method configured and no jaspi configured");
                    }
                    if (loginConfig.isSetRealmName()) {
                        webModuleData.setAttribute("realmName", loginConfig.getRealmName().getStringValue());
                    }
                }
                securityFactoryData.setAttribute("authMethod", auth);
                moduleContext.addGBean(securityFactoryData);
            }
View Full Code Here

            if (mergeItem != null) {
                if (mergeItem.isFromWebFragment()) {
                    throw new DeploymentException(WebDeploymentMessageUtils.createDuplicateJNDIRefMessage("message-destination-ref", messageDestinationRefName, mergeItem.getBelongedURL(), mergeContext.getCurrentJarUrl()));
                } else if (mergeItem.isFromWebXml() && !isMessageDestinationRefInjectTargetsConfiguredInInitialWebXML(messageDestinationRefName, mergeContext)) {
                    //Merge InjectTarget
                    MessageDestinationRefType messageDestinationRef = (MessageDestinationRefType) mergeItem.getValue();
                    for (InjectionTargetType injectTarget : srcMessageDestinationRef.getInjectionTargetArray()) {
                        String messageDestinationRefInjectTargetKey = createMessageDestinationRefInjectTargetKey(messageDestinationRefName, injectTarget.getInjectionTargetClass().getStringValue(), injectTarget
                                .getInjectionTargetName().getStringValue());
                        if (!mergeContext.containsAttribute(messageDestinationRefInjectTargetKey)) {
                            messageDestinationRef.addNewInjectionTarget().set(injectTarget);
                            mergeContext.setAttribute(messageDestinationRefInjectTargetKey, Boolean.TRUE);
                        }
                    }
                }
            } else {
                MessageDestinationRefType targetMessageDestinationRef = (MessageDestinationRefType) webApp.addNewMessageDestinationRef().set(srcMessageDestinationRef);
                mergeContext.setAttribute(messageDestinationRefKey, new MergeItem(targetMessageDestinationRef, mergeContext.getCurrentJarUrl(), ElementSource.WEB_FRAGMENT));
                for (InjectionTargetType injectionTarget : targetMessageDestinationRef.getInjectionTargetArray()) {
                    mergeContext.setAttribute(createMessageDestinationRefInjectTargetKey(messageDestinationRefName, injectionTarget.getInjectionTargetClass().getStringValue(), injectionTarget.getInjectionTargetName()
                            .getStringValue()), Boolean.TRUE);
                }
            }
        }
View Full Code Here

            messageDestinationRefName.setStringValue(resourceName);
            messageDestinationRef.setMessageDestinationRefName(messageDestinationRefName);

            if (!resourceType.equals("")) {
                // message-destination-ref-type
                MessageDestinationTypeType msgDestType = messageDestinationRef.addNewMessageDestinationType();
                msgDestType.setStringValue(resourceType);
            }
            if (method != null || field != null) {
                // injectionTarget
                InjectionTargetType injectionTarget = messageDestinationRef.addNewInjectionTarget();
                configureInjectionTarget(injectionTarget, method, field);
View Full Code Here

        public static WebFragmentOrderEntry create(WebFragmentEntry webFragmentEntry) throws DeploymentException {
            WebFragmentOrderEntry webFragmentOrderEntry = new WebFragmentOrderEntry();
            WebFragmentType webFragment = webFragmentEntry.getWebFragment();
            if (webFragment.getOrderingArray().length > 0) {
                OrderingType ordering = webFragment.getOrderingArray()[0];
                OrderingOrderingType after = ordering.getAfter();
                if (after == null) {
                    webFragmentOrderEntry.afterDefined = false;
                } else {
                    webFragmentOrderEntry.afterDefined = true;
                    webFragmentOrderEntry.afterOthers = (after.getOthers() != null);
                    for (JavaIdentifierType afterEntryName : after.getNameArray()) {
                        if (afterEntryName.getStringValue().length() > 0) {
                            webFragmentOrderEntry.afterEntryNames.add(afterEntryName.getStringValue());
                        }
                    }
                }
                OrderingOrderingType before = ordering.getBefore();
                if (before == null) {
                    webFragmentOrderEntry.beforeDefined = false;
                } else {
                    webFragmentOrderEntry.beforeDefined = true;
                    webFragmentOrderEntry.beforeOthers = (before.getOthers() != null);
                    for (JavaIdentifierType beforeEntryName : before.getNameArray()) {
                        if (beforeEntryName.getStringValue().length() > 0) {
                            webFragmentOrderEntry.beforeEntryNames.add(beforeEntryName.getStringValue());
                        }
                    }
                }
View Full Code Here

            } 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());
                    }
                }
            }
        }
View Full Code Here

        public static WebFragmentOrderEntry create(WebFragmentEntry webFragmentEntry) throws DeploymentException {
            WebFragmentOrderEntry webFragmentOrderEntry = new WebFragmentOrderEntry();
            WebFragmentType webFragment = webFragmentEntry.getWebFragment();
            if (webFragment.getOrderingArray().length > 0) {
                OrderingType ordering = webFragment.getOrderingArray()[0];
                OrderingOrderingType after = ordering.getAfter();
                if (after == null) {
                    webFragmentOrderEntry.afterDefined = false;
                } else {
                    webFragmentOrderEntry.afterDefined = true;
                    webFragmentOrderEntry.afterOthers = (after.getOthers() != null);
                    for (JavaIdentifierType afterEntryName : after.getNameArray()) {
                        if (afterEntryName.getStringValue().length() > 0) {
                            webFragmentOrderEntry.afterEntryNames.add(afterEntryName.getStringValue());
                        }
                    }
                }
                OrderingOrderingType before = ordering.getBefore();
                if (before == null) {
                    webFragmentOrderEntry.beforeDefined = false;
                } else {
                    webFragmentOrderEntry.beforeDefined = true;
                    webFragmentOrderEntry.beforeOthers = (before.getOthers() != null);
View Full Code Here

TOP

Related Classes of org.apache.geronimo.xbeans.javaee6.JndiNameType

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.