Class MetadataPolicyLookupStrategyFactory
- java.lang.Object
-
- net.shibboleth.oidc.metadata.cache.impl.MetadataPolicyLookupStrategyFactory
-
@ThreadSafe public class MetadataPolicyLookupStrategyFactory extends Object
A factory for building a function that resolves maps of metadata policies from the profile request context. The function uses a newly createdMetadataPolicyResolver. The resolver is backed by a newly instantiatedBatchMetadataCache. Every invocation of this factory will therefore build a new resolver and cache instance from the supplied cache specification.
-
-
Constructor Summary
Constructors Constructor Description MetadataPolicyLookupStrategyFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Function<ProfileRequestContext,Map<String,MetadataPolicy>>buildFileLoadingMetadataPolicyResolver(String resource, BatchMetadataCacheBuilderSpec<String,Map<String,MetadataPolicy>> cacheSpec, Function<ProfileRequestContext,CriteriaSet> criteriaSetLookupStrategy, String id)Build a Function that maps a profile request context to a map of metadata policies.
-
-
-
Method Detail
-
buildFileLoadingMetadataPolicyResolver
public Function<ProfileRequestContext,Map<String,MetadataPolicy>> buildFileLoadingMetadataPolicyResolver(@ParameterName(name="resource") @Nullable String resource, @ParameterName(name="cacheSpec") @Nonnull BatchMetadataCacheBuilderSpec<String,Map<String,MetadataPolicy>> cacheSpec, @ParameterName(name="criteriaSetLookupStrategy") @Nullable Function<ProfileRequestContext,CriteriaSet> criteriaSetLookupStrategy, @ParameterName(name="id") @Nonnull String id) throws ComponentInitializationException, IOException
Build a Function that maps a profile request context to a map of metadata policies. The map is resolved from a newly instantiatedMetadataPolicyResolver. The Resolver calls a newBatchMetadataCachewhich is hard-wired to use a default file loading strategy with the file resource supplied.- Parameters:
resource- the file to inject into the loading strategy. Can be null or empty.cacheSpec- the metadata cache specificationcriteriaSetLookupStrategy- the lookup strategy for the criteria set used for the metadata policy resolver.id- the identifier/name for the back-end cache created- Returns:
- the function
- Throws:
ComponentInitializationException- on error.IOException- on error.
-
-