Package org.opensaml.xmlsec.impl
Class AbstractSecurityParametersResolver<ProductType>
java.lang.Object
org.opensaml.xmlsec.impl.AbstractSecurityParametersResolver<ProductType>
- Type Parameters:
ProductType
- the type of output produced by the resolver
- All Implemented Interfaces:
Resolver<ProductType,
CriteriaSet>
- Direct Known Subclasses:
BasicDecryptionParametersResolver
,BasicEncryptionParametersResolver
,BasicSignatureSigningParametersResolver
,BasicSignatureValidationParametersResolver
public abstract class AbstractSecurityParametersResolver<ProductType>
extends Object
implements Resolver<ProductType,CriteriaSet>
Abstract base class for security parameters resolvers which supplies commonly used functionality for reuse.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected KeyInfoGenerator
lookupKeyInfoGenerator
(Credential credential, NamedKeyInfoGeneratorManager manager, String keyInfoProfileName) Resolve aKeyInfoGenerator
instance based on aNamedKeyInfoGeneratorManager
,Credential
and optional KeyInfo generation profile name.protected void
resolveAndPopulateIncludesExcludes
(AlgorithmPolicyParameters params, CriteriaSet criteria, List<? extends AlgorithmPolicyConfiguration> configs) Resolve and populate the effective includes or excludes on the supplied instance ofAlgorithmPolicyParameters
.protected Collection<String>
resolveEffectiveExcludes
(CriteriaSet criteria, List<? extends AlgorithmPolicyConfiguration> configs) Resolve and return the effective algorithm excludes based on supplied configuration.protected Collection<String>
resolveEffectiveIncludes
(CriteriaSet criteria, List<? extends AlgorithmPolicyConfiguration> configs) Resolve and return the effective algorithm includes based on supplied configuration.protected AlgorithmPolicyConfiguration.Precedence
resolveIncludeExcludePrecedence
(CriteriaSet criteria, List<? extends AlgorithmPolicyConfiguration> configs) Resolve and return the effective algorithm include/exclude precedence based on supplied configuration.resolveIncludeExcludePredicate
(CriteriaSet criteria, List<? extends AlgorithmPolicyConfiguration> configs) Get a predicate which operates according to the effective configured include and exclude policy.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.shibboleth.utilities.java.support.resolver.Resolver
resolve, resolveSingle
-
Field Details
-
log
private org.slf4j.Logger logLogger.
-
-
Constructor Details
-
AbstractSecurityParametersResolver
public AbstractSecurityParametersResolver()
-
-
Method Details
-
lookupKeyInfoGenerator
@Nullable protected KeyInfoGenerator lookupKeyInfoGenerator(@Nonnull Credential credential, @Nullable NamedKeyInfoGeneratorManager manager, @Nullable String keyInfoProfileName) Resolve aKeyInfoGenerator
instance based on aNamedKeyInfoGeneratorManager
,Credential
and optional KeyInfo generation profile name.- Parameters:
credential
- the credential for which a KeyInfo generator is neededmanager
- the named KeyInfo generator manager instancekeyInfoProfileName
- KeyInfo generation profile name- Returns:
- the resolved KeyInfo generator instance, or null
-
resolveAndPopulateIncludesExcludes
protected void resolveAndPopulateIncludesExcludes(@Nonnull AlgorithmPolicyParameters params, @Nonnull CriteriaSet criteria, @Nonnull @NonnullElements @NotEmpty List<? extends AlgorithmPolicyConfiguration> configs) Resolve and populate the effective includes or excludes on the supplied instance ofAlgorithmPolicyParameters
.- Parameters:
params
- the include/exclude parameters instance to populatecriteria
- the input criteria being evaluatedconfigs
- the effective list ofAlgorithmPolicyConfiguration
instances to consider
-
resolveIncludeExcludePredicate
@Nonnull protected Predicate<String> resolveIncludeExcludePredicate(@Nonnull CriteriaSet criteria, @Nonnull @NonnullElements @NotEmpty List<? extends AlgorithmPolicyConfiguration> configs) Get a predicate which operates according to the effective configured include and exclude policy.- Parameters:
criteria
- the input criteria being evaluatedconfigs
- the effective list ofAlgorithmPolicyConfiguration
instances to consider- Returns:
- a predicate instance which operates accordingly to the effective include and exclude policy
-
resolveEffectiveExcludes
@Nonnull protected Collection<String> resolveEffectiveExcludes(@Nonnull CriteriaSet criteria, @Nonnull @NonnullElements @NotEmpty List<? extends AlgorithmPolicyConfiguration> configs) Resolve and return the effective algorithm excludes based on supplied configuration.- Parameters:
criteria
- the input criteria being evaluatedconfigs
- the effective list ofAlgorithmPolicyConfiguration
instances to consider- Returns:
- the effective algorithm excludes
-
resolveEffectiveIncludes
@Nonnull protected Collection<String> resolveEffectiveIncludes(@Nonnull CriteriaSet criteria, @Nonnull @NonnullElements @NotEmpty List<? extends AlgorithmPolicyConfiguration> configs) Resolve and return the effective algorithm includes based on supplied configuration.- Parameters:
criteria
- the input criteria being evaluatedconfigs
- the effective list ofAlgorithmPolicyConfiguration
instances to consider- Returns:
- the effective algorithm includes
-
resolveIncludeExcludePrecedence
@Nonnull protected AlgorithmPolicyConfiguration.Precedence resolveIncludeExcludePrecedence(@Nonnull CriteriaSet criteria, @Nonnull @NonnullElements @NotEmpty List<? extends AlgorithmPolicyConfiguration> configs) Resolve and return the effective algorithm include/exclude precedence based on supplied configuration.- Parameters:
criteria
- the input criteria being evaluatedconfigs
- the effective list ofAlgorithmPolicyConfiguration
instances to consider- Returns:
- the effective algorithm include/exclude precedence
-