public final class DefaultMessageSecurityMetadataSource extends java.lang.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(java.util.LinkedHashMap<MessageMatcher<?>,java.util.Collection<ConfigAttribute>> messageMap) |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<ConfigAttribute> |
getAllConfigAttributes()
If available, returns all of the
ConfigAttribute s defined by the
implementing class. |
java.util.Collection<ConfigAttribute> |
getAttributes(java.lang.Object object)
Accesses the
ConfigAttribute s that apply to a given secure object. |
boolean |
supports(java.lang.Class<?> clazz)
Indicates whether the
SecurityMetadataSource implementation is able to
provide ConfigAttribute s for the indicated secure object type. |
public DefaultMessageSecurityMetadataSource(java.util.LinkedHashMap<MessageMatcher<?>,java.util.Collection<ConfigAttribute>> messageMap)
public java.util.Collection<ConfigAttribute> getAttributes(java.lang.Object object) throws java.lang.IllegalArgumentException
SecurityMetadataSource
ConfigAttribute
s that apply to a given secure object.getAttributes
in interface SecurityMetadataSource
object
- the object being securedjava.lang.IllegalArgumentException
- if the passed object is not of a type supported by
the SecurityMetadataSource
implementationpublic java.util.Collection<ConfigAttribute> getAllConfigAttributes()
SecurityMetadataSource
ConfigAttribute
s 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 SecurityMetadataSource
ConfigAttribute
s or null
if unsupportedpublic boolean supports(java.lang.Class<?> clazz)
SecurityMetadataSource
SecurityMetadataSource
implementation is able to
provide ConfigAttribute
s for the indicated secure object type.supports
in interface SecurityMetadataSource
clazz
- the class that is being queried