@ThreadSafe public class MappedAttributeDefinition extends AbstractAttributeDefinition
Collection of @link{ValueMap}s) and
if it matches then the appropriate value(s) is/are substituted. Non matches are either passed through or are removed
depending on the setting 'passThru'.| Modifier and Type | Field and Description |
|---|---|
private StringAttributeValue |
defaultValue
Default return value.
|
private org.slf4j.Logger |
log
Class logger.
|
private boolean |
passThru
Whether the definition passes thru unmatched values.
|
private Set<ValueMap> |
valueMaps
Value maps.
|
| Constructor and Description |
|---|
MappedAttributeDefinition() |
| Modifier and Type | Method and Description |
|---|---|
protected IdPAttribute |
doAttributeDefinitionResolve(AttributeResolutionContext resolutionContext,
AttributeResolverWorkContext workContext) |
protected void |
doDestroy() |
protected void |
doInitialize() |
StringAttributeValue |
getDefaultAttributeValue()
Gets the default return value.
|
String |
getDefaultValue()
Gets the default return value.
|
Collection<ValueMap> |
getValueMaps()
Gets the functions used to map an input value to an output value.
|
boolean |
isPassThru()
Gets whether the definition passes unmatched values through.
|
protected List<StringAttributeValue> |
mapValue(String value)
Maps the value from a dependency in to the value(s) for this attribute.
|
void |
setDefaultValue(String newDefaultValue)
Sets the default return value.
|
void |
setPassThru(boolean newPassThru)
Sets whether the definition passes unmatched values through.
|
void |
setValueMaps(Collection<ValueMap> mappings)
Sets the functions used to map an input value to an output value.
|
doResolve, getAttributeEncoders, getDisplayDescriptions, getDisplayNames, getLogPrefix, getSourceAttributeId, isDependencyOnly, setAttributeEncoders, setDependencyOnly, setDisplayDescriptions, setDisplayNames, setSourceAttributeIdequals, getActivationCondition, getDependencies, getProfileContextStrategy, hashCode, isPropagateResolutionExceptions, resolve, setActivationCondition, setDependencies, setProfileContextStrategy, setPropagateResolutionExceptionssetIdgetIddestroy, initialize, isDestroyed, isInitializedclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetActivationCondition, getDependencies, isPropagateResolutionExceptions, resolveinitialize, isInitializeddestroy, isDestroyedgetId@Nonnull private final org.slf4j.Logger log
@Nonnull @NonnullElements private Set<ValueMap> valueMaps
private boolean passThru
@Nullable private StringAttributeValue defaultValue
@Nonnull @NonnullElements @Unmodifiable public Collection<ValueMap> getValueMaps()
public void setValueMaps(@Nullable@NullableElements Collection<ValueMap> mappings)
mappings - functions used to map an input value to an output value@Nullable public StringAttributeValue getDefaultAttributeValue()
@Nullable public String getDefaultValue()
public void setDefaultValue(@Nullable String newDefaultValue)
newDefaultValue - the default return valuepublic boolean isPassThru()
public void setPassThru(boolean newPassThru)
newPassThru - whether the definition passes unmatched values unchanged or suppresses them.protected List<StringAttributeValue> mapValue(@Nullable String value)
value - the value from the dependency@Nullable protected IdPAttribute doAttributeDefinitionResolve(@Nonnull AttributeResolutionContext resolutionContext, @Nonnull AttributeResolverWorkContext workContext) throws ResolutionException
doAttributeDefinitionResolve in class AbstractAttributeDefinitionResolutionExceptionprotected void doDestroy()
doDestroy in class AbstractResolverPlugin<IdPAttribute>protected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractAttributeDefinitionComponentInitializationExceptionCopyright © 1999–2017 Shibboleth Consortium. All rights reserved.