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<com.google.common.base.Predicate<Credential>> |
getPredicates(net.shibboleth.utilities.java.support.resolver.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(net.shibboleth.utilities.java.support.resolver.CriteriaSet criteriaSet) |
protected abstract Iterable<Credential> |
resolveFromSource(net.shibboleth.utilities.java.support.resolver.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 net.shibboleth.utilities.java.support.resolver.CriteriaSet criteriaSet) throws net.shibboleth.utilities.java.support.resolver.ResolverException
resolve
in interface net.shibboleth.utilities.java.support.resolver.Resolver<Credential,net.shibboleth.utilities.java.support.resolver.CriteriaSet>
resolve
in class AbstractCredentialResolver
net.shibboleth.utilities.java.support.resolver.ResolverException
public boolean isSatisfyAllPredicates()
public void setSatisfyAllPredicates(boolean flag)
flag
- true if must satisfy all, false otherwise@Nonnull protected abstract Iterable<Credential> resolveFromSource(@Nullable net.shibboleth.utilities.java.support.resolver.CriteriaSet criteriaSet) throws net.shibboleth.utilities.java.support.resolver.ResolverException
criteriaSet
- the set of criteria used to resolve credentials from the credential sourcenet.shibboleth.utilities.java.support.resolver.ResolverException
- thrown if there is an error resolving credentials from the credential sourceprivate Set<com.google.common.base.Predicate<Credential>> getPredicates(@Nullable net.shibboleth.utilities.java.support.resolver.CriteriaSet criteriaSet) throws net.shibboleth.utilities.java.support.resolver.ResolverException
criteriaSet
- the set of credential criteria to process.net.shibboleth.utilities.java.support.resolver.ResolverException
- thrown if there is an error obtaining an instance of EvaluableCredentialCriterion
from the EvaluableCredentialCriteriaRegistryCopyright © 1999–2015 JBoss by Red Hat. All rights reserved.