Examples of GerSecurityRefType


Examples of org.apache.geronimo.xbeans.geronimo.security.GerSecurityRefType

        XmlObject[] refs = container.selectChildren(SECURITY_REF_QNAME);
        if (refs.length > 1) {
            throw new DeploymentException("Unexpected count of security-ref elements in geronimo plan " + refs.length + " qname: " + SECURITY_REF_QNAME);
        }
        if (refs.length == 1) {
            GerSecurityRefType ref;
            try {
                ref = (GerSecurityRefType) XmlBeansUtil.typedCopy(refs[0], GerSecurityRefType.type);
                if (ref.isSetName()) {
                    String name = ref.getName().trim();
                    AbstractNameQuery roleMapperDataName = new AbstractNameQuery(null, Collections.singletonMap("name", name), PrincipalRoleMapper.class.getName());
                    setRoleMapperName(applicationContext, roleMapperDataName);
                } else {
                    PatternType SecurityRefType = ref.getRef();
                    AbstractNameQuery roleMapperDataName = SingleGBeanBuilder.buildAbstractNameQuery(SecurityRefType, GBeanInfoBuilder.DEFAULT_J2EE_TYPE, Collections.singleton(CredentialStore.class.getName()));
                    setRoleMapperName(applicationContext, roleMapperDataName);
                }
            } catch (XmlException e) {
                throw new DeploymentException("Could not validate security element", e);
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.security.GerSecurityRefType

        XmlObject[] refs = container.selectChildren(SECURITY_REF_QNAME);
        if (refs.length > 1) {
            throw new DeploymentException("Unexpected count of security-ref elements in geronimo plan " + refs.length + " qname: " + SECURITY_REF_QNAME);
        }
        if (refs.length == 1) {
            GerSecurityRefType ref;
            try {
                ref = (GerSecurityRefType) XmlBeansUtil.typedCopy(refs[0], GerSecurityRefType.type);
                if (ref.isSetName()) {
                    String name = ref.getName().trim();
                    AbstractNameQuery roleMapperDataName = new AbstractNameQuery(null, Collections.singletonMap("name", name), PrincipalRoleMapper.class.getName());
                    setRoleMapperName(applicationContext, roleMapperDataName);
                } else {
                    PatternType SecurityRefType = ref.getRef();
                    AbstractNameQuery roleMapperDataName = SingleGBeanBuilder.buildAbstractNameQuery(SecurityRefType, GBeanInfoBuilder.DEFAULT_J2EE_TYPE, Collections.singleton(CredentialStore.class.getName()));
                    setRoleMapperName(applicationContext, roleMapperDataName);
                }
            } catch (XmlException e) {
                throw new DeploymentException("Could not validate security element", e);
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.security.GerSecurityRefType

        XmlObject[] refs = container.selectChildren(SECURITY_REF_QNAME);
        if (refs.length > 1) {
            throw new DeploymentException("Unexpected count of security-ref elements in geronimo plan " + refs.length + " qname: " + SECURITY_REF_QNAME);
        }
        if (refs.length == 1) {
            GerSecurityRefType ref;
            try {
                ref = (GerSecurityRefType) XmlBeansUtil.typedCopy(refs[0], GerSecurityRefType.type);
                if (ref.isSetName()) {
                    String name = ref.getName().trim();
                    AbstractNameQuery roleMapperDataName = new AbstractNameQuery(null, Collections.singletonMap("name", name), PrincipalRoleMapper.class.getName());
                    setRoleMapperName(applicationContext, roleMapperDataName);
                } else {
                    PatternType SecurityRefType = ref.getRef();
                    AbstractNameQuery roleMapperDataName = SingleGBeanBuilder.buildAbstractNameQuery(SecurityRefType, GBeanInfoBuilder.DEFAULT_J2EE_TYPE, Collections.singleton(CredentialStore.class.getName()));
                    setRoleMapperName(applicationContext, roleMapperDataName);
                }
            } catch (XmlException e) {
                throw new DeploymentException("Could not validate security element", e);
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.security.GerSecurityRefType

        XmlObject[] refs = container.selectChildren(SECURITY_REF_QNAME);
        if (refs.length > 1) {
            throw new DeploymentException("Unexpected count of security-ref elements in geronimo plan " + refs.length + " qname: " + SECURITY_REF_QNAME);
        }
        if (refs.length == 1) {
            GerSecurityRefType ref;
            try {
                ref = (GerSecurityRefType) XmlBeansUtil.typedCopy(refs[0], GerSecurityRefType.type);
                if (ref.isSetName()) {
                    String name = ref.getName().trim();
                    AbstractNameQuery roleMapperDataName = new AbstractNameQuery(null, Collections.singletonMap("name", name), PrincipalRoleMapper.class.getName());
                    setRoleMapperName(applicationContext, roleMapperDataName);
                } else {
                    PatternType SecurityRefType = ref.getRef();
                    AbstractNameQuery roleMapperDataName = SingleGBeanBuilder.buildAbstractNameQuery(SecurityRefType, GBeanInfoBuilder.DEFAULT_J2EE_TYPE, Collections.singleton(CredentialStore.class.getName()));
                    setRoleMapperName(applicationContext, roleMapperDataName);
                }
            } catch (XmlException e) {
                throw new DeploymentException("Could not validate security element", e);
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.security.GerSecurityRefType

        XmlObject[] refs = container.selectChildren(SECURITY_REF_QNAME);
        if (refs.length > 1) {
            throw new DeploymentException("Unexpected count of security-ref elements in geronimo plan " + refs.length + " qname: " + SECURITY_REF_QNAME);
        }
        if (refs.length == 1) {
            GerSecurityRefType ref;
            try {
                ref = (GerSecurityRefType) XmlBeansUtil.typedCopy(refs[0], GerSecurityRefType.type);
                if (ref.isSetName()) {
                    String name = ref.getName().trim();
                    AbstractNameQuery roleMapperDataName = new AbstractNameQuery(null, Collections.singletonMap("name", name), PrincipalRoleMapper.class.getName());
                    setRoleMapperName(applicationContext, roleMapperDataName);
                } else {
                    PatternType SecurityRefType = ref.getRef();
                    AbstractNameQuery roleMapperDataName = SingleGBeanBuilder.buildAbstractNameQuery(SecurityRefType, GBeanInfoBuilder.DEFAULT_J2EE_TYPE, Collections.singleton(CredentialStore.class.getName()));
                    setRoleMapperName(applicationContext, roleMapperDataName);
                }
            } catch (XmlException e) {
                throw new DeploymentException("Could not validate security element", e);
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.