public abstract class AbstractAccessDecisionManager extends java.lang.Object implements AccessDecisionManager, org.springframework.beans.factory.InitializingBean, org.springframework.context.MessageSourceAware
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).
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
logger |
protected org.springframework.context.support.MessageSourceAccessor |
messages |
Modifier | Constructor and Description |
---|---|
protected |
AbstractAccessDecisionManager(java.util.List<AccessDecisionVoter<? extends java.lang.Object>> decisionVoters) |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected void |
checkAllowIfAllAbstainDecisions() |
java.util.List<AccessDecisionVoter<? extends java.lang.Object>> |
getDecisionVoters() |
boolean |
isAllowIfAllAbstainDecisions() |
void |
setAllowIfAllAbstainDecisions(boolean allowIfAllAbstainDecisions) |
void |
setMessageSource(org.springframework.context.MessageSource messageSource) |
boolean |
supports(java.lang.Class<?> clazz)
Iterates through all
AccessDecisionVoter s and ensures each can support
the presented class. |
boolean |
supports(ConfigAttribute attribute)
Indicates whether this
AccessDecisionManager is able to process
authorization requests presented with the passed ConfigAttribute . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
decide
protected final org.apache.commons.logging.Log logger
protected org.springframework.context.support.MessageSourceAccessor messages
protected AbstractAccessDecisionManager(java.util.List<AccessDecisionVoter<? extends java.lang.Object>> decisionVoters)
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
protected final void checkAllowIfAllAbstainDecisions()
public java.util.List<AccessDecisionVoter<? extends java.lang.Object>> getDecisionVoters()
public boolean isAllowIfAllAbstainDecisions()
public void setAllowIfAllAbstainDecisions(boolean allowIfAllAbstainDecisions)
public void setMessageSource(org.springframework.context.MessageSource messageSource)
setMessageSource
in interface org.springframework.context.MessageSourceAware
public boolean supports(ConfigAttribute attribute)
AccessDecisionManager
AccessDecisionManager
is able to process
authorization requests presented with the passed ConfigAttribute
.
This allows the AbstractSecurityInterceptor
to check every
configuration attribute can be consumed by the configured
AccessDecisionManager
and/or RunAsManager
and/or
AfterInvocationManager
.
supports
in interface AccessDecisionManager
attribute
- a configuration attribute that has been configured against the
AbstractSecurityInterceptor
AccessDecisionManager
can support the passed
configuration attributepublic boolean supports(java.lang.Class<?> clazz)
AccessDecisionVoter
s and ensures each can support
the presented class.
If one or more voters cannot support the presented class, false
is
returned.
supports
in interface AccessDecisionManager
clazz
- the type of secured object being presented