Package org.glassfish.security.common

Examples of org.glassfish.security.common.Group


        /* populate the group in the subject and clean out the slate at the same
         * time
         */
        for(int i = 0; i<_groupsList.length; i++){
            if(_groupsList[i] != null){
                Group g;
                if (factory != null)
                    g = factory.getGroupInstance(_groupsList[i], realm_name);
                else
                    g = new Group(_groupsList[i]);

                if(!principalSet.contains(g)){
                    principalSet.add(g);
                }
               
View Full Code Here


       try {
            Realm realm = Realm.getInstance(realmName);
            Enumeration en = realm.getGroupNames(username);
            Set<Principal> principalSet = s.getPrincipals();
            while (en.hasMoreElements()) {
                principalSet.add(new Group((String) en.nextElement()));
            }

        } catch (InvalidOperationException ex) {
            _logger.warning("Realm " + realmName + ": " + ex.toString());
        } catch (NoSuchUserException ex){
View Full Code Here

                AppservAccessController.doPrivileged(new PrivilegedAction() {

                    public java.lang.Object run() {
                        while (groups.hasMoreElements()) {
                            String grp = (String) groups.nextElement();
                            fs.getPrincipals().add(new Group(grp));
                        }
                        return fs;
                    }
                });
            }
View Full Code Here

            return false;
        }
        Set<Principal> principalSet = subject.getPrincipals();
        for (int i = 0; i < groups.length; i++) {
            if (groups[i] != null) {
                Group g = Globals.getDefaultHabitat().<PrincipalGroupFactory>getService(PrincipalGroupFactory.class).
                        getGroupInstance(groups[i], CertificateRealm.AUTH_TYPE);
                principalSet.add(g);
            }
            groups[i] = null;
        }
View Full Code Here

        /* populate the group in the subject and clean out the slate at the same
         * time
         */
        for(int i = 0; i<_groupsList.length; i++){
            if(_groupsList[i] != null){
                Group g;
                if (factory != null)
                    g = factory.getGroupInstance(_groupsList[i], realm_name);
                else
                    g = new Group(_groupsList[i]);

                if(!principalSet.contains(g)){
                    principalSet.add(g);
                }
               
View Full Code Here

            return false;
        }
        Set<Principal> principalSet = subject.getPrincipals();
        for (int i = 0; i < groups.length; i++) {
            if (groups[i] != null) {
                Group g = Globals.getDefaultHabitat().<PrincipalGroupFactory>getService(PrincipalGroupFactory.class).
                        getGroupInstance(groups[i], CertificateRealm.AUTH_TYPE);
                principalSet.add(g);
            }
            groups[i] = null;
        }
View Full Code Here

                descriptor.addWLRoleAssignments(roleMap);
                Role role = new Role(roleMap.getRoleName());
                SecurityRoleMapper rm = descriptor.getRoleMapper();
                if (rm != null) {
                    if(roleMap.isExternallyDefined()){
                        rm.assignRole(new Group(roleMap.getRoleName()),
                                role, descriptor);
                    } else {
                        List<String> principals = roleMap.getPrincipalNames();
                        for (int i = 0; i < principals.size(); i++) {
                            rm.assignRole(new PrincipalImpl(principals.get(i)),
View Full Code Here

                        rm.assignRole(principals.get(i).getPrincipal(),
                            role, descriptor);
                    }
                    List<String> groups = roleMap.getGroupNames();
                    for (int i = 0; i < groups.size(); i++) {
                        rm.assignRole(new Group(groups.get(i)),
                            role, descriptor);
                    }
                }
            }
        }
View Full Code Here

                        rm.assignRole(principals.get(i).getPrincipal(),
                            role, descriptor);
                    }
                    List<String> groups = roleMap.getGroupNames();
                    for (int i = 0; i < groups.size(); i++) {
                        rm.assignRole(new Group(groups.get(i)),
                            role, descriptor);
                    }
                }
            }
        }
View Full Code Here

                } else {
                    rm = getRoleMapper();
                }
                if (rm != null) {
                    if (roleMap.isExternallyDefined()) {
                        rm.assignRole(new Group(role.getName()), role, descriptor);
                    } else {
                        List<String> principals = roleMap.getPrincipalNames();
                        for (int i = 0; i < principals.size(); i++) {
                            rm.assignRole(new PrincipalImpl(principals.get(i)),
                                    role, descriptor);
View Full Code Here

TOP

Related Classes of org.glassfish.security.common.Group

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.