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

# Class SAMLArtifactMetadataIndex

java.lang.Object
org.opensaml.saml.metadata.resolver.index.impl.SAMLArtifactMetadataIndex

All Implemented Interfaces:
  `MetadataIndex`

public class SAMLArtifactMetadataIndex extends Object implements MetadataIndex
An implementation of `MetadataIndex` which indexes entities by their artifact SourceID values.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`protected static class`
`SAMLArtifactMetadataIndex.ArtifactSourceIDMetadataIndexKey`
An implementation of `MetadataIndexKey` representing a SAML artifact SourceID value.
`protected static class`
`SAMLArtifactMetadataIndex.ArtifactSourceLocationMetadataIndexKey`
An implementation of `MetadataIndexKey` representing a SAML artifact source location value.
`static class`
`SAMLArtifactMetadataIndex.EntityIDToSHA1SourceIDIndexingFunction`
Entity descriptor indexing function which produces a single `SAMLArtifactMetadataIndex.ArtifactSourceIDMetadataIndexKey` based on the SHA-1 digest of the UTF-8 encoding of the value of `EntityDescriptor.getEntityID()`.
`static class`
`SAMLArtifactMetadataIndex.SourceIDExtensionIndexingFunction`
Descriptor indexing function which produces 0 to many `SAMLArtifactMetadataIndex.ArtifactSourceIDMetadataIndexKey` instances based on the values of all `SourceID` extension elements present in the descriptor's `RoleDescriptor`s.
`static class`
`SAMLArtifactMetadataIndex.SourceLocationIndexingFunction`
Descriptor indexing function which produces 0 to many `SAMLArtifactMetadataIndex.ArtifactSourceLocationMetadataIndexKey` instances based on the location values of all `ArtifactResolutionService` elements present in the descriptor's `RoleDescriptor`s.

## Field Summary

Fields
Modifier and Type
Field
Description
`private List<Function<EntityDescriptor,Set<MetadataIndexKey>>>`
`indexingFunctions`
Indexing function instance to use.

## Constructor Summary

Constructors
Constructor
Description
`SAMLArtifactMetadataIndex()`
Constructor.
`SAMLArtifactMetadataIndex(List<Function<EntityDescriptor,Set<MetadataIndexKey>>> descriptorIndexingFunctions)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Set<MetadataIndexKey>`
`generateKeys(CriteriaSet criteriaSet)`
Generate a set of one or more `MetadataIndexKey` instances based on the input `CriteriaSet`.
`Set<MetadataIndexKey>`
`generateKeys(EntityDescriptor descriptor)`
Generate a set of one or more `MetadataIndexKey` instances based on the input `EntityDescriptor`.

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

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

## Field Details

### indexingFunctions

@Nonnull private List<Function<EntityDescriptor,Set<MetadataIndexKey>>> indexingFunctions
Indexing function instance to use.

## Constructor Details

### SAMLArtifactMetadataIndex

public SAMLArtifactMetadataIndex()
Constructor.

The descriptor indexing functions will be:

- `SAMLArtifactMetadataIndex.EntityIDToSHA1SourceIDIndexingFunction`
- `SAMLArtifactMetadataIndex.SourceIDExtensionIndexingFunction`
- `SAMLArtifactMetadataIndex.SourceLocationIndexingFunction`

### SAMLArtifactMetadataIndex

public SAMLArtifactMetadataIndex(@Nonnull List<Function<EntityDescriptor,Set<MetadataIndexKey>>> descriptorIndexingFunctions)
Constructor.

Parameters:
  `descriptorIndexingFunctions` - the functions used to produce index keys from an entity descriptor

## Method Details

### generateKeys

@Nullable @Unmodifiable @NotLive public Set<MetadataIndexKey> generateKeys(@Nonnull EntityDescriptor descriptor)
Generate a set of one or more `MetadataIndexKey` instances based on the input `EntityDescriptor`.

These index key instances reflect the type of indexing performed and "understood" by the implementation, and as such should complement the `MetadataIndexKey` types generated for descriptor lookup via `MetadataIndex.generateKeys(CriteriaSet)`.

Specified by:
  `generateKeys` in interface `MetadataIndex`
Parameters:
  `descriptor` - the entity descriptor set to process
Returns:
  the set of index keys generated from the criteria. May be null or empty, but will not contain null elements.

### generateKeys

@Nullable @Unmodifiable @NotLive public Set<MetadataIndexKey> generateKeys(@Nullable CriteriaSet criteriaSet)
Generate a set of one or more `MetadataIndexKey` instances based on the input `CriteriaSet`.

These index key instances reflect the type of indexing performed and "understood" by the implementation, and as such should complement the `MetadataIndexKey` types generated for descriptor indexing via `MetadataIndex.generateKeys(EntityDescriptor)`.

Specified by:
  `generateKeys` in interface `MetadataIndex`
Parameters:
  `criteriaSet` - the criteria set to process
Returns:
  the set of index keys generated from the criteria. May be null or empty, but will not contain null elements.