Package org.opensaml.xmlsec.encryption.support

# Class ChainingEncryptedKeyResolver

java.lang.Object
org.opensaml.xmlsec.encryption.support.AbstractEncryptedKeyResolver
org.opensaml.xmlsec.encryption.support.ChainingEncryptedKeyResolver

All Implemented Interfaces:
  `EncryptedKeyResolver`

public class ChainingEncryptedKeyResolver extends AbstractEncryptedKeyResolver
An implementation of `EncryptedKeyResolver` which chains multiple other resolver implementations together, calling them in the order specified in the resolver list.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`class`
`ChainingEncryptedKeyResolver.ChainingIterable`
Implementation of `Iterable` to be returned by `ChainingEncryptedKeyResolver`.
`class`
`ChainingEncryptedKeyResolver.ChainingIterator`
Implementation of `Iterator` to be (indirectly) returned by `ChainingEncryptedKeyResolver`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final org.slf4j.Logger`
`log`
Class logger.
`private final List<EncryptedKeyResolver>`
`resolvers`
The list of resolvers which form the resolution chain.

## Constructor Summary

Constructors
Constructor
Description
`ChainingEncryptedKeyResolver(List<EncryptedKeyResolver> encKeyResolvers)`
Constructor.
`ChainingEncryptedKeyResolver(List<EncryptedKeyResolver> encKeyResolvers, String recipient)`
Deprecated.
`ChainingEncryptedKeyResolver(List<EncryptedKeyResolver> encKeyResolvers, Set<String> recipients)`
Deprecated.

## Method Summary

Modifier and Type
Method
Description
`List<EncryptedKeyResolver>`
`getResolverChain()`
Get the unmodifiable list of resolvers which form the resolution chain.
`Iterable<EncryptedKey>`
`resolve(EncryptedData encryptedData, Set<String> recipients)`
Resolve the EncryptedKey elements containing the data encryption key used to encrypt the specified EncryptedData element.

### Methods inherited from class org.opensaml.xmlsec.encryption.support.AbstractEncryptedKeyResolver

`getEffectiveRecipients, getRecipients, matchCarriedKeyName, matchDataReference, matchRecipient`

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

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

### Methods inherited from interface org.opensaml.xmlsec.encryption.support.EncryptedKeyResolver

`resolve`

## Field Details

### resolvers

@Nonnull private final List<EncryptedKeyResolver> resolvers
The list of resolvers which form the resolution chain.

### log

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

## Constructor Details

### ChainingEncryptedKeyResolver

public ChainingEncryptedKeyResolver(@Nonnull @ParameterName(name="encKeyResolvers") List<EncryptedKeyResolver> encKeyResolvers)
Constructor.

Parameters:
  `encKeyResolvers` - the chain of encrypted key resolvers

### ChainingEncryptedKeyResolver

@Deprecated public ChainingEncryptedKeyResolver(@Nonnull @ParameterName(name="encKeyResolvers") List<EncryptedKeyResolver> encKeyResolvers, @Nullable @ParameterName(name="recipients") Set<String> recipients)
Deprecated.
Constructor.

Parameters:
  `encKeyResolvers` - the chain of encrypted key resolvers
  `recipients` - the set of recipients

### ChainingEncryptedKeyResolver

@Deprecated public ChainingEncryptedKeyResolver(@Nonnull @ParameterName(name="encKeyResolvers") List<EncryptedKeyResolver> encKeyResolvers, @Nullable @ParameterName(name="recipient") String recipient)
Deprecated.
Constructor.

Parameters:
  `encKeyResolvers` - the chain of encrypted key resolvers
  `recipient` - the recipient

## Method Details

### getResolverChain

@Nonnull @Unmodifiable @NotLive public List<EncryptedKeyResolver> getResolverChain()
Get the unmodifiable list of resolvers which form the resolution chain.

Returns:
  a list of EncryptedKeyResolver instances

### resolve

@Nonnull public Iterable<EncryptedKey> resolve(@Nonnull EncryptedData encryptedData, @Nullable Set<String> recipients)
Resolve the EncryptedKey elements containing the data encryption key used to encrypt the specified EncryptedData element.

Parameters:
  `encryptedData` - the EncryptedData element context in which to resolve
  `recipients` - the recipients to use during resolution
Returns:
  an iterable of EncryptedKey elements