Class FunctionDrivenMetadataIndex
java.lang.Object
org.opensaml.saml.metadata.resolver.index.impl.FunctionDrivenMetadataIndex
- All Implemented Interfaces:
MetadataIndex
Implementation of
MetadataIndex which is based on injected strategy functions.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Function<CriteriaSet,Set<MetadataIndexKey>> Function for producing index keys from a CriteriaSet.private Function<EntityDescriptor,Set<MetadataIndexKey>> Function for producing index keys from an EntityDescriptor. -
Constructor Summary
ConstructorsConstructorDescriptionFunctionDrivenMetadataIndex(Function<EntityDescriptor, Set<MetadataIndexKey>> descriptorFunction, Function<CriteriaSet, Set<MetadataIndexKey>> criteriaFunction) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongenerateKeys(CriteriaSet criteriaSet) Generate a set of one or moreMetadataIndexKeyinstances based on the inputCriteriaSet.generateKeys(EntityDescriptor descriptor) Generate a set of one or moreMetadataIndexKeyinstances based on the inputEntityDescriptor.
-
Field Details
-
criteriaStrategy
Function for producing index keys from a CriteriaSet. -
descriptorStrategy
Function for producing index keys from an EntityDescriptor.
-
-
Constructor Details
-
FunctionDrivenMetadataIndex
public FunctionDrivenMetadataIndex(@Nonnull Function<EntityDescriptor, Set<MetadataIndexKey>> descriptorFunction, @Nonnull Function<CriteriaSet, Set<MetadataIndexKey>> criteriaFunction) Constructor.- Parameters:
descriptorFunction- function for producing index keys from an EntityDescriptorcriteriaFunction- function for producing index keys from a CriteriaSet
-
-
Method Details
-
generateKeys
@Nullable @Unmodifiable @NotLive public Set<MetadataIndexKey> generateKeys(@Nonnull EntityDescriptor descriptor) Generate a set of one or moreMetadataIndexKeyinstances based on the inputEntityDescriptor.These index key instances reflect the type of indexing performed and "understood" by the implementation, and as such should complement the
MetadataIndexKeytypes generated for descriptor lookup viaMetadataIndex.generateKeys(CriteriaSet).- Specified by:
generateKeysin interfaceMetadataIndex- 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.