public final class DefaultMessageSecurityMetadataSource extends Object implements MessageSecurityMetadataSource
MessageSecurityMetadataSource that looks up the ConfigAttribute instances
using a MessageMatcher.
Each entry is considered in order. The first entry that matches, the corresponding Collection<ConfigAttribute>
is returned.
ChannelSecurityInterceptor,
ExpressionBasedMessageSecurityMetadataSourceFactory| Constructor and Description |
|---|
DefaultMessageSecurityMetadataSource(LinkedHashMap<MessageMatcher<?>,Collection<ConfigAttribute>> messageMap) |
| Modifier and Type | Method and Description |
|---|---|
Collection<ConfigAttribute> |
getAllConfigAttributes()
If available, returns all of the
ConfigAttributes defined by the implementing class. |
Collection<ConfigAttribute> |
getAttributes(Object object)
Accesses the
ConfigAttributes that apply to a given secure object. |
boolean |
supports(Class<?> clazz)
Indicates whether the
SecurityMetadataSource implementation is able to provide
ConfigAttributes for the indicated secure object type. |
public DefaultMessageSecurityMetadataSource(LinkedHashMap<MessageMatcher<?>,Collection<ConfigAttribute>> messageMap)
public Collection<ConfigAttribute> getAttributes(Object object) throws IllegalArgumentException
SecurityMetadataSourceConfigAttributes that apply to a given secure object.getAttributes in interface SecurityMetadataSourceobject - the object being securedIllegalArgumentException - if the passed object is not of a type supported by the
SecurityMetadataSource implementationpublic Collection<ConfigAttribute> getAllConfigAttributes()
SecurityMetadataSourceConfigAttributes defined by the implementing class.
This is used by the AbstractSecurityInterceptor to perform startup time validation of each
ConfigAttribute configured against it.
getAllConfigAttributes in interface SecurityMetadataSourceConfigAttributes or null if unsupportedpublic boolean supports(Class<?> clazz)
SecurityMetadataSourceSecurityMetadataSource implementation is able to provide
ConfigAttributes for the indicated secure object type.supports in interface SecurityMetadataSourceclazz - the class that is being queried