InType - the input (SAML2 attribute) typeOutType - the output (IdP Attribute) typepublic abstract class AbstractSAMLAttributeMapper<InType extends Attribute,OutType extends IdPAttribute> extends AbstractIdentifiableInitializableComponent implements AttributeMapper<InType,OutType>
Attribute into an IdP IdPAttribute.| Modifier and Type | Field and Description |
|---|---|
private String |
attributeFormat
The attribute format.
|
private List<String> |
attributeIds
The internal names to generate.
|
private org.slf4j.Logger |
log
Class logger.
|
private String |
logPrefix
The String used to prefix log message.
|
private String |
theSAMLName
the (SAML) attribute name.
|
private AbstractSAMLAttributeValueMapper |
valueMapper
The value mapper.
|
| Constructor and Description |
|---|
AbstractSAMLAttributeMapper() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
attributeMatches(InType attribute)
Determines if the attribute matches the provided parameterisation.
|
protected void |
doInitialize() |
boolean |
equals(Object obj)
.
|
String |
getAttributeFormat()
Get the (optional) attribute format.
|
List<String> |
getAttributeIds()
Get the list of internal identifiers.
|
protected String |
getLogPrefix()
return a string which is to be prepended to all log messages.
|
String |
getSAMLName()
Get the SAML attribute name.
|
AbstractSAMLAttributeValueMapper |
getValueMapper()
Get the class which converts types.
|
int |
hashCode()
.
|
Map<String,OutType> |
mapAttribute(InType prototype)
Map the SAML attribute to the required output type.
|
protected boolean |
matches(String otherSAMLName,
String otherSAMLFormat)
Compare whether the name and format given "match" ours.
|
protected abstract OutType |
newAttribute(InType input,
String id)
Function to summon up the output type based on an ID and an object of the input type.
|
void |
setAttributeFormat(String format)
Set the (optional) attribute format.
|
void |
setAttributeIds(List<String> theIds)
Set the list of internal identifiers.
|
void |
setSAMLName(String name)
Set the SAML attribute name.
|
void |
setValueMapper(AbstractSAMLAttributeValueMapper mapper)
Get the class which converts types.
|
setIdgetIddestroy, doDestroy, initialize, isDestroyed, isInitializedclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetId@Nonnull private final org.slf4j.Logger log
@Nonnull @NonnullElements private List<String> attributeIds
@NonnullAfterInit private String theSAMLName
@NonnullAfterInit private AbstractSAMLAttributeValueMapper valueMapper
public void setAttributeIds(@Nullable@NullableElements List<String> theIds)
theIds - the list@Nonnull @NonnullElements @Unmodifiable public List<String> getAttributeIds()
public void setSAMLName(@Nullable String name)
name - the name@NonnullAfterInit public String getSAMLName()
public void setValueMapper(@Nullable AbstractSAMLAttributeValueMapper mapper)
mapper - The valueMapper to set.@NonnullAfterInit public AbstractSAMLAttributeValueMapper getValueMapper()
public void setAttributeFormat(@Nullable String format)
format - the format@Nullable public String getAttributeFormat()
protected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractIdentifiedInitializableComponentComponentInitializationExceptionprotected boolean matches(@Nonnull@NotEmpty String otherSAMLName, @Nullable String otherSAMLFormat)
Attribute.UNSPECIFIEDotherSAMLName - the name to compare againstotherSAMLFormat - the format to compare againstprotected boolean attributeMatches(@Nonnull InType attribute)
attribute - the attribute to consider@Nonnull @NonnullElements public Map<String,OutType> mapAttribute(@Nonnull InType prototype)
If the input contains values to be decoded, failure to decode any values results in a failure to map the input at all.
mapAttribute in interface AttributeMapper<InType extends Attribute,OutType extends IdPAttribute>prototype - the SAML attribute@Nonnull @NotEmpty protected String getLogPrefix()
public boolean equals(Object obj)
public int hashCode()
@Nonnull protected abstract OutType newAttribute(@Nonnull InType input, @Nonnull@NotEmpty String id)
input - the input value to inspect.id - the identifier of the new attribute.Copyright © 1999–2018 Shibboleth Consortium. All rights reserved.