org.opensaml.xml.security.credential
Class AbstractCriteriaFilteringCredentialResolver

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

public abstract class AbstractCriteriaFilteringCredentialResolver
extends AbstractCredentialResolver

An abstract implementation of 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.


Constructor Summary
AbstractCriteriaFilteringCredentialResolver()
          Constructor.
 
Method Summary
 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.
 java.lang.Iterable<Credential> resolve(CriteriaSet criteriaSet)
          Process the specified criteria and return the resulting instances the the product type which satisfy the criteria.
protected abstract  java.lang.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.
 
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

AbstractCriteriaFilteringCredentialResolver

public AbstractCriteriaFilteringCredentialResolver()
Constructor.

Method Detail

resolve

public java.lang.Iterable<Credential> resolve(CriteriaSet criteriaSet)
                                       throws SecurityException
Process the specified criteria and return the resulting instances the the product type which satisfy the criteria.

Specified by:
resolve in interface Resolver<Credential,CriteriaSet>
Specified by:
resolve in class AbstractCredentialResolver
Parameters:
criteriaSet - the criteria to evaluate or process
Returns:
instances which satisfy the criteria
Throws:
SecurityException - thrown if there is an error processing the specified criteria

isMeetAllCriteria

public boolean isMeetAllCriteria()
Get whether all EvaluableCredentialCriteria must be met to return a credential, or only one or more evaluable criteria. See also CriteriaFilteringIterator.

Returns:
Returns the meetAllCriteria flag.

setMeetAllCriteria

public void setMeetAllCriteria(boolean flag)
Set whether all EvaluableCredentialCriteria must be met to return a credential, or only one or more evaluable criteria. See also CriteriaFilteringIterator.

Parameters:
flag - the new meetAllCriteria flag value.

isUnevaluableSatisfies

public boolean isUnevaluableSatisfies()
Get the flag which determines the processing behavior when an EvaluableCredentialCriteria is unable to evaluate a Credential. See also CriteriaFilteringIterator.

Returns:
Returns the unevaluableSatisfies flag.

setUnevaluableSatisfies

public void setUnevaluableSatisfies(boolean flag)
Set the flag which determines the processing behavior when an EvaluableCredentialCriteria is unable to evaluate a Credential. See also CriteriaFilteringIterator.

Parameters:
flag - the new unevaluableSatisfies flag value.

resolveFromSource

protected abstract java.lang.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.

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.