Package com.adito.policyframework

Examples of com.adito.policyframework.ResourceType


     * @return int the unique priority
     * @throws Exception
     */
    public static int getAuthenticationSchemePriority(SessionInfo session) throws Exception {
        User user = session.getUser();
        ResourceType resourceType = PolicyConstants.AUTHENTICATION_SCHEMES_RESOURCE_TYPE;
        List<Integer> granted = PolicyDatabaseFactory.getInstance().getGrantedResourcesOfType(user, resourceType);

        List<AuthenticationScheme> schemes = new ArrayList<AuthenticationScheme>();
        for (Integer resourceId : granted) {
            AuthenticationScheme scheme = (AuthenticationScheme) resourceType.getResourceById(resourceId.intValue());
            schemes.add(scheme);
        }
        Collections.sort(schemes, new Comparator<AuthenticationScheme>() {
            public int compare(AuthenticationScheme o1, AuthenticationScheme o2) {
                return Math.abs(o1.getPriorityInt()) - Math.abs(o2.getPriorityInt());
View Full Code Here

TOP

Related Classes of com.adito.policyframework.ResourceType

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.