Class AbstractPersistentIdDataConnector
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.attribute.resolver.AbstractResolverPlugin<Map<String,IdPAttribute>>
net.shibboleth.idp.attribute.resolver.AbstractDataConnector
net.shibboleth.idp.saml.attribute.resolver.impl.AbstractPersistentIdDataConnector
- All Implemented Interfaces:
DataConnector
,ResolverPlugin<Map<String,
,IdPAttribute>> Component
,DestructableComponent
,IdentifiableComponent
,IdentifiedComponent
,InitializableComponent
,UnmodifiableComponent
,DisposableBean
The basis of a
DataConnector
that handles persistent IDs that depend on
a source IdPAttribute
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
Do the dance with dependencies.protected void
protected Map<String,
IdPAttribute> encodeAsAttribute
(String value) Encode the provided string.Get the ID of the attribute generated by this connector.Get Information about the attribute whose first value is used when generating the computed ID.protected String
resolveSourceAttribute
(AttributeResolverWorkContext workContext) Helper function to locate the source Attribute in the dependencies.void
setGeneratedAttributeId
(String newAttributeId) Set the ID of the attribute generated by this connector.Methods inherited from class net.shibboleth.idp.attribute.resolver.AbstractDataConnector
doDataConnectorResolve, doResolve, getExportAttributes, getFailoverDataConnectorId, getLastFail, getLastSuccess, getLogPrefix, getNoRetryDelay, isExportAllAttributes, setExportAllAttributes, setExportAttributes, setFailoverDataConnectorId, setLastFail, setLastSuccess, setNoRetryDelay
Methods inherited from class net.shibboleth.idp.attribute.resolver.AbstractResolverPlugin
addDisplayInformation, doDestroy, equals, getActivationCondition, getAttributeDependencies, getDataConnectorDependencies, getProfileContextStrategy, hashCode, isPropagateResolutionExceptions, isSuppressDisplayInformation, resolve, setActivationCondition, setAttributeDependencies, setDataConnectorDependencies, setProfileContextStrategy, setPropagateResolutionExceptions, setSuppressDisplayInformation
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setId
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
getId
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, initialize, isDestroyed, isInitialized
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.shibboleth.utilities.java.support.component.DestructableComponent
destroy, isDestroyed
Methods inherited from interface org.springframework.beans.factory.DisposableBean
destroy
Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiedComponent
getId
Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
Methods inherited from interface net.shibboleth.idp.attribute.resolver.ResolverPlugin
getActivationCondition, getAttributeDependencies, getDataConnectorDependencies, isPropagateResolutionExceptions, resolve
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
generatedAttribute
ID of the attribute generated by this data connector. -
sourceInformation
Information about the dependency.
-
-
Constructor Details
-
AbstractPersistentIdDataConnector
public AbstractPersistentIdDataConnector()
-
-
Method Details
-
getSourceAttributeInformation
Get Information about the attribute whose first value is used when generating the computed ID. This is derived from the sourceID (if present) and/or the dependencies. Public purely as an aid to testing.- Returns:
- log-friend information.
-
getGeneratedAttributeId
Get the ID of the attribute generated by this connector.- Returns:
- ID of the attribute generated by this connector
-
setGeneratedAttributeId
Set the ID of the attribute generated by this connector.- Parameters:
newAttributeId
- what to set.
-
doDependencyInformation
Do the dance with dependencies. Old style ones get the sourceId added (failing if it isn't there). New style ones get their names added to the information string.- Throws:
ComponentInitializationException
- if the dependencies are not aligned correctly
-
doInitialize
- Overrides:
doInitialize
in classAbstractDataConnector
- Throws:
ComponentInitializationException
-
resolveSourceAttribute
@Nullable protected String resolveSourceAttribute(@Nonnull AttributeResolverWorkContext workContext) Helper function to locate the source Attribute in the dependencies.- Parameters:
workContext
- the context to look in- Returns:
- the value, or null in any of the failure cases.
-
encodeAsAttribute
Encode the provided string.- Parameters:
value
- the value to encode or null if that failed- Returns:
- null or the attribute.
-