Class DefaultMessageSecurityMetadataSource
- java.lang.Object
 - 
- org.springframework.security.messaging.access.intercept.DefaultMessageSecurityMetadataSource
 
 
- 
- All Implemented Interfaces:
 org.springframework.aop.framework.AopInfrastructureBean,SecurityMetadataSource,MessageSecurityMetadataSource
public final class DefaultMessageSecurityMetadataSource extends java.lang.Object implements MessageSecurityMetadataSource
A default implementation ofMessageSecurityMetadataSourcethat looks up theConfigAttributeinstances using aMessageMatcher.Each entry is considered in order. The first entry that matches, the corresponding
Collection<ConfigAttribute>is returned.- Since:
 - 4.0
 - See Also:
 ChannelSecurityInterceptor,ExpressionBasedMessageSecurityMetadataSourceFactory
 
- 
- 
Constructor Summary
Constructors Constructor Description DefaultMessageSecurityMetadataSource(java.util.LinkedHashMap<MessageMatcher<?>,java.util.Collection<ConfigAttribute>> messageMap) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<ConfigAttribute>getAllConfigAttributes()If available, returns all of theConfigAttributes defined by the implementing class.java.util.Collection<ConfigAttribute>getAttributes(java.lang.Object object)Accesses theConfigAttributes that apply to a given secure object.booleansupports(java.lang.Class<?> clazz)Indicates whether theSecurityMetadataSourceimplementation is able to provideConfigAttributes for the indicated secure object type. 
 - 
 
- 
- 
Constructor Detail
- 
DefaultMessageSecurityMetadataSource
public DefaultMessageSecurityMetadataSource(java.util.LinkedHashMap<MessageMatcher<?>,java.util.Collection<ConfigAttribute>> messageMap)
 
 - 
 
- 
Method Detail
- 
getAttributes
public java.util.Collection<ConfigAttribute> getAttributes(java.lang.Object object) throws java.lang.IllegalArgumentException
Description copied from interface:SecurityMetadataSourceAccesses theConfigAttributes that apply to a given secure object.- Specified by:
 getAttributesin interfaceSecurityMetadataSource- Parameters:
 object- the object being secured- Returns:
 - the attributes that apply to the passed in secured object. Should return an empty collection if there are no applicable attributes.
 - Throws:
 java.lang.IllegalArgumentException- if the passed object is not of a type supported by theSecurityMetadataSourceimplementation
 
- 
getAllConfigAttributes
public java.util.Collection<ConfigAttribute> getAllConfigAttributes()
Description copied from interface:SecurityMetadataSourceIf available, returns all of theConfigAttributes defined by the implementing class.This is used by the
AbstractSecurityInterceptorto perform startup time validation of eachConfigAttributeconfigured against it.- Specified by:
 getAllConfigAttributesin interfaceSecurityMetadataSource- Returns:
 - the 
ConfigAttributes ornullif unsupported 
 
- 
supports
public boolean supports(java.lang.Class<?> clazz)
Description copied from interface:SecurityMetadataSourceIndicates whether theSecurityMetadataSourceimplementation is able to provideConfigAttributes for the indicated secure object type.- Specified by:
 supportsin interfaceSecurityMetadataSource- Parameters:
 clazz- the class that is being queried- Returns:
 - true if the implementation can process the indicated class
 
 
 - 
 
 -