public class ConsensusBased extends AbstractAccessDecisionManager
AccessDecisionManagerthat uses a consensus-based approach.
"Consensus" here means majority-rule (ignoring abstains) rather than unanimous agreement (ignoring abstains).
If you require unanimity, please see
|Constructor and Description|
Use constructor which takes voter list
|Modifier and Type||Method and Description|
This concrete implementation simply polls all configured
afterPropertiesSet, checkAllowIfAllAbstainDecisions, getDecisionVoters, isAllowIfAllAbstainDecisions, setAllowIfAllAbstainDecisions, setDecisionVoters, setMessageSource, supports, supports
@Deprecated public ConsensusBased()
public ConsensusBased(List<AccessDecisionVoter> decisionVoters)
public void decide(Authentication authentication, Object object, Collection<ConfigAttribute> configAttributes) throws AccessDeniedException
AccessDecisionVoters and upon completion determines the consensus of granted against denied responses.
If there were an equal number of grant and deny votes, the decision will be based on the
isAllowIfEqualGrantedDeniedDecisions() property (defaults to true).
AccessDecisionVoter abstained from voting, the decision will be based on the
AbstractAccessDecisionManager.isAllowIfAllAbstainDecisions() property (defaults to false).
authentication- the caller invoking the method
object- the secured object
configAttributes- the configuration attributes associated with the method being invoked
AccessDeniedException- if access is denied
public boolean isAllowIfEqualGrantedDeniedDecisions()
public void setAllowIfEqualGrantedDeniedDecisions(boolean allowIfEqualGrantedDeniedDecisions)