InType - the type which is to be inspected and mappedOutType - some sort of representation of an IdP attributepublic abstract class AbstractSAMLAttributesMapper<InType extends Attribute,OutType extends IdPAttribute> extends AbstractIdentifiableInitializableComponent implements AttributesMapper<InType,OutType>
Attributes (or derived) to a Multimap of
String,IdPAttribute (or derived, or null). The representation as a Multimap is useful for
filtering situations and is exploited by AttributeInMetadata filter.| Modifier and Type | Field and Description |
|---|---|
private org.slf4j.Logger |
log
Class logger.
|
private String |
logPrefix
The String used to prefix log message.
|
private Collection<AttributeMapper<InType,OutType>> |
mappers
The mappers we can apply.
|
| Constructor and Description |
|---|
AbstractSAMLAttributesMapper()
Default Constructor.
|
AbstractSAMLAttributesMapper(AttributeResolver resolver,
String id,
com.google.common.base.Supplier<AbstractSAMLAttributeMapper<InType,OutType>> mapperFactory)
Constructor to create the mapping from an existing resolver.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doInitialize() |
private String |
getLogPrefix()
Return a string which is to be prepended to all log messages.
|
Collection<AttributeMapper<InType,OutType>> |
getMappers()
Get the mappers.
|
com.google.common.collect.Multimap<String,OutType> |
mapAttributes(List<InType> prototypes)
Map the input objects into IdP attributes.
|
void |
setMappers(Collection<AttributeMapper<InType,OutType>> theMappers)
Set the attribute mappers into the lookup map.
|
setIdgetIddestroy, doDestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetId@Nonnull private final org.slf4j.Logger log
@Nonnull @NonnullElements private Collection<AttributeMapper<InType extends Attribute,OutType extends IdPAttribute>> mappers
public AbstractSAMLAttributesMapper()
public AbstractSAMLAttributesMapper(@Nonnull AttributeResolver resolver, @Nonnull@NotEmpty String id, @Nonnull com.google.common.base.Supplier<AbstractSAMLAttributeMapper<InType,OutType>> mapperFactory)
AttributeEncoder (internal attribute -> SAML Attributes) into
AttributeMapper (SAML [RequestedAttributes] -> internal [Requested] Attributes). AbstractSAMLAttributeMapper (with no
AbstractSAMLAttributeMapper.getAttributeIds(). These are accumulated into a Multimap, where the
key is the AbstractSAMLAttributeMapper and the values are the (IdP) attribute names. The collection of
AttributeMappers can then be extracted from the map, and the appropriate internal names added (these
being the value of the Multimap)resolver - The resolverid - The itmapperFactory - A factory to generate new mappers of the correct type.@Nonnull @NonnullElements public Collection<AttributeMapper<InType,OutType>> getMappers()
public void setMappers(@Nonnull Collection<AttributeMapper<InType,OutType>> theMappers)
theMappers - The mappers to set.@Nonnull @NonnullElements public com.google.common.collect.Multimap<String,OutType> mapAttributes(@Nonnull@NonnullElements List<InType> prototypes)
mapAttributes in interface AttributesMapper<InType extends Attribute,OutType extends IdPAttribute>prototypes - the SAML attributesprotected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractIdentifiedInitializableComponentComponentInitializationExceptionCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.