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 (annotatedWebAppDD instanceof AnnotatedWebApp) {
            WebAppType webAppDD = ((AnnotatedWebApp) annotatedWebAppDD).getWebApp();
            SecurityRoleType[] securityRoles = webAppDD.getSecurityRoleArray();
            if (securityRoles.length > 0) {
                security = GerSecurityType.Factory.newInstance();
                GerRoleMappingsType roleMappings = security.addNewRoleMappings();
                for (int i = 0; i < securityRoles.length; i++) {
                    String roleName = securityRoles[i].getRoleName().getStringValue();
                    roleMappings.addNewRole().setRoleName(roleName);
                }
            }
        }
    }
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

    protected AbstractNameQuery configureRoleMapper(DeploymentContext deploymentContext, GerSecurityType securityType, ClassLoader classLoader) 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

    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 (annotatedWebAppDD instanceof WebApp) {
            WebApp webAppDD = (WebApp) annotatedWebAppDD;
            List<SecurityRole> securityRoles = webAppDD.getSecurityRole();
            if (securityRoles.size() > 0) {
                security = GerSecurityType.Factory.newInstance();
                GerRoleMappingsType roleMappings = security.addNewRoleMappings();
                for (SecurityRole securityRole: securityRoles) {
                    String roleName = securityRole.getRoleName();
                    roleMappings.addNewRole().setRoleName(roleName);
                }
            }
        }
    }
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

    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
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.