Class CollectionCredentialResolver
- java.lang.Object
-
- org.opensaml.security.credential.impl.AbstractCredentialResolver
-
- org.opensaml.security.credential.impl.AbstractCriteriaFilteringCredentialResolver
-
- org.opensaml.security.credential.impl.CollectionCredentialResolver
-
- All Implemented Interfaces:
Resolver<Credential,CriteriaSet>,CredentialResolver
public class CollectionCredentialResolver extends AbstractCriteriaFilteringCredentialResolver
An implementation ofCredentialResolverthat uses aCollectionas the underlying credential source.The credentials returned are filtered based on any
EvaluableCredentialCriterionthat may have been present in the specified criteria set, or that are resolved by lookup in theEvaluableCredentialCriteriaRegistry.
-
-
Field Summary
Fields Modifier and Type Field Description private Collection<Credential>collectionThe collection of credentials which is the underlying store for the resolver.
-
Constructor Summary
Constructors Constructor Description CollectionCredentialResolver()Constructor.CollectionCredentialResolver(Collection<Credential> credentials)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<Credential>getCollection()Get the (modifiable) credential collection which is the backing store for the resolver.protected Iterable<Credential>resolveFromSource(CriteriaSet criteriaSet)Subclasses are required to implement this method to resolve credentials from the implementation-specific type of underlying credential source.-
Methods inherited from class org.opensaml.security.credential.impl.AbstractCriteriaFilteringCredentialResolver
isSatisfyAllPredicates, resolve, setSatisfyAllPredicates
-
Methods inherited from class org.opensaml.security.credential.impl.AbstractCredentialResolver
resolveSingle
-
-
-
-
Field Detail
-
collection
private final Collection<Credential> collection
The collection of credentials which is the underlying store for the resolver.
-
-
Constructor Detail
-
CollectionCredentialResolver
public CollectionCredentialResolver()
Constructor. AnArrayListis used as the underlying collection implementation.
-
CollectionCredentialResolver
public CollectionCredentialResolver(@Nonnull Collection<Credential> credentials)Constructor.- Parameters:
credentials- the credential collection which is the backing store for the resolver
-
-
Method Detail
-
getCollection
@Nonnull public Collection<Credential> getCollection()
Get the (modifiable) credential collection which is the backing store for the resolver.- Returns:
- the credential collection backing store
-
resolveFromSource
@Nonnull protected Iterable<Credential> resolveFromSource(@Nullable CriteriaSet criteriaSet) throws ResolverException
Subclasses are required to implement this method to resolve credentials from the implementation-specific type of underlying credential source.- Specified by:
resolveFromSourcein classAbstractCriteriaFilteringCredentialResolver- Parameters:
criteriaSet- the set of criteria used to resolve credentials from the credential source- Returns:
- an Iterable for the resolved set of credentials
- Throws:
ResolverException- thrown if there is an error resolving credentials from the credential source
-
-