Examples of GerRoleMappingsType


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

        if (securityType.isSetDefaultRole()) {
            security.setDefaultRole(securityType.getDefaultRole().trim());
        }

        if (securityType.isSetRoleMappings()) {
            GerRoleMappingsType roleMappingsType = securityType.getRoleMappings();
            for (int i = 0; i < roleMappingsType.sizeOfRoleArray(); i++) {
                GerRoleType roleType = roleMappingsType.getRoleArray(i);
                Role role = new Role();

                String roleName = roleType.getRoleName().trim();
                role.setRoleName(roleName);
View Full Code Here

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

        if (securityType.isSetDefaultRole()) {
            security.setDefaultRole(securityType.getDefaultRole().trim());
        }

        if (securityType.isSetRoleMappings()) {
            GerRoleMappingsType roleMappingsType = securityType.getRoleMappings();
            for (int i = 0; i < roleMappingsType.sizeOfRoleArray(); i++) {
                GerRoleType roleType = roleMappingsType.getRoleArray(i);
                Role role = new Role();

                String roleName = roleType.getRoleName().trim();
                role.setRoleName(roleName);
View Full Code Here

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

        if (securityType.isSetDefaultRole()) {
            security.setDefaultRole(securityType.getDefaultRole().trim());
        }

        if (securityType.isSetRoleMappings()) {
            GerRoleMappingsType roleMappingsType = securityType.getRoleMappings();
            for (int i = 0; i < roleMappingsType.sizeOfRoleArray(); i++) {
                GerRoleType roleType = roleMappingsType.getRoleArray(i);
                Role role = new Role();

                String roleName = roleType.getRoleName().trim();
                role.setRoleName(roleName);
View Full Code Here

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

        if (securityType.isSetDefaultRole()) {
            security.setDefaultRole(securityType.getDefaultRole().trim());
        }

        if (securityType.isSetRoleMappings()) {
            GerRoleMappingsType roleMappingsType = securityType.getRoleMappings();
            for (int i = 0; i < roleMappingsType.sizeOfRoleArray(); i++) {
                GerRoleType roleType = roleMappingsType.getRoleArray(i);
                Role role = new Role();

                String roleName = roleType.getRoleName().trim();
                role.setRoleName(roleName);
View Full Code Here

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

    protected AbstractNameQuery configureRoleMapper(DeploymentContext deploymentContext, GerSecurityType securityType, Bundle bundle) throws DeploymentException {
        Map<String, SubjectInfo> roleDesignates = new HashMap<String, SubjectInfo>();
        Map<Principal, Set<String>> principalRoleMap = new HashMap<Principal, Set<String>>();
        if (securityType.isSetRoleMappings()) {
            GerRoleMappingsType roleMappingsType = securityType.getRoleMappings();
            for (int i = 0; i < roleMappingsType.sizeOfRoleArray(); i++) {
                GerRoleType roleType = roleMappingsType.getRoleArray(i);

                String roleName = roleType.getRoleName().trim();
                if (roleType.isSetRunAsSubject()) {
                    SubjectInfo subjectInfo = buildSubjectInfo(roleType.getRunAsSubject());
                    roleDesignates.put(roleName, subjectInfo);
View Full Code Here

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

        if (securityType.isSetDefaultRole()) {
            security.setDefaultRole(securityType.getDefaultRole().trim());
        }

        if (securityType.isSetRoleMappings()) {
            GerRoleMappingsType roleMappingsType = securityType.getRoleMappings();
            for (int i = 0; i < roleMappingsType.sizeOfRoleArray(); i++) {
                GerRoleType roleType = roleMappingsType.getRoleArray(i);
                Role role = new Role();

                String roleName = roleType.getRoleName().trim();
                role.setRoleName(roleName);
View Full Code Here

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

            defaultPrincipal.setRealmName(defaultPrincipalType.getRealmName());
            defaultPrincipal.setPrincipal(buildPrincipal(defaultPrincipalType.getPrincipal()));

            security.setDefaultPrincipal(defaultPrincipal);

            GerRoleMappingsType roleMappingsType = securityType.getRoleMappings();
            if (roleMappingsType != null) {
                for (int i = 0; i < roleMappingsType.sizeOfRoleArray(); i++) {
                    GerRoleType roleType = roleMappingsType.getRoleArray(i);
                    Role role = new Role();

                    role.setRoleName(roleType.getRoleName());

                    for (int j = 0; j < roleType.sizeOfRealmArray(); j++) {
View Full Code Here

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

        }

        public void save(WARConfigData warConfig, Hashtable<String, Subject> runAsSubjects) {
            if (warConfig.getSecurity().isSetRoleMappings())
                warConfig.getSecurity().unsetRoleMappings();
            GerRoleMappingsType roleMappings = warConfig.getSecurity().addNewRoleMappings();

            for (int i = 0; i < items.length; i++) {
                SecurityPrincipalJson[] jPrincipals = items[i].getChildren();
                SecurityRoleJson item = items[i];

                GerRoleType role = roleMappings.addNewRole();
                role.setRoleName(item.getRoleName());

                for (int j = 0; j < jPrincipals.length; j++) {
                    SecurityPrincipalJson jPrincipal = jPrincipals[j];
                    String type = jPrincipal.getType();
View Full Code Here

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

        ConfigurationUtil.configure(configuration, webApp);
        setConfigured(true);

        //TODO not clear if schema allows/should allow security == null
        if (security != null) {
            GerRoleMappingsType roleMappings = security.getRoleMappings();
            if (roleMappings != null) {
                GerRoleType[] roles = roleMappings.getRoleArray();
                for (int i = 0; i < roles.length; i++) {
                    GerRoleType role = roles[i];
                    GerRealmType[] realms = role.getRealmArray();
                    for (int j = 0; j < realms.length; j++) {
                        GerRealmType realm = realms[j];
View Full Code Here

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

        ConfigurationUtil.configure(configuration, ejbJar);
        setConfigured(true);

        //TODO not clear if schema allows/should allow security == null
        if (security != null) {
            GerRoleMappingsType roleMappings = security.getRoleMappings();
            if (roleMappings != null) {
                GerRoleType[] roles = roleMappings.getRoleArray();
                for (int i = 0; i < roles.length; i++) {
                    GerRoleType role = roles[i];
                    GerRealmType[] realms = role.getRealmArray();
                    for (int j = 0; j < realms.length; j++) {
                        GerRealmType realm = realms[j];
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.