Example usage for org.springframework.security.access AccessDecisionVoter supports

List of usage examples for org.springframework.security.access AccessDecisionVoter supports

Introduction

In this page you can find the example usage for org.springframework.security.access AccessDecisionVoter supports.

Prototype

boolean supports(Class<?> clazz);

Source Link

Document

Indicates whether the AccessDecisionVoter implementation is able to provide access control votes for the indicated secured object type.

Usage

From source file:org.codehaus.groovy.grails.plugins.springsecurity.AbstractFilterInvocationDefinition.java

private boolean supports(final ConfigAttribute config, final AccessDecisionVoter voter) {
    return voter != null && voter.supports(config);
}

From source file:es.osoco.grails.plugins.otp.access.AbstractMultipleVoterFilterInvocationDefinition.java

private boolean supportsAttribute(final ConfigAttribute config, final AccessDecisionVoter voter) {
    return voter != null && voter.supports(config);
}

From source file:org.springframework.security.access.vote.AbstractAccessDecisionManager.java

public boolean supports(ConfigAttribute attribute) {
    for (AccessDecisionVoter voter : this.decisionVoters) {
        if (voter.supports(attribute)) {
            return true;
        }/*from w  w  w .  ja v a 2 s. c om*/
    }

    return false;
}

From source file:org.springframework.security.access.vote.AbstractAccessDecisionManager.java

/**
 * Iterates through all <code>AccessDecisionVoter</code>s and ensures each can support
 * the presented class./*from  w ww  .  j  av a2  s.  co  m*/
 * <p>
 * If one or more voters cannot support the presented class, <code>false</code> is
 * returned.
 *
 * @param clazz the type of secured object being presented
 * @return true if this type is supported
 */
public boolean supports(Class<?> clazz) {
    for (AccessDecisionVoter voter : this.decisionVoters) {
        if (!voter.supports(clazz)) {
            return false;
        }
    }

    return true;
}