issrg.test.pmi
Class PMITest.TestRuleComparator

java.lang.Object
  extended by issrg.test.pmi.PMITest.TestRuleComparator
All Implemented Interfaces:
RuleComparator
Enclosing class:
PMITest

public static class PMITest.TestRuleComparator
extends java.lang.Object
implements RuleComparator


Constructor Summary
PMITest.TestRuleComparator()
           
 
Method Summary
 boolean isSufficient(AssignmentRule asRAR, AssignmentRule vaRAR, java.lang.Object assertion, java.lang.Object validated)
          This function test whether the constrained assertion is good enough
 ParsedToken[] predict(java.lang.Object assertion, java.util.Vector tokens, Entry holder)
          This function will take the vector of asserted RARs of issuer, ignore unrelevant RARs for the assertion, and sort relevant RARs according to the assertion
 void setFlag(boolean f)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PMITest.TestRuleComparator

public PMITest.TestRuleComparator()
Method Detail

predict

public ParsedToken[] predict(java.lang.Object assertion,
                             java.util.Vector tokens,
                             Entry holder)
Description copied from interface: RuleComparator
This function will take the vector of asserted RARs of issuer, ignore unrelevant RARs for the assertion, and sort relevant RARs according to the assertion

Specified by:
predict in interface RuleComparator
Parameters:
assertion - is either a credentials or a RoleAssignmentRule of the holder that needs to be validated
tokens - stores all the RARs of issuer
holder - is the holder of the assertion credentials or the RoleAssignmentRule
Returns:
an array of ParsedToken that is sorted according to the assertion.

isSufficient

public boolean isSufficient(AssignmentRule asRAR,
                            AssignmentRule vaRAR,
                            java.lang.Object assertion,
                            java.lang.Object validated)
Description copied from interface: RuleComparator
This function test whether the constrained assertion is good enough

Specified by:
isSufficient in interface RuleComparator
Parameters:
asRAR - is the RoleAssignmentRule of the issuer
vaRAR - is the validated RoleAssignmentRule of the issuer. Both of these RoleAssignmentRules may be null. If they are null, it means RoleAssignmentRule of the issuer is totally trusted and we do not care about it.
assertion - is either a credentials or a RoleAssignmentRule of the holder that needs to be validated
validated - is a validated credentials or validated RoleAssignmentRules of the holder
Returns:
a boolean value. If it is true then the issuer's RAR is good enough for validating the request and we do not need to use another issuer'RAR for validating the request. Otherwise, we need to use another RAR to validate the request. Currently, this function simply return true.

setFlag

public void setFlag(boolean f)
Specified by:
setFlag in interface RuleComparator