Package org.uberfire.security

Examples of org.uberfire.security.Role


                        return iterator.hasNext();
                    }

                    @Override
                    public AuthorizationResult next() {
                        final Role role = iterator.next();

                        for (final Role activeSubjectRole : subject.getRoles()) {
                            if (role.getName().equals(activeSubjectRole.getName())) {
                                return ACCESS_GRANTED;
                            }
                        }

                        return ACCESS_ABSTAIN;
View Full Code Here


        final StringBuilder sb = new StringBuilder();

        Iterator<Role> iterator = collection.iterator();
        int i = 0;
        while ( iterator.hasNext() ) {
            final Role next = iterator.next();
            sb.append( '"' ).append( next.getName() ).append( '"' );
            if ( i + 1 < collection.size() ) {
                sb.append( ", " );
            }
            i++;
        }
View Full Code Here

        final List<Role> roles = new ArrayList<Role>();
        final Map<String, String> properties = new HashMap<String, String>();

        if ( clientSubject == null ) {
            name = ANONYMOUS;
            roles.add( new Role() {
                @Override
                public String getName() {
                    return ANONYMOUS;
                }
            } );

        } else {
            name = clientSubject.getName();
            for ( int i = 0; i < clientSubject.getRoles().length(); i++ ) {
                final String roleName = clientSubject.getRoles().get( i );
                roles.add( new Role() {
                    @Override
                    public String getName() {
                        return roleName;
                    }
                } );
View Full Code Here

TOP

Related Classes of org.uberfire.security.Role

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.