Examples of PrincipalComparator


Examples of com.ecyrd.jspwiki.auth.PrincipalComparator

        StringBuffer s = new StringBuffer();
        for ( Map.Entry<String,List<Principal>>entry : permissionPrincipals.entrySet() )
        {
            String action = entry.getKey();
            List<Principal> principals = entry.getValue();
            Collections.sort( principals, new PrincipalComparator() );
            s.append( "[{ALLOW ");
            s.append( action );
            s.append( " ");
            for ( int i = 0; i < principals.size(); i++ )
            {
View Full Code Here

Examples of com.sun.security.auth.PrincipalComparator

} else {

// dealing with a PrincipalComparator

Constructor<?> c = pClass.getConstructor(PARAMS1);
PrincipalComparator pc = (PrincipalComparator)c.newInstance
(new Object[] { pppe.principalName });

if (debug != null) {
debug.println("found PrincipalComparator " +
pc.getClass().getName());
}

// check if the PrincipalComparator
// implies the current thread's principals

Set<Principal> pSet =
new HashSet<Principal>(principals.length);
for (int j = 0; j < principals.length; j++) {
pSet.add(principals[j]);
}
Subject subject = new Subject(true,
pSet,
Collections.EMPTY_SET,
Collections.EMPTY_SET);

if (!pc.implies(subject)) {
if (debug != null) {
debug.println
("evaluation (principal comparator) failed");
}
View Full Code Here

Examples of com.sun.security.auth.PrincipalComparator

                } else {

                    // dealing with a PrincipalComparator

                    Constructor<?> c = pClass.getConstructor(PARAMS1);
                    PrincipalComparator pc = (PrincipalComparator)c.newInstance
                                        (new Object[] { pppe.principalName });

                    if (debug != null) {
                        debug.println("found PrincipalComparator " +
                                        pc.getClass().getName());
                    }

                    // check if the PrincipalComparator
                    // implies the current thread's principals

                    Set<Principal> pSet =
                                new HashSet<Principal>(principals.length);
                    for (int j = 0; j < principals.length; j++) {
                        pSet.add(principals[j]);
                    }
                    Subject subject = new Subject(true,
                                                pSet,
                                                Collections.EMPTY_SET,
                                                Collections.EMPTY_SET);

                    if (!pc.implies(subject)) {
                        if (debug != null) {
                            debug.println
                                ("evaluation (principal comparator) failed");
                        }
View Full Code Here

Examples of com.sun.security.auth.PrincipalComparator

                } else {

                    // dealing with a PrincipalComparator

                    Constructor<?> c = pClass.getConstructor(PARAMS1);
                    PrincipalComparator pc = (PrincipalComparator)c.newInstance
                                        (new Object[] { pppe.principalName });

                    if (debug != null) {
                        debug.println("found PrincipalComparator " +
                                        pc.getClass().getName());
                    }

                    // check if the PrincipalComparator
                    // implies the current thread's principals

                    Set<Principal> pSet =
                                new HashSet<Principal>(principals.length);
                    for (int j = 0; j < principals.length; j++) {
                        pSet.add(principals[j]);
                    }
                    Subject subject = new Subject(true,
                                                pSet,
                                                Collections.EMPTY_SET,
                                                Collections.EMPTY_SET);

                    if (!pc.implies(subject)) {
                        if (debug != null) {
                            debug.println
                                ("evaluation (principal comparator) failed");
                        }
View Full Code Here

Examples of org.apache.wiki.auth.PrincipalComparator

        StringBuffer s = new StringBuffer();
        for (Map.Entry<String, List<Principal>> entry : permissionPrincipals.entrySet()) {
            String action = entry.getKey();
            List<Principal> principals = entry.getValue();
            Collections.sort(principals, new PrincipalComparator());
            s.append("[{ALLOW ");
            s.append(action);
            s.append(" ");
            for (int i = 0; i < principals.size(); i++) {
                Principal principal = principals.get(i);
View Full Code Here

Examples of org.apache.wiki.auth.PrincipalComparator

        StringBuffer s = new StringBuffer();
        for ( Map.Entry<String,List<Principal>>entry : permissionPrincipals.entrySet() )
        {
            String action = entry.getKey();
            List<Principal> principals = entry.getValue();
            Collections.sort( principals, new PrincipalComparator() );
            s.append( "[{ALLOW ");
            s.append( action );
            s.append( " ");
            for ( int i = 0; i < principals.size(); i++ )
            {
View Full Code Here

Examples of org.apache.wiki.auth.PrincipalComparator

        StringBuffer s = new StringBuffer();
        for ( Map.Entry<String,List<Principal>>entry : permissionPrincipals.entrySet() )
        {
            String action = entry.getKey();
            List<Principal> principals = entry.getValue();
            Collections.sort( principals, new PrincipalComparator() );
            s.append( "[{ALLOW ");
            s.append( action );
            s.append( " ");
            for ( int i = 0; i < principals.size(); i++ )
            {
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.