org.opensaml.xml.security.credential.criteria
Class EvaluableUsageCredentialCriteria

java.lang.Object
  extended by org.opensaml.xml.security.credential.criteria.EvaluableUsageCredentialCriteria
All Implemented Interfaces:
EvaluableCredentialCriteria, Criteria, EvaluableCriteria<Credential>

public class EvaluableUsageCredentialCriteria
extends Object
implements EvaluableCredentialCriteria

Instance of evaluable credential criteria for evaluating whether a credential contains a particular usage specifier.


Constructor Summary
EvaluableUsageCredentialCriteria(UsageCriteria criteria)
          Constructor.
EvaluableUsageCredentialCriteria(UsageType newUsage)
          Constructor.
 
Method Summary
 Boolean evaluate(Credential target)
          Evaluate the target.
protected  boolean matchUsage(UsageType credentialUsage, UsageType criteriaUsage)
          Match usage enum type values from credential and criteria.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvaluableUsageCredentialCriteria

public EvaluableUsageCredentialCriteria(UsageCriteria criteria)
Constructor.

Parameters:
criteria - the criteria which is the basis for evaluation

EvaluableUsageCredentialCriteria

public EvaluableUsageCredentialCriteria(UsageType newUsage)
Constructor.

Parameters:
newUsage - the criteria value which is the basis for evaluation
Method Detail

evaluate

public Boolean evaluate(Credential target)
Evaluate the target. The result of evaluation is one of the following values:

Specified by:
evaluate in interface EvaluableCriteria<Credential>
Parameters:
target - the object to be evaluated
Returns:
the result of evaluation

matchUsage

protected boolean matchUsage(UsageType credentialUsage,
                             UsageType criteriaUsage)
Match usage enum type values from credential and criteria.

Parameters:
credentialUsage - the usage value from the credential
criteriaUsage - the usage value from the criteria
Returns:
true if the two usage specifiers match for purposes of resolving credentials, false otherwise


Copyright © 2006-2011 Internet2. All Rights Reserved.