@ThreadSafe public abstract class AbstractAttributeDefinition extends AbstractResolverPlugin<IdPAttribute> implements AttributeDefinition
| Modifier and Type | Field and Description |
|---|---|
private boolean |
dependencyOnly
Whether this attribute definition is only a dependency and thus its values should never be released.
|
private Map<Locale,String> |
displayDescriptions
Localized human readable description of attribute.
|
private Map<Locale,String> |
displayNames
Localized human intelligible attribute name.
|
private Set<AttributeEncoder<?>> |
encoders
Attribute encoders associated with this definition.
|
private org.slf4j.Logger |
log
Class logger.
|
private String |
logPrefix
cache for the log prefix - to save multiple recalculations.
|
private String |
sourceAttributeID
The sourceAttributeID attributeName.
|
| Constructor and Description |
|---|
AbstractAttributeDefinition() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract IdPAttribute |
doAttributeDefinitionResolve(AttributeResolutionContext resolutionContext,
AttributeResolverWorkContext workContext)
Creates and populates the values for the resolved attribute.
|
protected void |
doInitialize() |
protected IdPAttribute |
doResolve(AttributeResolutionContext resolutionContext,
AttributeResolverWorkContext workContext)
Perform the actual resolution.
|
Set<AttributeEncoder<?>> |
getAttributeEncoders()
Gets the unmodifiable encoders used to encode the values of this attribute in to protocol specific formats.
|
Map<Locale,String> |
getDisplayDescriptions()
Gets the localized human readable descriptions of attribute.
|
Map<Locale,String> |
getDisplayNames()
Gets the localized human readable names of the attribute.
|
protected String |
getLogPrefix()
return a string which is to be prepended to all log messages.
|
String |
getSourceAttributeId()
Deprecated.
- only used for old style dependencies
|
boolean |
isDependencyOnly()
Gets whether this attribute definition is only a dependency and thus its values should never be released outside
the resolver.
|
void |
setAttributeEncoders(Set<AttributeEncoder<?>> attributeEncoders)
Sets the encoders used to encode the values of this attribute in to protocol specific formats.
|
void |
setDependencyOnly(boolean isDependencyOnly)
Sets whether this attribute definition is only a dependency and thus its values should never be released outside
the resolver.
|
void |
setDisplayDescriptions(Map<Locale,String> descriptions)
Sets the localized human readable descriptions of attribute.
|
void |
setDisplayNames(Map<Locale,String> names)
Sets the localized human readable names of the attribute.
|
void |
setSourceAttributeId(String attributeId)
Sets the source attribute id.
|
doDestroy, equals, 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
private boolean dependencyOnly
@Nonnull private Set<AttributeEncoder<?>> encoders
@Nonnull private Map<Locale,String> displayNames
@Nonnull private Map<Locale,String> displayDescriptions
public boolean isDependencyOnly()
isDependencyOnly in interface AttributeDefinitionpublic void setDependencyOnly(boolean isDependencyOnly)
isDependencyOnly - whether this attribute definition is only a dependency@Nonnull @NonnullElements @Unmodifiable public Map<Locale,String> getDisplayDescriptions()
getDisplayDescriptions in interface AttributeDefinitionpublic void setDisplayDescriptions(@Nullable@NullableElements Map<Locale,String> descriptions)
descriptions - localized human readable descriptions of attribute@Nonnull @NonnullElements @Unmodifiable public Map<Locale,String> getDisplayNames()
getDisplayNames in interface AttributeDefinitionpublic void setDisplayNames(@Nullable@NullableElements Map<Locale,String> names)
names - localized human readable names of the attribute@Nonnull @NonnullElements @Unmodifiable public Set<AttributeEncoder<?>> getAttributeEncoders()
getAttributeEncoders in interface AttributeDefinitionpublic void setAttributeEncoders(@Nullable@NullableElements Set<AttributeEncoder<?>> attributeEncoders)
attributeEncoders - encoders used to encode the values of this attribute in to protocol specific formats@Deprecated public String getSourceAttributeId()
public void setSourceAttributeId(String attributeId)
attributeId - the source attribute idprotected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractResolverPlugin<IdPAttribute>ComponentInitializationException@Nullable protected IdPAttribute doResolve(@Nonnull AttributeResolutionContext resolutionContext, @Nonnull AttributeResolverWorkContext workContext) throws ResolutionException
doAttributeDefinitionResolve(AttributeResolutionContext, AttributeResolverWorkContext) method.
Afterwards, if null was not returned, this method will attach the registered display names, descriptions,
and encoders to the resultant attribute.doResolve in class AbstractResolverPlugin<IdPAttribute>resolutionContext - current resolution contextworkContext - child context where intermediate results are trackedResolutionException - thrown if there is a problem resolving the attributesAbstractResolverPlugin.resolve(AttributeResolutionContext)@Nullable protected abstract IdPAttribute doAttributeDefinitionResolve(@Nonnull AttributeResolutionContext resolutionContext, @Nonnull AttributeResolverWorkContext workContext) throws ResolutionException
resolutionContext - current attribute resolution contextworkContext - current resolver work contextResolutionException - thrown if there is a problem resolving and creating the attributeCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.