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

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

Introduction

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

Prototype

boolean supports(Class<?> clazz);

Source Link

Document

Indicates whether the AfterInvocationProvider is able to provide "after invocation" processing for the indicated secured object type.

Usage

From source file:org.springframework.security.access.intercept.AfterInvocationProviderManager.java

public boolean supports(ConfigAttribute attribute) {
    for (AfterInvocationProvider provider : providers) {
        if (logger.isDebugEnabled()) {
            logger.debug("Evaluating " + attribute + " against " + provider);
        }/*  w  w w .ja v  a  2  s  .c om*/

        if (provider.supports(attribute)) {
            return true;
        }
    }

    return false;
}

From source file:org.springframework.security.access.intercept.AfterInvocationProviderManager.java

/**
 * Iterates through all <code>AfterInvocationProvider</code>s and ensures each can
 * support the presented class./*from   www. ja va 2  s .  c  o m*/
 * <p>
 * If one or more providers cannot support the presented class, <code>false</code> is
 * returned.
 *
 * @param clazz the secure object class being queries
 *
 * @return if the <code>AfterInvocationProviderManager</code> can support the secure
 * object class, which requires every one of its <code>AfterInvocationProvider</code>s
 * to support the secure object class
 */
public boolean supports(Class<?> clazz) {
    for (AfterInvocationProvider provider : providers) {
        if (!provider.supports(clazz)) {
            return false;
        }
    }

    return true;
}