public abstract class AbstractCriteriaFilteringCredentialResolver extends AbstractCredentialResolver
CredentialResolver
which filters the returned Credentials
based on the instances of EvaluableCredentialCriteria
which are present in the set of
criteria, or which are obtained via lookup in the EvaluableCredentialCriteriaRegistry
.Modifier and Type | Field and Description |
---|---|
private boolean |
meetAllCriteria
Flag to pass to CriteriaFilteringIterable constructor parameter 'meetAllCriteria'.
|
private boolean |
unevaluableSatisfies
Flag to pass to CriteriaFilteringIterable constructor 'unevaluableSatisfies'.
|
Constructor and Description |
---|
AbstractCriteriaFilteringCredentialResolver()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private Set<EvaluableCriteria<Credential>> |
getEvaluableCriteria(CriteriaSet criteriaSet)
Extract the evaluable credential criteria from the criteria set.
|
boolean |
isMeetAllCriteria()
Get whether all
EvaluableCredentialCriteria must be met to return
a credential, or only one or more evaluable criteria. |
boolean |
isUnevaluableSatisfies()
Get the flag which determines the processing behavior when
an
EvaluableCredentialCriteria is unable to evaluate
a Credential. |
Iterable<Credential> |
resolve(CriteriaSet criteriaSet)
Process the specified criteria and return the resulting instances the the product type
which satisfy the criteria.
|
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 |
setMeetAllCriteria(boolean flag)
Set whether all
EvaluableCredentialCriteria must be met to return
a credential, or only one or more evaluable criteria. |
void |
setUnevaluableSatisfies(boolean flag)
Set the flag which determines the processing behavior when
an
EvaluableCredentialCriteria is unable to evaluate
a Credential. |
resolveSingle
private boolean meetAllCriteria
private boolean unevaluableSatisfies
public AbstractCriteriaFilteringCredentialResolver()
public Iterable<Credential> resolve(CriteriaSet criteriaSet) throws SecurityException
resolve
in interface Resolver<Credential,CriteriaSet>
resolve
in class AbstractCredentialResolver
criteriaSet
- the criteria to evaluate or processSecurityException
- thrown if there is an error processing the specified criteriapublic boolean isMeetAllCriteria()
EvaluableCredentialCriteria
must be met to return
a credential, or only one or more evaluable criteria.
See also CriteriaFilteringIterator
.public void setMeetAllCriteria(boolean flag)
EvaluableCredentialCriteria
must be met to return
a credential, or only one or more evaluable criteria.
See also CriteriaFilteringIterator
.flag
- the new meetAllCriteria flag value.public boolean isUnevaluableSatisfies()
EvaluableCredentialCriteria
is unable to evaluate
a Credential.
See also CriteriaFilteringIterator
.public void setUnevaluableSatisfies(boolean flag)
EvaluableCredentialCriteria
is unable to evaluate
a Credential.
See also CriteriaFilteringIterator
.flag
- the new unevaluableSatisfies flag value.protected abstract Iterable<Credential> resolveFromSource(CriteriaSet criteriaSet) throws SecurityException
criteriaSet
- the set of criteria used to resolve credentials from the credential sourceSecurityException
- thrown if there is an error resolving credentials from the credential sourceprivate Set<EvaluableCriteria<Credential>> getEvaluableCriteria(CriteriaSet criteriaSet) throws SecurityException
criteriaSet
- the set of credential criteria to process.SecurityException
- thrown if there is an error obtaining an instance of EvaluableCredentialCriteria
from the EvaluableCredentialCriteriaRegistryCopyright © 1999–2017. All rights reserved.