public abstract class AbstractCriteriaFilteringCredentialResolver extends AbstractCredentialResolver
CredentialResolver
that
filters the returned Credentials based on the instances of Predicate
which are present in the set of criteria as instances of EvaluableCredentialCriterion
,
or which are obtained via lookup in the EvaluableCredentialCriteriaRegistry
.Modifier and Type | Field and Description |
---|---|
private boolean |
satisfyAllPredicates
Flag which determines whether predicates used in filtering are connected by
a logical 'AND' or by logical 'OR'.
|
Constructor and Description |
---|
AbstractCriteriaFilteringCredentialResolver()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private Set<Predicate<Credential>> |
getPredicates(CriteriaSet criteriaSet)
Construct a set of credential predicates based on the criteria set.
|
boolean |
isSatisfyAllPredicates()
Get the flag indicating whether resolved credentials must satisfy all predicates
(i.e.
|
Iterable<Credential> |
resolve(CriteriaSet criteriaSet) |
protected abstract Iterable<Credential> |
resolveFromSource(CriteriaSet criteriaSet)
Subclasses are required to implement this method to resolve credentials from the
implementation-specific type of underlying credential source.
|
void |
setSatisfyAllPredicates(boolean flag)
Set the flag indicating whether resolved credentials must satisfy all predicates
(i.e.
|
resolveSingle
private boolean satisfyAllPredicates
public AbstractCriteriaFilteringCredentialResolver()
@Nonnull public Iterable<Credential> resolve(@Nullable CriteriaSet criteriaSet) throws ResolverException
resolve
in interface Resolver<Credential,CriteriaSet>
resolve
in class AbstractCredentialResolver
ResolverException
public boolean isSatisfyAllPredicates()
public void setSatisfyAllPredicates(boolean flag)
flag
- true if must satisfy all, false otherwise@Nonnull protected abstract Iterable<Credential> resolveFromSource(@Nullable CriteriaSet criteriaSet) throws ResolverException
criteriaSet
- the set of criteria used to resolve credentials from the credential sourceResolverException
- thrown if there is an error resolving credentials from the credential sourceprivate Set<Predicate<Credential>> getPredicates(@Nullable CriteriaSet criteriaSet) throws ResolverException
criteriaSet
- the set of credential criteria to process.ResolverException
- thrown if there is an error obtaining an instance of EvaluableCredentialCriterion
from the EvaluableCredentialCriteriaRegistryCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.