Package net.shibboleth.idp.attribute.resolver.dc.saml.plugin.impl

# Class ChainingSelfEntityIDResolver

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.idp.attribute.resolver.dc.saml.plugin.impl.ChainingSelfEntityIDResolver

All Implemented Interfaces:
  `SelfEntityIDResolver`, `Component`, `DestructableComponent`, `InitializableComponent`

public class ChainingSelfEntityIDResolver extends AbstractInitializableComponent implements SelfEntityIDResolver
An implementation of `SelfEntityIDResolver` which implements a chain-of-responsibility pattern using a list of configured resolvers.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final org.slf4j.Logger`
`log`
Logger.
`private List<SelfEntityIDResolver>`
`resolvers`
List of chain members.

## Constructor Summary

Constructors
Constructor
Description
`ChainingSelfEntityIDResolver()`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doInitialize()`
`List<SelfEntityIDResolver>`
`getResolvers()`
Get the list of chain members.
`String`
`resolve(AttributeResolutionContext resolutionContext, Map<String,List<IdPAttributeValue>> dependencyAttributes, AttributeAuthorityDescriptor roleDescriptor)`
Resolve the self entity ID to use in query.
`void`
`setResolvers(List<SelfEntityIDResolver> chain)`
Set the list of chain members.

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### log

@Nonnull private final org.slf4j.Logger log
Logger.

### resolvers

@NonnullAfterInit private List<SelfEntityIDResolver> resolvers
List of chain members.

## Constructor Details

### ChainingSelfEntityIDResolver

public ChainingSelfEntityIDResolver()

## Method Details

### getResolvers

@NotLive @Unmodifiable @NonnullAfterInit public List<SelfEntityIDResolver> getResolvers()
Get the list of chain members.

Returns:
  the list of chain members

### setResolvers

public void setResolvers(@Nullable List<SelfEntityIDResolver> chain)
Set the list of chain members.

Parameters:
  `chain` - the chain of members

### doInitialize

protected void doInitialize() throws ComponentInitializationException

Overrides:
  `doInitialize` in class `AbstractInitializableComponent`
Throws:
  `ComponentInitializationException`

### resolve

@Nullable public String resolve(@Nonnull AttributeResolutionContext resolutionContext, @Nonnull Map<String,List<IdPAttributeValue>> dependencyAttributes, @Nonnull AttributeAuthorityDescriptor roleDescriptor) throws ResolutionException
Resolve the self entity ID to use in query.

Specified by:
  `resolve` in interface `SelfEntityIDResolver`
Parameters:
  `resolutionContext` - the attribute resolution context in effect for the query
  `dependencyAttributes` - the dependency attributes in effect for the query
  `roleDescriptor` - the attribute authority role descriptor for the query
Returns:
  the entity ID, may be null
Throws:
  `ResolutionException` - if there is a fatal error during processing