org.opensaml.xml.security.credential
Class CollectionCredentialResolver

java.lang.Object
  extended by org.opensaml.xml.security.credential.AbstractCredentialResolver
      extended by org.opensaml.xml.security.credential.AbstractCriteriaFilteringCredentialResolver
          extended by org.opensaml.xml.security.credential.CollectionCredentialResolver
All Implemented Interfaces:
CredentialResolver, Resolver<Credential,CriteriaSet>
Direct Known Subclasses:
CollectionKeyInfoCredentialResolver

public class CollectionCredentialResolver
extends AbstractCriteriaFilteringCredentialResolver

An implementation of CredentialResolver which uses a Collection as the underlying credential source.

The credentials returned are filtered based on any EvaluableCredentialCriteria which may have been present in the specified criteria set, or which are resolved by lookup in the EvaluableCredentialCriteriaRegistry.


Constructor Summary
CollectionCredentialResolver()
          Constructor.
CollectionCredentialResolver(Collection<Credential> credentials)
          Constructor.
 
Method Summary
 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.xml.security.credential.AbstractCriteriaFilteringCredentialResolver
isMeetAllCriteria, isUnevaluableSatisfies, resolve, setMeetAllCriteria, setUnevaluableSatisfies
 
Methods inherited from class org.opensaml.xml.security.credential.AbstractCredentialResolver
resolveSingle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionCredentialResolver

public CollectionCredentialResolver()
Constructor. An ArrayList is used as the underlying collection implementation.


CollectionCredentialResolver

public CollectionCredentialResolver(Collection<Credential> credentials)
Constructor.

Parameters:
credentials - the credential collection which is the backing store for the resolver
Method Detail

getCollection

public Collection<Credential> getCollection()
Get the (modifiable) credential collection which is the backing store for the resolver.

Returns:
the credential collection backing store

resolveFromSource

protected Iterable<Credential> resolveFromSource(CriteriaSet criteriaSet)
                                          throws SecurityException
Subclasses are required to implement this method to resolve credentials from the implementation-specific type of underlying credential source.

Specified by:
resolveFromSource in class AbstractCriteriaFilteringCredentialResolver
Parameters:
criteriaSet - the set of criteria used to resolve credentials from the credential source
Returns:
an Iterable for the resolved set of credentials
Throws:
SecurityException - thrown if there is an error resolving credentials from the credential source


Copyright © 2006-2011 Internet2. All Rights Reserved.