Class AbstractAccessDecisionManager
java.lang.Object
org.springframework.security.access.vote.AbstractAccessDecisionManager
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.MessageSourceAware
,AccessDecisionManager
- Direct Known Subclasses:
AffirmativeBased
,ConsensusBased
,UnanimousBased
public abstract class AbstractAccessDecisionManager
extends Object
implements AccessDecisionManager, org.springframework.beans.factory.InitializingBean, org.springframework.context.MessageSourceAware
Abstract implementation of
AccessDecisionManager
.
Handles configuration of a bean context defined list of AccessDecisionVoter
s
and the access control behaviour if all voters abstain from voting (defaults to deny
access).
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractAccessDecisionManager
(List<AccessDecisionVoter<?>> decisionVoters) -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected final void
boolean
void
setAllowIfAllAbstainDecisions
(boolean allowIfAllAbstainDecisions) void
setMessageSource
(org.springframework.context.MessageSource messageSource) boolean
Iterates through allAccessDecisionVoter
s and ensures each can support the presented class.boolean
supports
(ConfigAttribute attribute) Indicates whether thisAccessDecisionManager
is able to process authorization requests presented with the passedConfigAttribute
.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.security.access.AccessDecisionManager
decide
-
Field Details
-
logger
protected final org.apache.commons.logging.Log logger -
messages
protected org.springframework.context.support.MessageSourceAccessor messages
-
-
Constructor Details
-
AbstractAccessDecisionManager
-
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
checkAllowIfAllAbstainDecisions
protected final void checkAllowIfAllAbstainDecisions() -
getDecisionVoters
-
isAllowIfAllAbstainDecisions
public boolean isAllowIfAllAbstainDecisions() -
setAllowIfAllAbstainDecisions
public void setAllowIfAllAbstainDecisions(boolean allowIfAllAbstainDecisions) -
setMessageSource
public void setMessageSource(org.springframework.context.MessageSource messageSource) - Specified by:
setMessageSource
in interfaceorg.springframework.context.MessageSourceAware
-
supports
Description copied from interface:AccessDecisionManager
Indicates whether thisAccessDecisionManager
is able to process authorization requests presented with the passedConfigAttribute
.This allows the
AbstractSecurityInterceptor
to check every configuration attribute can be consumed by the configuredAccessDecisionManager
and/orRunAsManager
and/orAfterInvocationManager
.- Specified by:
supports
in interfaceAccessDecisionManager
- Parameters:
attribute
- a configuration attribute that has been configured against theAbstractSecurityInterceptor
- Returns:
- true if this
AccessDecisionManager
can support the passed configuration attribute
-
supports
Iterates through allAccessDecisionVoter
s and ensures each can support the presented class.If one or more voters cannot support the presented class,
false
is returned.- Specified by:
supports
in interfaceAccessDecisionManager
- Parameters:
clazz
- the type of secured object being presented- Returns:
- true if this type is supported
-
toString
-