Package org.opensaml.saml.metadata.resolver.impl

# Class DefaultLocalDynamicSourceKeyGenerator

java.lang.Object
org.opensaml.saml.metadata.resolver.impl.EntityIDDigestGenerator
org.opensaml.saml.metadata.resolver.impl.DefaultLocalDynamicSourceKeyGenerator

All Implemented Interfaces:
  `Function<CriteriaSet,String>`

public class DefaultLocalDynamicSourceKeyGenerator extends EntityIDDigestGenerator
A default implementation of `EntityIDDigestGenerator` for use as a source key generator with `LocalDynamicMetadataResolver`.

This is a simple subclass of `EntityIDDigestGenerator` which defaults in the `StringDigester` to use lower-case hex encoding of the SHA-1 digest of the entity ID from `EntityIdCriterion`. Since this is the same representation typically used for the SAML SourceID used in artifacts, this implementation adds in support for understanding `ArtifactCriterion` carrying a `SAMLSourceIDArtifact`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private static final BaseEncoding`
`HEX`
Hex encoder.

## Constructor Summary

Constructors
Constructor
Description
`DefaultLocalDynamicSourceKeyGenerator()`
Constructor.
`DefaultLocalDynamicSourceKeyGenerator(String keyPrefix, String keySuffix, String valueSeparator)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`String`
`apply(CriteriaSet criteria)`

### Methods inherited from class org.opensaml.saml.metadata.resolver.impl.EntityIDDigestGenerator

`buildKey`

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

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

### Methods inherited from interface java.util.function.Function

`andThen, compose`

## Field Details

### HEX

@Nonnull private static final BaseEncoding HEX
Hex encoder.

## Constructor Details

### DefaultLocalDynamicSourceKeyGenerator

public DefaultLocalDynamicSourceKeyGenerator()
Constructor.

### DefaultLocalDynamicSourceKeyGenerator

public DefaultLocalDynamicSourceKeyGenerator(@Nullable String keyPrefix, @Nullable String keySuffix, @Nullable String valueSeparator)
Constructor.

Parameters:
  `keyPrefix` - optional prefix for the digested value
  `keySuffix` - optional suffix for the digested value
  `valueSeparator` - optional separator between the prefix, digest and suffix values

## Method Details

### apply

@Nullable public String apply(@Nullable CriteriaSet criteria)

Specified by:
  `apply` in interface `Function<CriteriaSet,String>`
Overrides:
  `apply` in class `EntityIDDigestGenerator`